Keyboard - Redefine Keys

Trying to turn the capslock into a control as I have big hands and will end up with RSI :smiley: Tried:

setxkbmap -option ctrl:nocaps

Doesn’t work.
Also compiled and installed interception tools & dual function keys and configured, doesn’t work.

1 Like

Best way I found is to edit the keycodes via a config file:

sudo nano /usr/share/X11/xkb/keycodes/evdev

Do a search in the doc for the keys you hope to switch. I used this to swap CTRL/ALT. I would recommend noting out anything you change.

What I’m still hoping to figure out: How to add different keyboard types. I’d like to switch the keyboard to U.S. (Macintosh) so I have easy access to command keys via the third level (which comes in handy for things like curly quotes and long dashes).

1 Like

Tried, but couldn’t get it working, changed:

<CAPS> = 66;
# To:
<LCTL> = 66;

It doesn’t have the desired effect, it does kill the caps lock though.

Hmm. Interesting. Does it work if you swap other keys? I’m wondering if it’s a Caps Lock only thing.

Probably, what did you do?

I was able to swap LCTL and LALT via this config file. That said I was thinking about putting Meta or Super on Caps Lock to allow the Super key to go third level.

If I wasn’t using emacs, I could see the advantage in that. I have an idea, what if I tried <CAPS> = <LCTL> ???

Nope, kills the jingpad :frowning: Thankfully ssh still works, so I ssh’d in and undid the edit :smiley: :smiley:

Move fast, break things :laughing:

1 Like

your information is interesting i am agree and but i am not idea.

This thread is quite helpful.