diff options
author | jsorg71 <jsorg71> | 2006-12-09 19:30:57 +0000 |
---|---|---|
committer | jsorg71 <jsorg71> | 2006-12-09 19:30:57 +0000 |
commit | b295e08ad2f450f5bda8682d82a865b0db531382 (patch) | |
tree | 0f9af7c907deb72b639679f30b19e5f65acfec94 /vnc | |
parent | 778b1489d767fdf89befe8be9a91e3ee9e0aed1e (diff) | |
download | xrdp-proprietary-b295e08ad2f450f5bda8682d82a865b0db531382.tar.gz xrdp-proprietary-b295e08ad2f450f5bda8682d82a865b0db531382.zip |
let module decide if alt-gr needs to be ignored
Diffstat (limited to 'vnc')
-rw-r--r-- | vnc/vnc.c | 25 | ||||
-rw-r--r-- | vnc/vnc.h | 1 |
2 files changed, 21 insertions, 5 deletions
@@ -190,7 +190,18 @@ lib_mod_event(struct vnc* v, int msg, long param1, long param2, v->shift_state = (msg == 15); break; case 0x0038: /* left-right alt */ - key = (param2 & 0x0100) ? 0xffea : 0xffe9; + if (param2 & 0x0100) /* right alt */ + { + /* only en-us keymap can send right alt(alt-gr) */ + if (v->keylayout == 0x409) + { + key = 0xffea; + } + } + else /* left alt */ + { + key = 0xffe9; + } break; case 0x003b: /* F1 */ key = 0xffbe; @@ -1102,22 +1113,26 @@ lib_mod_end(struct vnc* v) int DEFAULT_CC lib_mod_set_param(struct vnc* v, char* name, char* value) { - if (g_strncasecmp(name, "username", 8) == 0) + if (g_strcasecmp(name, "username") == 0) { g_strncpy(v->username, value, 255); } - else if (g_strncasecmp(name, "password", 8) == 0) + else if (g_strcasecmp(name, "password") == 0) { g_strncpy(v->password, value, 255); } - else if (g_strncasecmp(name, "ip", 2) == 0) + else if (g_strcasecmp(name, "ip") == 0) { g_strncpy(v->ip, value, 255); } - else if (g_strncasecmp(name, "port", 4) == 0) + else if (g_strcasecmp(name, "port") == 0) { g_strncpy(v->port, value, 255); } + else if (g_strcasecmp(name, "keylayout") == 0) + { + v->keylayout = g_atoi(value); + } return 0; } @@ -92,4 +92,5 @@ struct vnc char port[256]; int sck_closed; int shift_state; /* 0 up, 1 down */ + int keylayout; }; |