

Besides the frontend compilation, you may start a frontend or backend server handling incoming requests. For example, you may have a compile step to bundle up the final JavaScript file that will be delivered to the browser. Also keep in mind that these shortcuts can no longer be used to manipulate iTerm itself, so be sure to avoid mapping any keyboard shortcuts that you already tend to use, like cmd + q to quit, or cmd + t to open a new terminal tab.Modern development environments sometimes require more than a single command line tab to run a project. Obviously you can pick and choose which to add, or add more if you have a need.

ITERM KEYBOARD SHORTCUTS CODE
In this case, we want to emulate ctrl + c, so open up Key Codes and with the window focused, press the key combination.Ĭopy the hexadecimal code under the Unicode section into the iTerm field. I use the Key Codes app to figure out what the appropriate hexadecimal code is for the key combination that I want to emulate. Select the ‘Send Hex Code’ option in the select box.

This is the literal shortcut you’ll use to trigger the mapping, so you should be pressing the shortcut that you actually want to be pressing on a regular basis. Click the field to set the keyboard shortcut - let’s say cmd + c.
ITERM KEYBOARD SHORTCUTS PLUS
In the ‘Key Mapping’ section, click the plus button to add a mapping. Open up iTerm’s preferences window, and head to the ‘Keys’ tab. ITerm is pretty configurable, so what we can do is set up certain key combinations to forward hexadecimal key codes for the ‘proper’ keys. Any terminal programs that use ctrl shortcuts are affected (like nano, for example). This sucks, because muscle memory from using Linux makes me reach for what is now my cmd key. Expectedly, terminal commands like ctrl + c and ctrl + l (which clears the buffer, super useful) don’t just work with the cmd key - you need to use ctrl. Where it doesn’t work out so well, is in iTerm.

Sweet, now I can reach for the key I’m used to and get cmd instead. So, using macOS’s built-in keyboard configuration, I mapped my ctrl modifier to be cmd, and my cmd modifier to be ctrl.
ITERM KEYBOARD SHORTCUTS WINDOWS
On macOS, the cmd key tends to be a pain in the ass.Ĭopy and paste, quitting applications, and all sorts of other things that you’d typically do with the ctrl key on a Linux or Windows machine, all use the cmd key instead. Using Linux, or even Windows, the ctrl key tends to be the only real modifier key you need to worry about, especially in the context of using a terminal. I use macOS, both on my laptop and desktop (a Hackintosh). I had made the switch to caps lock control around a year before I picked up my HHKB, so it was no problem using it, mostly. Where’s it gone to? It’s replaced the bastard child of keyboard keys, Caps Lock. The keyboard is really a topic for another post - the reason I mention it is the placement of the ctrl key. After trying a couple different kinds of keyboards, I eventually settled on a Happy Hacking Keyboard.
