Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I would like to enable "sticky modifier keys" under archlinux + awesome, and I haven't found the correct info.

share|improve this question
    
What is "sticky keys"? –  Daniel Andersson Apr 10 '12 at 7:31
    
right, I meant "sticky modifier keys", it means that pressing a modifier key acts as a toggle and usually the toggle is released on the next key press, so keys don't have to be pressed simultaneously but can be pressed in sequence. This is an accesibility for disabled users feature on OS-X, Gnome and probably Windows, and I find it more confortable and less hand straining with the feature on. –  Macario Apr 10 '12 at 7:43
add comment

3 Answers 3

up vote 8 down vote accepted

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

From xbkey manual:

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

 

share|improve this answer
    
Here is a link to xkbset: math.missouri.edu/~stephen/software/#xkbset –  paraxor Apr 4 '13 at 23:11
    
This is available in debian in the package xkbset. –  Jesse Hallett Jun 1 at 8:40
    
This answer is very helpful! Now I just want to find a way to limit the sticky behavior to the Shift keys. –  Jesse Hallett Jun 1 at 22:34
add comment

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.

share|improve this answer
    
Unfortunatelly I haven't got any more points to offer, I really am missing sticky modifiers as in cntrl, window, alt, meta... –  Macario Apr 19 '12 at 21:37
    
XKB is a better way to do this. Check Arch wiki –  phil pirozhkov Jun 1 at 23:17
add comment

As far as I know, Xorg doesn't support this. It's not inconceivable for a custom keyboard driver to implement this, but I have never come across such a thing.

share|improve this answer
    
Mmm... I would really like to have this without having to resort to Gnome or XFCE... bummer! –  Macario Apr 16 '12 at 5:22
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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