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
xev
report when you pressS
?xmodmap -pke
report?xmodmap
output.-pke
option and look at the entry for keycode 9:xmodmap -pke| grep ' 9 ='
.