How to use caps lock key to launch an app?

chombee at lavabit.com chombee at lavabit.com
Thu Aug 7 16:25:04 EDT 2008


I like to use the Caps Lock key to launch an application, like dmenu in
openbox or gnome-do in gnome.

In GNOME I use xmodmap to remap my caps lock key to F12, then set gnome-do
to launch on F12. In my "Sessions" settings in GNOME I have it run
`xmodmap ~/.Xmodmap` on login.

In openbox this isn't working, and the problem seems to be that
gnome-settings-daemon is overriding xmodmap. If I simply run the command
`xmodmap ~/.Xmodmap` afer logging in it works. If I put this command in
autostart.sh it works too. But if I have both the xmodmap command and
gnome-settings-daemon in autostart.sh then it doesn't work. I think that a
few seconds after it launches gnome-settings-daemon overrides the keymap.
Putting the xmodmap command after gnome-settings-daemon doesn't help,
cause g-s-d takes a few seconds after it's launched before it makes the
changes.

Can anyone think of a way to use both at once?





More information about the openbox mailing list