Add per-client keysym state mapping.
This commit is contained in:
parent
0b65bec8cc
commit
d5c00f628c
@ -67,6 +67,8 @@ typedef struct rdp_guac_client_data {
|
||||
|
||||
const guac_rdp_keysym_scancode_map* keysym_scancodes;
|
||||
|
||||
guac_rdp_keysym_state_map keysym_state;
|
||||
|
||||
} rdp_guac_client_data;
|
||||
|
||||
typedef struct rdp_freerdp_context {
|
||||
|
@ -83,6 +83,11 @@ typedef struct guac_rdp_altcode_map {
|
||||
|
||||
} guac_rdp_altcode_map;
|
||||
|
||||
/**
|
||||
* Mapping from keysym to current state
|
||||
*/
|
||||
typedef int guac_rdp_keysym_state_map[256][256];
|
||||
|
||||
/**
|
||||
* Static mapping from keysyms to scancodes.
|
||||
*/
|
||||
|
@ -325,6 +325,9 @@ int guac_client_init(guac_client* client, int argc, char** argv) {
|
||||
guac_client_data->current_surface = GUAC_DEFAULT_LAYER;
|
||||
guac_client_data->keysym_scancodes = &guac_rdp_keysym_scancode_en_us;
|
||||
|
||||
/* Clear keysym state mapping */
|
||||
memset(guac_client_data->keysym_state, 0, sizeof(guac_rdp_keysym_state_map));
|
||||
|
||||
((rdp_freerdp_context*) rdp_inst->context)->client = client;
|
||||
client->data = guac_client_data;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user