Add alternate LED name field to KLM overlay type for regional key layouts
This commit is contained in:
parent
65615e2bcf
commit
1d9779d80e
11 changed files with 1474 additions and 1294 deletions
|
|
@ -67,6 +67,7 @@ enum KEYBOARD_OPCODE
|
|||
KEYBOARD_OPCODE_INS_SHFT_ADJACENT = 3,
|
||||
KEYBOARD_OPCODE_INSERT_ROW = 4,
|
||||
KEYBOARD_OPCODE_REMOVE_ROW = 5,
|
||||
KEYBOARD_OPCODE_ADD_ALT_NAME = 6,
|
||||
};
|
||||
|
||||
typedef struct
|
||||
|
|
@ -76,6 +77,7 @@ typedef struct
|
|||
std::uint8_t col;
|
||||
unsigned int value;
|
||||
const char* name;
|
||||
const char* alt_name;
|
||||
KEYBOARD_OPCODE opcode;
|
||||
} keyboard_led;
|
||||
|
||||
|
|
@ -120,6 +122,8 @@ public:
|
|||
unsigned int GetKeyCount();
|
||||
std::string GetKeyNameAt(unsigned int key_idx);
|
||||
std::string GetKeyNameAt(unsigned int row, unsigned int col);
|
||||
std::string GetKeyAltNameAt(unsigned int key_idx);
|
||||
std::string GetKeyAltNameAt(unsigned int row, unsigned int col);
|
||||
|
||||
unsigned int GetKeyValueAt(unsigned int key_idx);
|
||||
unsigned int GetKeyValueAt(unsigned int row, unsigned int col);
|
||||
|
|
@ -141,6 +145,7 @@ private:
|
|||
void SwapKeys(std::vector<keyboard_led> keys);
|
||||
void RemoveKey(keyboard_led keys);
|
||||
void RemoveRow(std::uint8_t row);
|
||||
void AddAltName(keyboard_led key);
|
||||
|
||||
KEYBOARD_LAYOUT layout;
|
||||
KEYBOARD_SIZE physical_size;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue