> "Giacomo" == Giacomo Boffi
<giacomo.boffi(a)polimi.it> writes:
Uwe Brauer writes:
the following worked for me, but eventually i don't use any DE
;-)
1. run "xmodmap -pke > kbstatus" to have a file that,
fed to xmodmap,
should put your keyboard in the current status, starting from any
random status
Ok here is the result of xmodmap -pke > kbstatus (just the relevant
lines of course)
keycode 37 = Caps_Lock NoSymbol Caps_Lock
keycode 133 = Super_L NoSymbol Super_L
So first I tried out something stupid change
keycode 133 = Hyper_L NoSymbol Hyper_L
and run xmodmap on the new file
Nothing more! Xev tells me that key 133 is now hyper and not super,
I restart xemacs who complains:
Warning: XEmacs: Super_R (0x86) generates Mod4, which is generated by Hyper.
Warning:
Two distinct modifier keys (such as Meta and Hyper) cannot generate
the same modifier bit, because Emacs won't be able to tell which
modifier was actually held down when some other key is pressed. It
won't be able to tell Meta-x and Hyper-x apart, for example. Change
one of these keys to use some other modifier bit. If you intend for
these keys to have the same behavior, then change them to have the
same keysym as well as the same modifier bit.
Warning:
The meanings of the modifier bits Mod1 through Mod5 are determined
by the keysyms used to control those bits. Mod1 does NOT always
mean Meta, although some non-ICCCM-compliant programs assume that.
But 133 is hyper now in Xemacs. This of course is not what I want. So I
try
keycode 37 = Hyper_L NoSymbol Hyper_L
Again xev tells me that key 133 is now Hyper, xemacs after restarting
complains about
Warning: XEmacs: Hyper_L (0x25) generates ModLock, which is nonsensical.
Warning:
The semantics of the modifier bits ModShift, ModLock, and ModControl
are predefined. It does not make sense to assign ModControl to any
keysym other than Control_L or Control_R, or to assign any modifier
bits to the "control" keysyms other than ModControl. You can't
turn a "control" key into a "meta" key (or vice versa) by simply
assigning the key a different modifier bit. You must also make that
key generate an appropriate keysym (Control_L, Meta_L, etc).
Warning:
The meanings of the modifier bits Mod1 through Mod5 are determined
by the keysyms used to control those bits. Mod1 does NOT always
mean Meta, although some non-ICCCM-compliant programs assume that.
And control is now NOT recognised by xemacs, so I
follow your advice which clear and add as below.
3. add to the end of the trimmed kbstatus the lines (again, m.m.)
clear Shift
clear Lock
clear Control
clear Mod1
clear Mod2
clear Mod3
clear Mod4
clear Mod5
add Shift = Shift_L
add Control = Control_L
add Mod1 = Meta_L
add Mod2 = Alt_L
add Mod3 = Super_R
add Mod4 = Hyper_R
add Mod5 = Num_Lock
But then after applying xmodmap kbstatus I obtain this error
X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 118 (X_SetModifierMapping)
Value in failed request: 0x17
Serial number of failed request: 261
Current serial number in output stream: 261
So I try out which of the add commands caused the problem
and it is the line
add Mod2 = Alt_L
so I comment it out.
add Mod3 = Super_L
and I am almost there, but now shift is not working, so I have to
comment out the clear shift command restart X and finally the kbstatus
file looks like
keycode 37 = Hyper_L NoSymbol Hyper_L
clear Lock
clear Control
clear Mod1
clear Mod2
clear Mod3
clear Mod4
clear Mod5
add Control = Control_L
add Mod1 = Meta_L
add Mod3 = Super_L
add Mod4 = Hyper_L
add Mod5 = Num_Lock
And now it works!!
thanks
Uwe
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-beta