Linux MS DOS discussions
 help / color / mirror / Atom feed
* Re: dosemu-1.1.3 and Cyrillic_er
@ 2002-04-24 13:13 Stas Sergeev
  2002-04-24 14:05 ` Grigory Batalov
  0 siblings, 1 reply; 18+ messages in thread
From: Stas Sergeev @ 2002-04-24 13:13 UTC (permalink / raw)
  To: linux-msdos

Hello.

Grigory Batalov wrote:
>   Why do you prefer that patch than koi8-r from extra_charsets plugin?
>   It seems working for me.
It works for me as well except for
typing cyrillic since there is no
"ru" keymap without this patch.
How are you getting it to understand the
cyrillic typing using a system switch?

^ permalink raw reply	[flat|nested] 18+ messages in thread
* Re: dosemu-1.1.3 and Cyrillic_er
@ 2002-04-25 19:29 Stas Sergeev
  2002-04-25 21:05 ` Grigory Batalov
  0 siblings, 1 reply; 18+ messages in thread
From: Stas Sergeev @ 2002-04-25 19:29 UTC (permalink / raw)
  To: linux-msdos

Hello.

Grigory Batalov wrote:
>>  Grigory> Also I set $_external_char_set = "koi8-r"
>>  Grigory> $_internal_char_set = "cp866" in ~/dosemu/conf/dosemurc and
>>  Grigory> it works. 
>>         As the Alt+keypad sequences.
>    Is it bad? =)
Are you sure that you are using a
*system* switch (xrus, xxkb) rather
than a dos' switch (keyrus, keyb.com)?
Because dos's switch works under xdos
also without Sergey's patch, but not the
system switch.
And if yes, then how are you setting the
$_layout option?
Cause I don't think you can set it to
"ru" without a Sergey's patch.

^ permalink raw reply	[flat|nested] 18+ messages in thread
* Re: dosemu-1.1.3 and Cyrillic_er
@ 2002-04-25 14:23 Stas Sergeev
  2002-04-26 11:18 ` Sergey Suleymanov
  0 siblings, 1 reply; 18+ messages in thread
From: Stas Sergeev @ 2002-04-25 14:23 UTC (permalink / raw)
  To: linux-msdos

[-- Attachment #1: Type: text/plain, Size: 1081 bytes --]

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.

[-- Attachment #2: serv_xlat.diff --]
[-- Type: text/plain, Size: 1017 bytes --]

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

^ permalink raw reply	[flat|nested] 18+ messages in thread
* Re: dosemu-1.1.3 and Cyrillic_er
@ 2002-04-24 13:13 Stas Sergeev
  0 siblings, 0 replies; 18+ messages in thread
From: Stas Sergeev @ 2002-04-24 13:13 UTC (permalink / raw)
  To: linux-msdos

Hello.

Grigory Batalov wrote:
>   Why do you prefer that patch than koi8-r from extra_charsets plugin?
>   It seems working for me.
It works for me as well except for
typing cyrillic since there is no
"ru" keymap without this patch.
How are you getting it to understand the
cyrillic typing using a system switch?

^ permalink raw reply	[flat|nested] 18+ messages in thread
* Re: dosemu-1.1.3 and Cyrillic_er
@ 2002-04-24 13:02 Stas Sergeev
  2002-04-24 14:15 ` Sergey Suleymanov
  0 siblings, 1 reply; 18+ messages in thread
From: Stas Sergeev @ 2002-04-24 13:02 UTC (permalink / raw)
  To: linux-msdos

[-- Attachment #1: Type: text/plain, Size: 407 bytes --]

Hello.

Sergey Suleymanov wrote:
>>> Any ideas why this happens with BackSpace?
>  Stas> Well, turning off X_keycode "fixes" the problem.  Can live with
>  Stas> this:)
>         Hmm, can't reproduce that :(. 3592 in both modes.
Well, I have investigated a little more
and found that the attached patch fixes
the problem. Actually only the change to
altgr table is enough.
Does this help?
Why 127 is there?

[-- Attachment #2: keymaps.diff --]
[-- Type: text/plain, Size: 1456 bytes --]

--- src/plugin/kbd_unicode/keymaps.c	Tue Apr 23 17:32:37 2002
+++ src/plugin/kbd_unicode/keymaps.c	Wed Apr 24 16:53:09 2002
@@ -1755,7 +1755,7 @@
 CONST t_keysym key_map_ru[] =
 {
   U_VOID, 27, '1', '2', '3', '4', '5', '6',
-  '7', '8', '9', '0', '-', '=', 127, 9,
+  '7', '8', '9', '0', '-', '=', 8, 9,
   'q', 'w', 'e', 'r', 't', 'y', 'u', 'i',
   'o', 'p', '[', ']', 13, U_VOID, 'a', 's',
   'd', 'f', 'g', 'h', 'j', 'k', 'l', ';',
@@ -1772,7 +1772,7 @@
 CONST t_keysym shift_map_ru[] =
 {
   U_VOID, 27, '!', '@', '#', '$', '%', '^',
-  '&', '*', '(', ')', '_', '+', 127, 9,
+  '&', '*', '(', ')', '_', '+', 8, 9,
   'Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I',
   'O', 'P', '{', '}', 13, U_VOID, 'A', 'S',
   'D', 'F', 'G', 'H', 'J', 'K', 'L', ':',
@@ -1789,7 +1789,7 @@
 CONST t_keysym altgr_map_ru[] =
 {
   U_VOID, 27, '1', '2', '3', '4', '5', '6',
-  '7', '8', '9', '0', '-', '=', 127, 9,
+  '7', '8', '9', '0', '-', '=', 8, 9,
   0x439,0x446,0x443,0x43A,0x435,0x43D,0x433,0x448,0x449,0x437,0x445,0x44A,
   13, U_VOID,
   0x444,0x44B,0x432,0x430,0x43F,0x440,0x43E,0x43B,0x434,0x436,0x44D,0x451,
@@ -1807,7 +1807,7 @@
 CONST t_keysym shift_altgr_map_ru[] =
 {
   U_VOID, 27, '!', '@', '#', '$', '%', '^',
-  '&', '*', '(', ')', '_', '+', 127, 9,
+  '&', '*', '(', ')', '_', '+', 8, 9,
   0x419,0x426,0x423,0x41A,0x415,0x41D,0x413,0x428,0x429,0x417,0x425,0x42A,
   13, U_VOID,
   0x424,0x42B,0x412,0x410,0x41F,0x420,0x41E,0x41B,0x414,0x416,0x42D,0x401,

^ permalink raw reply	[flat|nested] 18+ messages in thread
* Re: dosemu-1.1.3 and Cyrillic_er
@ 2002-04-23 17:15 Stas Sergeev
  2002-04-24  6:10 ` Sergey Suleymanov
  0 siblings, 1 reply; 18+ messages in thread
From: Stas Sergeev @ 2002-04-23 17:15 UTC (permalink / raw)
  To: linux-msdos

Hello.

Stas Sergeev wrote:
> Sergey Suleymanov wrote:
>> Stas> And where is this glorious patch of yours?  Having a proper
>>  Stas> keymap could be very handy.
>>         Well, here is it. (for 1.1.3)
> Any ideas why this happens with BackSpace?
Well, turning off X_keycode "fixes" the
problem.
Can live with this:)

^ permalink raw reply	[flat|nested] 18+ messages in thread
* Re: dosemu-1.1.3 and Cyrillic_er
@ 2002-04-23 15:00 Stas Sergeev
  0 siblings, 0 replies; 18+ messages in thread
From: Stas Sergeev @ 2002-04-23 15:00 UTC (permalink / raw)
  To: linux-msdos

Hello.

Sergey Suleymanov wrote:
> Stas> And where is this glorious patch of yours?  Having a proper
>  Stas> keymap could be very handy.
>         Well, here is it. (for 1.1.3)
Thanks, it works.
But one thing is strange: when I use a native
X switch (Xkb) to switch to Cyrillic, everything
works OK except the BackSpace key.
When I use a dos switch (KeyRus), everything
works OKey. So I suspect the problem is in
your patch somewhere.
For testing I wrote this prog:
---
#include <stdio.h> 
#include <bios.h> 
 
int main() { 
 for (;;) 
   printf("%i\n",bioskey(0)); 
}
---

When Xkb is in US mode, this program shows
3592 when BackSpace is pressed (KeyRus state
is irrelevant). When Xkb is in RU mode,
program shows 3711 at BackSpace, which is not
correct.
All other keys seem to work good.
Under console also everything works, the
bug triggers only in X mode.
Any ideas why this happens with BackSpace?

^ permalink raw reply	[flat|nested] 18+ messages in thread
* Re: dosemu-1.1.3 and Cyrillic_er
@ 2002-04-23 11:06 Stas Sergeev
  2002-04-23 11:29 ` Sergey Suleymanov
  0 siblings, 1 reply; 18+ messages in thread
From: Stas Sergeev @ 2002-04-23 11:06 UTC (permalink / raw)
  To: linux-msdos

Hello.

Sergey Suleymanov wrote:
>  Grigory> looks like 'P') when in X.  Some time ago I got patch from
>  Grigory> Sergey Suleymanovor for dosemu-1.0.2 that fixes problem for
>  Grigory> 1.0.2 version. Maybe such patch exist for 1.1.3?
>         Just for 1.1.2 + Eric's patch.
I think that this Eric's patch (was in this
list: "Add koi8-r support for the russion hackers")
went in dosemu-1.1.2.8, so why not?
Or do you mean some other Eric's patch that
wasn't in this list?
And where is this glorious patch of yours?
Having a proper keymap could be very handy.

I was not reading this list for a long time so
I probably have missed something in this thread.
But as this subject is rather important for me,
I have to pick up this old message.

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2002-04-26 11:18 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-04-24 13:13 dosemu-1.1.3 and Cyrillic_er Stas Sergeev
2002-04-24 14:05 ` Grigory Batalov
2002-04-24 14:39   ` Sergey Suleymanov
2002-04-24 19:08     ` Grigory Batalov
  -- strict thread matches above, loose matches on Subject: below --
2002-04-25 19:29 Stas Sergeev
2002-04-25 21:05 ` Grigory Batalov
2002-04-25 14:23 Stas Sergeev
2002-04-26 11:18 ` Sergey Suleymanov
2002-04-24 13:13 Stas Sergeev
2002-04-24 13:02 Stas Sergeev
2002-04-24 14:15 ` Sergey Suleymanov
2002-04-23 17:15 Stas Sergeev
2002-04-24  6:10 ` Sergey Suleymanov
2002-04-24  6:38   ` Grigory Batalov
2002-04-24  9:18     ` Sergey Suleymanov
2002-04-23 15:00 Stas Sergeev
2002-04-23 11:06 Stas Sergeev
2002-04-23 11:29 ` Sergey Suleymanov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox