How I can use extended scancodes

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
OSMAN

How I can use extended scancodes

Post by OSMAN »

Hello.

How can I use extended scancodes?
bluecode

Re:How I can use extended scancodes

Post by bluecode »

OSMAN wrote:How can I use extended scancodes?
What do you mean with "extended scancodes"? Perhaps you mean "escaped scancodes and should look here under section "What's that E0 scancode i get all the time ?"?
OSMAN

Re:How I can use extended scancodes

Post by OSMAN »

I've read it and lots more but I don't get how can I use them!
What must I do if I want to contain an escaped scancode?
User avatar
Candy
Member
Member
Posts: 3882
Joined: Tue Oct 17, 2006 11:33 pm
Location: Eindhoven

Re:How I can use extended scancodes

Post by Candy »

Make three tables. One contains the ascii characters for scan codes 0 - 0x7F. The second contains those for 0xE0 plus the scan code (in which the scan code is again the lookup number). The third is for 0xE1 (which is just pause, so you could skip this one). Then, when you get an E0, instead of outputting it converted or anything, set a state bit to 1 and next time use the 0xE0 table. For the E1 table make two states, first_byte and second_byte, since it eats up two bytes after the E1 for the scan code.
Post Reply