Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

The S key seems to be mapped to an incorrect value in XQuartz for me. I am running OS X 10.7.5 and XQuartz 2.7.4 (xorg-server 1.13.0). The problem also occurs in X11.app (XQuartz 2.6.5, xorg-server 1.10.6). I am also running Homebrew 0.9.4, if that makes a difference.

Pressing S in X has never worked correctly for me. In most applications in X, pressing S has no effect. It may actually be mapped to a meta-key, because pressing S in some contexts (e.g., in most save dialogs) seems to trigger button hotkeys. If I copy the "s" character from within a native Cocoa application and then paste it into an X application, that works fine.

Update: xev reports the following when S is pressed:

KeyPress event, serial 34, synthetic NO, window 0xa00001,
    root 0x281, subw 0x0, time 2057519943, (138,-10), root:(158,32),
    state 0x0, keycode 9 (keysym 0xff1b, Escape), same_screen YES,
    XLookupString gives 1 bytes: (1b) "
mbLookupString gives 1 bytes: (1b) "
FilterEvent returns: False

KeyRelease event, serial 34, synthetic NO, window 0xa00001,
    root 0x281, subw 0x0, time 2057520022, (138,-10), root:(158,32),
    state 0x0, keycode 9 (keysym 0xff1b, Escape), same_screen YES,
    XLookupString gives 1 bytes: (1b) "
FilterEvent returns: False

Update 2: xmodmap reports:

shift       Shift_L (0x40),  Shift_R (0x44)
lock      
control     Control_L (0x41),  Control_L (0x43),  Control_R (0x46)
mod1        Mode_switch (0x42),  Mode_switch (0x45)
mod2        Meta_L (0x3f),  Meta_R (0x47)
mod3      
mod4      
mod5
share|improve this question
    
What does xev report when you press S? –  lhf May 6 '13 at 16:13
    
@lhf: I just updated the question with the result. –  ESultanik May 6 '13 at 16:21
    
What does xmodmap -pke report? –  lhf May 6 '13 at 16:25
    
Updated the question with xmodmap output. –  ESultanik May 6 '13 at 16:27
    
Use the -pke option and look at the entry for keycode 9: xmodmap -pke| grep ' 9 ='. –  lhf May 6 '13 at 16:28

1 Answer 1

up vote 1 down vote accepted

It appears that s has been mapped to Escape.

I don't know how it got be like this. I also don't know how to reset the map, given that setxkbmap -layout us (recommended by http://askubuntu.com/questions/29603/how-do-i-clear-xmodmap-settings) does not work. (It doesn't work for me either.)

So, as a last resort, if the only problem is s, then try

xmodmap -e "keycode   9 = s S ssharp Iacute"
share|improve this answer
    
No idea what caused this either, but your xmodmap command fixed the problem. If no one else responds with the root cause in the next day or so, I'll mark your answer as accepted. Thanks! –  ESultanik May 6 '13 at 16:54
    
@ESultanik, note that this is not a permanent solution: you'll have to do this every time you start the X server, if the problem is persistent. In this case, look in your X11 init files and check that none of them is changing the map. –  lhf May 6 '13 at 17:00

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.