2

Im working with a kiosk software, and it can easly be exited with the escape key. Theres no way to disable this behaviour, why I would want to simply disable the escape key completely.

I tried with executing:

xmodmap -e "keycode 9 ="

from .Xsession, but that does not help. (Im sure that .Xsession runs, because there is other commands in .Xsession which are run correctly).

-1

As a hack, you could use a global shortcut program like Xbindkeys, and bind the escape key to /bin/true, which does nothing.

  • This needlessly invokes a program - something like keycode 9 = NoSymbol would be better. – shalomb Aug 19 '17 at 19:58
3

Just for completeness, this is how I did it.

$ cat ~/.config/xmodmap.d/disable-esc keycode 9 = NoSymbol keycode 66 = Escape ! Make CAPS lock the new Escape

This can then be invoked on logon to take effect. There are a number of ways to do that, I place it in ~/.xinitrc.

$ grep 'disable-esc' ~/.xinitrc xmodmap ~/.config/xmodmap.d/disable-esc

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.