Thread: Ctrl+H event independent of keyboard layout
hi,
examining "keyval" field of gdkeventkey struct doesn't work cause works if user's using latin (english-like) keyboard layout.
so, ctrl+h works in "english us" mode fails "russian" keyboard layout.
since need catch ctrl+h event regardless of keyboard layout went "hardware_keycode" field of gdkeventkey struct
reports "43" "h" key on keyboard regardless of keyboard layout.
question is, there better approach? , "43" stand "h" key on every keyboard or mine (logitech)?
code:$ grep -r '\<43;$' /usr/share/x11/xkb/keycodes /usr/share/x11/xkb/keycodes/sony: <ad10> = 43; /usr/share/x11/xkb/keycodes/amiga: <ac04> = 43; /usr/share/x11/xkb/keycodes/amiga: <ac04> = 43; /usr/share/x11/xkb/keycodes/ibm: <ac05> = 43; /usr/share/x11/xkb/keycodes/digital_vndr/pc: <ac04> = 43; /usr/share/x11/xkb/keycodes/sun: <ae07> = 43; /usr/share/x11/xkb/keycodes/sun: <ae07> = 43; /usr/share/x11/xkb/keycodes/sun: <ae07> = 43; /usr/share/x11/xkb/keycodes/sun: <ae07> = 43; /usr/share/x11/xkb/keycodes/sun: <ae07> = 43; /usr/share/x11/xkb/keycodes/xfree98: <ac07> = 43; /usr/share/x11/xkb/keycodes/evdev: <ac06> = 43; /usr/share/x11/xkb/keycodes/hp: <ab02> = 43; /usr/share/x11/xkb/keycodes/hp: <fk11> = 43; /usr/share/x11/xkb/keycodes/fujitsu: <ae06> = 43; /usr/share/x11/xkb/keycodes/sgi_vndr/indigo: <ab05> = 43; /usr/share/x11/xkb/keycodes/sgi_vndr/indy: <ac03> = 43; /usr/share/x11/xkb/keycodes/ataritt: <ac06> = 43; /usr/share/x11/xkb/keycodes/xfree86: <ac06> = 43; /usr/share/x11/xkb/keycodes/macintosh: <ad10> = 43; $ grep -r '<ac06>[ \t]=[ \t]*43;$' /usr/share/x11/xkb/keycodes /usr/share/x11/xkb/keycodes/evdev: <ac06> = 43; /usr/share/x11/xkb/keycodes/ataritt: <ac06> = 43; /usr/share/x11/xkb/keycodes/xfree86: <ac06> = 43;
Forum The Ubuntu Forum Community Ubuntu Specialised Support Development & Programming Programming Talk Ctrl+H event independent of keyboard layout
Ubuntu
Comments
Post a Comment