I use i3wm, and to map cap lock to escape, I run:

setxkbmap -option caps:swapescape

This works fine, but sometimes while hitting the F1 key, my pinky can accidentally hit the Escape key, which turns on CapsLock.

Gnome has a very nice way to do this, where Shift + Escape = CapsLock. Hitting Escape on its own will do nothing.

  • bdonvrA
    link
    fedilink
    arrow-up
    2
    ·
    edit-2
    15 hours ago

    Wait why do people want escape there???

    I like the backspace there like Colemak has. I can do Fn-Backspace(capslock) to activate Caps Lock but that’s something I added to my Keyboard separately.

      • gwilikers@lemmy.ml
        link
        fedilink
        arrow-up
        1
        ·
        edit-2
        12 hours ago

        From my understanding, Esc was originally where the Caps lock is on earlier keyboard layouts. That’s why it’s bound to that in Vim. It’s a holdover, so it makes sense to switch them back.

    • BaconIsAVeg@lemmy.ml
      link
      fedilink
      English
      arrow-up
      2
      ·
      15 hours ago

      I have a ZSA Voyager and my escape key is on my left thumb, beside the space key.

      For the life of me though I can’t imagine why anyone is still using CAPSLOCK, vbU.

      • ShittyBeatlesFCPres@lemmy.world
        link
        fedilink
        English
        arrow-up
        2
        ·
        11 hours ago

        I do that too. I almost never want to hit CAPS LOCK (and can type holding shift) but if you map it to CTRL or even something not on modern keyboards (like F15 or any number over 12, I guess), you can use it as a shortcut key.

        Personally, I use CAPS (remapped to CTRL) plus Tilde as my shortcut to show/dismiss a Quake-style terminal overlay window. That key combo actually can be made to work on Windows and macOS too so it’s basically cross-platform.

        I’m 99% sure macOS (with iTerm 2 setup for Quake-style) has a built-in system option to remap CAPS LOCK but it only allows a few keys. I forget the Windows method. I used to have to use Windows sometimes but it’s been awhile. I’ve definitely got it working with a third party terminal emulator and WSL2, though.