enabling sticky keys under xorg (awesome desktop manager)

I've got it. There is a utility called xbkeys for setting accessibiltiy options for xorg.

From xkbset manual ($ xkbset man):

To switch sticky keys on or off, and optionally set or reset:
() two keys pressed at the same time stops sticky keys;
() a modifier pressed twice will be locked:

    [-]{sticky|st} [[-]twokey|[-]latchlock]...

I ran this:

$ xkbset sticky -twokey -latchlock

That command can go in .xinitrc

# turn on stickykeys. don't let two keys pressed at the same time disable it.
# don't turn on "latch lock", ie pressing a modifier key twice "locks" it on.
xkbset accessx sticky -twokey -latchlock

# don't expire these settings. (run xkbset q exp for details.)
xkbset exp 1 =accessx =sticky =twokey =latchlock

 


You can use Xmodmap to set a key lock for the Scroll, Kana, Num, Caps, and Shift keys. Also some ISO groupings keys can be remapped this way. For example, on my keyboard, to set Left Shift as a toggle, use this:

xmodmap -e "keycode 50 = Shift_Lock"

use "xev" to get the correct keycode.

Just add the command inside the quotes to a file named .Xmodmap and restart X to have the changes permanent.

Unfortunately, I don't think there is a keycode to Lock the Control, Alt, or Meta keys. If you post a more specific question and add a decent bounty, I may be able to work out a shell script and/or xorg change to make this possible.