Ps2KeyboardHost  1.0.1
Allows you to read from one or more PS2-style keyboards on an Arduino.
ps2::UsbTranslator< Diagnostics > Class Template Reference

Translates from PS2's default scancode set to USB/HID. More...

#include <ps2_UsbTranslator.h>

Public Member Functions

 UsbTranslator ()
 
 UsbTranslator (Diagnostics &diagnostics)
 
void reset ()
 causes it to forget about any scan codes that it has recorded so far and start fresh. More...
 
UsbKeyAction translatePs2Keycode (ps2::KeyboardOutput ps2Scan)
 Examines a scan code (from the default PS2 scan code set) and translates it into the corresponding USB/HID scan code. More...
 
KeyboardLeds translateLeds (UsbKeyboardLeds usbLeds)
 

Detailed Description

template<typename Diagnostics = NullDiagnostics>
class ps2::UsbTranslator< Diagnostics >

Translates from PS2's default scancode set to USB/HID.

The translation was mostly culled from http://www.hiemalis.org/~keiji/PC/scancode-translate.pdf

Constructor & Destructor Documentation

◆ UsbTranslator() [1/2]

template<typename Diagnostics = NullDiagnostics>
ps2::UsbTranslator< Diagnostics >::UsbTranslator ( )

◆ UsbTranslator() [2/2]

template<typename Diagnostics >
ps2::UsbTranslator< Diagnostics >::UsbTranslator ( Diagnostics &  diagnostics)

Member Function Documentation

◆ reset()

template<typename Diagnostics >
void ps2::UsbTranslator< Diagnostics >::reset ( )

causes it to forget about any scan codes that it has recorded so far and start fresh.

◆ translateLeds()

template<typename Diagnostics >
ps2::KeyboardLeds ps2::UsbTranslator< Diagnostics >::translateLeds ( UsbKeyboardLeds  usbLeds)

◆ translatePs2Keycode()

template<typename Diagnostics >
ps2::UsbKeyAction ps2::UsbTranslator< Diagnostics >::translatePs2Keycode ( ps2::KeyboardOutput  ps2Scan)

Examines a scan code (from the default PS2 scan code set) and translates it into the corresponding USB/HID scan code.

Returns
A gesture to send to the USB Keyboard - either a key up, key down, or no-action. (No action would happen if the scan code was found to be a part of a multi-byte sequence from the PS2.)

The documentation for this class was generated from the following files: