ultravnc / UltraVNC

UltraVNC Server, UltraVNC Viewer and UltraVNC SC | Official repository: https://github.com/ultravnc/UltraVNC
https://uvnc.com
GNU General Public License v3.0
833 stars 190 forks source link

When issuing ALT + Tab in on client, tab gets stuck indefinitely unless interrupted with ALT or Tab key again #46

Open ghnand opened 2 years ago

ghnand commented 2 years ago

I have tested this with several hosts (windows 10) and clients (Windows 10, Mac OSX, Linux), as well as different physical keyboards, however the issue persists across all variations.

How reproducible: enable scroll lock. Launch ultravnc viewer and connect to client Press ALT + Tab and release both. As you would when switching between windows normally.

The client behaves as if tab is held down and cycles through the window.

charlescanato commented 1 year ago

I've found this same problem - in my case this is the client running on Win7 and connecting to Kubuntu 22.04 running krfb.

Still, the same problem, only that it begins to happen right when you release the TAB key. Of course, when you release the ALT key, nothing changes and the current window keeps "tabbing".

wharlox commented 1 year ago

This has got to be the most frustrating problem I can think of; client is x11vnc and win10 using uvnc from 1.3.x through 1.4.09 (probably even older versions; I'll have to check now).

I can guarntee this is an ultravnc problem as tightvnc was unable to replicate the issue. It is not a keyboard-driver issue either as I am able to reproduce it using the On Screen Keyboard with windows:

Will edit/post if i see results with older versions of this.

wharlox commented 1 year ago

Seems this is part of the implementation, to not send a tab-up signal - hopefully some easy logic can be added to prevent the tab from sending indefinitly

https://github.com/ultravnc/UltraVNC/blob/ee9954b90ab6b52a2332b349d55f6a98af3f7424/vncviewer/LowLevelHook.cpp#L318-L339

RudiDeVos commented 1 year ago

We end key down and key up seperate. If mouse is over viewer with down and the up is pressed outsite the viewer the key stay down on the remote PC. Some auto reset could do the trick..if it doesn't break other cases, on the list to verify.

Was this with scrollock on ?

wharlox commented 1 year ago

maybe an added option to test out a new flow for the alt-tab; i'd be willing to test that

Neustradamus commented 1 year ago

@RudiDeVos: Have you seen the latest @wharlox comment?