Xmodmap fails to remap modifier keys
Posted
by ZyX
on Super User
See other posts from Super User
or by ZyX
Published on 2010-04-27T14:53:20Z
Indexed on
2010/04/27
14:54 UTC
Read the original article
Hit count: 353
When I try to move keys, so that I have CapsLock on escape, Control on CapsLock and Escape on left control, I get the following error:
% xmodmap ~/.Xmodmap
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: 15
Current serial number in output stream: 15
That is the code that fails:
remove Lock = Caps_Lock
! ESC
keycode 9 = Caps_Lock
add Lock = Caps_Lock
remove Control = Control_L
! CapsLock
keycode 66 = Control_L
add control = Control_L
! Control_R
keycode 37 = Escape
! 2*Meta_L
keycode 148 = Meta_L
add mod1 = Meta_L
If I comment out all lines that start with either add
or remove
it runs without any errors, but does not do what I want.
Program versions (Gentoo x86 (stable)):
- xorg-server-1.7.6
- xmodmap-1.0.4
- xf86-input-evdev-2.3.2
Xorg.conf:
# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig: version 1.0 (buildmeister@builder63) Fri Aug 14 17:54:58 PDT 2009
Section "ServerLayout"
Identifier "Layout0"
Screen 0 "Screen0"
InputDevice "Evdev Keyboard" "CoreKeyboard"
InputDevice "Evdev Mouse" "CorePointer"
EndSection
Section "Module"
Disable "dri"
Disable "dri2"
Disable "record"
EndSection
Section "InputDevice"
Identifier "Evdev Keyboard"
Driver "evdev"
Option "Device" "/dev/input/event2"
Option "CoreKeyboard"
Option "AutoRepeat" "500 25"
Option "XkbRules" "xorg"
Option "xkb_rules" "xorg"
Option "XkbModel" "yahoo"
Option "xkb_model" "yahoo"
Option "XkbLayout" "dvp2" # ,ru2
Option "xkb_layout" "dvp2" # ,ru2
# Option "XkbVariant" "" # ,winkeys
Option "XkbOption" "grp_led:scroll,grp:rctrl_toggle,compose:rwin,grp:lwin_switch"
# grp:lwin_switch
EndSection
Section "InputDevice"
Identifier "Evdev Mouse"
Driver "evdev"
Option "CorePointer"
Option "Device" "/dev/input/event3"
Option "Name" "Genius Ergo Mouse"
Option "HWHEELRelativeAxisButtons" "7 6"
Option "WHEELRelativeAxizButtons" "4 5"
Option "SendCoreEvents" "true"
Option "Buttons" "11"
EndSection
Section "Files"
FontPath "/usr/share/fonts/misc"
FontPath "/usr/share/fonts/Type1"
FontPath "/usr/share/fonts/100dpi"
FontPath "/usr/share/fonts/75dpi"
FontPath "/usr/share/fonts/terminus"
# FontPath "/usr/share/fonts/intlfonts"
FontPath "/usr/share/fonts/ttf-bitstream-vera"
# FontPath "/usr/share/fonts/ttf"
FontPath "/usr/share/fonts/corefonts"
FontPath "/usr/share/fonts/paratype"
EndSection
Section "Monitor"
Identifier "Monitor0"
VendorName "Unknown"
ModelName "Unknown"
HorizSync 28.0 - 33.0
VertRefresh 43.0 - 72.0
Option "DPMS"
EndSection
Section "Device"
Identifier "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
EndSection
Section "Screen"
Identifier "Screen0"
Device "Device0"
Monitor "Monitor0"
DefaultDepth 24
SubSection "Display"
Depth 24
EndSubSection
EndSection
Section "Extensions"
Option "Composite" "Disable"
EndSection
Section "ServerFlags"
# Option "XkbDisable" "false"
# Option "AutoAddDevices" "false"
Option "DontVTSwitch" "false"
Option "DontZap" "false"
# Option "DontZoom" "true"
EndSection
Everything worked before update.
© Super User or respective owner