From 2b8a5f42b1548f9bc8a76b066712a7da4f7342e9 Mon Sep 17 00:00:00 2001 From: jsorg71 Date: Wed, 17 Mar 2010 18:35:26 +0000 Subject: fix for mstsc altgr --- vnc/vnc.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'vnc') diff --git a/vnc/vnc.c b/vnc/vnc.c index fefedd6c..6df35b02 100644 --- a/vnc/vnc.c +++ b/vnc/vnc.c @@ -255,12 +255,29 @@ lib_mod_event(struct vnc* v, int msg, long param1, long param2, key = param2; if (key > 0) { + if (key == 65027) /* altgr */ + { + if (v->shift_state) + { + /* fix for mstsc sending left control down with altgr */ + init_stream(s, 8192); + out_uint8(s, 4); + out_uint8(s, 0); /* down flag */ + out_uint8s(s, 2); + out_uint32_be(s, 65507); /* left control */ + lib_send(v, s->data, 8); + } + } init_stream(s, 8192); out_uint8(s, 4); out_uint8(s, msg == 15); /* down flag */ out_uint8s(s, 2); out_uint32_be(s, key); error = lib_send(v, s->data, 8); + if (key == 65507) /* left control */ + { + v->shift_state = msg == 15; + } } } else if (msg >= 100 && msg <= 110) /* mouse events */ -- cgit v1.2.1