Skip to content

Commit

Permalink
Nightly checkin - needs more testing
Browse files Browse the repository at this point in the history
  • Loading branch information
matt335672 committed Jun 21, 2024
1 parent 4398052 commit 5e61019
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
5 changes: 5 additions & 0 deletions common/xrdp_client_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,12 @@ struct xrdp_client_info
char layout[16];
char variant[16];
char options[256];
/* X11 rules to load */
char xkb_rules[32];
/* Specific X11 keycodes needed by the xrdpkeyb module */
int x11_keycode_caps_lock;
int x11_keycode_num_lock;
int x11_keycode_scroll_lock;

/* ==================================================================== */
/* Private to xrdp below this line */
Expand Down
5 changes: 5 additions & 0 deletions common/xrdp_scancode_defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,16 @@ enum
*/
SCANCODE_LSHIFT_KEY = 0x2a,
SCANCODE_RSHIFT_KEY = 0x36,
SCANCODE_LCTRL_KEY = 0x1d,
SCANCODE_RCTRL_KEY = 0x11d,
SCANCODE_CAPS_KEY = 0x3a,
SCANCODE_NUMLOCK_KEY = 0x45,
SCANCODE_SCROLL_KEY = 0x46, // Scroll lock
SCANCODE_LALT_KEY = 0x38,
SCANCODE_RALT_KEY = 0x138,
SCANCODE_LWIN_KEY = 0x15b,
SCANCODE_RWIN_KEY = 0x15c,
SCANCODE_MENU_KEY = 0x15d,

SCANCODE_ESC_KEY = 0x01,
SCANCODE_BACKSPACE_KEY = 0x0e,
Expand Down
8 changes: 8 additions & 0 deletions libxrdp/xrdp_sec.c
Original file line number Diff line number Diff line change
Expand Up @@ -619,6 +619,14 @@ xrdp_load_keyboard_layout(struct xrdp_client_info *client_info)
"xrdp_load_keyboard_layout: xkb_rules [%s] are loaded",
client_info->xkb_rules);

/* Determine specific keycodes needed by the keyvoard driver */
client_info->x11_keycode_caps_lock =
scancode_to_x11_keycode(SCANCODE_CAPS_KEY);
client_info->x11_keycode_num_lock =
scancode_to_x11_keycode(SCANCODE_NUMLOCK_KEY);
client_info->x11_keycode_scroll_lock =
scancode_to_x11_keycode(SCANCODE_SCROLL_KEY);

LOG(LOG_LEVEL_INFO, "xrdp_load_keyboard_layout: model [%s] variant [%s] "
"layout [%s] options [%s]", client_info->model,
client_info->variant, client_info->layout, client_info->options);
Expand Down

0 comments on commit 5e61019

Please sign in to comment.