diff options
author | Jay Sorg <jay.sorg@gmail.com> | 2011-11-12 16:40:08 -0800 |
---|---|---|
committer | Jay Sorg <jay.sorg@gmail.com> | 2011-11-12 16:40:08 -0800 |
commit | 6e9405d418e27caa982c5ada70b440563add210b (patch) | |
tree | ce69e43e65d5d728927d8fe75d873e1d9c696999 | |
parent | b0ebf1c146042966bd5d75190e9dba2bd9593c28 (diff) | |
download | xrdp-proprietary-6e9405d418e27caa982c5ada70b440563add210b.tar.gz xrdp-proprietary-6e9405d418e27caa982c5ada70b440563add210b.zip |
fix for alt-gr win7 control key
-rw-r--r-- | xup/xup.c | 37 | ||||
-rw-r--r-- | xup/xup.h | 1 |
2 files changed, 38 insertions, 0 deletions
@@ -261,10 +261,47 @@ lib_mod_event(struct mod* mod, int msg, tbus param1, tbus param2, { struct stream* s; int len; + int key; int rv; LIB_DEBUG(mod, "in lib_mod_event"); make_stream(s); + if ((msg >= 15) && (msg <= 16)) /* key events */ + { + key = param2; + if (key > 0) + { + if (key == 65027) /* altgr */ + { + if (mod->shift_state) + { + g_writeln("special"); + /* fix for mstsc sending left control down with altgr */ + /* control down / up + msg param1 param2 param3 param4 + 15 0 65507 29 0 + 16 0 65507 29 49152 */ + init_stream(s, 8192); + s_push_layer(s, iso_hdr, 4); + out_uint16_le(s, 103); + out_uint32_le(s, 16); /* key up */ + out_uint32_le(s, 0); + out_uint32_le(s, 65507); /* left control */ + out_uint32_le(s, 29); /* RDP scan code */ + out_uint32_le(s, 0xc000); /* flags */ + s_mark_end(s); + len = (int)(s->end - s->data); + s_pop_layer(s, iso_hdr); + out_uint32_le(s, len); + lib_send(mod, s->data, len); + } + } + if (key == 65507) /* left control */ + { + mod->shift_state = msg == 15; + } + } + } init_stream(s, 8192); s_push_layer(s, iso_hdr, 4); out_uint16_le(s, 103); @@ -104,4 +104,5 @@ struct mod char ip[256]; char port[256]; tbus sck_obj; + int shift_state; }; |