0

I'm on macOS Ventura 13.1. I have the command and control modifier keys swapped in the macOS keyboard settings, and it works in most places, but terminal programs still expect command+X to close nano, or command+C to kill a process, etc., but I'd prefer they use control+X or control+C to be consistent with the rest of the system.

Is there a way to fully rebind these modifier keys so that they work globally in all programs, including terminals like iTerm2 and VS Code's integrated terminal? I tried using Karabiner Elements, but that didn't work inside terminals either.

6
  • Terminals expect Ctrl/key. People mainly just get used to that fact that they want 'the other one' compared to the rest of the system.
    – Tetsujin
    Commented Jan 25, 2023 at 17:01
  • Use hidutil to remap keys systemwide. Similar question: apple.stackexchange.com/q/434991/119271
    – Allan
    Commented Jan 25, 2023 at 18:32
  • @Allan Thanks for the tip! I just tried that, and it looks like it doesn't fix the problem inside terminals. That change makes it function the same way as rebinding through System Settings does--the binding works in most places, but terminals still require command.
    – vaindil
    Commented Jan 25, 2023 at 19:11
  • It should work everywhere. Did you close and restart Terminal?
    – Allan
    Commented Jan 25, 2023 at 19:13
  • @Allan Yes, I restarted the terminal. Pressing ctrl+V does paste into the terminal, so iTerm2 in this case is recognizing the command, but if I go into nano within the terminal, I have to hit command+X to close it. I think I understand now what Tetsujin is saying, that this is just the nature of how keybinds work on macOS and there's probably no solution to this.
    – vaindil
    Commented Jan 25, 2023 at 19:21

0

You must log in to answer this question.

Browse other questions tagged .