From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stas Sergeev Subject: Re: dosemu-1.1.3 and Cyrillic_er Date: Thu, 25 Apr 2002 18:23:15 +0400 Sender: linux-msdos-owner@vger.kernel.org Message-ID: <3CC81153.2070408@yahoo.com> Reply-To: stas.orel@mailcity.com Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------040806000803040700060505" Return-path: List-Id: To: linux-msdos@vger.kernel.org This is a multi-part message in MIME format. --------------040806000803040700060505 Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit 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. --------------040806000803040700060505 Content-Type: text/plain; name="serv_xlat.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="serv_xlat.diff" --- 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) { --------------040806000803040700060505--