Page 1 of 1

[BUG] International keyboard layouts

Posted: Mon 01 Jul, 2019 1:33 am
by ruben_balea
There's something wrong with international keyboard layouts: incorrect, missing and duplicated keys.

Recent 'keyboard_at.c' changes could have caused additional troubles (viewtopic.php?f=2&t=3250#p12329) but the strange WME behaviour was present at least since v12.
In v13 and v14 is the same and in the latest v15 commit the effect was expanded to a lot more keys.
For MS-DOS 6.22 Spanish XT and AT machines have a few but different keys wrong depending of the machine and maybe the PCem release. For PS/2 machines all was fine until last commit, now 'Alt Gr' is not working.

And there were already other issues before, I've found some comments about problems with keyboard layouts in older topics:
viewtopic.php?f=2&t=3253#p12299
viewtopic.php?f=2&t=409#p2741
viewtopic.php?f=2&t=3167#p11672

Re: [BUG] International keyboard layouts

Posted: Mon 01 Jul, 2019 12:57 pm
by Manaphy
If you are on Windows, v12 introduced the closs platform UI. Maybe that affected it?

Re: [BUG] International keyboard layouts

Posted: Mon 01 Jul, 2019 2:49 pm
by ruben_balea
Yes, I'm on Windows 10 x64 but with Spanish keyboard layout in PCem v11 I get also wrong/missing keys in some configurations.
All tested PC and XT machines are wrong running MS-DOS 6.22 Spanish
All tested AT and PS/2 machines are fine running MS-DOS 6.22 Spanish but Windows ME is even worst than in v12-v15

IBM PC MS-DOS 6.22 [×]
IBM XT MS-DOS 6.22 [×]
Generic XT clone MS-DOS 6.22 [×]
AMI XT clone MS-DOS 6.22 [×]
DTK XT clone MS-DOS 6.22 [×]
VTech Laser Turbo XT MS-DOS 6.22 [×]
VTech Laser XT3 MS-DOS 6.22 [×]
Phoenix XT clone MS-DOS 6.22 [×]
Tandy 1000 MS-DOS 6.22 [×]
Sinclair PC200 MS-DOS 6.22 [×]
Euro PC MS-DOS 6.22 [×]
Amstrad PC3086 MS-DOS 6.22 [×]
IBM AT MS-DOS 6.22 [√]
Commodore PC 30 III MS-DOS 6.22 [√]
AMI 286 clone MS-DOS 6.22 [√]
Award 286 clone MS-DOS 6.22 [√]
Dell System 200 MS-DOS 6.22 [√]
Compaq Deskpro 386 MS-DOS 6.22 [√]
Award 430VX PCI MS-DOS 6.22 [√] WME GUI [×] WME DOS SESSION [×] :arrow: Edit: Windows ME seems to have buggy DOS support, Windows 95, 98, 98SE and Linux Mandrake 10 keyboards are working correctly.

Re: [BUG] International keyboard layouts

Posted: Thu 04 Jul, 2019 5:05 am
by ruben_balea
Edit: if some machines are working then the problem has nothing to do with reading physical keys, it must be some code specific to those machines, so my previous idea makes no sense:
I was doing some research, it seems that one of the international keys has the same scancode as a different US key :? so I think PCem may have to use different scancodes according to the OS locale, at least under Windows.
Then if I'm correct this isn't a PCem bug but a feature not yet implemented.

This page gives a lot of information about many kinds of keyboards: http://www.quadibloc.com/comp/scan.htm

And this documment has the specifications for US and international keyboards to use Windows Logo: https://download.microsoft.com/download ... ancode.doc
The same is available here in PDF format: https://babbage.cs.qc.cuny.edu/courses/ ... ancode.pdf
:idea: Under MS-DOS 5.00* and higher KEYB can be set back to US layout pressing CONTROL+ALT+F1 and set again to the layout specified by command line parameters pressing CONTROL+ALT+F2, thanks to this feature and knowing the US layout all operating system commands and parameters can be typed with any keyboard.

*At least, it could be present already on earlier versions. May be available also on PC-DOS, DR/Novell/OpenDOS, FreeDOS...

Re: [BUG] International keyboard layouts

Posted: Fri 05 Jul, 2019 12:27 am
by ruben_balea
Windows ME has the same problems under VirtualBox 6.0.8 while Windows 95 OSR 2.5 and Windows 98 SE are fine.
I'm guessing that WME does the same on real computers, after all MS was ditching DOS support with Windows ME

Re: [BUG] International keyboard layouts

Posted: Tue 09 Jul, 2019 4:13 am
by ruben_balea
Test results of PCem v15 running MS-DOS 6.22 Spanish:

Code: Select all

FIC VA-503+          MS-DOS 6.22 SP [√]
Shuttle HOT-557      MS-DOS 6.22 SP [√]
Epox P55-VA          MS-DOS 6.22 SP [√]
ASUS P/I-P55T2P4     MS-DOS 6.22 SP [×]
ASUS P/I-P55TVP4     MS-DOS 6.22 SP [×]
Intel Advanced/ZP    MS-DOS 6.22 SP [×]
Packard Bell PB520R  MS-DOS 6.22 SP [×]
Intel Premiere/PCI   MS-DOS 6.22 SP [×]
Packard Bell PB410A  MS-DOS 6.22 SP [√]
Elonex PC-425X       MS-DOS 6.22 SP [×]
Award SiS 496/497    MS-DOS 6.22 SP [√]
AMI WinBIOS 486      MS-DOS 6.22 SP [×]
AMI 486 clone        MS-DOS 6.22 SP [×]
MR 386DX clone       MS-DOS 6.22 SP [×]
Compaq Deskpro 386   MS-DOS 6.22 SP [×]
AMI 386DX clone      MS-DOS 6.22 SP [×]
PB Legend 300SX      MS-DOS 6.22 SP [√]
KMX-C-02             MS-DOS 6.22 SP [×]
IBM PS/1 model 2121  MS-DOS 6.22 SP [√]
Epson PC AX3         MS-DOS 6.22 SP [√]
DTK 386SX clone      MS-DOS 6.22 SP [×]
Amstrad MegaPC       MS-DOS 6.22 SP [×]
AMI 386SX clone      MS-DOS 6.22 SP [×]
AMA-932J DTK         MS-DOS 6.22 SP [×]
Acer 386SX25/N       MS-DOS 6.22 SP [×]
Tulip AT Compact     MS-DOS 6.22 SP [√]
Trigem 286M          MS-DOS 6.22 SP [√]
Toshiba T3100e       MS-DOS 6.22 SP [×]
Samsung SPC-4216P    MS-DOS 6.22 SP [√]
Samsung SPC-4200P    MS-DOS 6.22 SP [√]
IBM XT Model 286     MS-DOS 6.22 SP [×]
IBM PS/2 30-286      MS-DOS 6.22 SP [√]
IBM PS/1 model 2121  MS-DOS 6.22 SP [√]
IBM AT               MS-DOS 6.22 SP [×]
GW-286CT GEAR        MS-DOS 6.22 SP [×]
Epson PC AX2e        MS-DOS 6.22 SP [×]
Epson PC AX          MS-DOS 6.22 SP [√]
Dell System 200      MS-DOS 6.22 SP [√]
Compaq Portable II   MS-DOS 6.22 SP [√]
Commodore PC 30 III  MS-DOS 6.22 SP [×]
Bull Micral 45       MS-DOS 6.22 SP [√]
Award 286 clone      MS-DOS 6.22 SP [×]
AMI 286 clone        MS-DOS 6.22 SP [×]
VTech Laser XT3      MS-DOS 6.22 SP [×]
Toshiba T1200        MS-DOS 6.22 SP [×]
Tandy 1000SL/2       MS-DOS 6.22 SP [√]
Sinclair PC200       MS-DOS 6.22 SP [1]
Amstrad PPC512/640   MS-DOS 6.22 SP [1]
Amstrad PC3086       MS-DOS 6.22 SP [1]
Amstrad PC2086       MS-DOS 6.22 SP [1]
Amstrad PC1640       MS-DOS 6.22 SP [×]
Amstrad PC1512       MS-DOS 6.22 SP [×]
Xi8088               MS-DOS 6.22 SP [2]
VTech Laser Turbo XT MS-DOS 6.22 SP [×]
Toshiba T1000        MS-DOS 6.22 SP [×]
Thomson TO16 PC      MS-DOS 6.22 SP [×]
Tandy 1000HX         MS-DOS 6.22 SP [×]
Tandy 1000           MS-DOS 6.22 SP [×]
Schenider Euro PC    MS-DOS 6.22 SP [×]
Phoenix XT clone     MS-DOS 6.22 SP [×]
NCR PC4i             MS-DOS 6.22 SP [×]
Juko XT clone        MS-DOS 6.22 SP [×]
IBM XT               MS-DOS 6.22 SP [×]
IBM PC               MS-DOS 6.22 SP [×]
Generic XT clone     MS-DOS 6.22 SP [×]
DTK XT clone         MS-DOS 6.22 SP [×]
Atari PC3            MS-DOS 6.22 SP [×]
AMI XT clone         MS-DOS 6.22 SP [×]

Legend:
√ Good, all keys are correct with KEYB SP enabled
× Bad, most MS-DOS commands/parameters can't be typed with KEYB SP enabled. All those machines have exactly the same behaviour.
1 Not so bad, some MS-DOS commands/parameters can be typed with KEYB SP enabled, Alt GR doesn't work and key 45* is missing. All those machines have exactly the same behaviour too.
2 Total disaster, I can't type anything, all keys are missplaced!!!
* Key positions from table 12 of this document: https://web.archive.org/web/20180826215 ... 1_12v2.pdf

Re: [BUG] International keyboard layouts

Posted: Wed 10 Jul, 2019 1:33 am
by ruben_balea
On 8088/8086 machines loading keyb with /E parameter to force enhanced keyboard fixes most problems except:
- Alt-GR & key #45 still missing or not working.
- Left arrows become backspace.
- Numeric '/' types '-'
- Maybe something else, I tested character keys only.

Re: [BUG] International keyboard layouts

Posted: Thu 11 Jul, 2019 8:11 pm
by JosepMa
I can only confirm your findings (at least about ami 386 and xi8088)

It's clear that the keyboard emulation that was added on that commit that we identified, is making these systems use an incorrect key mapping.

Re: [BUG] International keyboard layouts

Posted: Thu 11 Jul, 2019 9:00 pm
by ruben_balea
Of course, PC / XT and AT use incompatible keyboards, but I think that machines with AT and PS/2 keyboard should behave all the same.
I wonder if their keyboard controllers of the AT + machines which aren't working don't have standard output and/or their BIOS performs additional processing or are setting the keyboards to other translations :?