ulab-original
jsorg71 18 years ago
parent 3ab171a462
commit 8cf3c7eaaa

@ -299,24 +299,28 @@ get_char_from_scan_code(int device_flags, int scan_code, int* keys,
int shift;
int altgr;
int ext;
int has_altgr;
if (keylayout == 0x40c) /* france */
{
keys_noshift = fr_noshift;
keys_shift = fr_shift;
keys_altgr = fr_altgr;
has_altgr = 1;
}
else if (keylayout == 0x809) /* en-uk or en-gb */
{
keys_noshift = en_uk_noshift;
keys_shift = en_uk_shift;
keys_altgr = en_uk_altgr;
has_altgr = 1;
}
else if (keylayout == 0x407) /* german */
{
keys_noshift = de_noshift;
keys_shift = de_shift;
keys_altgr = de_altgr;
has_altgr = 1;
}
/* italy
else if (keylayout == 0x410)
@ -327,6 +331,12 @@ get_char_from_scan_code(int device_flags, int scan_code, int* keys,
keys_noshift = en_us_noshift;
keys_shift = en_us_shift;
keys_altgr = en_us_altgr;
has_altgr = 0;
}
/* don't send altgr */
if (has_altgr && (scan_code == 56) && (device_flags & 0x100))
{
return 1;
}
/*g_writeln("%d %d %x", scan_code, device_flags, keylayout);*/
shift = keys[42] || keys[54];

@ -1385,7 +1385,7 @@ xrdp_bitmap_def_proc(struct xrdp_bitmap* self, int msg,
self->wm->num_lock,
self->wm->scroll_lock,
self->wm->session->client_info->keylayout);
if (c != 0)
if ((unsigned char)c >= 32)
{
add_char_at(self->caption1, c, self->edit_pos);
self->edit_pos++;

@ -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
{

Loading…
Cancel
Save