|
M5Unit-KEYBOARD 0.1.0 git rev:b58d024
|
HID Usage ID → ASCII translation tables (US ANSI layout) More...
Namespaces | |
| namespace | m5 |
| Top level namespace of M5Stack. | |
Functions | |
| char | m5::unit::tab5_keyboard::hidUsageToChar (const uint8_t keycode, const uint8_t modifier) |
| Translate HID Usage Code + modifier to ASCII character (US ANSI layout) | |
| bool | m5::unit::tab5_keyboard::isPrintableHidKey (const uint8_t keycode, const uint8_t modifier) |
| Convenience: returns true if hidUsageToChar result is printable ASCII (0x20-0x7E) | |
HID Usage ID → ASCII translation tables (US ANSI layout)
| char m5::unit::tab5_keyboard::hidUsageToChar | ( | const uint8_t | keycode, |
| const uint8_t | modifier ) |
Translate HID Usage Code + modifier to ASCII character (US ANSI layout)
| keycode | HID Usage ID per USB HID spec Keyboard/Keypad Page 0x07 |
| modifier | HID modifier byte. Bit 1 (0x02) = Left Shift, Bit 5 (0x20) = Right Shift. Other bits (Ctrl/Alt/GUI) are ignored. |
| !=0 | ASCII character (printable or whitespace) |
| 0 | Not translatable (modifier-only keys, F-keys, navigation, invalid) |
| bool m5::unit::tab5_keyboard::isPrintableHidKey | ( | const uint8_t | keycode, |
| const uint8_t | modifier ) |
Convenience: returns true if hidUsageToChar result is printable ASCII (0x20-0x7E)
| keycode | HID Usage ID |
| modifier | HID modifier byte |
| true | Suitable for direct c display |
| false | Either not translatable or non-printable control character |