jimradford / superputty

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

FocusActiveSession is usually wrong when switching tabs with shortcuts #927

Open Tomas-M opened 5 months ago

Tomas-M commented 5 months ago

I am using latest superputty release. I have consifured shortcuts that Ctrl+PgUp goes to previous tab, Ctrl+PgDn goes to next tab. Many times when I have multiple sessions open (using latest putty stable exe), I can properly switch between tabs with these shortcuts, but focus stays on one session and the newly activated tab does not get focus. This is terrible because I start typing and the text is typed to the inactive (no longer visible) tab.

I noticed that if I configure another shortcut, FocusActiveSession, for example to Ctrl+Space, then I can press this shortcut after switching to prevtab/nexttab and the focus is fixed, since that the focus is always correct after subsequent tab changes with ctrl+pgup and ctrl+pgdn.

Using Windows 10 Home version 22H2

luisbunuel commented 5 months ago

I have been suffering this issue since the very beginning, as a temporary workaround you can use the "Switch Session" shortcut which is less handy but doesn't have the focus issue. Anyway, I think this issue should be a priority.

rex-banner commented 5 months ago

I noticed that if I configure another shortcut, FocusActiveSession, for example to Ctrl+Space, then I can press this shortcut after switching to prevtab/nexttab and the focus is fixed, since that the focus is always correct after subsequent tab changes with ctrl+pgup and ctrl+pgdn.

Thanks @Tomas-M for this nice workaround :) Focus bug already raised in 2022 in https://github.com/jimradford/superputty/issues/880 but no answer since then :( Using keyboard shortcut CtrlTab CtrlShiftTab MUST come with focus @jimradford Could you give your opinion on this issue ?

sdturne commented 4 months ago

I just started using SuperPutty and this is one of the very first things I noticed. I honestly can't think of any reason why the focus shouldn't be associated with the current active tab. Very surprising behavior.