|
M5Unit-KEYBOARD 0.0.1 git rev:a483db1
|
QWERTY is a full-featured keyboard panel adapted to FACE_BOTTOM. More...
#include <unit_FacesQWERTY.hpp>
Classes | |
| struct | config_t |
| Settings for begin. More... | |
Public Member Functions | |
| UnitFacesQWERTY (const uint8_t addr=DEFAULT_ADDRESS) | |
| virtual bool | begin () override |
| virtual void | update (const bool force=false) override |
| virtual keyboard::key_index_t | toKeyIndex (const char ch) const override |
| Obtains the key index corresponding to the specified character. | |
| uint8_t | released () const |
| Gets the released key character code if updated. | |
Settings for begin | |
| config_t | config () |
| Gets the configuration. | |
| void | config (const config_t &cfg) |
| Set the configuration. | |
Faces type | |
| |
| uint8_t | facesType () const |
| Gets the Faces type. | |
| bool | readFacesType (uint8_t &ftype) |
| Read the faces type. | |
Public Member Functions inherited from m5::unit::UnitKeyboardBitwise | |
| UnitKeyboardBitwise (const uint8_t addr=DEFAULT_ADDRESS) | |
| virtual char | getchar () const override |
| Gets the input character. | |
| uint8_t | pressed () const |
| Get the oldest pressed key. | |
| bool | startPeriodicMeasurement (const uint32_t interval) |
| Start periodic measurement. | |
| bool | startPeriodicMeasurement () |
| Start periodic measurement using current settings. | |
| bool | stopPeriodicMeasurement () |
| Stop periodic measurement. | |
| 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. | |
| 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? | |
| 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? | |
| 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? | |
| 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? | |
| uint8_t | firmwareVersion () const |
| Gets the firmware version. | |
| virtual bool | readFirmwareVersion (uint8_t &ver) |
| Read the firmware version. | |
| 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. | |
| virtual bool | readMode (keyboard::Mode &mode) |
| Read the mode. | |
| virtual bool | writeMode (const keyboard::Mode mode) |
| Write the mode. | |
Public Member Functions inherited from m5::unit::UnitKeyboard | |
| UnitKeyboard (const uint8_t addr=DEFAULT_ADDRESS) | |
Static Public Member Functions | |
| static keyboard::key_index_t | character_to_key_index (const char ch) |
| Character to key index. | |
| static uint8_t | character_to_mode_bits (const char ch) |
| Character to mode bits. | |
Static Public Attributes | |
| static constexpr uint8_t | NUMBER_OF_KEYS {35} |
key index (left top to right bottom) | |
| static constexpr keyboard::key_index_t | KEY_Q {0} |
| static constexpr keyboard::key_index_t | KEY_W {1} |
| static constexpr keyboard::key_index_t | KEY_E {2} |
| static constexpr keyboard::key_index_t | KEY_R {3} |
| static constexpr keyboard::key_index_t | KEY_T {4} |
| static constexpr keyboard::key_index_t | KEY_Y {5} |
| static constexpr keyboard::key_index_t | KEY_U {6} |
| static constexpr keyboard::key_index_t | KEY_I {7} |
| static constexpr keyboard::key_index_t | KEY_O {8} |
| static constexpr keyboard::key_index_t | KEY_P {9} |
| static constexpr keyboard::key_index_t | KEY_A {10} |
| static constexpr keyboard::key_index_t | KEY_S {11} |
| static constexpr keyboard::key_index_t | KEY_D {12} |
| static constexpr keyboard::key_index_t | KEY_F {13} |
| static constexpr keyboard::key_index_t | KEY_G {14} |
| static constexpr keyboard::key_index_t | KEY_H {15} |
| static constexpr keyboard::key_index_t | KEY_J {16} |
| static constexpr keyboard::key_index_t | KEY_K {17} |
| static constexpr keyboard::key_index_t | KEY_L {18} |
| static constexpr keyboard::key_index_t | KEY_BS {19} |
| static constexpr keyboard::key_index_t | KEY_NO_KEY_ALT {20} |
| static constexpr keyboard::key_index_t | KEY_Z {21} |
| static constexpr keyboard::key_index_t | KEY_X {22} |
| static constexpr keyboard::key_index_t | KEY_C {23} |
| static constexpr keyboard::key_index_t | KEY_V {24} |
| static constexpr keyboard::key_index_t | KEY_B {25} |
| static constexpr keyboard::key_index_t | KEY_N {26} |
| static constexpr keyboard::key_index_t | KEY_M {27} |
| static constexpr keyboard::key_index_t | KEY_DOLLAR {28} |
| static constexpr keyboard::key_index_t | KEY_ENTER {29} |
| static constexpr keyboard::key_index_t | KEY_NO_KEY_SHIFT {30} |
| static constexpr keyboard::key_index_t | KEY_0 {31} |
| static constexpr keyboard::key_index_t | KEY_SPACE {32} |
| static constexpr keyboard::key_index_t | KEY_NO_KEY_SYM {33} |
| static constexpr keyboard::key_index_t | KEY_NO_KEY_FN {34} |
Character code for special keys | |
| static constexpr char | SCHAR_NOMARK_G {static_cast<char>(180)} |
| static constexpr char | SCHAR_NOMARK_H {static_cast<char>(181)} |
| static constexpr char | SCHAR_NOMARK_J {static_cast<char>(182)} |
| static constexpr char | SCHAR_UP {static_cast<char>(183)} |
| static constexpr char | SCHAR_INS {static_cast<char>(184)} |
| static constexpr char | SCHAR_HOME {static_cast<char>(187)} |
| static constexpr char | SCHAR_END {static_cast<char>(188)} |
| static constexpr char | SCHAR_PAGE_UP {static_cast<char>(189)} |
| static constexpr char | SCHAR_PAGE_DOWN {static_cast<char>(190)} |
| static constexpr char | SCHAR_LEFT {static_cast<char>(191)} |
| static constexpr char | SCHAR_DOWN {static_cast<char>(192)} |
| static constexpr char | SCHAR_RIGHT {static_cast<char>(193)} |
| static constexpr char | SCHAR_SPEAKER {static_cast<char>(194)} |
Protected Member Functions | |
| bool | update_new_firmware (const types::elapsed_time_t at) |
| void | push_back (m5::container::CircularBuffer< uint8_t > *container, const uint8_t kidx, const uint8_t mod8) |
| virtual uint8_t | to_mode_bits (const char ch) const override |
Protected Member Functions inherited from m5::unit::UnitKeyboardBitwise | |
| bool | start_periodic_measurement () |
| bool | start_periodic_measurement (const uint32_t interval) |
| bool | stop_periodic_measurement () |
| bool | update_new_firmware (const types::elapsed_time_t at) |
| void | push_back (m5::container::CircularBuffer< uint8_t > *container, const uint8_t kidx, const uint8_t alt) |
| keyboard::key_status_bits_t | modifier_bits () const |
| virtual uint8_t | scan_reg_addr () const |
| virtual uint8_t | mode_reg_addr () const |
| virtual uint8_t | firmware_version_reg_addr () const |
| bool | permitted_mode (const uint8_t mbits) const |
| M5_UNIT_COMPONENT_PERIODIC_MEASUREMENT_ADAPTER_HPP_BUILDER (UnitKeyboardBitwise, uint8_t) | |
Protected Attributes | |
| bool | _handle_irq {} |
| uint8_t | _type {} |
| config_t | _cfg {} |
Protected Attributes inherited from m5::unit::UnitKeyboardBitwise | |
| std::unique_ptr< m5::container::CircularBuffer< uint8_t > > | _data {} |
| keyboard::key_status_bits_t | _now {} |
| keyboard::key_status_bits_t | _prev {} |
| keyboard::key_status_bits_t | _wasPressed {} |
| keyboard::key_status_bits_t | _wasReleased {} |
| keyboard::key_status_bits_t | _wasHold {} |
| keyboard::key_status_bits_t | _holding {} |
| keyboard::key_status_bits_t | _repeating {} |
| std::vector< types::elapsed_time_t > | _repeat_start_at {} |
| std::vector< types::elapsed_time_t > | _hold_start_at {} |
| uint32_t | _repeating_threshold {400} |
| uint32_t | _holding_threshold {800} |
| uint8_t | _firmware_version {} |
| keyboard::Mode | _mode {keyboard::Mode::Conventional} |
QWERTY is a full-featured keyboard panel adapted to FACE_BOTTOM.
|
overridevirtual |
Reimplemented from m5::unit::UnitKeyboard.
|
static |
Character to key index.
| != | 0xFF keyboard::key_index_t |
| == | 0xFF No corresponding key index exists |
|
static |
Character to mode bits.
| == | 0 Not exists |
| != | 0 Bits in corresponding mode |
|
inline |
Gets the Faces type.
| bool m5::unit::UnitFacesQWERTY::readFacesType | ( | uint8_t & | ftype | ) |
Read the faces type.
| [out] | ftype | Hardware type |
|
virtual |
Gets the released key character code if updated.
| != | 0 Released character code |
| == | 0 There is no released key |
Reimplemented from m5::unit::UnitKeyboardBitwise.
|
inlineoverrideprotectedvirtual |
Reimplemented from m5::unit::UnitKeyboardBitwise.
|
inlineoverridevirtual |
Obtains the key index corresponding to the specified character.
| != | 0xFF key index |
| == | 0xFF No corresponding key index |
Reimplemented from m5::unit::UnitKeyboardBitwise.
|
overridevirtual |
Reimplemented from m5::unit::UnitKeyboardBitwise.