www.cendio.com

Bug 4660

Summary: Option for grabbing keys ("send system keys") in non-fullscreen mode
Product: ThinLinc Reporter: Peter Åstrand <astrand@cendio.se>
Component: VNCAssignee: Pierre Ossman <ossman@cendio.se>
Status: NEW QA Contact: Bugzilla mail exporter <bugzilla-qa@cendio.se>
Severity: Normal    
Priority: P2 CC: samuel@cendio.se
Version: trunkKeywords: upstream
Target Milestone: MediumPrio   
Hardware: PC   
OS: Unknown   
Acceptance Criteria:
Bug Depends on: 4975    
Bug Blocks:    

Description From cendio 2013-05-27 12:51:57
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 From cendio 2013-05-28 13:24:24 -------
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 From cendio 2013-11-04 12:28:47 -------
There is another suggestion regarding this on the TigerVNC mailing list:

http://www.mail-archive.com/tigervnc-devel@lists.sourceforge.net/msg02671.html
------- Comment #4 From cendio 2018-04-04 14:14:47 -------
Fixed in upstream vncviewer:

https://github.com/TigerVNC/tigervnc/commit/7e546febadb6e6cc66138c2316c8c19ca8aab2b1#diff-0bc9f6cbf1d4ba686d07a133d1b44743
------- Comment #5 From cendio 2018-04-10 12:50:14 -------
(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 From cendio 2018-05-09 13:11:03 -------
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 From cendio 2018-05-09 13:16:28 -------
The current keyboard grabbing method is also causing other issues, like bug
7160.