In the scancode table here:
http://panda.cs.ndsu.nodak.edu/%7Eachap ... odes1.html
for some keys there are two scancodes? Like Right control:
R CTRL E0,1D
how come?
Two scancodes?
Re:Two scancodes?
And just one more thing Is it possible to print more "special characters" in Protected Mode... Cause such characters as ? ? ? ? and so on are replaced by other weird characters..any way to get around this or do I have to write my own routines for text displaying (now Im just setting the character in the videomemory)
Re:Two scancodes?
Hi,
The reason for all of this is the same reason we still need to turn gateA20 on - "backward compatibility".
Also there are other codes that aren't related to a keypress (or release) - see Ralf Brown's IO Port List. Of these other codes it's good to respond to the BAT OK code (0xAA - Basic Assurance Test) by setting the typematic rate and keyboard LED's to what they should be. The BAT is sent by the keyboard at power-on or reset, and responding to it properly will allow the keyboard driver to work with manual switch boxes (used to connect several computers to the same keyboard, mouse, monitor) and allow the keyboard to be swapped without rebooting.
http://www.evergreen.edu/biophysics/tec ... ext-pc.htm
The VGA card uses the characters in the DOS column....
Cheers,
Brendan
There's normal keypresses, extended keypresses and weird keypresses. For extended keypresses there's an escape code "0xE0" followed by the make (or break) code. The weird keypresses are "pause" and "print screen". The "print screen" make sequence is the same as "left shift" then "keypad *", and the break sequence is the reverse (even though it's a completely different key). The "pause" sequence is worse - it's almost the same as "right control" then "keypad 6" except for the different escape code and that the break is sent immediately after the make (not when the key is released). Your keyboard driver should handle all of this (the scan code table should be enough).Whodoo wrote: In the scancode table here:
http://panda.cs.ndsu.nodak.edu/%7Eachap ... odes1.html
for some keys there are two scancodes? Like Right control:
R CTRL E0,1D
how come?
The reason for all of this is the same reason we still need to turn gateA20 on - "backward compatibility".
Also there are other codes that aren't related to a keypress (or release) - see Ralf Brown's IO Port List. Of these other codes it's good to respond to the BAT OK code (0xAA - Basic Assurance Test) by setting the typematic rate and keyboard LED's to what they should be. The BAT is sent by the keyboard at power-on or reset, and responding to it properly will allow the keyboard driver to work with manual switch boxes (used to connect several computers to the same keyboard, mouse, monitor) and allow the keyboard to be swapped without rebooting.
Take a look at this:Whodoo wrote: And just one more thing Is it possible to print more "special characters" in Protected Mode... Cause such characters as ? ? ? ? and so on are replaced by other weird characters..any way to get around this or do I have to write my own routines for text displaying (now Im just setting the character in the videomemory)
http://www.evergreen.edu/biophysics/tec ... ext-pc.htm
The VGA card uses the characters in the DOS column....
Cheers,
Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
Re:Two scancodes?
Alright thanks.. but the right alt, Alt Gr..
the tables says
R ALT E0,38
but when I print the scancodes and press Alt Gr I get
29, 157, 224, 56
which is four numbers instead of two? I dont know if it matters that I do not use an english keyboard
the tables says
R ALT E0,38
but when I print the scancodes and press Alt Gr I get
29, 157, 224, 56
which is four numbers instead of two? I dont know if it matters that I do not use an english keyboard
Re:Two scancodes?
Hi,
157 = 0x9D = Left control released
224, 56 = 0xE0, 0x38 = Right alt pressed
http://www-306.ibm.com/software/globali ... ysical.jsp
Unfortunately it doesn't show scancodes..
Cheers,
Brendan
29 = 0x1D = Left control pressedWhodoo wrote: Alright thanks.. but the right alt, Alt Gr..
the tables says
R ALT E0,38
but when I print the scancodes and press Alt Gr I get
29, 157, 224, 56
157 = 0x9D = Left control released
224, 56 = 0xE0, 0x38 = Right alt pressed
Using a non-US keyboard would make a difference (the scan code chart is for US keyboards). Take a look at:Whodoo wrote: which is four numbers instead of two? I dont know if it matters that I do not use an english keyboard
http://www-306.ibm.com/software/globali ... ysical.jsp
Unfortunately it doesn't show scancodes..
Cheers,
Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.