Interaction of mapping modifier keys in both OSX system preferences and iterm2
- iTerm2 version: 3.2.7
- OS version: OSX 10.14.3
I prefer to have command and control swapped for the OSX operating system, but wish them to have the default behavior when using iterm2. The following steps allowed this to work in an previous versions of OSX. If there is a more correct way of achieving this behavior I would like to know.
Detailed steps to reproduce the problem:
- Go to System Preferences > Keyboard > Modifier Keys
- Map Ctrl to Command and Command to Control
- Go to the Iterm2 > Preferenes > Keys
- Map Ctrl to left command and left command to ctrl
In iterm2 both modifier keys (left command and ctrl) now execute a command. For instance hitting either ctrl-D or command-D creates a new split pane. The expected ctrl-C behavior for exiting a command line program does not work (presumably because it is executing a command-C instead).
What should have happened:
In the system (outside iterm2) hitting control executes command, and command executes in control. In iterm2 hitting control should execute control, and hitting command should execute command. For instance hitting ctrl-D should close a split pane rather than opening a new split pane.