Switching tabs in Mac terminal with Ctrl+PageUp/PageDown

defaults write -g NSUserKeyEquivalents -dict-add "Select Previous Tab" "^\UF72C" "Previous Tab" "^\UF72C" "Previous Workspace" "^\UF72C" "Select Next Tab" "^\UF72D" "Next Tab" "^\UF72D" "Next Workspace" "^\UF72D"

-g modifies ~/Library/Preferences/.GlobalPreferences.plist. You need to reopen apps to apply changes, and the manually added shortcuts aren't displayed in Application Shortcuts.


You could use iTerm, since that has a much more flexible shortcuts system, but you will inevitably come across another application that does not work the way you want.

I think you will find that Command+shift+[ and Command+shift+] are the only consistent shortcuts for switching between tabs and it is better to simply change your habits.


Lri's answer works (and FWIW, I upvoted it), but takes a bit of a shotgun approach: it creates global settings (instead of Terminal-specific settings), and some of the things it sets actually have no effect on Terminal at all -- I actually don't know what they're for.

If, like me, you're a bit paranoid and would prefer a more "surgical" approach, here's a modified version of Lri's answer:

defaults write com.apple.Terminal NSUserKeyEquivalents -dict-add "Select Previous Tab"    "^\UF72C"
defaults write com.apple.Terminal NSUserKeyEquivalents -dict-add "Select Next Tab"        "^\UF72D"

This adds only two keybindings, ^PageUp and ^PageDown, and adds them only to Terminal.