How to change binding in zsh? command key vs control key
-
02-06-2021 - |
Question
I moved to Mac OS and I'm facing the control vs command key problem.
I already changed the settings for my external keyboard, so that my control key is mapped to command key and viceversa. This fixes my habits of ctrl-x,c,v,z and ctrl-t,ctrl-w for the browser and most applications.
However, when I work with Terminal and zsh, now ctrl-w, ctrl-u, ctrl-a etc... does not do what I expect, because I'm of course sending command-w etc.
How do I fix this once and for all so that I don't need to change my habits?
Solution 2
I solved my problem by switching from the default Mac OS terminal to iTerm2
which allows to remap modifiers very easily.
OTHER TIPS
- Install the awesome, free Karabiner-Elements app.
- Install the "Keyboard shortcuts for Terminal apps" mod.
Then, instead of using ^W
, ^U
, ^A
, etc., you can just use the modifier keys (⌘/⌥/⌃) plus the arrow/delete keys (↑/↓/←/→/⌫/⌦), just as you do in the rest of macOS.
Don't like those exact mappings? Just git clone https://github.com/pqrs-org/KE-complex_modifications.git
and write your own mod. 😎