From 8cf3c7eaaaae32d473b1bdac84c3d3f08864916b Mon Sep 17 00:00:00 2001 From: jsorg71 Date: Mon, 9 Oct 2006 07:04:32 +0000 Subject: altgr fix --- xrdp/xrdp_wm.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'xrdp/xrdp_wm.c') diff --git a/xrdp/xrdp_wm.c b/xrdp/xrdp_wm.c index d2ef8fa5..4a9baecd 100644 --- a/xrdp/xrdp_wm.c +++ b/xrdp/xrdp_wm.c @@ -1171,12 +1171,18 @@ xrdp_wm_key(struct xrdp_wm* self, int device_flags, int scan_code) self->num_lock, self->scroll_lock, self->session->client_info->keylayout); - /*g_printf("%x\n", c);*/ - if (c != 0) + /* this means don't send anything */ + /* used to qvoid sending alt to xserver eg altgr */ + /* if alt state is down, the xserver avoids the keystroke */ + if (c == 1) { - self->mod->mod_event(self->mod, msg, c, 0xffff, + } + else if (c != 0) + { + self->mod->mod_event(self->mod, msg, (unsigned char)c, 0xffff, scan_code, device_flags); - xrdp_add_key_down(self, c, 0xffff, scan_code, device_flags); + xrdp_add_key_down(self, (unsigned char)c, 0xffff, scan_code, + device_flags); } else { -- cgit v1.2.1