|
|
|
|
@ -11,6 +11,7 @@
|
|
|
|
|
#include <map>
|
|
|
|
|
#include <string>
|
|
|
|
|
#include <vector>
|
|
|
|
|
#include <cstdint>
|
|
|
|
|
#include "RGBControllerKeyNames.h"
|
|
|
|
|
|
|
|
|
|
extern const char* KLM_CLASS_NAME;
|
|
|
|
|
@ -67,9 +68,9 @@ enum KEYBOARD_OPCODE
|
|
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
|
{
|
|
|
|
|
uint8_t zone;
|
|
|
|
|
uint8_t row;
|
|
|
|
|
uint8_t col;
|
|
|
|
|
std::uint8_t zone;
|
|
|
|
|
std::uint8_t row;
|
|
|
|
|
std::uint8_t col;
|
|
|
|
|
unsigned int value;
|
|
|
|
|
const char* name;
|
|
|
|
|
KEYBOARD_OPCODE opcode;
|
|
|
|
|
@ -126,23 +127,23 @@ public:
|
|
|
|
|
void GetKeyMap(unsigned int* map_ptr);
|
|
|
|
|
void GetKeyMap(unsigned int* map_ptr, KEYBOARD_MAP_FILL_TYPE fill_type);
|
|
|
|
|
void GetKeyMap(unsigned int* map_ptr, KEYBOARD_MAP_FILL_TYPE fill_type,
|
|
|
|
|
uint8_t height, uint8_t width);
|
|
|
|
|
std::uint8_t height, std::uint8_t width);
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
void OpCodeSwitch(key_set change_keys);
|
|
|
|
|
void InsertKey(keyboard_led key);
|
|
|
|
|
void InsertKeys(std::vector<keyboard_led> keys);
|
|
|
|
|
bool InsertRow(uint8_t row);
|
|
|
|
|
bool InsertRow(std::uint8_t row);
|
|
|
|
|
void SwapKey(keyboard_led keys);
|
|
|
|
|
void SwapKeys(std::vector<keyboard_led> keys);
|
|
|
|
|
void RemoveKey(keyboard_led keys);
|
|
|
|
|
void RemoveRow(uint8_t row);
|
|
|
|
|
void RemoveRow(std::uint8_t row);
|
|
|
|
|
|
|
|
|
|
KEYBOARD_LAYOUT layout;
|
|
|
|
|
KEYBOARD_SIZE physical_size;
|
|
|
|
|
std::string name = KLM_CLASS_NAME;
|
|
|
|
|
uint8_t rows = 0;
|
|
|
|
|
uint8_t cols = 0;
|
|
|
|
|
std::uint8_t rows = 0;
|
|
|
|
|
std::uint8_t cols = 0;
|
|
|
|
|
std::vector<keyboard_led> keymap;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|