* DOSEMU, Slang and UK keyboards
@ 2002-09-02 17:09 Chris Wilson
2002-09-02 17:20 ` Chris Wilson
0 siblings, 1 reply; 3+ messages in thread
From: Chris Wilson @ 2002-09-02 17:09 UTC (permalink / raw)
To: linux-msdos; +Cc: john
Hi all,
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.
We made a quick hack for the most important key, the pound sign, which
I've attached in case it's useful to anyone. Strangely, slang returns a
character code of 163 when this key is pressed, although the keymap and
fonts suggest that it should be 156. I had to kludge this character code,
since I'm not familiar with Slang and was in rather a hurry.
Are there any plans to introduce proper keyboard layout support under
slang? And does anyone have any ideas why we're seeing the wrong character
code for the pound sign?
Cheers, Chris.
--
___ __ _
/ __// / ,__(_)_ | Chris Wilson -- UNIX Firewall Lead Developer |
/ (_ / ,\/ _/ /_ \ | NetServers.co.uk http://www.netservers.co.uk |
\ _//_/_/_//_/___/ | 21 Signet Court, Cambridge, UK. 01223 576516 |
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: DOSEMU, Slang and UK keyboards
2002-09-02 17:09 Chris Wilson
@ 2002-09-02 17:20 ` Chris Wilson
0 siblings, 0 replies; 3+ messages in thread
From: Chris Wilson @ 2002-09-02 17:20 UTC (permalink / raw)
To: linux-msdos; +Cc: john
[-- 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',
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: DOSEMU, Slang and UK keyboards
@ 2002-09-02 19:23 Stas Sergeev
0 siblings, 0 replies; 3+ messages in thread
From: Stas Sergeev @ 2002-09-02 19:23 UTC (permalink / raw)
To: Chris Wilson; +Cc: linux-msdos
Hello.
Chris Wilson wrote:
> Are there any plans to introduce proper keyboard layout support under
> slang?
Yes, upgrade to 1.1.3.2 and apply the keyboard
patches from
dosemu.sourceforge.net/stas
to try out the new keyboard engine.
It would be better to provide patches for
both, your patch is for the old one.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-09-02 19:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-09-02 19:23 DOSEMU, Slang and UK keyboards Stas Sergeev
-- strict thread matches above, loose matches on Subject: below --
2002-09-02 17:09 Chris Wilson
2002-09-02 17:20 ` Chris Wilson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox