Emacs with both Meta AND Alt not working
I use xfree86 and emacs21 from sid and eventually after a dist-upgrade the
Emacs behavior around the Meta and Alt keys changes.
I want the Meta_L on the left windows key and Alt_L on the Alt_L.
I have a /etc/X11/Xmodmap that I update according to the new xfree86
version after each new versions to have this behavior.
But on the last version I cannot have this working. :-(
I've also used a XF86Config-4 with a simple :
Section "InputDevice"
Identifier "Keyboard0"
Driver "keyboard"
Option "CoreKeyboard"
Option "XkbRules" "xfree86"
Option "XkbModel" "pc104"
Option "XkbLayout" "us"
#altwin:left_meta_win Meta is mapped to the left Win-key.
Option "XKbOptions" "altwin:left_meta_win"
EndSection
and Emacs reports for example Win_L-q and Alt_L-q respectively as :
H-s-q
M-q
and xmodmap returns :
xmodmap: up to 3 keys per modifier, (keycodes in parentheses):
shift Shift_L (0x32), Shift_R (0x3e)
lock Caps_Lock (0x42)
control Control_L (0x25), Control_R (0x6d)
mod1 Alt_L (0x40), BadKey (0x7d), BadKey (0x9c)
mod2 Num_Lock (0x4d)
mod3
mod4 BadKey (0x7f), BadKey (0x80)
mod5 Mode_switch (0x5d), ISO_Level3_Shift (0x7c)
that is clearly a mess with all this BadKey... :-(
Modifying it with xmodmap appears just to increase the mess...
xmodmap -e 'clear mod4'
produce a correct :
xmodmap: up to 3 keys per modifier, (keycodes in parentheses):
shift Shift_L (0x32), Shift_R (0x3e)
lock Caps_Lock (0x42)
control Control_L (0x25), Control_R (0x6d)
mod1 Alt_L (0x40), BadKey (0x7d), BadKey (0x9c)
mod2 Num_Lock (0x4d)
mod3
mod4
mod5 Mode_switch (0x5d), ISO_Level3_Shift (0x7c)
but then with a :
xmodmap -e 'add mod4 = Meta_L'
the mess is back :
xmodmap: up to 3 keys per modifier, (keycodes in parentheses):
shift Shift_L (0x32), Shift_R (0x3e)
lock Caps_Lock (0x42)
control Control_L (0x25), Control_R (0x6d)
mod1 Alt_L (0x40), BadKey (0x7d), BadKey (0x9c)
mod2 Num_Lock (0x4d)
mod3
mod4 Alt_L (0x40), BadKey (0x9c)
mod5 Mode_switch (0x5d), ISO_Level3_Shift (0x7c)
It seems to be even more complex than what is discussed in
http://lists.gnu.org/archive/html/help-gnu-emacs/2004-06/msg00195.html or in bug
#255286255286
Sounds like an issue rather on the X11 part around the modifier stuffs and
the conservative assumption of Emacs that if there is no key with a plain
Meta modifier Emacs decides to use Alt keys as Meta...
Does anyone have this kind of stuff working ?
Thank you,
--
Ronan KERYELL |\/ Tel: (+33|0) 2.29.00.14.15
Labo Informatique & Télécom |/) Fax: (+33|0) 2.29.00.12.82
ENST Bretagne, CS 83818 K GSM: (+33|0) 6.13.14.37.66
F-29238 PLOUZANÉ CEDEX |\ E-mail: rk@enstb.org
FRANCE | \ http://www.lit.enstb.org/~keryell
Reply to: