-
-
Notifications
You must be signed in to change notification settings - Fork 171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
extended input device support #173
Comments
Best links from #1131#comment:5 and more:
|
More information:
|
2016-06-03 11:51:49: antoine commented
|
FWIW: wmi exposes input device information:
For more information on device fields, see WMI Tasks: Computer Hardware |
xorg ML response from input maintainer Peter Hutterer: emit "smooth scrolling/pixel perfect" events: one option is to emulate a trackstick-like device and send a middle button mouse press before sending scroll events (and relative events otherwise). In libinput this will scroll automatically, in evdev it's a configuration script away ( The other option is to emulate a touchpad and forward the touches as-is. Then you let userspace take care of converting 2 finger to scroll, etc. |
2017-02-24 04:17:20: antoine uploaded file
|
New thread about the same issue: Virtual Touch Events for XTEST. |
This will also help handling javascript wheel events better, see #1424#comment:3 |
See events client side: monitoring events (keyboard, mouse) in X using:
|
2017-05-03 07:27:36: antoine uploaded file
|
2017-05-03 17:25:18: antoine uploaded file
|
More links:
Maybe we want to ensure that the keyboard layout is set per device and does not change: New udev property: XKB_FIXED_LAYOUT for keyboards that must not change layouts (but how do we set this without udev?) Preparatory work in r15790 + r15792. The patch attached allows us to receive XINPUT2 events: raw touch, keyboard and pointer events.
|
More useful pointers:
|
2017-05-04 11:58:01: antoine uploaded file
|
This bug may prevent us from using synthetic events: XSendEvent() fails on XInput2 events Other problems:
|
2017-05-04 18:01:03: antoine uploaded file
|
2017-05-05 17:30:04: antoine uploaded file
|
New issues:
|
2017-05-06 17:59:30: antoine uploaded file
|
With the updated patch, we get the correct events for pointer motion and clicks (keyboard events remain to be done). Now, the hard part: setting up the server side devices. If we use uinput, we should ship a file in The problem with uinput is that as raw as the xinput2 events are, they're not from the same level as uinput.. so some interpretation / un-translation is still going to be needed to re-inject them in such a way that libinput will generate the exact events we want. But maybe we don't want to use uinput + libinput at all? |
2017-05-07 11:42:52: antoine uploaded file
|
2017-05-07 17:33:47: antoine uploaded file
|
With the latest patch, the server has all the information it needs about the input devices (device changes need to be propagated - easy) and the input events include the device id (most of them - easy to add). As for simulating the devices on the server, these examples may help:
The problem is that those examples work on "evdev" devices.. and we get the device information from the X11 server using the "xinput2" API... which is mapped from the kernel's evdev devices via the "libinput" or the "evdev" Xorg driver layer. |
2017-05-08 08:04:00: antoine uploaded file
|
2017-05-08 08:04:38: antoine uploaded file
|
2017-05-08 08:05:35: antoine uploaded file
|
2017-05-08 11:03:40: antoine uploaded file
|
Installing:
udev will create input devices that a non-root Xorg can access. (we should probably use group access instead of 666 permisions, and restrict the changes to our virtual input devices, not all input devices... see udev rules: controlling permissions and ownership)
but Xdummy will add and enable them:
With this in place, I can simulate devices via uinput and only Xdummy sees the events.
For injecting events, maybe python-evdev will be more useful than python-uinput? (at least the capabilities are better documented) With the latest patch, I can inject relative motion... but not absolute. (mouse pointers don't do absolute)
|
2017-05-08 11:45:51: antoine uploaded file
|
Mostly merged in r15802 (big), this doesn't do anything useful yet and is not enabled unless the client specifies With "xi" enabled, the server gets a list of devices, which is not used for anything yet, and the pointer packets include the device responsible for the event (as well as more details on the event), ie:
This will have to do for this release, at least the xinput code is merged and won't bitrot too much. |
This may help with MS Windows to get the device ID and layout for each keyboard device:
|
2017-07-30 19:05:24: antoine uploaded file
|
Moved the uinput server-side support to #1611. We can keep this ticket as a tracker. |
r16721 uses xinput2 devices on posix clients by default. |
See #1615 for touch device support |
think: tablet pcs can be used with the program running on the higher end desktop machine.
Pressure sensitivity, fine-grained scrolling, etc.
The text was updated successfully, but these errors were encountered: