remapping keys with xmodmap etc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

[I am newbie to X stuff.]

X version:
22:28:46]sudhakar::~ # rpm --query xorg-x11
xorg-x11-6.7.0-10
[22:28:50]sudhakar::~ #



I lost my ctrl-key when I was moving. It is no help with emacs if you do
not have ctrl key.  I am trying to map my "windows" key to left-ctrl key.
Somehow it does not work.  Anyone has experience?


keycodes are
windows button : 115
ctrl-left : 37
x         : 53

I used xmodmap to map key-115 (windows) to Control_L.  But somehow that
does not work.  There is some problem in translation.


win-x does not translate to ctrl-x as it should be.  I used "xev" to see
what is happening.  can someone help?  win returns the same code as ctrl.
but the next character x is not mapped properly to 0x18. i see 0x78
(ascci-'x') instead.


interesting things from "xev" output:

115-x:


KeyPress event, serial 28, synthetic NO, window 0x2800001,
    root 0x60, subw 0x0, time 109788, (84,-9), root:(1083,514),
    state 0x0, keycode 115 (keysym 0xffe3, Control_L), same_screen YES,
    XKeysymToKeycode returns keycode: 37   <------ not there in ctrl-x
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False


(this seems fine.   just that there is an extra mapping from 115 to 37,
which is expected)

KeyPress event, serial 28, synthetic NO, window 0x2800001,
    root 0x60, subw 0x0, time 110039, (84,-9), root:(1083,514),
    state 0x0, keycode 53 (keysym 0x78, x), same_screen YES, <---state0x0
    XLookupString gives 1 bytes: (78) "x"      <--- output 78.
    XmbLookupString gives 1 bytes: (78) "x"
    XFilterEvent returns: False

output should be 18..    that is the problem



ctrl-x:
KeyPress event, serial 28, synthetic NO, window 0x2800001,
    root 0x60, subw 0x0, time 122194, (84,-9), root:(1083,514),
    state 0x0, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False


KeyPress event, serial 28, synthetic NO, window 0x2800001,
    root 0x60, subw 0x0, time 122487, (84,-9), root:(1083,514),
    state 0x4, keycode 53 (keysym 0x78, x), same_screen YES, <---state0x4
    XLookupString gives 1 bytes: (18) ""    <----output 18
    XmbLookupString gives 1 bytes: (18) ""
    XFilterEvent returns: False



Any ideas?


I wanted to download X source and look it. I cannot figure out how to
extract source from srpm.  can someone tell me how?


thanks,
Sudhakar

PS: already wasted about 4 hours on this. :-)

more complete xev output:



KeyPress event, serial 28, synthetic NO, window 0x2800001,
    root 0x60, subw 0x0, time 109788, (84,-9), root:(1083,514),
    state 0x0, keycode 115 (keysym 0xffe3, Control_L), same_screen YES,
    XKeysymToKeycode returns keycode: 37
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyPress event, serial 28, synthetic NO, window 0x2800001,
    root 0x60, subw 0x0, time 110039, (84,-9), root:(1083,514),
    state 0x0, keycode 53 (keysym 0x78, x), same_screen YES,
    XLookupString gives 1 bytes: (78) "x"
    XmbLookupString gives 1 bytes: (78) "x"
    XFilterEvent returns: False

KeyRelease event, serial 28, synthetic NO, window 0x2800001,
    root 0x60, subw 0x0, time 110112, (84,-9), root:(1083,514),
    state 0x0, keycode 53 (keysym 0x78, x), same_screen YES,
    XLookupString gives 1 bytes: (78) "x"

KeyRelease event, serial 28, synthetic NO, window 0x2800001,
    root 0x60, subw 0x0, time 110193, (84,-9), root:(1083,514),
    state 0x0, keycode 115 (keysym 0xffe3, Control_L), same_screen YES,
    XKeysymToKeycode returns keycode: 37
    XLookupString gives 0 bytes:

KeyPress event, serial 28, synthetic NO, window 0x2800001,
    root 0x60, subw 0x0, time 122194, (84,-9), root:(1083,514),
    state 0x0, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyPress event, serial 28, synthetic NO, window 0x2800001,
    root 0x60, subw 0x0, time 122487, (84,-9), root:(1083,514),
    state 0x4, keycode 53 (keysym 0x78, x), same_screen YES,
    XLookupString gives 1 bytes: (18) ""
    XmbLookupString gives 1 bytes: (18) ""
    XFilterEvent returns: False

KeyRelease event, serial 28, synthetic NO, window 0x2800001,
    root 0x60, subw 0x0, time 122560, (84,-9), root:(1083,514),
    state 0x4, keycode 53 (keysym 0x78, x), same_screen YES,
    XLookupString gives 1 bytes: (18) ""

KeyRelease event, serial 28, synthetic NO, window 0x2800001,
    root 0x60, subw 0x0, time 122684, (84,-9), root:(1083,514),
    state 0x4, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
    XLookupString gives 0 bytes:





Sudhakar Govindavajhala                   Department of Computer Science
Graduate Student,                         Princeton University
Ph : (lab) +1 609 258 1763                   (office) +1 609 258 1798
               http://www.cs.princeton.edu/~sudhakar
_______________________________________________
XFree86 mailing list
XFree86@xxxxxxxxxxx
http://XFree86.Org/mailman/listinfo/xfree86

[Index of Archives]     [X Forum]     [Xorg]     [XFree86 Newbie]     [IETF Announce]     [Security]     [Font Config]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux Kernel]

  Powered by Linux