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).

ᔕᖺᘎᕊ
  • 6,393

2 Answers2

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

shalomb
  • 240
-1

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