295 static const byte pauseKeySequence[] {
300 template <
typename Diagnostics>
303 this->isSpecial =
false;
304 this->isUnmake =
false;
305 this->pauseKeySequenceIndex = 0;
306 this->diagnostics = &diagnostics;
309 template <
typename Diagnostics>
315 template <
typename Diagnostics>
323 template <
typename Diagnostics>
332 this->isUnmake =
true;
338 this->isSpecial =
true;
345 this->isSpecial =
false;
346 this->isUnmake =
false;
351 if ((uint8_t)ps2Scan == pauseKeySequence[pauseKeySequenceIndex]) {
352 ++pauseKeySequenceIndex;
353 if (pauseKeySequenceIndex <
sizeof(pauseKeySequence))
358 else if (this->isSpecial)
366 pauseKeySequenceIndex = 0;
370 diagnostics->noTranslationForKey(this->isSpecial, ps2Scan);
371 this->isUnmake =
false;
372 this->isSpecial =
false;
379 this->isUnmake =
false;
380 this->isSpecial =
false;
enum ps2::UsbKeyAction::@0 gesture
A translated PS2 keystroke - it indicates either a keydown, a key up, or that there should be no imme...
Definition: ps2_UsbTranslator.h:36
UsbKeyAction translatePs2Keycode(ps2::KeyboardOutput ps2Scan)
Examines a scan code (from the default PS2 scan code set) and translates it into the corresponding US...
Definition: ps2_UsbTranslator.hpp:324
const byte ps2ToUsbMap[]
Definition: ps2_UsbTranslator.hpp:28
Definition: ps2_UsbTranslator.h:40
Definition: ps2_UsbTranslator.h:41
KeyboardLeds translateLeds(UsbKeyboardLeds usbLeds)
Definition: ps2_UsbTranslator.hpp:316
void reset()
causes it to forget about any scan codes that it has recorded so far and start fresh.
Definition: ps2_UsbTranslator.hpp:310
UsbKeyboardLeds
The bitfield that describes USB LED's.
Definition: ps2_UsbTranslator.h:27
KeyboardOutput
Byte-codes sent back from the Ps2 keyboard to the host.
Definition: ps2_KeyboardOutput.h:31
KeyboardLeds
The LED's available on a standard PS2 keyboard.
Definition: ps2_KeyboardLeds.h:23
Definition: ps2_UsbTranslator.h:39
uint8_t hidCode
Definition: ps2_UsbTranslator.h:37
const byte extPs2ToUsbMap[]
Definition: ps2_UsbTranslator.hpp:164