#201 german keyboard - ALT GR

open
nobody
5
2012-11-29
2006-05-23
Anonymous
No

When using the german keyboard (0x407) there are
problems to get the `\´, `~´, `|´ - signs with W2K.

I've fixed the problem by using some parts of code from
the patches of
former realeases. We have to do only some changes in
the file `xwin.c´.

Here are the changes:

--
ORIGINAL code in `xwin.c´:
==========================

case KeyPress:
if (scancode == 0)
break;

rdp_send_input(ev_time,
RDP_INPUT_SCANCODE, 0,
scancode, 0);
break;

case KeyRelease:
scancode =
xwin_translate_key(event.xkey.keycode);
if (scancode == 0)
break;

rdp_send_input(ev_time,
RDP_INPUT_SCANCODE,
KBD_FLAG_DOWN |
KBD_FLAG_UP,
scancode, 0);
break;

CHANGED code in `xwin.c´ to:

case KeyPress:
scancode =
xwin_translate_key(event.xkey.keycode);
if (scancode == 0)
break;
if (scancode & 0x80)
rdp_send_input(ev_time,
RDP_INPUT_SCANCODE,KBD_FLAG_EXT,scancode & 0x7f, 0);
else
rdp_send_input(ev_time,
RDP_INPUT_SCANCODE,0,
scancode, 0);
break;

case KeyRelease:
scancode =
xwin_translate_key(event.xkey.keycode);
if (scancode == 0)
break;

if (scancode & 0x80)
rdp_send_input(ev_time,
RDP_INPUT_SCANCODE,
KBD_FLAG_EXT | KBD_FLAG_DOWN | KBD_FLAG_UP, scancode &
0x7f, 0);
else
rdp_send_input(ev_time,
RDP_INPUT_SCANCODE,KBD_FLAG_DOWN |
KBD_FLAG_UP,scancode, 0);
break;

--

Re-compile ... and it just works fine with `rdesktop -k
0x407
computer_name´!

Discussion