|
|
| UnitKeyboardBitwise (const uint8_t addr=DEFAULT_ADDRESS) |
| |
| virtual void | update (const bool force=false) override |
| |
|
| virtual char | getchar () const override |
| | Gets the input character.
|
| |
| uint8_t | pressed () const |
| | Get the oldest pressed key.
|
| |
| virtual uint8_t | released () const override |
| | Get the oldest released key.
|
| |
|
| bool | startPeriodicMeasurement (const uint32_t interval) |
| | Start periodic measurement.
|
| |
|
bool | startPeriodicMeasurement () |
| | Start periodic measurement using current settings.
|
| |
| bool | stopPeriodicMeasurement () |
| | Stop periodic measurement.
|
| |
|
- Warning
- API valid only if using M5Unit-KEYBOARD firmware
- Note
- Which bits represent what depends on the target unit
|
|
keyboard::key_status_bits_t | nowBits () const |
| | Get the bits of the key being pressed.
|
| |
|
keyboard::key_status_bits_t | previousBits () const |
| | Get the bits of the previous key pressed.
|
| |
|
keyboard::key_status_bits_t | pressedBits () const |
| | Get the key bits at the moment they are pressed.
|
| |
|
keyboard::key_status_bits_t | releasedBits () const |
| | Get the key bits at the moment they are released.
|
| |
|
keyboard::key_status_bits_t | holdingBits () const |
| | Get the bits of the held key.
|
| |
|
keyboard::key_status_bits_t | wasHoldBits () const |
| | Get the bits of the key at the moment of hold.
|
| |
|
keyboard::key_status_bits_t | repeatingBits () const |
| | Get the bits of the key that the software is repeatedly pressing.
|
| |
|
keyboard::key_status_bits_t | modifierBits () const |
| | Get the bits of the modifier key being pressed.
|
| |
|
- Warning
- API valid only if using M5Unit-KEYBOARD firmware
- Note
- Some keys do not exist depending on the target Unit
|
|
bool | isModifier () const |
| | Is any modifier keys pressed?
|
| |
|
bool | isShift () const |
| | Is the shift key pressed?
|
| |
|
bool | isSymbol () const |
| | Is the symbol key pressed?
|
| |
|
bool | isFunction () const |
| | Is the function key pressed?
|
| |
|
bool | isAlt () const |
| | Is the alt key pressed?
|
| |
|
bool | isControl () const |
| | Is the control key pressed?
|
| |
|
bool | isOption () const |
| | Is the option key pressed?
|
| |
|
bool | isShiftEqual () const |
| | Is only shift pressed among the modifier keys?
|
| |
|
bool | isSymbolEqual () const |
| | Is only symbol pressed among the modifier keys?
|
| |
|
bool | isFunctionEqual () const |
| | Is only function pressed among the modifier keys?
|
| |
|
bool | isAltEqual () const |
| | Is only alt pressed among the modifier keys?
|
| |
|
bool | isControlEqual () const |
| | Is only control pressed among the modifier keys?
|
| |
|
bool | isOptionEqual () const |
| | Is only option pressed among the modifier keys?
|
| |
|
- Warning
- API valid only if using M5Unit-KEYBOARD firmware
|
|
bool | isPressed () const |
| | Is any key press?
|
| |
|
bool | isReleased () const |
| | Is all key release?
|
| |
|
bool | wasPressed () const |
| | Was any key pressed?
|
| |
|
bool | wasReleased () const |
| | Was any key released?
|
| |
|
bool | isHolding () const |
| | Is any key holding?
|
| |
|
bool | wasHold () const |
| | Was any key hold?
|
| |
|
bool | isRepeating () const |
| | Is any key repeating?
|
| |
|
- Warning
- API valid only if using M5Unit-KEYBOARD firmware
|
| bool | isPressed (const keyboard::key_index_t kidx) const |
| | Is the specified key pressed?
|
| |
| bool | isReleased (const keyboard::key_index_t kidx) const |
| | Is the specified key released?
|
| |
| bool | wasPressed (const keyboard::key_index_t kidx) const |
| | Was the specified key pressed?
|
| |
| bool | wasReleased (const keyboard::key_index_t kidx) const |
| | Was the specified key released?
|
| |
| bool | isHolding (const keyboard::key_index_t kidx) const |
| | Is the specified key holding?
|
| |
| bool | wasHold (const keyboard::key_index_t kidx) const |
| | Was the specified key hold?
|
| |
| bool | isRepeating (const keyboard::key_index_t kidx) const |
| | Is the specified key repeating?
|
| |
|
- Warning
- API valid only if using M5Unit-KEYBOARD firmware. For CardKB2 UART mode, character-based state queries (isPressed(ch), wasPressed(ch), etc.) may return inaccurate results because press and release events can arrive in the same update cycle, causing the key state to be cleared before the buffered character is read. Use key-index-based queries (isPressed(kidx)) instead. This limitation may be improved in a future firmware update.
|
| virtual keyboard::key_index_t | toKeyIndex (const char) const |
| | Obtains the key index corresponding to the specified character.
|
| |
| bool | isPressed (const char ch) const |
| | Is the specified character pressed?
|
| |
| bool | isReleased (const char ch) const |
| | Is the specified character released?
|
| |
| bool | wasPressed (const char ch) const |
| | Was the specified character pressed?
|
| |
| bool | wasReleased (const char ch) const |
| | Was the specified character released?
|
| |
| bool | isHolding (const char ch) const |
| | Is the specified character holding?
|
| |
| bool | wasHold (const char ch) const |
| | Was the specified character hold?
|
| |
| bool | isRepeating (const char ch) const |
| | Is the specified character repeating?
|
| |
|
- Warning
- API valid only if using M5Unit-KEYBOARD firmware
|
| uint8_t | firmwareVersion () const |
| | Gets the firmware version.
|
| |
| virtual bool | readFirmwareVersion (uint8_t &ver) |
| | Read the firmware version.
|
| |
|
- Warning
- API valid only if using M5Unit-KEYBOARD firmware
|
|
uint32_t | holdingThreshold () const |
| | Gets the holding threshold (ms)
|
| |
|
uint32_t | repeatingThreshold () const |
| | Gets the repeating threshold (ms)
|
| |
| void | setHoldingThreshold (const uint32_t ms) |
| | Sets the holding threshold.
|
| |
| void | setRepeatingThreshold (const uint32_t ms) |
| | Sets the repeating threshold.
|
| |
|
- Warning
- API valid only if using M5Unit-KEYBOARD firmware (CardKB, FacesQWERTY). CardKB2 does not support software mode switching; readMode()/writeMode() always return false.
|
| virtual bool | readMode (keyboard::Mode &mode) |
| | Read the mode.
|
| |
| virtual bool | writeMode (const keyboard::Mode mode) |
| | Write the mode.
|
| |
|
| UnitKeyboard (const uint8_t addr=DEFAULT_ADDRESS) |
| |
| virtual bool | begin () override |
| |
Class supporting keyboard state acquisition by key press bits.
- Warning
- To make it work, M5Unit-KEYBOARD firmware must be written to the target (CardKB, FacesQWERTY...)