shell script to fix key mappings with xmodmap
Kragen Javier Sitaker
kragen at canonical.org
Sat Aug 21 03:37:01 EDT 2010
set -e # exit on errors
# KDE installs my custom keymap when I log in, but if my keyboard
# crashes and reboots — or gets unplugged and plugged back in — it
# resets to the default keymap. So I wrote this script to restore my
# custom keymap within a second if that happens. This is almost
# certainly the wrong way to solve the problem, but it's pretty easy.
while : ; do
# My default keymap has no Multi_key, but my custom keymap does
# (on keycode 108), which is how you can tell the difference.
if ! xmodmap -pk | grep -q Multi_key; then
(End of `xmodmapd`.)
This software is available via
git clone http://canonical.org/~kragen/sw/inexorable-misc.git
(or in <http://canonical.org/~kragen/sw/inexorable-misc>) in the file
Like everything else posted to kragen-hacks without a notice to the
contrary, this software is in the public domain.
More information about the Kragen-hacks