3

I'd like to bind a particular i3 action to Alt_R+space without it affecting Alt_L+space. Both Alt keys are attached to the Mod1 modifier group:

$ xmodmap -pm | grep mod1
mod1        Alt_L (0x40),  Alt_R (0x6c),  Meta_L (0xcd)

So I'm trying to remove Alt_R from Mod1 and attach it to Mod3 (which is currently empty).

But I'm getting this error when trying to run the removal:

$ xmodmap -e 'remove Mod1 = Alt_R'
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:  11
  Current serial number in output stream:  11

I've tried mod1 and Mod1 with the same result. I've even tried clear:

$ xmodmap -e 'clear Mod1'
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:  8
  Current serial number in output stream:  8

What am I doing wrong?

2
  • It may be a bug. Which xserver-xorg-core version do you have?
    – Andra
    Commented Feb 3, 2020 at 11:03
  • X.Org X Server 1.20.5, X Protocol Version 11, Revision 0
    – ivan
    Commented Feb 3, 2020 at 12:07

1 Answer 1

0

I'm trying almost the same thing (binding hyper for use with i3) and had the same error. Clearing the modifiers before setting them did it for me.

I'm still working on it, but at the moment my xmodmap looks like this:

keycode   8 =
keycode   9 = Escape NoSymbol Escape
[...]
keycode 254 = XF86WWAN NoSymbol XF86WWAN
keycode 255 = XF86RFKill NoSymbol XF86RFKill

clear shift
clear lock
clear control
clear mod1
clear mod2
clear mod3
clear mod4
clear mod5

add shift =      Shift_L  Shift_R
add lock  =      Caps_Lock
add control =    Control_L  Control_R
add mod1    =    Alt_L Meta_L
add mod2    =    Num_Lock
add mod3    =    Hyper_L Hyper_R
add mod4    =    Super_L Super_R
add mod5    =    ISO_Level3_Shift Mode_switch

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .