xpra icon
Bug tracker and wiki

This bug tracker and wiki are being discontinued
please use https://github.com/Xpra-org/xpra instead.

Opened 6 years ago

Closed 6 years ago

Last modified 16 months ago

#1152 closed enhancement (fixed)

intercept all keys before the desktop

Reported by: Antoine Martin Owned by: alas
Priority: major Milestone: 0.17
Component: platforms Version: trunk
Keywords: win32 Cc: johnss1221@…


From this mailing list discussion: http://lists.devloop.org.uk/pipermail/shifter-users/2016-March/001497.html, it would be nice if we could catch the special keys like the windows key and forward them to the server.

The Virtual-Key Codes shows VK_LWIN as 0x5B and VK_RWIN as 0x5c.

Looks like we will need SetWindowsHookEx as per this answer: Python and SetWindowsHookExA.
Alternatively we could use pyhook or pyhk. (meh)

This is for win32, not sure what we can do for X11 without grabbing the keyboard..

Change History (8)

comment:1 Changed 6 years ago by Antoine Martin

Status: newassigned

Mostly done in r12226, still TODO:

  • send the key event to the server (Super_L and Super_R?)
  • maybe generalize the code so we can catch AltGr and have a better workaround? (#1119)
  • make it an option (some users may not want their windows key intercepted), and maybe a tray option for it too

comment:2 Changed 6 years ago by Antoine Martin

Owner: changed from Antoine Martin to alas
Status: assignednew
  • r12228 sends the key event to the server (and should deal with most modifier keys - but not all, this will have to do)
  • r12229 makes this behaviour off by default, enable it with the env var: XPRA_FORWARD_WINDOWS_KEY=1 (I don't have time to make a command line option and do all the man page updates that go with it)

Tested using xev to see the Super_R event server side, I cannot test with the left hand side windows key because my virtualbox VM does not pass it through to the guest.

@afarr: mostly a FYI, I don't think you want to capture the windows key in your setup. New beta build uploaded. Feel free to test or just close it.

comment:3 Changed 6 years ago by John1221

Cc: johnss1221@… added

comment:4 Changed 6 years ago by Antoine Martin

@johnss1221: there are windows beta builds including this change - does this work for you? (see comment:2 for enabling it)

comment:5 Changed 6 years ago by Antoine Martin

Not heard back, so I'll assume that this works as expected.

@afarr: feel free to test or just close.

comment:6 Changed 6 years ago by alas

Resolution: fixed
Status: newclosed

Tried to test a little, but I'm not sure what windows keyboard commands I can expect a fedora server to know what to do with.

Maybe maxmylyn will test with a shadow server... in any case though, I'll close this.

comment:7 Changed 6 years ago by Antoine Martin

This is now enabled by default when grabs are active, see ticket:1195#comment:1

comment:8 Changed 16 months ago by migration script

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/1152

Note: See TracTickets for help on using tickets.