mooz / xkeysnail

Yet another keyboard remapping tool for X environment
890 stars 112 forks source link

Caps lock to control key #139

Open EskoJTH opened 3 years ago

EskoJTH commented 3 years ago

There does not appear to be any way to map caps lock to control so that it would also inherit all key combinations defined with "C-".

I'm currently using my keyboard with caps lock as a control key, but the change is applied after xkeysnail so it does not affect all places I would like it to.

yyykt commented 3 years ago

define_modmap seems to be what you are looking for.

define_modmap({
    Key.CAPSLOCK: Key.LEFT_CTRL
})

Please check example/config.py

joshgoebel commented 2 years ago

@EskoJTH Did this work for you?

mangelozzi commented 1 year ago

define_modmap seems to be what you are looking for.

define_modmap({
    Key.CAPSLOCK: Key.LEFT_CTRL
})

Please check example/config.py

The documentation on key specification does not even show you can use the Key constant. They only show K("...some text name...")

joshgoebel commented 1 year ago

You can write it with K macros too... same thing, K just resolves to Key.name objects...