Skip to content

Commit

Permalink
Implement keycode set independence
Browse files Browse the repository at this point in the history
This commit uses the XKB rules set passed by xrdp to set up
the keyboard mappings. This allows the dependency on the evdev
or base keycode set to be removed from xorgxrdp, and passed to
xrdp.

Some other tidy-ups, mainly around the removal of magic numbers
have been implemented.
  • Loading branch information
matt335672 committed Aug 5, 2024
1 parent 9310cf8 commit ad9bbf0
Show file tree
Hide file tree
Showing 2 changed files with 142 additions and 217 deletions.
24 changes: 17 additions & 7 deletions module/rdp.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,14 +130,24 @@ typedef struct _rdpPointer rdpPointer;

struct _rdpKeyboard
{
int pause_spe;
int ctrl_down;
int alt_down;
int shift_down;
/**
* State of tab key
*
* Used to remove mstsc.exe tab KeyRelease before and after TS_SYNC_EVENT
*/
int tab_down;
/* this is toggled every time num lock key is released, not like the
above *_down vars */
int scroll_lock_down;

/**
* Whether or not to skip the next numlock key press/release
*/
int skip_numlock;

int x11_keycode_caps_lock; ///< Used in TS_SYNC_EVENT processing
int x11_keycode_num_lock; ///< Used in TS_SYNC_EVENT processing
int x11_keycode_scroll_lock; ///< Used in TS_SYNC_EVENT processing

int scroll_lock_down; ///< Whether key is up/down
int scroll_lock_state; ///< Toggle state
DeviceIntPtr device;
};
typedef struct _rdpKeyboard rdpKeyboard;
Expand Down
Loading

0 comments on commit ad9bbf0

Please sign in to comment.