Re: DOSEMU, Slang and UK keyboards

Chris Wilson
2002-09-02T17:20:39Z

[-- Attachment #1: Type: TEXT/PLAIN, Size: 645 bytes --]

Sorry to bother you again, I forgot to attach the patch.

Cheers, Chris.

> We recently needed to use DOSEMU to provide access to a legacy
> application, System 505 (a DOS database frontend). It worked very well
> except for one small problem: our UK keyboards were not fully supported.
> It seems that when DOSEMU is using slang as the user interface, the
> keyboard layout is hardcoded to US and cannot be changed.
--
___ __ _
/ __// / ,__(_)_ | Chris Wilson -- UNIX Firewall Lead Developer |
/ (_ / ,\/ _/ /_ \ | NetServers.co.uk http://www.netservers.co.uk |
\ _//_/_/_//_/___/ | 21 Signet Court, Cambridge, UK. 01223 576516 |

[-- Attachment #2: Type: TEXT/PLAIN, Size: 1742 bytes --]

diff -ru2 dosemu-1.1.3/src/plugin/keyboard/include/keymaps.h dosemu-pound/src/plugin/keyboard/include/keymaps.h
--- dosemu-1.1.3/src/plugin/keyboard/include/keymaps.h Mon Mar 18 21:58:18 2002
+++ dosemu-pound/src/plugin/keyboard/include/keymaps.h Mon Sep 2 16:28:16 2002
@@ -56,5 +56,5 @@

extern unsigned char key_map_us[];
-extern unsigned char shift_map_us[];
+extern unsigned char shift_map_uk[];
extern unsigned char alt_map_us[];

diff -ru2 dosemu-1.1.3/src/plugin/keyboard/keyb_slang.c dosemu-pound/src/plugin/keyboard/keyb_slang.c
--- dosemu-1.1.3/src/plugin/keyboard/keyb_slang.c Mon Mar 18 21:58:15 2002
+++ dosemu-pound/src/plugin/keyboard/keyb_slang.c Mon Sep 2 16:49:01 2002
@@ -767,5 +767,5 @@

define_key_from_keymap(key_map_us, 0, 1);
- define_key_from_keymap(shift_map_us, SHIFT_MASK, 1);
+ define_key_from_keymap(shift_map_uk, SHIFT_MASK, 1);
define_key_from_keymap(alt_map_us, ALT_MASK, 0);

@@ -1104,4 +1114,9 @@
#endif

+ if (scan == 0x00010004) {
+ k_printf("KBD: remapping pound sign\n");
+ key->str[1] = 156;
+ }
+
k_printf("KBD: scan=%08lx Shift_Flags=%08lx str[0]=%d str='%s' len=%d\n",
scan,Shift_Flags,key->str[0],strprintable(key->str+1),Keystr_Len);
diff -ru2 dosemu-1.1.3/src/plugin/keyboard/keymaps.c dosemu-pound/src/plugin/keyboard/keymaps.c
--- dosemu-1.1.3/src/plugin/keyboard/keymaps.c Mon Mar 18 21:58:18 2002
+++ dosemu-pound/src/plugin/keyboard/keymaps.c Mon Sep 2 16:30:37 2002
@@ -292,5 +292,5 @@
CONST unsigned char shift_map_uk[] =
{
- 0, 27, '!', '"', 156, '$', '%', '^',
+ 0, 27, '!', '"', 163, '$', '%', '^',
'&', '*', '(', ')', '_', '+', 127, 9,
'Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I',