

Those special keys on your Mac’s keyboard, like Command (⌘), Option (⌥), Control (⌃), and others, are most commonly used in conjunction with regular keys as feature shortcuts.įrequently-used macOS commands have their dedicated keyboard shortcuts, many of which are the same across apps like copy/paste and undo/redo.

Since we don’t need the return key, we can drop it.Veteran users are privy to the power of the Mac modifier keys. So from our code 02630a, 02 stands for ctrl+b, 63 stands for c, and 0a stands for return. Keystroke hex codes are bound to two character at a time. You now have the hex code 02630a, which stands for ctrl+b c return. You will see the following data output in your terminal: ^Bc 02630a Then type ctrl+b, c, then press the return key (aka enter). We will use xxd to record our keystrokes and dump the hex codes we need.įirst run the following command (outside of tmux): xxd -psd In order to simulate a keystroke, Alacritty uses hex codes, which is simply a combination of characters.įor our example, we need to get the hex code values for c. New tabs in macOS are created with the cmd+t keyboard shortcut. tmux windows share the same UI pattern as tabs in macOS (ex: Safari tabs or Finder tabs). In macOS, keyboard shortcuts are driven by the command key plus an additional key.Īs an example, you can create a new tmux window with prefix+c. tmux uses a prefix (default: control+b) followed by a key to run a key binding. We will go through the following steps:īefore you can assign the keyboard shortcut you have to decide what you want it to do. In this article, I’m going to show you how to create your own keyboard shortcut for tmux. So, using the Alacritty terminal emulator, I found a way to customize tmux with my own macOS style keyboard shortcuts using the command key. I spent months building the muscle memory for the tmux keybindings, but it always felt slow compared to the macOS keyboard shortcuts. Unfortunately, tmux is a tool used in the terminal that doesn’t leverage the command key at all, but rather all of it’s commands are prefixed with the keystroke ctrl+b followed by a letter (ex: new window is ctrl+b c). Most power users agree that staying away from the mouse and keeping your hands on the keyboard for as long as possible will help you be faster and more efficient while working.

You’re probably familar with cmd+c for copying to the clipboard, and cmd+t to create a new tab in Safari. As a longtime macOS user, I am used to using the command key to get a lot done.
