Reply 520 of 2085, by TheGreatCodeholio
No, because I would like the correct scan code to be passed, and that's 0x59 make, and 0xD9 break. The normal equals key doesn't even have a fixed scan code (every keyboard layout places it elsewhere, the Slovenian keyboard layout has equals at Shift+0, for example), and in any case this isn't about the key returning an equals sign, but about the key generating the correct scan code.
Hm... are you aware though that scan code 0x59 on the PC is already associated with the right shift key in scan code set 2 and 3?
I see the '=' next to the zero key, yes. I'm unfamiliar though with how you type '=' with the 0 key verses typing ')' on that keyboard. ) is SHIFT+0 on US keyboards, what keys exactly do you press for slovenian to type the 0 key's = sign? Again, if you have to hold down shift, control, etc. to type it then it's not it's own keyboard key.
If you want me to implement it, someone here will need to plug in a Slovenian keyboard (to the PS/2 port NOT USB) and use the 8042 test program from DOSLIB in pure MS-DOS to dump the keyboard scan codes. You will need to go through the menus to select scan code sets 1, 2, and 3. I'm not going to add scan codes to keyboard.cpp that I'm not certain are correct. Again: DOSBox does not emulate USB keyboards it emulates PS/2 keyboards, use a PS/2 version of the keyboard.
Well, the Apple F13-F16 (I think no Apple keyboard has F17-F24) keys generate 0x64/0xE4, 0x65/0xE5, 0x66/0xE6, and 0x67/0xE7.
As for the IBM ones, F13 is Shift+F1, F14 is Shift+F2, and so on, so basically the scan code would be 0x2A (0xAA for break) followed by the appropriate F1-F12 key code.
I'll go ahead and implement F13-F24 then as Shift+F1-F12, since that's the common assignment.
Edit: The scan codes for the Windows etc. keys: left Windows is 0xE0 0x5B (make) and 0xE0 0xDB (break), right Windows is 0xE0 0x5C (make) and 0xE0 0xDC (break), and Windows Popup Menu is 0xE0 0x5D (make) and 0xE0 0xDD (break).
Already coded that, thanks.
I'll add the keyboard bindings to the mapper then for the extra Japanese keys and the scan codes to keyboard.cpp.