I'm experiencing two problems with client shortcuts:
Current Alt+Shift+something shortcuts are in conflict with common keyboard layout switching shortcut Alt+Shift. Perhaps, some unused prefix could be found.
There is no way to enable grabbing and passing through of modifier keys, like Super. This is especially needed in shadow and full-desktop (like with Xephyr) sessions. To pass Super+something to the server host.
The answer to both problems could be Host Key concept. It is used by such software as VirtualBox? or Remmina: Define a Host key (R_Control by default) which would have special meaning for Xpra client. Host+something would do some stuff. Single Host key tap would switch unconditional grabbing of keyboard, including modifier keys, as long as any xpra window has focus. Single (of doubles) key, like R_Control would not interfere with any of common shortcuts like Alt+Shift, and leave L_Control to act as Control itself.
All the shortcuts are configurable, if your DE intercepts them then you can change your DE shortcuts or change xpra's.
As for passing the super key to the server, that seemed easy enough to implement (but in the end.. it wasn't), so that's done in r12645.
This is done by adding a new key shortcut "Control_R" which toggles grabbing the keyboard. Whilst the keyboard is grabbed, all keys will be sent to the server, including the super key. We release the grab when we lose focus. That part was hard to implement on X11 with GTK because it seems to swallow focus events when we hold the grab..
We already had similar functionality on win32 (which was disabled by default until now), see #1152.
Please close if this works for you.
Big thanks! I'll test it in a few days. When Control_R is bound to toggle_keyboard_grab, can it still be bound to other actions as a part of combination?
When Control_R is bound to toggle_keyboard_grab, can it still be bound to other actions as a part of combination?
Theoretically yes, but each shortcut will then also toggle the keyboard grab. Probably not a good idea.
Key grab seems to work, at least with simple rootless xpra session. I will have more testing cases tomorrow, including shadow sessions.
btw, I've replaced all 'Meta+Shift' with 'Shift_R' and none of xpra shortcuts seem to work this way.
Theoretically yes, but each shortcut will then also toggle the keyboard grab. Probably not a good idea.
If action would be triggered on exact match keys release, it would be possible to partially replicate host key behavior. For full host key feature it would also be needed to add option 'host-key' to the config file and allow 'key-shortcut' option to parse 'Host_key' value as a key set by 'host-key' option.
btw, I've replaced all 'Meta+Shift' with 'Shift_R' and none of xpra shortcuts seem to work this way.
Modifier keys have no concept of right or left once they are pressed in X11.
Theoretically, it might be possible to keep track of which key triggered which modifier to be enabled (ie: Shift_R for shift), but I am not crazy enough to attempt writing such horrible code.
I also don't have time to implement the host-key feature, feel free to create a new ticket for that.
I'm closing as fixed because all keys can now be forwarded and trying to find shortcuts that don't conflict with any DE is futile.
Mouse grabs in #1229 done the same way.
Important: the shortcuts have just been changed, see r13169
Some GTK API links:
So, ctrl+menu grabs keyboard, shift+menu grabs mouse? Sounds good.
r14359 also intercepts Alt-Tab on win32 (only when we have the keyboard grab obviously).
See also:
this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/1195