New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Map Ctrl+Alt+Del to Ctrl+Alt+End #6186
base: master
Are you sure you want to change the base?
Conversation
On Microsoft Windows systems, when connecting to a remote desktop with mstsc.exe, Ctrl+Alt+Del does not open the task manager on the remote host. It will be intercepted by the current system and opens the task manager locally. A different key combo is used to pass Ctrl+Alt+Del to the remote host: Ctrl+Alt+End. Similarly with xfreerdp, the Ctrl+Alt+Del combo is often interpreted by the Window Manager. This patch maps Ctrl+Alt+End to pass the Ctrl+Alt+Del combo. Fixes issue FreeRDP#455 and FreeRDP#3494
Can one of the admins verify this patch? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
xfc->KeyboardState
should contain the current (and properly reset) state of the whole keyboard.
Better use that one ot check which keys are currently pressed.
Doing so only in xf_keyboard_send_key
will leave you with wrong states under many conditions (focus changes, ...)
@@ -43,6 +43,9 @@ | |||
#include <freerdp/log.h> | |||
#define TAG CLIENT_TAG("x11") | |||
|
|||
static BOOL controlDown = FALSE; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These should be part of xfContext
(same is true for the existing ones, looks like a bug)
@@ -191,6 +194,28 @@ void xf_keyboard_send_key(xfContext* xfc, BOOL down, BYTE keycode) | |||
DWORD rdp_scancode; | |||
rdpInput* input; | |||
input = xfc->context.input; | |||
|
|||
if (keycode == 0x25) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better check against rdp_scancode
and the RDP_SCANCODE*
macros instead of these magic numbers
controlDown = FALSE; | ||
} | ||
|
||
if (keycode == 0x40) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better check against rdp_scancode
and the RDP_SCANCODE*
macros instead of these magic numbers
laltDown = FALSE; | ||
} | ||
|
||
if (laltDown && controlDown && keycode == 0x73 && down == 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better check against rdp_scancode
and the RDP_SCANCODE*
macros instead of these magic numbers
Workaround, until this is merged (and because I could not find this documented anywhere else): disable the |
ctrl-alt-end works in the W10 rdp client. It should also work for freerdp (IMHO) for compatibility |
@tcheneau: Have you progressed on this PR? |
@Neustradamus No, I didn't have time to get back to it despite all the very valid comments offered by @akallabeth. I left my employer since I first submitted this PR and no longer have a working setup to try the patch. I'm OK if this PR is dropped. |
On Microsoft Windows systems, when connecting to a remote desktop with
mstsc.exe, Ctrl+Alt+Del does not open the task manager on the remote
host. It will be intercepted by the current system and opens the task
manager locally. A different key combo is used to pass Ctrl+Alt+Del to
the remote host: Ctrl+Alt+End.
Similarly with xfreerdp, the Ctrl+Alt+Del combo is often interpreted by
the Window Manager. This patch maps Ctrl+Alt+End to pass the
Ctrl+Alt+Del combo.
Fixes issue #455 and #3494
Regards,
Tony
P.-S.: this patch was provided by a colleague of mine, hence the different author name