OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 6:09 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Problem with scancodes
PostPosted: Mon Jan 20, 2020 8:54 pm 
Offline

Joined: Wed Jan 08, 2020 8:09 pm
Posts: 17
I just wrote an entire translation table for scancode set 3 and made sure that i switched the keyboard to use set 3. However, i still recieve set 2 scancodes.

To add to that, i get the ACK response even if the keyboard doesn't seem to change its set. What should i do?


Top
 Profile  
 
 Post subject: Re: Problem with scancodes
PostPosted: Tue Jan 21, 2020 4:48 am 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5099
Probably you should stop trying to use set 3.

What are you running your OS on? If you're running on bare metal, what kind of keyboard are you using?


Top
 Profile  
 
 Post subject: Re: Problem with scancodes
PostPosted: Tue Jan 21, 2020 8:35 am 
Offline

Joined: Wed Jan 08, 2020 8:09 pm
Posts: 17
I'm running my OS on virtualbox.


Top
 Profile  
 
 Post subject: Re: Problem with scancodes
PostPosted: Tue Jan 21, 2020 8:46 am 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5099
Virtualbox appears to support scan code set 3. How are you switching the keyboard to set 3? If you ask the keyboard which set it's using, how does it respond?


Top
 Profile  
 
 Post subject: Re: Problem with scancodes
PostPosted: Tue Jan 21, 2020 8:59 am 
Offline

Joined: Wed Jan 08, 2020 8:09 pm
Posts: 17
The output of that command is 3F.

outb(PORT_NB_PS2_DATA, 0xF0);
outb(PORT_NB_PS2_DATA, 3);
outb(PORT_NB_PS2_DATA, 0xF0);
outb(PORT_NB_PS2_DATA, 0);


Top
 Profile  
 
 Post subject: Re: Problem with scancodes
PostPosted: Tue Jan 21, 2020 10:50 am 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5099
You are not receiving set 2 scan codes. You are receiving set 1 scan codes.

The keyboard is sending set 3 scan codes, and the keyboard controller is translating them to set 1 scan codes. If you want to receive set 3 scan codes, you need to turn off translation in the keyboard controller.

Incidentally, when you ask the keyboard which scan code set it's using, it responds with 0x03 and the keyboard controller translates that into 0x3F.


Top
 Profile  
 
 Post subject: Re: Problem with scancodes
PostPosted: Tue Jan 21, 2020 10:56 am 
Offline

Joined: Wed Jan 08, 2020 8:09 pm
Posts: 17
Thanks a lot!!!!!

Have a nice day :)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot] and 54 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group