Hello.

Sergey Suleymanov wrote:
> Stas> altgr table is enough.  
>         Actually only these are needed at all. ;)
But in fact this means that the problem
is still there.
The problem is that normally altgr map is
similar to the alt map, so the special keycodes
in it are mapped as for the alt map.
But you are reserving altgr map for Cyrillic,
so it must be treated as a plain map.
And for the plain map, the BackSpace keycode
gets altered back to 8, see init_misc_plain_map()
and init_misc_shifted_map().
So I think that the real fix would be something
like the attached patch.

> Stas> Does this help?  Why 127 is there?
>         I presume this is ^?. Anyway, ^H also works. Thanks.
Actually I think it is a bios keycodes, so it
must be 8. Which is done with the attached patch
and no need to modify the keymaps at all.
This patch also fixes some other small
problems with ctrl and alt modifiers in
cyrillic mode.
Does this look like a correct fix to you?
And of course the root of the problem
seems to be that dosemu currently doesn't
natively support the layout switching.
--- src/plugin/kbd_unicode/serv_xlat.c  Tue Apr 23 17:32:37 2002
+++ src/plugin/kbd_unicode/serv_xlat.c  Thu Apr 25 13:53:46 2002
@@ -361,11 +361,11 @@
 }
 static void init_misc_altgr_map(t_keysym *rule)
 {
-       rule[NUM_SPACE] = KEY_SPACE;
+       init_misc_plain_map(rule);
 }
 static void init_misc_shift_altgr_map(t_keysym *rule)
 {
-       rule[NUM_SPACE] = KEY_SPACE;
+       init_misc_shifted_map(rule);
 }
 static void init_misc_ctrl_alt_map(t_keysym *rule)
 {
@@ -1134,10 +1134,11 @@
        if ((shiftstate & ANY_ALT) && (shiftstate & ANY_CTRL)) {
                ch = state->rules->map.ctrl_alt[key];
        }
-  else if ((shiftstate & (R_ALT|ALTGR_LOCK)) && (shiftstate & ANY_SHIFT)) {
+       else if ((shiftstate & ALTGR_LOCK) && (shiftstate & ANY_SHIFT) &&
+           !(shiftstate & (ANY_CTRL | ANY_ALT))) {
                ch = state->rules->map.shift_altgr[key];
        }
-  else if (shiftstate & (R_ALT|ALTGR_LOCK)) {
+       else if ((shiftstate & ALTGR_LOCK) && !(shiftstate & (ANY_CTRL | ANY_ALT))) {
                ch = state->rules->map.altgr[key];
        }
        else if (shiftstate & ANY_ALT) {

Reply via email to