kbingham / xhk

XLib HalfKeyboard implementation
16 stars 8 forks source link

Suspended process loses keyboard #1

Open kbingham opened 8 years ago

kbingham commented 8 years ago

If you 'ctrl-z' the running process once it has grabbed your keyboard - you can't foreground the app very easily.

To recover - I have managed to drop to a console with ctrl-alt-F1 - where the input does not go through X11.

Then you can kill -9 pgrep xhk and hopefully your keyboard will come back!

To fix this - we will have to try to catch the suspend signal and release the keyboard.

kbingham commented 6 years ago

This shouldn't be difficult to fix - just need to trap on SIGSTP, and release the keyboard. Then we can either exit, - or wait for a SIGCONT to re-attach the keyboard perhaps.