jimradford / superputty

The SuperPuTTY Window Manager for putty sessions
https://www.facebook.com/superputty
MIT License
1.91k stars 320 forks source link

Alt+Tab stays in SuperPuTTY (extra Tab required) #809

Open Chealer opened 4 years ago

Chealer commented 4 years ago

Describe the bug On Windows, when several windows are opened, pressing the Tab key while holding the Alt key should change the window at the foreground (the one with focus) to the last used window. But unlike all other applications, simply pressing Alt+Tab does not give focus to the right window when SuperPuTTY has focus.

To Reproduce Steps to reproduce the behavior:

  1. Have exactly 1 SuperPuTTY window opened
  2. Ensure that at least one more window is opened
  3. Give focus to SuperPuTTY
  4. Hold the Alt key
  5. Press the Tab key
  6. Release the Alt key

Expected behavior A window other than SuperPuTTY should get in the foreground and get focus.

Desktop (please complete the following information):

Additional context "Alt+Tab" can include several presses of the Tab key. Technically, this bug causes an extra press to be required. What would require Alt + Tab*n requires Alt + Tab*(n+1), and the combination when n is 1 does not change the displayed window.

This was previously tracked in ticket #216 This bug is apparently due to SuperPuTTY's hybrid nature (PuTTY + SuperPuTTY), and would be non-trivial to solve.

daattali commented 4 years ago

Can confirm this happens to me too (also Windows 10 Pro).

I also came here after seeing the 5+ year old issue at https://github.com/jimradford/superputty/issues/216 is closed

BraINstinct0 commented 4 years ago

Also confirmed on Windows 10 Home (Version 2004 Build 19041.450).

zecode commented 3 years ago

I have the same experience. Very annoying. Windows 10 Home 19041.572

kczx3 commented 3 years ago

Most likely has to do with the fact that SuperPuTTY just launches PuTTY and then sets the SuperPuTTY window as the parent of the PuTTY window.

zidercol commented 3 years ago

Lifehack, use Win+Tab in Windows 10. Saw such behaviour in old versions of Putty. You can test different.

Chealer commented 3 years ago

I've just seen an even more annoying key bug, still in 1.4.0.9. Alt+Tab would consistently switch PuTTY tab rather than window. This must be rare, I don't remember seeing that yet.

It also solved quickly; I didn't even have to restart SuperPuTTY. It was solved a couple minutes later, after a few windows switches using the mouse.

XulleX commented 2 months ago

Still an issue with Win11.
Updated the AHK workaround for AHK v2

; Superputty Alt+Tab Window switching workaround
#HotIf WinActive("ahk_class PuTTY")
!tab::SendInput("{Alt down}{tab 2}")