alesya-h / linux_detect_tablet_mode

Detect if your laptop is in normal or tablet mode. Useful for Yoga laptops to disable keyboard/trackpoint/touchpad in a tablet mode
MIT License
137 stars 29 forks source link

Update watch_tablet.yml for KEYBOARD_KEY support and maybe also Wayland #27

Closed Xanderamon closed 2 years ago

Xanderamon commented 2 years ago

Commit 189f370a8a2b66f0214c71efe3ec5b6bc7665160 added support for KEYBOARD_KEY event based laptops, but neither the README.md mentions it nor the watch_tablet.yml gives an example of utilization for the input_device parameter - especially for cases where more than one event# is involved. Additionally, since GNOME now uses Wayland (and libinput is still compatible) it would be nice to see some examples of the same xinput commands but for Wayland

Xanderamon commented 2 years ago

$ sudo libinput debug-events ... -event3 DEVICE_ADDED Ideapad extra buttons seat0 default group7 cap:k -event2 DEVICE_ADDED AT Translated Set 2 keyboard seat0 default group8 cap:k ... event2 KEYBOARD_KEY +0.000s KEY_F21 (191) pressed event2 KEYBOARD_KEY +0.009s KEY_F21 (191) released -event3 KEYBOARD_KEY +0.011s KEY_F23 (193) pressed event3 KEYBOARD_KEY +0.011s KEY_F23 (193) released ... -event3 KEYBOARD_KEY +26.513s KEY_F22 (192) pressed event3 KEYBOARD_KEY +26.513s KEY_F22 (192) released