Added flags to keymap.

This commit is contained in:
Michael Jumper 2011-07-24 23:35:54 -07:00
parent 1ecbf7bbef
commit 50c80a7685
4 changed files with 25853 additions and 5363 deletions

View File

@ -40,6 +40,7 @@ AC_CONFIG_MACRO_DIR([m4])
# Checks for programs. # Checks for programs.
AC_PROG_CC AC_PROG_CC
AC_PROG_CC_C99
AC_PROG_LIBTOOL AC_PROG_LIBTOOL
# Checks for libraries. # Checks for libraries.

View File

@ -38,7 +38,12 @@
#ifndef _GUAC_CLIENT_RDP_KEYMAP #ifndef _GUAC_CLIENT_RDP_KEYMAP
#define _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 #endif

View File

@ -348,16 +348,16 @@ int rdp_guac_client_key_handler(guac_client* client, int keysym, int pressed) {
if (keysym <= 0xFFFF) { if (keysym <= 0xFFFF) {
/* Look up scancode */ /* Look up scancode */
int scancode = const guac_rdp_keymap* keymap =
guac_rdp_keysym_scancode[(keysym & 0xFF00) >> 8][keysym & 0xFF]; &guac_rdp_keysym_scancode[(keysym & 0xFF00) >> 8][keysym & 0xFF];
/* If defined, send event */ /* If defined, send event */
if (scancode != 0) if (keymap->scancode != 0)
rdp_inst->rdp_send_input( rdp_inst->rdp_send_input(
rdp_inst, RDP_INPUT_SCANCODE, rdp_inst, RDP_INPUT_SCANCODE,
pressed ? RDP_KEYPRESS : RDP_KEYRELEASE, pressed ? RDP_KEYPRESS : RDP_KEYRELEASE,
scancode, keymap->scancode,
0); keymap->flags);
} }

File diff suppressed because it is too large Load Diff