My machine is AT-compatible so its default scancode-set is 2 .
I used this function to set scancode-set to 3 :
Byte KB_Set_ScanCode_Mode ( Byte mode )
{
KB_Write_To_DataRegister ( KB_READ_OR_SET_SCANCODE_COM ) ;
if ( KB_Read_From_OutputRegister ( ) != KB_ACK_REPLY ) return 0;//FAILED
KB_Write_To_DataRegister ( mode ) ;
if ( KB_Read_From_OutputRegister ( ) != KB_ACK_REPLY ) return 0;//FAILED
return 1 ;
}
After that I checked the scancode-set and it was 3 , so the previous code succeeded .
but when I press anykey the IRQ1_handler craches . although it works well when using scancode set 2 .
thanks
scancode 3 on AT-Compatible machines
Re:scancode 3 on AT-Compatible machines
Hi,
Cheers,
Brendan
Scancode sets 1 and 3 aren't recommended as they aren't supported by all keyboards. Despite this your keyboard driver should never crash (even if the keyboard is sending random numbers). Why did it crash (which exception, etc)?firas981 wrote: After that I checked the scancode-set and it was 3 , so the previous code succeeded .
but when I press anykey the IRQ1_handler craches . although it works well when using scancode set 2 .
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:scancode 3 on AT-Compatible machines
manuals say that there is internal translation from set 2 to set 1 in some AT-compatibles , so I wrote my driver according on set 1 .....
it succeeded !
thanks
it succeeded !
thanks
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:scancode 3 on AT-Compatible machines
i second that. Those "'multiple scancode sets" are things people that write code for a microcontroller that talks *directly* with the keyboard need to take into account. In our case, there's *already* a microcontroller doing this (the 8042) and doing it well. So we can be happy and stick with scancode set #1, which is the plain compatible set you get if you're running under DOS...
Re:scancode 3 on AT-Compatible machines
Hi,
2 keyboards + 2 video cards + 2 serial mice = a multi-user computer ;D
Cheers,
Brendan
Ever wondered what happens when you plug another keyboard into the second PS/2 port (where the mouse usually goes)? I've got a PS/2 (keyboard & mouse) driver that allows this..Pype.Clicker wrote: i second that. Those "'multiple scancode sets" are things people that write code for a microcontroller that talks *directly* with the keyboard need to take into account. In our case, there's *already* a microcontroller doing this (the 8042) and doing it well. So we can be happy and stick with scancode set #1, which is the plain compatible set you get if you're running under DOS...
2 keyboards + 2 video cards + 2 serial mice = a multi-user computer ;D
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.