Bug 4660 - Option for grabbing keys ("send system keys") in non-fullscreen mode
Summary: Option for grabbing keys ("send system keys") in non-fullscreen mode
Status: NEW
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: VNC (show other bugs)
Version: trunk
Hardware: PC Unknown
: P2 Normal
Target Milestone: MediumPrio
Assignee: Pierre Ossman
Keywords: upstream
Depends on: 4975
  Show dependency treegraph
Reported: 2013-05-27 12:51 CEST by Peter Åstrand
Modified: 2018-05-09 13:16 CEST (History)
1 user (show)

See Also:
Acceptance Criteria:


Description Peter Åstrand cendio 2013-05-27 12:51:57 CEST
When bug 3417 was implemented, the functionality was restricted to fullscreen mode. This is difficult from how rdesktop works (which was given in the initial description). Also, NoMachine has an option "Grab the keyboard when the client has focus" (http://www.nomachine.com/documents/configuration/client-guide.php), and customers have requested this functionality.
Comment 2 Peter Åstrand cendio 2013-05-28 13:24:24 CEST
One use case for this feature is the ability to switch windows in the remote session. On some client platforms (ie Linux), it is sometimes possible to remap so that two different keyboard combinations are used, ie Alt-Tab switches windows locally while Super-Tab (Windows key) switches windows in the remote session. Unfortunately, this does not work on Windows clients, since the key has different uses on that platforms.
Comment 3 Pierre Ossman cendio 2013-11-04 12:28:47 CET
There is another suggestion regarding this on the TigerVNC mailing list:

Comment 5 Samuel Mannehed cendio 2018-04-10 12:50:14 CEST
(In reply to comment #4)
> Fixed in upstream vncviewer:
> https://github.com/TigerVNC/tigervnc/commit/7e546febadb6e6cc66138c2316c8c19ca8aab2b1#diff-0bc9f6cbf1d4ba686d07a133d1b44743

Unclear if this upstream fix "solves" this bug.

This bug is about grabbing keyboard out of fullscreen mode.
Comment 6 Pierre Ossman cendio 2018-05-09 13:11:03 CEST
This is not currently possible on macOS, given the current method of grabbing the keyboard.

However there is an alternative method, using "event taps" (see CGEventTap). It seems to provide the functionality we need, but the downside is that it requires some user interaction to activate (which is sensible given the possible problems low level event access can cause).

There is an old API, AXIsProcessTrusted(), that allows us to check if we can do what we want. There is also a newer event, AXIsProcessTrustedWithOptions(), that will notify and help the user if we are not "trusted".

We also need to check how this system behaves with our dual bundle design, as the "trust" is associated with a bundle.
Comment 7 Pierre Ossman cendio 2018-05-09 13:16:28 CEST
The current keyboard grabbing method is also causing other issues, like bug 7160.

Note You need to log in before you can comment on or make changes to this bug.