Skip to content

Rdp: fix transmission of some key combinations

Fabio Bas requested to merge ctrlaltca/krdc:rdp_modifiers into master

This MR fixes a couple of issues related to the transmission of some key combinations to the remote host.

The first commit moves the unpressModifiers() logic from vncview to remoteview, so that rdpview can use it, too (BUG 447983) This method avoids modifier keys getting stuck on the remote host. A simple test is alt-tabbing out of krdc while connected. The remote host would receive the "alt" keypress but not the "alt" keyrelease, making the "alt" key stuck.

The second commit adds a dependency on Qt::Dbus to request org.kde.KGlobalAccel to disable global shortcuts when krdc is focused and the reserve keys" option is enabled (BUG 178015). This makes krdc able to grab all key combinations, even those that are usually intercepted by global shortcuts (eg. alt+tab, ctrl+alt+del), so that the remote host will receive them. Right now if you connect to a windows rdp server, you may found yourself stuck at the login screen asking you to press ctrl+alt+del in order to be able to login, but you won't be able to send that key combination.

This MR is marked as a request for comment since it introduces a dependency on Qt::Dbus, while other (better) methods could be available to achieve the same result. @nicolasfella suggested the use of https://wayland.app/protocols/keyboard-shortcuts-inhibit-unstable-v1 a as possible alternative, and possibly a X11 counterpart exists in XGrabKeyboard.

EDIT: keyboard-shortcuts-inhibit-unstable-v1 has been implemented

Edited by Fabio Bas

Merge request reports