Open iTerm2 with ctrl+ctrl?

1

1

I recently switched from TotalTerminal (formerly Visor) to iTerm2 on Mac OS X. I used to be able to open TotalTerminal with the shortcut Ctrl Ctrl (two quick taps). Is this same shortcut possible in iTerm2?

Joe Mornin

Posted 2014-01-07T18:18:52.733

Reputation: 1 399

Answers

2

You can use a private.xml like this with KeyRemap4MacBook:

<?xml version="1.0"?>
<root>
  <vkopenurldef>
    <name>KeyCode::VK_OPEN_URL_ITERM</name>
    <url>file:///Applications/iTerm.app</url>
  </vkopenurldef>
  <item>
    <name>test</name>
    <identifier>test</identifier>
    <autogen>__DoublePressModifier__ KeyCode::CONTROL_L, KeyCode::CONTROL_L,
    KeyCode::VK_OPEN_URL_ITERM</autogen>
  </item>
</root>

If you have the Powerpack for Alfred 2, you can create a workflow like this:

If you want to make the shortcut toggle showing iTerm, add for example __DoublePressModifier__ KeyCode::CONTROL_L, KeyCode::CONTROL_L, KeyCode::F18 to private.xml and then set F18 as the shortcut for toggling iTerm:

Or check the "Toggle visibility for apps" option in Alfred.

Lri

Posted 2014-01-07T18:18:52.733

Reputation: 34 501

Thanks. This opens iTerm if it's not already open, but it won't toggle the visor if it's already open. – Joe Mornin – 2014-01-16T03:43:11.440

I think it's easier to just use command-H, but I edited the answer. – Lri – 2014-01-18T20:38:15.950

0

iTerm2 does not natively support this option, nor does the System Preferences keyboard prefpane. Search results show no programs capable of replicating such keyboard shortcut functionality. Your best bet is to get something like Quicksilver or Alfred and use control-control (or any other such key tap sequence you desire) to open the launcher app, then type the first few letters of "iTerm" and then Enter to open it.

Caleb Xu

Posted 2014-01-07T18:18:52.733

Reputation: 1 523

0

Use Alfreds Powerpack and create a new Workflow. Use a Trigger for double CTRL and an Apple Script as Action.

The Applescript should look like this

on alfred_script(q)

    tell application "System Events" to keystroke "^" using control down

end alfred_script

Enable "Cache compiled AppleScript" for maximum performance.

Alfred Workflow

cgross

Posted 2014-01-07T18:18:52.733

Reputation: 121