I know I can add key shortcuts to a profile or in general to iTerm2
But can I, and if so, how do I disable or change the default application keyboard shortcuts in iTerm2?
For example, I'd like to disable the command ⌘ W
for Closing the current pane / window.
This can be done in 2 ways.
Using defaults
command:
defaults write com.googlecode.iterm2.plist NSUserKeyEquivalents -dict-add "Close" "\U0000"
. (\U0000
means NULL
)To revert this run, defaults write com.googlecode.iterm2.plist NSUserKeyEquivalents -dict-add "Close" -string "@W"
Using System Preferences: (In this method, shortcut is changed, not removed.)