Sublime Forum

Problem when using Windows hotkey to run Sublime

#1

Please give this a try and let me know whether this is only happening to me…

I created a simple hotkey to run Sublime via a Windows shortcut. For example,
Sub.lnk with a Target of:
“C:\apps\Sublime Text 3\sublime_text.exe”
Shortcut key:
Ctrl+Alt+1 [Doesn’t matter what key is used]

Hit the shortcut key. A Sublime window opens and you can use it normally
Hit the shortcut key again. The Sublime window remains open BUT the window is not active - it doesn’t have focus. It’s on top, but you can’t type into it or use Ctrl keys (like Ctrl+O to open a file) or Alt+keys (like Alt+F to open the file menu). If you Alt+Tab TWICE you can use Sublime normally, but as soon as you use the shortcut key again Sublime loses focus (though it stays on top)

NOTE: If you invoke Sublime in any other way (like, by double-clicking the desktop icon) everything works as expected. It’s only when you use the shortcut to activate it that won’t get the focus.

PS Tonight I’m going to try it on a computer that has never had Sublime installed to see if that makes any difference. I do use some (standard) packages and rather than getting into un-installing them and undoing all my preferences, I’ll just try a fresh machine. I’ll update this post with my findings

EDIT [1/20]: I tried it on a Win 10/64 computer that never had ST installed before (forgive me) and it does the same thing. I’ve also tried it on a Win 7/64 machine.

0 Likes

#2

confirmed (Windows 7 x64)

confirmed, if I only have one ST window open. If I have more than one, the most recent window is brought to the top and activated.

for me, if my sole ST window has the focus when I press the hotkey, it loses the focus. If it doesn’t have the focus, the window that did have the focus, loses the focus, but the ST window isn’t on top or focused.

confirmed. Double-clicking focuses and brings to top the most recent window, even if there is only one.

1 Like