Apple - How to open terminal in Mac using keyboard shortcut?
Press CmdSpace to open spotlight search, and type terminal and hit return.
Or if you are in the terminal press CmdT to open a new tab OR CmdN to open a new Terminal window.
Karabiner-Elements (10.12 and later)
Karabiner stopped working in 10.12 due to changes in the kernel architecture, and Karabiner was rewritten as Karabiner-Elements which uses a new JSON format for the configuration files.
You can now add a rule like this to karabiner.json
(https://pqrs.org/osx/karabiner/json.html):
{
"from": {
"key_code": "t",
"modifiers": {
"mandatory": [
"right_option"
]
}
},
"to": [
{
"shell_command": "open -aterminal"
}
],
"type": "basic"
}
Karabiner (10.11 and earlier)
Save a file like this as private.xml:
<?xml version="1.0"?>
<root>
<vkopenurldef>
<name>KeyCode::VK_OPEN_URL_TERMINAL</name>
<url>file:///Applications/Utilities/Terminal.app</url>
</vkopenurldef>
<item>
<name>custom</name>
<identifier>custom</identifier>
<autogen>__KeyToKey__ KeyCode::T, ModifierFlag::OPTION_R | ModifierFlag::NONE, KeyCode::VK_OPEN_URL_TERMINAL</autogen>
</item>
</root>
Alfred
If you have bought the Powerpack for Alfred, you can create a workflow like this:
Hotkeys have a short delay by default, but you can reduce the delay by changing the "Trigger behaviour" option from "Simulate modifier keys released" to "Pass through modifier keys (Fastest)":
iTerm 2
iTerm 2 has an option to enable a global keyboard shortcut for focusing the application in "Preferences > Keys > Show/hide all windows with a system-wide hotkey":