Bug 110933
Summary: | AltGr key not working for some X11 clients | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 3 | Reporter: | Thierry Lelegard <thierry.lelegard> |
Component: | XFree86 | Assignee: | X/OpenGL Maintenance List <xgl-maint> |
Status: | CLOSED WONTFIX | QA Contact: | David Lawrence <dkl> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 3.0 | CC: | jdennis, pamadio, tao, thierry.lelegard, thomas.specht |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | i686 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2005-07-08 18:04:44 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Thierry Lelegard
2003-11-25 17:32:02 UTC
I experience the same trouble with a Xserver on RHEL3 and a xterm hosted on a HP-UX B.11.00 . playing with XKeyCaps with the correct keyboard (105 fr) show that the correct key are supposed to be mapped to their respective position (mod3 backslash) but altgr8 still behave as if only 8 has been activated. Furthermore, even if the map shown by XKeyCaps is exactly what i have on the keyboard, some keys does not behave correctly: pressing the 2 key (0x0B) in order to have a eacute just put 'C)' on the screen. egrave gives 'C(' ugrave gives 'C9' and so on. I have finally found a workaround. Note that this is NOT a proper solution, just a workaround for an XFree86 bug which NEEDS TO BE FIXED ANYWAY. The following xmodmap definitions map both ISO_Level3_Shift and Mode_switch to the AltGr key. Then, all keys with an AltGr value must be remapped with the same interpretation with different modifiers (since X11 clients will see the AltGr key as different modifiers, depending on the platform). !---------------------------------------------------------------------------- ! Keyboard mapping for: ! - XFree86 4.3 X11 server ! - OpenVMS X11 clients (possibly also useful for HP-UX and AIX) ! - French PC keyboards !---------------------------------------------------------------------------- ! Definition of AltGr key (right of space bar): ! - ISO_Level3_Shift is the default value (XFree86 4.3) and is used by ! Linux and Solaris clients. ! - Mode_switch is used by OpenVMS clients keycode 113 = ISO_Level3_Shift Mode_switch ! Keys with third value using AltGr key. ! - First two values are default values. ! - Third value is used by OpenVMS clients. ! - Fifth value is used by Linux & Solaris clients. keycode 11 = eacute 2 asciitilde asciitilde asciitilde keycode 12 = quotedbl 3 numbersign numbersign numbersign keycode 13 = apostrophe 4 braceleft braceleft braceleft keycode 14 = parenleft 5 bracketleft bracketleft bracketleft keycode 15 = minus 6 bar bar bar keycode 16 = egrave 7 grave grave grave keycode 17 = underscore 8 backslash backslash backslash keycode 18 = ccedilla 9 asciicircum asciicircum asciicircum keycode 19 = agrave 0 at at at keycode 20 = parenright degree bracketright bracketright bracketright keycode 21 = equal plus braceright braceright braceright keycode 26 = e E EuroSign EuroSign EuroSign keycode 35 = dollar sterling currency currency currency !---------------------------------------------------------------------------- Important: This mapping works for French keyboards only. Other international keyboards with AltGr must use appropriage mappings. Guidelines for building other mapping for other keyboards: 1) Save original mapping (xmodmap -pke >xmodmap.txt) 2) Create a new mapping file (xmodmap.vms for instance). Add the following line at the beginning: keycode 113 = ISO_Level3_Shift Mode_switch 3) Use xev from a "working" client (Linux for instance) 4) In xev, press AltGr+key for every key with an AltGr value. Example on a French keyboard: KeyPress event, serial 25, synthetic NO, window 0x2c00001, root 0x40, subw 0x0, time 6109189, (141,92), root:(147,138), state 0x10, keycode 113 (keysym 0xfe03, ISO_Level3_Shift), same_screen YES, XLookupString gives 0 bytes: "" KeyPress event, serial 25, synthetic NO, window 0x2c00001, root 0x40, subw 0x0, time 6110049, (141,92), root:(147,138), state 0x90, keycode 19 (keysym 0x40, at), same_screen YES, XLookupString gives 1 bytes: "@" 5) In the above example, keycode 19 produces keysym "@", named "at" with modifier ISO_Level3_Shift (AltGr). 6) In the original mapping xmodmap.txt, get keycode 19. Example (French keyboard): keycode 19 = agrave 0 7) Add the AltGr value three times and add the new line in the new mapping file xmodmap.vms. Example: keycode 19 = agrave 0 at at at 8) Repeat the process for all keys with an AltGr value. 9) In the session init file, run the following command: xmodmap xmodmap.vms AGAIN, THIS IS ONLY A WORKAROUND, ASK FOR A PROPER FIX IN XFREE86 ! I encountered the same problem with RHEL3 using a german keyboard. This problem only exists, if I'm using gnome - there is no problem with kde. Adapted from Ezio: " AltGr is mapped as Mode_switch in RHEL 2.1 and it is mapped as ISO_Level3_Shift in RHEL 3. When AltGr+Key is pressed, an event with the correct keysym is generated by both versions, but: state = 0x2000 in RHEL 2.1 state = 0x0080 in RHEL 3 It appears that some (broken) applications are sensitive to these values and ignore the KeyUp/KeyDown event sent by a RHEL 3 X server. Unfortunately the real solution is fixing the broken application, in the meantime you can obtain a keymap from a RHEL 2.1 machine w/ French (German, etc.) keyboard like this: xmodmap -pm xmodmap -pke The output of xmodmap -pke should be parsable by "xmodmap -e" on the target hosts. " clearing out old bug reports, this shouldn't be assigned to me any longer. Corresponding issue tracker was closed. Closing this one as suggested. |