system
October 5, 2012, 3:18am
1
Dear all.
For my project, I need a bunch of buttons.
I knew I can do this by using multiplexer in matrix layout.
But since I have PS/2 keyboard laying around, I want to use it.
I use PS2Keyboard library from the playground.
From the 'Simple_test' example, I knew that the available read method will return a char type.
My Question is : how to get the original keyboard scan code ( something like 'MAKE' coloumn at http://www.computer-engineering.org/ps2keyboard/scancodes2.html ) ?
I think I need to write another method as member, but I'm not good in C
Sincerely
-bino-
pylon
October 5, 2012, 1:52pm
2
I use PS2Keyboard library from the playground.
A link to the exact version you're using is always best.
how to get the original keyboard scan code
The library doesn't support the reading of scan codes although it's internally using them. You can add this method to the library:
uint8_t PS2Keyboard::readScancode() {
return get_scan_code();
}
This will return the next scan code or 0 if there was no keystroke left. To use it you have to add the appropriate code to the .h file too.
system
October 6, 2012, 2:09am
3
Salute .. pylon
You are everywhere , I really appreciate
It's time for me to do the CoPas.
Sincerely
-bino-