Added the ability to quite the RDP session by pressing "r-ctrl + shift + D". The reason for this is when in full screen I have no way to exit from xrdp if I don't want to close my session.

This commit is contained in:
Dan Holliday 2023-06-13 19:24:09 +01:00 committed by akallabeth
parent 8c584c29dd
commit 7234b0a2f1

View File

@ -430,25 +430,34 @@ BOOL sdlInput::keyboard_handle_event(const SDL_KeyboardEvent* ev)
const SDL_Keymod mask = KMOD_RSHIFT;
if ((mods & mask) == mask)
{
if (ev->type == SDL_KEYDOWN)
switch (ev->keysym.scancode)
{
switch (ev->keysym.scancode)
{
case SDL_SCANCODE_RETURN:
case SDL_SCANCODE_RETURN:
if (ev->type == SDL_KEYDOWN)
{
_sdl->update_fullscreen(!_sdl->fullscreen);
return TRUE;
case SDL_SCANCODE_R:
}
return TRUE;
case SDL_SCANCODE_R:
if (ev->type == SDL_KEYDOWN)
{
_sdl->update_resizeable(!_sdl->resizeable);
return TRUE;
case SDL_SCANCODE_G:
}
return TRUE;
case SDL_SCANCODE_G:
if (ev->type == SDL_KEYDOWN)
{
keyboard_grab(ev->windowID, _sdl->grab_kbd ? SDL_FALSE : SDL_TRUE);
return TRUE;
case SDL_SCANCODE_D:
}
return TRUE;
case SDL_SCANCODE_D:
if (ev->type == SDL_KEYDOWN)
{
freerdp_abort_connect_context(_sdl->context());
return true;
default:
break;
}
}
return true;
default:
break;
}
}
return freerdp_input_send_keyboard_event_ex(_sdl->context()->input, ev->type == SDL_KEYDOWN,