[GH-ISSUE #56] SSH connection isn't ready for keyboard input upon window focus #2922

Closed
opened 2026-03-13 00:12:42 +03:00 by kerem · 10 comments
Owner

Originally created by @majkinetor on GitHub (Jan 12, 2021).
Original GitHub issue: https://github.com/1Remote/1Remote/issues/56

Originally assigned to: @VShawn on GitHub.

If you ALT + TAB to another app, then return to ssh connection, you can't type until you explicitly click somewhere in the window. Until you click, cursor is hollow, when you click, it is filed.

Originally created by @majkinetor on GitHub (Jan 12, 2021). Original GitHub issue: https://github.com/1Remote/1Remote/issues/56 Originally assigned to: @VShawn on GitHub. If you ALT + TAB to another app, then return to ssh connection, you can't type until you explicitly click somewhere in the window. Until you click, cursor is hollow, when you click, it is filed.
kerem 2026-03-13 00:12:42 +03:00
Author
Owner

@VShawn commented on GitHub (Jan 12, 2021):

actually it's not a bug.

When ssh was implemented by kitty not premotem , so when you back premotem from alt+tab, you are focus on premotem, so we have to click one time to let kitty get focus.🤔

in fact, in original versions, when you click window border ssh will not get focus until you click the SSH darkness area. And when you click ssh darkness area when window was in the background and masked by other window, premotem will not goes to foreground though SSH has get the focus😂

I made some efforts to let premotem auto focus on Kitty. But anyway extend app will never brings a same experience compare with a native app.

Anyway I will try and check if we can fix your issue🤜🏻

<!-- gh-comment-id:758573849 --> @VShawn commented on GitHub (Jan 12, 2021): actually it's not a bug. --- When ssh was implemented by kitty not premotem , so when you back premotem from alt+tab, you are focus on premotem, so we have to click one time to let kitty get focus.🤔 in fact, in original versions, when you click window border ssh will not get focus until you click the SSH darkness area. And when you click ssh darkness area when window was in the background and masked by other window, premotem will not goes to foreground though SSH has get the focus😂 I made some efforts to let premotem auto focus on Kitty. But anyway extend app will never brings a same experience compare with a native app. Anyway I will try and check if we can fix your issue🤜🏻
Author
Owner

@majkinetor commented on GitHub (Jan 12, 2021):

actually it's not a bug.

Actually, it is. What you talk about is implementation detail that is irrelevant to end user :)

I made some efforts to let premotem auto focus on Kitty. But anyway extend app will never brings a same experience compare with a native app.

Never is a strong word :) We can get creative: you could simulate mouse click when you detect focus on SSH, heck I can even do it externally with AutoHotKey :)

Bug it is.

<!-- gh-comment-id:758580399 --> @majkinetor commented on GitHub (Jan 12, 2021): > actually it's not a bug. Actually, it is. What you talk about is implementation detail that is irrelevant to end user :) > I made some efforts to let premotem auto focus on Kitty. But anyway extend app will never brings a same experience compare with a native app. Never is a strong word :) We can get creative: you could simulate mouse click when you detect focus on SSH, heck I can even do it externally with AutoHotKey :) Bug it is.
Author
Owner

@VShawn commented on GitHub (Jan 12, 2021):

You may be right, I am more thinking as an engineer than an experience designer.

But I still think that embedded programs cannot achieve the effects of native programs. Embedded program require additional logic to achieve a same experience with native program, which means it will be more difficult to maintain and more likely to cause bugs, and bring other bad experiences.

I am looking for a WPF ssh terminal simulater control and get nothing.

<!-- gh-comment-id:758639688 --> @VShawn commented on GitHub (Jan 12, 2021): You may be right, I am more thinking as an engineer than an experience designer. But I still think that embedded programs cannot achieve the effects of native programs. Embedded program require additional logic to achieve a same experience with native program, which means it will be more difficult to maintain and more likely to cause bugs, and bring other bad experiences. I am looking for a WPF ssh terminal simulater control and get nothing.
Author
Owner

@majkinetor commented on GitHub (Jan 12, 2021):

I am looking for a WPF ssh terminal simulater control and get nothing.

Never mind. Since you plan rewrite I wouldn't lose time on things like this as any solution might be worth nothing when new system is up.

I will see on my own how this can be fixed as it really breaks experience for me (the same was true also for mRemoteNg) and let you know if I find something. You should however keep this in mind when designing new system.

<!-- gh-comment-id:758741063 --> @majkinetor commented on GitHub (Jan 12, 2021): > I am looking for a WPF ssh terminal simulater control and get nothing. Never mind. Since you plan rewrite I wouldn't lose time on things like this as any solution might be worth nothing when new system is up. I will see on my own how this can be fixed as it really breaks experience for me (the same was true also for mRemoteNg) and let you know if I find something. You should however keep this in mind when designing new system.
Author
Owner

@VShawn commented on GitHub (Jan 13, 2021):

any solution might be worth nothing when new system is up.

but the purpose of refactoring is only to optimize the structure of the software, and existing solutions may continue to be used.

<!-- gh-comment-id:759132544 --> @VShawn commented on GitHub (Jan 13, 2021): > any solution might be worth nothing when new system is up. but the purpose of refactoring is only to optimize the structure of the software, and existing solutions may continue to be used.
Author
Owner

@VShawn commented on GitHub (Jan 13, 2021):

I tried to fix it, and don’t know if new bugs was introduced.

Try it:

PRemoteM_0.5.8.2101331121.zip

<!-- gh-comment-id:759229548 --> @VShawn commented on GitHub (Jan 13, 2021): I tried to fix it, and don’t know if new bugs was introduced. Try it: [PRemoteM_0.5.8.2101331121.zip](https://github.com/VShawn/PRemoteM/files/5806796/PRemoteM_0.5.8.2101331121.zip)
Author
Owner

@majkinetor commented on GitHub (Jan 13, 2021):

It works if window is alone, however, if I open second tab, then switching between tabs will act the same as before, even a bit worse.

and don’t know if new bugs was introduced.

Testing this I discovered a new bug NOT in the previous version - I open two same SSH tabs, and type in one, then in second one I have 2 cursors shown and that cursor can be moved right of its previous location:

image

<!-- gh-comment-id:759342584 --> @majkinetor commented on GitHub (Jan 13, 2021): It works if window is alone, however, if I open second tab, then switching between tabs will act the same as before, even a bit worse. > and don’t know if new bugs was introduced. Testing this I discovered a new bug **NOT in the previous version** - I open two same SSH tabs, and type in one, then in second one I have 2 cursors shown and that cursor can be moved right of its previous location: ![image](https://user-images.githubusercontent.com/85767/104437308-e45dc680-558e-11eb-9f69-10d5a2987da5.png)
Author
Owner

@VShawn commented on GitHub (Jan 13, 2021):

Testing this I discovered a new bug NOT in the previous version - I open two same SSH tabs, and type in one, then in second one I have 2 cursors shown and that cursor can be moved right of its previous location:

Nope, 2 cursors did existed in previous version since I turned PuTTY to KiTTY, I seem them before.

Just no idea to fix it.

BTW 1 of 2 cursors should disappear after ‘Enter’ or window resize.

<!-- gh-comment-id:759361510 --> @VShawn commented on GitHub (Jan 13, 2021): >Testing this I discovered a new bug NOT in the previous version - I open two same SSH tabs, and type in one, then in second one I have 2 cursors shown and that cursor can be moved right of its previous location: Nope, 2 cursors did existed in previous version since I turned PuTTY to KiTTY, I seem them before. Just no idea to fix it. BTW 1 of 2 cursors should disappear after ‘Enter’ or window resize.
Author
Owner

@VShawn commented on GitHub (Jan 13, 2021):

another bug is that KiTTY was not killed when the tab was closed.

image

update:
it seems like the bug of my debug version.

<!-- gh-comment-id:759364884 --> @VShawn commented on GitHub (Jan 13, 2021): ~~another bug is that KiTTY was not killed when the tab was closed.~~ ![image](https://user-images.githubusercontent.com/10143738/104441880-3fafa900-55cf-11eb-8ca8-cd6b2e0f6cf3.png) update: it seems like the bug of my debug version.
Author
Owner

@VShawn commented on GitHub (Jan 13, 2021):

Testing this I discovered a new bug NOT in the previous version - I open two same SSH tabs, and type in one, then in second one I have 2 cursors shown and that cursor can be moved right of its previous location:

I guess the cursor is drawn repeatedly due to multiple activation of KiTTY.

In old version, this bug was easy show up when “auto command” was set.
image

<!-- gh-comment-id:759385092 --> @VShawn commented on GitHub (Jan 13, 2021): > Testing this I discovered a new bug NOT in the previous version - I open two same SSH tabs, and type in one, then in second one I have 2 cursors shown and that cursor can be moved right of its previous location: I guess the cursor is drawn repeatedly due to multiple activation of KiTTY. In old version, this bug was easy show up when “auto command” was set. ![image](https://user-images.githubusercontent.com/10143738/104445882-a6839100-55d4-11eb-80f9-9b1a77d50379.png)
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#2922
No description provided.