TigerVNC / tigervnc

High performance, multi-platform VNC client and server
https://tigervnc.org
GNU General Public License v2.0
5.25k stars 956 forks source link

TigerVNC don't capture modifier keys set on Logitech Options + #1827

Open rudironsonijr opened 2 months ago

rudironsonijr commented 2 months ago

Describe the bug TigerVNC don't capture modifier keys set on Logitech Options +

To Reproduce

  1. Set keyboard shortcuts to my MX Master 2S thumb button gestures on Logitech Option+;
  2. Open TigerVNC in full screen and configured to pass shortcuts to the remote machine;
  3. Try to use the mouse gestures, no modifier key is sent, only the last key is received.

Expected behavior Remote host should receive the modifiers.

Screenshots

CleanShot 2024-09-03 at 17 11 52@2x

CleanShot 2024-09-03 at 17 16 08@2x

CleanShot 2024-09-03 at 17 13 58@2x

Client (please complete the following information):

Server (please complete the following information):

Additional context Add any other context about the problem here.

rudironsonijr commented 2 months ago

More info:

CGSSetGlobalHotKeyOperatingMode

https://stackoverflow.com/a/58012972/16563876

https://github.com/NUIKit/CGSInternal/tree/master

https://forum.qt.io/topic/49253/capturing-alt-tab-event/5

https://fossies.org/linux/SDL2/src/video/cocoa/SDL_cocoakeyboard.m

https://www.virtualbox.org/svn/vbox/trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/DarwinKeyboard.cpp

http://git.ithinksw.org/~jspiros/WindowBlur.git/blob/HEAD:/CGSInternal/CGSHotKeys.h

rudironsonijr commented 2 months ago

https://discourse.libsdl.org/t/sdl-cocoa-add-keyboard-grab-support/32323

rudironsonijr commented 2 months ago

https://github.com/libsdl-org/SDL/blob/main/src/video/cocoa/SDL_cocoakeyboard.m

CendioOssman commented 2 months ago

We only respond to keyboard events, so if Logitech is doing something magical, then it might not be compatible.

Could you try enabling debug logging and see if you get any log lines when you use the gestures:

https://github.com/TigerVNC/tigervnc/wiki/Debug-Logs#os-x

It would also be interesting to see how other applications behave. Please try the following page in a browser and use the gestures with the input box focused:

https://dvcs.w3.org/hg/d4e/raw-file/tip/key-event-test.html