How can I prevent the iTerm2 hotkey window from losing focus?

15

3

Is there a way to prevent the iTerm2 hotkey window from losing focus when another window is clicked?

I'm aware of this question already, but the answer does not work for me. Unchecking "Hotkey window hides when focus is lost" does not prevent the hotkey window from losing focus when another window is clicked. That option just prevents the hotkey window from hiding in the background, eliminating the short display animation when I press the hotkey again.

I'm using OS X El Capitan 10.11.5 and iTerm2 Build 3.0.0.

alexwforsythe

Posted 2016-07-14T18:24:52.783

Reputation: 153

Answers

29

(If anyone wants the answer as of October 2017)

For iTerm2 as of v3.1.3:

  1. Open the iTerm Preferences window (Menu bar: iTerm2 > Preferences...) and select Profiles.
  2. Select the Hotkey Window profile* you want to change.
  3. Click on the Keys tab inside the Hotkey Window profile.
  4. Click on Configure Hotkey Window button, opening a pulldown dialog.
  5. Check the Pin hotkey window (stays open on loss of keyboard focus) and Floating window options, then click OK to confirm.

You may need to close the Hotkey Window first if it's already open (or you can restart iTerm) in order for the changes to take effect.

Screenshot of iTerm preferences window


* Nb. Since v3.1 you can have multiple hotkey windows, so this is why I say "the profile you want to change", as there may be more than one Hotkey Window profile, unlike in the screenshot.

Benjamin R

Posted 2016-07-14T18:24:52.783

Reputation: 412

2Thanks! However, to get the window to stay "on top"/"in front" of other windows, I had to also enable Floating window and restart the app. Now it works perfectly :) – alexwforsythe – 2017-10-18T23:31:55.697

1@alexwforsythe Ah! I will edit my answer to make this requirement explicit, thanks for sharing that important detail. – Benjamin R – 2017-10-19T00:59:26.340

My pleasure.. I always refer back to this answer – abbood – 2018-03-07T22:10:08.457

3

Try this (for iTerm2 ~ v3.0.10):

  1. Open iTerm2 Preferences > Keys Tab (not Profiles>Keys!)
  2. Turn off option "Hotkey window hides when focus is lost"

kivagant

Posted 2016-07-14T18:24:52.783

Reputation: 131

1UP: The mentioned problem was fixed. – kivagant – 2017-09-26T10:30:18.323

1

I needed to go to Settings -> Advanced, search for "Hide", then check the relevant option. Only then do the "Hide when focus lost" checkbox and keymap in Settings > Key work.

Yatharth Agarwal

Posted 2016-07-14T18:24:52.783

Reputation: 562