wd wrote:
Should be consistent now, please test if the program works.
To: DOXBOX Developers
From: dvwjr
Subject: IBM PC-AT/PS2 Keyboard emulation
The concerns the current DOSBOX CVS compiled version that exhibits some anomolies, some of which you have been made aware by this message thread. Also attached to this message is a ZIP file with ten GIF files which are screen captures comparing the WinXP (SP2) NTVDM keyboard output with a current DOSBOX CVS release.
Also enclosed in the ZIP file is a modified version of ScanCode Show version 2.2 by Mr. Paul Postuma. The modified version is labeled on-screen as version 2.21 followed by my initials. Previous versions are now deprecated. I had to modify his keyboard diagnostic utility to reflect the proper display precedence order for the keyboard modifer keys when multiple modifiers are simultainiously depressed. The "ScanCode Show" utility always displayed the proper decimal/hexadecimal keyboard scancodes, however the key-stroke interpretation displayed on the left side of the screen incorrectly displayed with multiple keyboard modifiers depressed at the same time by having SHFT over-ride CTRL over-ride ALT. The proper display order in the multi-modifer situation is ALT over-ride CTRL over-ride SHFT. Now the version "2.21" of the utility displays what is expected.
The problem with the current CVS releases of DOXBOX concerns the ten PC-AT/PS2 'gray' keys: INSERT, DELETE, HOME, END, PAGE UP, PAGE DOWN,↑ , ↓, ←, →. There appear to be three errors with the current DOSBOX CVS key-modifier code.
First error is the keyboard modifier key precedence order. It should be the highest priority of ALT, then CTRL, then SHFT and finally CAPSlock/NUMlock. It appears that the current DOSBOX CVS has the modifier order as ALT, then SHFT, then CTRL and finally CAPSlock/NUMlock with these ten keys ONLY. This leads to a CTRL-SHFT modifier combination improperly providing SHFT only scancodes for these ten gray keys. The modifier precedence order appears to be correct for all other keys.
The second error error noted is that when the NUMlock key is OFF, the RIGHT SHFT does not the modify the output of any of the ten gray keys that is depressed, nor does it properly set the bit 0 of the Keyboard BIOS variable at address 0040:0017. This can be seen with the use of the v2.21 ScanCode Show utility. When the NUMlock key is ON, the RIGHT SHFT functions properly with the ten gray keys.
The third error appears to be the function of the SHIFT keys as related to the eleven white keys of the numeric keypad. The WinXP (SP2) NTVDM emulation appears to have any SHIFT key OR'd with the NUMlock key toggle status for these eleven keys, while the CTRL key is XOR'd with NUMlock key toggle status and resulting scancodes provided. The DOSBOX CVS appears to have XOR'd both the SHFT and CTRL with the NUMlock key toggle status so that CTRL or CTRL-SHFT works properly, but SHFT mistakenly reverses the NUMlock key status for the scancodes of the eleven white numeric pad keys.
Hope this helps,
dvwjr