default scan code set
default scan code set
i have researched the keyboard controller all over the internet and have found different info about the scan code sets. some sites say that the default set is set 1 while others say that the default is set 2. another site says that set 2 scancodes are translated to set 1 scan codes. also i have been using 0x1C to be the scan code for "enter" under set2 and it works but several sites say that enter is 0x5A under set 2....whats goin on here???
Re:default scan code set
http://my.execpc.com/~geezer/osd/kbd/index.htm#scan
[table][tr][td][/td][td]Set 1[/td][td]Set 2[/td][/tr]
[tr][td]Enter[/td][td]0x1C[/td][td]0x5A[/td][/tr][/table]
[table][tr][td][/td][td]Set 1[/td][td]Set 2[/td][/tr]
[tr][td]Enter[/td][td]0x1C[/td][td]0x5A[/td][/tr][/table]
Re:default scan code set
******FROM SITE*****Only scancode set 2 is widely supported and relatively free of bugs. However, the 8042 can be (and usually is) programmed to convert set 2 scancodes from the keyboard to set 1. The 8042 also handles some non-keyboard functions, such as resetting the CPU, controlling the A20 gate, and communicating with a PS/2 mouse.********************************
ive been using set 2 and 0x1c=enter...maybe the controller converts set 2 to set 1(above)?
ive been using set 2 and 0x1c=enter...maybe the controller converts set 2 to set 1(above)?
Re:default scan code set
But how do you know what scancode set you are using. And how do you know if the scancode set is converted to another scancode set?
And then an important question. Does it matter what scancode set you are using? It is probably best to convert any of the scancode sets to your own defined scancode set, right?
And why do different scancode sets exist? Does one support more keys than the other ones?
And then an important question. Does it matter what scancode set you are using? It is probably best to convert any of the scancode sets to your own defined scancode set, right?
And why do different scancode sets exist? Does one support more keys than the other ones?
Re:default scan code set
From the 486(possibly 386 too, I'm not sure though) and up, by default the keyboard outputs scancode set 2, and the keyboard controller translates those set 2 scancodes into set 1.
http://osdev.neopages.net/docs/wout_kbd.php
Hope this helps,
K.J.
By sending bytes to certian ports and reading other ports, read section 4 of this doc:But how do you know what scancode set you are using. And how do you know if the scancode set is converted to another scancode set?
http://osdev.neopages.net/docs/wout_kbd.php
Hope this helps,
K.J.