www.cendio.com
Bug 4660 - Option for grabbing keys ("send system keys") in non-fullscreen mode
: Option for grabbing keys ("send system keys") in non-fullscreen mode
Status: NEW
: ThinLinc
VNC
: trunk
: PC Unknown
: P2 Normal
: MediumPrio
Assigned To:
:
:
: 4975
:
  Show dependency treegraph
 
Reported: 2013-05-27 12:51 by
Modified: 2018-05-09 13:16 (History)
Acceptance Criteria:


Attachments


Note

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


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 #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.