I present a second version of the "latin_o2i" routine in which I added deadkey handling.
To get a key, call the "latin" routine with eax=2 instead of the syscall 2 function.
An additional parameter (ebx) must point to a 12 byte structure (three 32-bit variables).
On return, eax contains the same result as the syscall 2 function, and the variables contain:
var 1 returns the ascii code, or 0 for deadkey, 1 if the controlkey is down, 2 for hotkey
var 2 contains the control key flags (see syscall 66,3).
var 3 is used by the latin routine to store the ascii code of the pending dead-key.
Please look at the "PrintLatin.asm" example application to understand the simplicity of it all.
Комментарий к файлу: PrintLatin version 2
PrintLatin.jpg [ 8.35 КБ | 1271 просмотр ]
- the routine works for all countries that use the Western Latin font for keyboard symbols.
- keyboard mode should be set to normal (the default)
- I did not (yet) test hotkeys
The latin routine applies simple "Typewriter" rules:
A dead-key that does not match a valid combination is lost.
To print a deadkey by itself, it must be pressed twice.
Use the AltNumkey method to enter any ascii code
I intent to make an application similar to Zkey for Latin keyboards.
I intent to make a map for Spanish keyboard, . . .
I will post a new topic on "printable keycodes".
On positive feedback, I'll publish a Fasm version of the latin_o2i routine.