Added flags to keymap.
This commit is contained in:
parent
1ecbf7bbef
commit
50c80a7685
@ -40,6 +40,7 @@ AC_CONFIG_MACRO_DIR([m4])
|
||||
|
||||
# Checks for programs.
|
||||
AC_PROG_CC
|
||||
AC_PROG_CC_C99
|
||||
AC_PROG_LIBTOOL
|
||||
|
||||
# Checks for libraries.
|
||||
|
@ -38,7 +38,12 @@
|
||||
#ifndef _GUAC_CLIENT_RDP_KEYMAP
|
||||
#define _GUAC_CLIENT_RDP_KEYMAP
|
||||
|
||||
extern const int guac_rdp_keysym_scancode[256][256];
|
||||
typedef struct guac_rdp_keymap {
|
||||
int scancode;
|
||||
int flags;
|
||||
} guac_rdp_keymap;
|
||||
|
||||
extern const guac_rdp_keymap guac_rdp_keysym_scancode[256][256];
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -348,16 +348,16 @@ int rdp_guac_client_key_handler(guac_client* client, int keysym, int pressed) {
|
||||
if (keysym <= 0xFFFF) {
|
||||
|
||||
/* Look up scancode */
|
||||
int scancode =
|
||||
guac_rdp_keysym_scancode[(keysym & 0xFF00) >> 8][keysym & 0xFF];
|
||||
const guac_rdp_keymap* keymap =
|
||||
&guac_rdp_keysym_scancode[(keysym & 0xFF00) >> 8][keysym & 0xFF];
|
||||
|
||||
/* If defined, send event */
|
||||
if (scancode != 0)
|
||||
if (keymap->scancode != 0)
|
||||
rdp_inst->rdp_send_input(
|
||||
rdp_inst, RDP_INPUT_SCANCODE,
|
||||
pressed ? RDP_KEYPRESS : RDP_KEYRELEASE,
|
||||
scancode,
|
||||
0);
|
||||
keymap->scancode,
|
||||
keymap->flags);
|
||||
|
||||
}
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user