Touchscreen input not working when using a VirtualBox

I’m using Ubuntu in a Virtual Box (host is a Windows Machine).

The application I am developing will be used on an external touch screen (currently hooked up to the Host). This will eventually be an embedded application but I need to develop it using this virtualbox in the mean time.

I can use the touch input in the VM box. Here is the output of the evtest.

I have USE_EVDEV enabled and the /dev/input/event5 which gave me those results above.

Here is how I call the touchpad setup in my code. I’m using lvgl 6.0.

// enable event input
evdev_init();

// get an input device like mouse
lv_indev_drv_t indev_drv;
lv_indev_drv_init(&indev_drv);
indev_drv.type = LV_INDEV_TYPE_POINTER;
indev_drv.read_cb = evdev_read;
lv_indev_drv_register(&indev_drv);

Ideas? I’ve tried different /dev/input but none of them work.

I find it interesting that your screen is 16,000 pixels wide. :wink: Clearly something is wrong with the way the coordinates are being measured.

What is the output of the ABS_X and ABS_Y lines when you touch the upper left corner of the screen?

Here are the four corners (upper left, upper right, lower left, lower right) as best as I could get them. I have my Host extended over 3 displays (with this display being #3)