Skip to main content
replaced http://unix.stackexchange.com/ with https://unix.stackexchange.com/
Source Link

I would like all modifier keys -- except Shift -- to disable Caps Lock. Since, I would like to swap some modifiers as well, I am trying to achieve both goals at the same time (I wouldn't know how to do otherwise). After having read this answerthis answer, I have tried the following code in my custom layout, but it doesn't work:

key <LCTL> { type[Group1] = "ONE_LEVEL", symbols[Group1] = [ Super_L ], actions[Group1] = [ SetMods(modifiers=none), SetMods(modifiers=Lock,clearLocks) ]}; modifier_map Mod4 { <LCTL> }; 

However, the following simple remapping does work:

key <LCTL> { type = "ONE_LEVEL", [ Super_L ] }; modifier_map Mod4 { <LCTL> }; 

What am I missing?

I would like all modifier keys -- except Shift -- to disable Caps Lock. Since, I would like to swap some modifiers as well, I am trying to achieve both goals at the same time (I wouldn't know how to do otherwise). After having read this answer, I have tried the following code in my custom layout, but it doesn't work:

key <LCTL> { type[Group1] = "ONE_LEVEL", symbols[Group1] = [ Super_L ], actions[Group1] = [ SetMods(modifiers=none), SetMods(modifiers=Lock,clearLocks) ]}; modifier_map Mod4 { <LCTL> }; 

However, the following simple remapping does work:

key <LCTL> { type = "ONE_LEVEL", [ Super_L ] }; modifier_map Mod4 { <LCTL> }; 

What am I missing?

I would like all modifier keys -- except Shift -- to disable Caps Lock. Since, I would like to swap some modifiers as well, I am trying to achieve both goals at the same time (I wouldn't know how to do otherwise). After having read this answer, I have tried the following code in my custom layout, but it doesn't work:

key <LCTL> { type[Group1] = "ONE_LEVEL", symbols[Group1] = [ Super_L ], actions[Group1] = [ SetMods(modifiers=none), SetMods(modifiers=Lock,clearLocks) ]}; modifier_map Mod4 { <LCTL> }; 

However, the following simple remapping does work:

key <LCTL> { type = "ONE_LEVEL", [ Super_L ] }; modifier_map Mod4 { <LCTL> }; 

What am I missing?

Source Link
Eleno
  • 1.9k
  • 4
  • 28
  • 43

Disable Caps Lock when a modifier key is pressed, with XKB

I would like all modifier keys -- except Shift -- to disable Caps Lock. Since, I would like to swap some modifiers as well, I am trying to achieve both goals at the same time (I wouldn't know how to do otherwise). After having read this answer, I have tried the following code in my custom layout, but it doesn't work:

key <LCTL> { type[Group1] = "ONE_LEVEL", symbols[Group1] = [ Super_L ], actions[Group1] = [ SetMods(modifiers=none), SetMods(modifiers=Lock,clearLocks) ]}; modifier_map Mod4 { <LCTL> }; 

However, the following simple remapping does work:

key <LCTL> { type = "ONE_LEVEL", [ Super_L ] }; modifier_map Mod4 { <LCTL> }; 

What am I missing?