Score:1

Disable laptop keyboard on demand in Wayland

st flag

I have an HP ENVY 13-ay0000 x360 Convertible Laptop with an AMD Ryzen 5 4500U CPU running Ubuntu 22.10. The auto-rotation is not working, and the keyboard and touchpad are only disabled if the laptop is folded completetly backwards, but not in between. I believe it's due to this bug: https://bugzilla.kernel.org/show_bug.cgi?id=212615.

As a workaround, I was trying to rotate the screen and disable the keyboard manually through a script or something of the sort. The screen rotation and touchpad disabling I managed to get working but I'm struggling to figure out how to disable and reenable the keyboard. Using xinput does not work as I'm using wayland. I checked this thread: https://unix.stackexchange.com/questions/381944/how-to-disable-internal-keyboard-on-fedora-26-wayland

But neither solution worked as I need to disable and reenable on demand and not permanently. I tried grabbing the keyboard events but this results in the touchscren and touchpad behaving erratically.

Any ideas on how this could be achieved?

bvargo avatar
cn flag
The stackexchange solution worked for me on a dell inspiron and Ubuntu 22.04 running Wayland/xwayland, ```$ sudo evtest --grab /dev/input/event2 >/dev/null &``` but you need to enter evtest into visudo so you don't actually have to enter the sudo password...alternately, don't launch it backgrounded and enter the password.
lzilhao avatar
st flag
Unfortunately it didn't work out in my case. I have to grab the input by-path but somehow it messes up the touchscreen inputs and slows down the laptop
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.