[GH-ISSUE #224] SSH lost focus with alt+tab #195

Closed
opened 2026-02-26 11:57:09 +03:00 by kerem · 4 comments
Owner

Originally created by @Kerwin1202 on GitHub (Mar 24, 2022).
Original GitHub issue: https://github.com/1Remote/1Remote/issues/224

Originally assigned to: @VShawn on GitHub.

当我 ssh 服务器的时候,采用 alt+tab 切换到其他窗口,我需要切换两次。

并且从其他窗口切换回来的时候,光标并不在输入输入框中,必须鼠标点下窗口才可以输入


When I SSH server, use the Alt + TAB to switch to the other Windows, I need to switch twice.And returned from the other window switch, the cursor is not in the input in the input box, must be the window under the mouse point can be input

Originally created by @Kerwin1202 on GitHub (Mar 24, 2022). Original GitHub issue: https://github.com/1Remote/1Remote/issues/224 Originally assigned to: @VShawn on GitHub. 当我 `ssh` 服务器的时候,采用 `alt+tab` 切换到其他窗口,我需要切换两次。 并且从其他窗口切换回来的时候,光标并不在输入输入框中,必须鼠标点下窗口才可以输入 ---- When I SSH server, use the Alt + TAB to switch to the other Windows, I need to switch twice.And returned from the other window switch, the cursor is not in the input in the input box, must be the window under the mouse point can be input
kerem 2026-02-26 11:57:09 +03:00
Author
Owner

@VShawn commented on GitHub (Mar 25, 2022):

感谢反馈,我回去检测一下。

<!-- gh-comment-id:1078546337 --> @VShawn commented on GitHub (Mar 25, 2022): 感谢反馈,我回去检测一下。
Author
Owner

@VShawn commented on GitHub (Mar 26, 2022):

bug confirm and it is easy to fix.

<!-- gh-comment-id:1079549264 --> @VShawn commented on GitHub (Mar 26, 2022): bug confirm and it is easy to fix.
Author
Owner

@Kerwin1202 commented on GitHub (May 14, 2022):

不知道这个是否会考虑再次优化下,还是自编译最新版,有上面这个 Commit 如图,
但是还是有个问题,在 PremoteM 中 ssh 的时候,alt + tab 需要两次 才可以切换到别的应用。

但是从别的应用按一次切换回来倒是没问题,这次可以正常直接输入了

image

image

<!-- gh-comment-id:1126731683 --> @Kerwin1202 commented on GitHub (May 14, 2022): 不知道这个是否会考虑再次优化下,还是自编译最新版,有上面这个 Commit 如图, 但是还是有个问题,在 PremoteM 中 ssh 的时候,alt + tab 需要两次 才可以切换到别的应用。 但是从别的应用按一次切换回来倒是没问题,这次可以正常直接输入了 ![image](https://user-images.githubusercontent.com/16319833/168430789-04cd574f-0a29-44de-9e72-49e8c5b985af.png) ![image](https://user-images.githubusercontent.com/16319833/168430784-dbf9a349-24a1-43b9-8691-8965b9802d92.png)
Author
Owner

@VShawn commented on GitHub (May 16, 2022):

在 PremoteM 中 ssh 的时候,alt + tab 需要两次 才可以切换到别的应用。

目前没有办法,这是APP原理上决定的,SSH 的实是 PRemtoeM host 了 putty 的进程,PRemtoeM 通过 SetForegroundWindow 使 putty 保持 activate,所以第一下 alt + tab 比然是使 activate window 从 putty 回到 PRemtoeM.

强行要改的话可能可以通过 windows api 给 alt + tab 加钩子,检测到是 PRemtoeM 时就切到下一个程序,不过这样做我个人觉得太 hardcore 了,加钩子也容易被当成病毒杀掉。

<!-- gh-comment-id:1127122388 --> @VShawn commented on GitHub (May 16, 2022): > 在 PremoteM 中 ssh 的时候,alt + tab 需要两次 才可以切换到别的应用。 目前没有办法,这是APP原理上决定的,SSH 的实是 PRemtoeM host 了 putty 的进程,PRemtoeM 通过 SetForegroundWindow 使 putty 保持 activate,所以第一下 alt + tab 比然是使 activate window 从 putty 回到 PRemtoeM. 强行要改的话可能可以通过 windows api 给 alt + tab 加钩子,检测到是 PRemtoeM 时就切到下一个程序,不过这样做我个人觉得太 hardcore 了,加钩子也容易被当成病毒杀掉。
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/1Remote#195
No description provided.