How to get ps2keyboard original scan code ?

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-

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.

Salute .. pylon
You are everywhere , I really appreciate

It's time for me to do the CoPas.

Sincerely
-bino-