You are not logged in.
Pages: 1
I cannot find a working solution to conditionally deactive/activate libinput controlled devices.
I am using Gnome3 with Wayland and want to conditionally deactivate my laptop's keyboard and touchpad when in tablet mode.
I tried using xinput, but this will only disable the virtualized device for applications that use the Xorg backend, eg. chromium.
Other applications like gnome-terminal however will still receive working keyboard input.
How can I completely deactivate and later reactivate all keyboard and touchpad input?
Last edited by schard (2019-03-23 12:45:59)
macro_rules! yolo { { $($tokens:tt)* } => { unsafe { $($tokens)* } }; }
Offline
AFAIK this hasn't been implemented by mutter yet, so a different approach is needed.
One option may be to use evtest to grab all events from the relevant device(s) so the kernel doesn't pass them on.
Offline
I believe normally libinput should handle that automatically if it detects a tablet mode switch. If you don't have a tablet mode switch, it might be possible to simulate it with uinput.
https://wayland.freedesktop.org/libinpu … h-handling
Last edited by progandy (2019-03-22 19:14:25)
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |
Offline
Thanks to you both. It seems, that the kernel does not yet detect the tablet mode sensor. Probably the device is too new and nobody has written a driver for it yet.
The hint with evtest allowed me to create a workaround.
Basically I've written a systemd unit that runs the tablet mode via evtest --grab, a script toggling the service and a custom desktop entry to have a button in Gnome.
Should I put this here or start a Wiki article on this particular Notebook?
Update:
I created a package with the software: https://bbs.archlinux.org/viewtopic.php?pid=1838472
Last edited by schard (2019-03-23 13:37:16)
macro_rules! yolo { { $($tokens:tt)* } => { unsafe { $($tokens)* } }; }
Offline
Can you tell us the name of your foldable laptop?
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |
Offline
It's an HP ENVY x360 13-ag0005ng.
Update:
I did some more research. The sensors in question do not yet have driver support.
The respective Kernel feature request can be found here:
https://bugzilla.kernel.org/show_bug.cgi?id=199715
Last edited by schard (2019-04-04 19:10:36)
macro_rules! yolo { { $($tokens:tt)* } => { unsafe { $($tokens)* } }; }
Offline
Pages: 1