Add VSG Mintaka keyboard

This commit is contained in:
Federico Scodelaro
2024-10-20 19:56:31 +00:00
committed by Adam Honse
parent 7dcdef28c8
commit d7e467a37f
8 changed files with 986 additions and 161 deletions

View File

@@ -0,0 +1,301 @@
/*---------------------------------------------------------*\
| MintakaKeyboardController.cpp |
| |
| Driver for VSG Mintaka Devices keyboard lighting |
| Based on KeychronKeyboardController |
| |
| Federico Scodelaro (pudymody) 08 Oct 2024 |
| |
| This file is part of the OpenRGB project |
| SPDX-License-Identifier: GPL-2.0-only |
\*---------------------------------------------------------*/
#include "MintakaKeyboardController.h"
#include <string.h>
using namespace std::chrono_literals;
MintakaKeyboardController::MintakaKeyboardController(hid_device* dev_handle, const hid_device_info& info)
{
dev = dev_handle;
version = "";
location = info.path;
wchar_t serial_string[128];
int ret = hid_get_serial_number_string(dev, serial_string, 128);
if(ret != 0)
{
serial_number = "";
}
else
{
std::wstring return_wstring = serial_string;
serial_number = std::string(return_wstring.begin(), return_wstring.end());
}
}
MintakaKeyboardController::~MintakaKeyboardController()
{
hid_close(dev);
}
std::string MintakaKeyboardController::GetDeviceLocation()
{
return("HID: " + location);
}
std::string MintakaKeyboardController::GetSerialString()
{
return(serial_number);
}
std::string MintakaKeyboardController::GetFirmwareVersion()
{
return(version);
}
void MintakaKeyboardController:: SetLedSequencePositions(std::vector<unsigned int> positions)
{
led_sequence_positions = positions;
}
void MintakaKeyboardController::SetMode(std::vector<mode> modes, int active_mode, std::vector<RGBColor> colors)
{
/*-----------------------------------------*\
| Turn customization on/off |
| Custom mode needs to turn it on |
\*-----------------------------------------*/
SetCustomization(modes[active_mode].value == CUSTOM_MODE_VALUE);
/*-----------------------------------------*\
| Tells the device we're about to send the |
| pages (18 pages) |
\*-----------------------------------------*/
StartEffectPage();
unsigned char usb_buf[PACKET_DATA_LENGTH];
/*-----------------------------------------*\
| Configure the modes |
| LED Effect Page structure: |
| |
| OK.. this was from the original PDF |
| which appears to not be exact/up to date |
|-------------------------------------------|
| [0] Specialeffects mode1-32 |
| [1] colorFull color: 0x00 Monochrome:0x01 |
| [2] R Color ratio 0x00-0xFF |
| [3] G Color Ratio0x00-0xFF |
| [4] B Colour ratio0x00-0xFF |
| full color is 0,invalid |
| [5] dynamicdirection |
| left to right: 0x00 |
| right to left: 0x01 |
| down to up: 0x02 |
| up to down: 0x03 |
| [6] brightnesscontrol 0x00-0x0F |
| 0x0F brightest |
| [7] Periodiccontrol0x00-0x0F |
| 0x0F longest cycle |
| [8:13] Reserved |
| [14] Checkcode_L0xAA |
| [15] Checkcode_H0x55 |
|-------------------------------------------|
| Fixes: |
| color mode is 8th byte |
| brightness is 9th byte |
| speed is 10th byte |
| direction is 11th byte |
\*-----------------------------------------*/
unsigned char selected_mode[EFFECT_PAGE_LENGTH];
for(unsigned int i = 0; i < 5; i++) // 5 packets
{
memset(usb_buf, 0x00, PACKET_DATA_LENGTH);
for(unsigned int j = 0; j < 4; j++) // of 4 effects
{
const mode& m = modes[1 + j + i * 4]; // skip 1 first mode (Custom)
int offset = j * EFFECT_PAGE_LENGTH;
usb_buf[offset + 0] = m.value; // mode value
if(m.flags & MODE_FLAG_HAS_MODE_SPECIFIC_COLOR)
{
usb_buf[offset + 1] = RGBGetRValue(m.colors[0]);
usb_buf[offset + 2] = RGBGetGValue(m.colors[0]);
usb_buf[offset + 3] = RGBGetBValue(m.colors[0]);
}
usb_buf[offset + 8] = m.color_mode == MODE_COLORS_RANDOM; // random switch
usb_buf[offset + 9] = m.brightness;
usb_buf[offset + 10] = m.speed;
usb_buf[offset + 11] = m.direction;
usb_buf[offset + 14] = EFFECT_PAGE_CHECK_CODE_L;
usb_buf[offset + 15] = EFFECT_PAGE_CHECK_CODE_H;
/*-----------------------------------------*\
| Backup active mode values for later use |
| Custom and off share the same mode value |
\*-----------------------------------------*/
if(m.value == modes[active_mode].value || (m.value == LIGHTS_OFF_MODE_VALUE && modes[active_mode].value == CUSTOM_MODE_VALUE))
{
usb_buf[offset + 9] = modes[active_mode].brightness;
for(unsigned int x = 0; x < EFFECT_PAGE_LENGTH; x++)
{
selected_mode[x] = usb_buf[offset+x];
}
}
}
Send(usb_buf); // Sends the packet
}
// packets count sent: 5
/*-----------------------------------------*\
| 3 times an empty packet - guess why... |
\*-----------------------------------------*/
for(unsigned int i = 0; i < 3; i++)
{
memset(usb_buf, 0x00, PACKET_DATA_LENGTH);
Send(usb_buf);
}
// packets count sent: 8
/*-----------------------------------------*\
| Customization stuff |
| 9 times * 16 blocks 80 RR GG BB |
\*-----------------------------------------*/
unsigned char color_buf[COLOR_BUF_SIZE];
memset(color_buf, 0x00, COLOR_BUF_SIZE);
for(unsigned int i = 0; i < COLOR_BUF_SIZE; i += 4)
{
color_buf[i] = 0x80;
}
for(unsigned int c = 0; c < colors.size(); c++)
{
int offset = led_sequence_positions[c] * 4;
color_buf[offset + 1] = RGBGetRValue(colors[c]);
color_buf[offset + 2] = RGBGetGValue(colors[c]);
color_buf[offset + 3] = RGBGetBValue(colors[c]);
}
for(unsigned int p = 0; p < 9; p++)
{
memcpy(usb_buf, &color_buf[p * PACKET_DATA_LENGTH], PACKET_DATA_LENGTH);
Send(usb_buf);
}
// packets count sent: 17
/*-----------------------------------------*\
| Tells the device what the active mode is |
| This is the last packet |
\*-----------------------------------------*/
memset(usb_buf, 0x00, PACKET_DATA_LENGTH);
memcpy(usb_buf, &selected_mode[0], EFFECT_PAGE_LENGTH);
Send(usb_buf);
// packets count sent: 18 - let's hope the keyboard ACK in next frame
/*-----------------------------------------*\
| Tells the device that the pages are sent |
\*-----------------------------------------*/
EndCommunication();
/*-----------------------------------------*\
| Tells the device to apply what we've sent |
\*-----------------------------------------*/
StartEffectCommand();
}
void MintakaKeyboardController::StartEffectCommand()
{
unsigned char usb_buf[PACKET_DATA_LENGTH];
memset(usb_buf, 0x00, PACKET_DATA_LENGTH);
usb_buf[0x00] = PACKET_HEADER;
usb_buf[0x01] = LED_EFFECT_START_COMMAND;
Send(usb_buf);
}
void MintakaKeyboardController::StartEffectPage()
{
/*-----------------------------------------*\
| LED_SPECIAL_EFFECT_PACKETS: |
| Packet amount that will be sent in this |
| transaction |
\*-----------------------------------------*/
unsigned char usb_buf[PACKET_DATA_LENGTH];
memset(usb_buf, 0x00, PACKET_DATA_LENGTH);
usb_buf[0x00] = PACKET_HEADER;
usb_buf[0x01] = WRITE_LED_SPECIAL_EFFECT_AREA_COMMAND;
usb_buf[0x08] = LED_SPECIAL_EFFECT_PACKETS;
Send(usb_buf);
Read();
}
void MintakaKeyboardController::SetCustomization(bool state)
{
unsigned char usb_buf[PACKET_DATA_LENGTH];
memset(usb_buf, 0x00, PACKET_DATA_LENGTH);
usb_buf[0x00] = PACKET_HEADER;
usb_buf[0x01] = state ? TURN_ON_CUSTOMIZATION_COMMAND : TURN_OFF_CUSTOMIZATION_COMMAND;
Send(usb_buf);
Read();
}
void MintakaKeyboardController::EndCommunication()
{
unsigned char usb_buf[PACKET_DATA_LENGTH];
memset(usb_buf, 0x00, PACKET_DATA_LENGTH);
usb_buf[0x00] = PACKET_HEADER;
usb_buf[0x01] = COMMUNICATION_END_COMMAND;
Send(usb_buf);
Read();
}
void MintakaKeyboardController::Read()
{
unsigned char usb_buf[PACKET_DATA_LENGTH+1];
memset(usb_buf, 0x00, PACKET_DATA_LENGTH+1);
usb_buf[0x00] = REPORT_ID;
hid_get_feature_report(dev, usb_buf, PACKET_DATA_LENGTH+1);
std::this_thread::sleep_for(10ms);
}
void MintakaKeyboardController::Send(unsigned char data[PACKET_DATA_LENGTH])
{
unsigned char usb_buf[PACKET_DATA_LENGTH+1];
usb_buf[0] = REPORT_ID;
for(unsigned int x = 0; x < PACKET_DATA_LENGTH; x++)
{
usb_buf[x+1] = data[x];
}
hid_send_feature_report(dev, usb_buf, PACKET_DATA_LENGTH+1);
std::this_thread::sleep_for(10ms);
}

View File

@@ -0,0 +1,120 @@
/*---------------------------------------------------------*\
| MintakaKeyboardController.h |
| |
| Driver for VSG Mintaka Devices keyboard lighting |
| Based on KeychronKeyboardController |
| |
| Federico Scodelaro (pudymody) 08 Oct 2024 |
| |
| This file is part of the OpenRGB project |
| SPDX-License-Identifier: GPL-2.0-only |
\*---------------------------------------------------------*/
#pragma once
#include "RGBController.h"
#include <string>
#include <hidapi/hidapi.h>
#define REPORT_ID 0x00
#define PACKET_DATA_LENGTH 64
#define COLOR_BUF_SIZE 576
#define EFFECT_PAGE_LENGTH 16
#define LED_SPECIAL_EFFECT_PACKETS 0x12
#define PACKET_HEADER 0x04
#define EFFECT_PAGE_CHECK_CODE_L 0xAA
#define EFFECT_PAGE_CHECK_CODE_H 0x55
/*-----------------------------------------*\
| Commands |
\*-----------------------------------------*/
enum
{
COMMUNICATION_END_COMMAND = 0x02,
GET_BASIC_INFO_COMMAND = 0x05,
READ_KEY_DEFINITION_AREA_COMMAND = 0x10,
WRITE_KEY_DEFINITION_AREA_COMMAND = 0x11,
READ_LED_EFFECT_DEFINITION_AREA_COMMAND = 0x12,
WRITE_LED_SPECIAL_EFFECT_AREA_COMMAND = 0x13,
READ_MACRO_DEFINITION_AREA_COMMAND = 0x14,
WRITE_MACRO_DEFINITION_AREA_COMMAND = 0x15,
READ_GAME_MODE_AREA_COMMAND = 0x16,
WRITE_GAME_MODE_AREA_COMMAND = 0x17,
TURN_ON_CUSTOMIZATION_COMMAND = 0x18,
TURN_OFF_CUSTOMIZATION_COMMAND = 0x19,
LED_EFFECT_START_COMMAND = 0xF0,
LED_SYNC_INITIAL_COMMAND = 0xF1,
LED_SYNC_START_COMMAND = 0xF2,
LED_SYNC_STOP_COMMAND = 0xF3,
RANDOM_PACKET_START_COMMAND = 0xAB,
};
/*-----------------------------------------*\
| Modes |
\*-----------------------------------------*/
enum
{
CUSTOM_MODE_VALUE = 0x00,
STATIC_MODE_VALUE = 0x01,
KEYSTROKE_LIGHT_UP_MODE_VALUE = 0x02,
KEYSTROKE_DIM_MODE_VALUE = 0x03,
SPARKLE_MODE_VALUE = 0x04,
RAIN_MODE_VALUE = 0x05,
RANDOM_COLORS_MODE_VALUE = 0x06,
BREATHING_MODE_VALUE = 0x07,
SPECTRUM_CYCLE_MODE_VALUE = 0x08,
RING_GRADIENT_MODE_VALUE = 0x09,
VERTICAL_GRADIENT_MODE_VALUE = 0x0A,
HORIZONTAL_GRADIENT_WAVE_MODE_VALUE = 0x0B,
AROUND_EDGES_MODE_VALUE = 0x0C,
KEYSTROKE_HORIZONTAL_LINES_VALUE = 0x0D,
KEYSTROKE_TITLED_LINES_MODE_VALUE = 0x0E,
KEYSTROKE_RIPPLES_MODE_VALUE = 0x0F,
SEQUENCE_MODE_VALUE = 0x10,
WAVE_LINE_MODE_VALUE = 0x11,
TILTED_LINES_MODE_VALUE = 0x12,
BACK_AND_FORTH_MODE_VALUE = 0x13,
LIGHTS_OFF_MODE_VALUE = 0x80,
};
/*-----------------------------------------*\
| Other settings |
\*-----------------------------------------*/
enum
{
MINTAKA_MIN_SPEED = 0x00,
MINTAKA_MAX_SPEED = 0x0F,
MINTAKA_MIN_BRIGHTNESS = 0x00,
MINTAKA_MAX_BRIGHTNESS = 0x0F,
};
class MintakaKeyboardController
{
public:
MintakaKeyboardController(hid_device* dev_handle, const hid_device_info& info);
~MintakaKeyboardController();
std::string GetSerialString();
std::string GetDeviceLocation();
std::string GetFirmwareVersion();
void SetLedSequencePositions(std::vector<unsigned int> positions);
void SetMode(std::vector<mode> modes, int active_mode, std::vector<RGBColor> colors);
protected:
hid_device* dev;
private:
std::string location;
std::string serial_number;
std::string version;
std::vector<unsigned int> led_sequence_positions;
void SetCustomization(bool state);
void StartEffectPage();
void StartEffectCommand();
void EndCommunication();
void Read();
void Send(unsigned char data[PACKET_DATA_LENGTH]);
};

View File

@@ -0,0 +1,40 @@
/*---------------------------------------------------------*\
| MintakaKeyboardControllerDetect.cpp |
| |
| Driver for VSG Mintaka Devices keyboard lighting |
| Based on KeychronKeyboardController |
| |
| Federico Scodelaro (pudymody) 08 Oct 2024 |
| |
| This file is part of the OpenRGB project |
| SPDX-License-Identifier: GPL-2.0-only |
\*---------------------------------------------------------*/
#include "Detector.h"
#include "MintakaKeyboardController.h"
#include "RGBController.h"
#include "RGBController_MintakaKeyboard.h"
/*---------------------------------------------------------*\
| MintakaKeyboard vendor ID |
\*---------------------------------------------------------*/
#define MINTAKA_KEYBOARD_VID 0x05AC
/*---------------------------------------------------------*\
| Product ID |
\*---------------------------------------------------------*/
#define VSG_MINTAKA_PID 0x0256
void DetectMintakaKeyboardControllers(hid_device_info* info, const std::string& name)
{
hid_device* dev = hid_open_path(info->path);
if(dev)
{
MintakaKeyboardController* controller = new MintakaKeyboardController(dev, *info);
RGBController_MintakaKeyboard* rgb_controller = new RGBController_MintakaKeyboard(controller);
rgb_controller->name = name;
ResourceManager::get()->RegisterRGBController(rgb_controller);
}
}
REGISTER_HID_DETECTOR_IPU("VSG Mintaka", DetectMintakaKeyboardControllers, MINTAKA_KEYBOARD_VID, VSG_MINTAKA_PID, 0, 0x0001, 0x06);

View File

@@ -0,0 +1,319 @@
/*---------------------------------------------------------*\
| RGBController_MintakaKeyboard.cpp |
| |
| Driver for VSG Mintaka Devices keyboard lighting |
| Based on KeychronKeyboardController |
| |
| Federico Scodelaro (pudymody) 08 Oct 2024 |
| |
| This file is part of the OpenRGB project |
| SPDX-License-Identifier: GPL-2.0-only |
\*---------------------------------------------------------*/
#include <chrono>
#include <thread>
#include "KeyboardLayoutManager.h"
#include "RGBControllerKeyNames.h"
#include "RGBController_MintakaKeyboard.h"
/*---------------------------------------------------------------------*\
| VSG Keyboard Mintaka Layout |
\*---------------------------------------------------------------------*/
layout_values mintaka_offset_values =
{
{
/* ESC 1 2 3 4 5 6 7 8 9 0 ' ¿ BSPC */
19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 103,
/* TAB Q W E R T Y U I O P ´ + */
37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
/* CPLK A S D F G H J K L Ñ { } ENTR */
55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 108, 85,
/* LSFT < Z X C V B N M , . - RSFT */
73, 109, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
/* LCTL LWIN LALT SPC RALT RMNU RCTL RFNC */
91, 92, 93, 94, 95, 96, 97, 98,
},
{
{ KEYBOARD_LAYOUT_ISO_QWERTY, {
{ 0, 1, 11, 0, KEY_EN_QUOTE, KEYBOARD_OPCODE_SWAP_ONLY, },
{ 0, 1, 12, 0, KEY_ES_OPEN_QUESTION_MARK, KEYBOARD_OPCODE_SWAP_ONLY, },
{ 0, 2, 11, 0, KEY_ES_TILDE, KEYBOARD_OPCODE_SWAP_ONLY, },
{ 0, 2, 12, 0, KEY_EN_PLUS, KEYBOARD_OPCODE_SWAP_ONLY, },
{ 0, 3, 10, 0, KEY_ES_ENIE, KEYBOARD_OPCODE_SWAP_ONLY, },
{ 0, 3, 11, 0, KEY_EN_LEFT_BRACKET, KEYBOARD_OPCODE_SWAP_ONLY, },
{ 0, 3, 12, 0, KEY_EN_RIGHT_BRACKET, KEYBOARD_OPCODE_SWAP_ONLY, },
{ 0, 4, 1, 0, KEY_NORD_ANGLE_BRACKET, KEYBOARD_OPCODE_SWAP_ONLY, },
{ 0, 4, 11, 0, KEY_NORD_HYPHEN, KEYBOARD_OPCODE_SWAP_ONLY, },
{ 0, 5, 11, 0, KEY_EN_MENU, KEYBOARD_OPCODE_SWAP_ONLY, },
{ 0, 5, 12, 0, KEY_EN_RIGHT_CONTROL, KEYBOARD_OPCODE_SWAP_ONLY, },
{ 0, 5, 13, 0, KEY_EN_RIGHT_FUNCTION, KEYBOARD_OPCODE_SWAP_ONLY, },
}}
}
};
typedef struct
{
std::string name;
int value;
int flags;
} mintaka_effect;
/**------------------------------------------------------------------*\
@name Mintaka Keyboard
@category Keyboard
@type USB
@save :x:
@direct :x:
@effects :white_check_mark:
@detectors DetectMintakaKeyboardControllers
@comment
\*-------------------------------------------------------------------*/
RGBController_MintakaKeyboard::RGBController_MintakaKeyboard(MintakaKeyboardController* controller_ptr)
{
controller = controller_ptr;
name = "Mintaka Keyboard";
vendor = "VSG";
type = DEVICE_TYPE_KEYBOARD;
description = name;
location = controller->GetDeviceLocation();
serial = controller->GetSerialString();
version = controller->GetFirmwareVersion();
mode Custom;
Custom.name = "Custom";
Custom.value = CUSTOM_MODE_VALUE;
Custom.flags = MODE_FLAG_HAS_PER_LED_COLOR | MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_AUTOMATIC_SAVE;
Custom.color_mode = MODE_COLORS_PER_LED;
Custom.brightness_min = MINTAKA_MIN_BRIGHTNESS;
Custom.brightness_max = MINTAKA_MAX_BRIGHTNESS;
Custom.brightness = MINTAKA_MAX_BRIGHTNESS;
modes.push_back(Custom);
mintaka_effect mintaka_effects[20] =
{
{
"Static",
STATIC_MODE_VALUE,
MODE_FLAG_HAS_RANDOM_COLOR | MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_AUTOMATIC_SAVE
},
{
"Keystroke light up",
KEYSTROKE_LIGHT_UP_MODE_VALUE,
MODE_FLAG_HAS_RANDOM_COLOR | MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_HAS_SPEED | MODE_FLAG_AUTOMATIC_SAVE
},
{
"Keystroke dim",
KEYSTROKE_DIM_MODE_VALUE,
MODE_FLAG_HAS_RANDOM_COLOR | MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_HAS_SPEED | MODE_FLAG_AUTOMATIC_SAVE
},
{
"Sparkle",
SPARKLE_MODE_VALUE,
MODE_FLAG_HAS_RANDOM_COLOR | MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_HAS_SPEED | MODE_FLAG_AUTOMATIC_SAVE
},
{
"Rain",
RAIN_MODE_VALUE,
MODE_FLAG_HAS_RANDOM_COLOR | MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_HAS_SPEED | MODE_FLAG_AUTOMATIC_SAVE
},
{
"Random colors",
RANDOM_COLORS_MODE_VALUE,
MODE_FLAG_HAS_RANDOM_COLOR | MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_HAS_SPEED | MODE_FLAG_AUTOMATIC_SAVE
},
{
"Breathing",
BREATHING_MODE_VALUE,
MODE_FLAG_HAS_RANDOM_COLOR | MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_HAS_SPEED | MODE_FLAG_AUTOMATIC_SAVE
},
{
"Spectrum cycle",
SPECTRUM_CYCLE_MODE_VALUE,
MODE_FLAG_HAS_RANDOM_COLOR | MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_HAS_SPEED | MODE_FLAG_AUTOMATIC_SAVE
},
{
"Ring gradient",
RING_GRADIENT_MODE_VALUE,
MODE_FLAG_HAS_RANDOM_COLOR | MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_HAS_SPEED | MODE_FLAG_AUTOMATIC_SAVE
},
{
"Vertical gradient",
VERTICAL_GRADIENT_MODE_VALUE,
MODE_FLAG_HAS_RANDOM_COLOR | MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_DIRECTION_UD | MODE_FLAG_AUTOMATIC_SAVE
},
{
"Horizontal gradient / Rainbow wave",
HORIZONTAL_GRADIENT_WAVE_MODE_VALUE,
MODE_FLAG_HAS_RANDOM_COLOR | MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_DIRECTION_LR | MODE_FLAG_AUTOMATIC_SAVE
},
{
"Around edges",
AROUND_EDGES_MODE_VALUE,
MODE_FLAG_HAS_RANDOM_COLOR | MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_HAS_SPEED | MODE_FLAG_AUTOMATIC_SAVE
},
{
"Keystroke horizontal lines",
KEYSTROKE_HORIZONTAL_LINES_VALUE,
MODE_FLAG_HAS_RANDOM_COLOR | MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_HAS_SPEED | MODE_FLAG_AUTOMATIC_SAVE
},
{
"Keystroke tilted lines",
KEYSTROKE_TITLED_LINES_MODE_VALUE,
MODE_FLAG_HAS_RANDOM_COLOR | MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_HAS_SPEED | MODE_FLAG_AUTOMATIC_SAVE
},
{
"Keystroke ripples",
KEYSTROKE_RIPPLES_MODE_VALUE,
MODE_FLAG_HAS_RANDOM_COLOR | MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_HAS_SPEED | MODE_FLAG_AUTOMATIC_SAVE
},
{
"Sequence",
SEQUENCE_MODE_VALUE,
MODE_FLAG_HAS_RANDOM_COLOR | MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_DIRECTION_LR | MODE_FLAG_AUTOMATIC_SAVE
},
{
"Wave line",
WAVE_LINE_MODE_VALUE,
MODE_FLAG_HAS_RANDOM_COLOR | MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_HAS_SPEED | MODE_FLAG_AUTOMATIC_SAVE
},
{
"Tilted lines",
TILTED_LINES_MODE_VALUE,
MODE_FLAG_HAS_RANDOM_COLOR | MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_HAS_SPEED | MODE_FLAG_AUTOMATIC_SAVE
},
{
"Back and forth",
BACK_AND_FORTH_MODE_VALUE,
MODE_FLAG_HAS_RANDOM_COLOR | MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_HAS_SPEED | MODE_FLAG_HAS_DIRECTION_LR | MODE_FLAG_AUTOMATIC_SAVE
},
{
"Off",
LIGHTS_OFF_MODE_VALUE,
MODE_FLAG_AUTOMATIC_SAVE
}
};
for(const mintaka_effect& effect : mintaka_effects)
{
mode m;
m.name = effect.name;
m.value = effect.value;
m.flags = effect.flags;
if(m.flags & MODE_FLAG_HAS_MODE_SPECIFIC_COLOR)
{
m.color_mode = MODE_COLORS_MODE_SPECIFIC;
m.colors_min = 1;
m.colors_max = 1;
m.colors.resize(1);
}
else
{
m.color_mode = MODE_COLORS_NONE;
m.colors_min = 0;
m.colors_max = 0;
m.colors.resize(0);
}
if(m.flags & MODE_FLAG_HAS_SPEED)
{
m.speed_min = MINTAKA_MIN_SPEED;
m.speed_max = MINTAKA_MAX_SPEED;
m.speed = m.speed_min;
}
if(m.flags & MODE_FLAG_HAS_BRIGHTNESS)
{
m.brightness_min = MINTAKA_MIN_BRIGHTNESS;
m.brightness_max = MINTAKA_MAX_BRIGHTNESS;
m.brightness = m.brightness_max;
}
modes.push_back(m);
}
SetupZones();
}
RGBController_MintakaKeyboard::~RGBController_MintakaKeyboard()
{
delete controller;
}
void RGBController_MintakaKeyboard::SetupZones()
{
/*---------------------------------------------------------*\
| Create the keyboard zone usiung Keyboard Layout Manager |
\*---------------------------------------------------------*/
zone new_zone;
new_zone.name = ZONE_EN_KEYBOARD;
new_zone.type = ZONE_TYPE_MATRIX;
KeyboardLayoutManager new_kb(KEYBOARD_LAYOUT_ISO_QWERTY, KEYBOARD_SIZE_SIXTY, mintaka_offset_values);
matrix_map_type * new_map = new matrix_map_type;
new_zone.matrix_map = new_map;
new_zone.matrix_map->height = new_kb.GetRowCount();
new_zone.matrix_map->width = new_kb.GetColumnCount();
new_zone.matrix_map->map = new unsigned int[new_map->height * new_map->width];
new_zone.leds_count = new_kb.GetKeyCount();
new_zone.leds_min = new_zone.leds_count;
new_zone.leds_max = new_zone.leds_count;
/*---------------------------------------------------------*\
| Matrix map still uses declared zone rows and columns |
| as the packet structure depends on the matrix map |
\*---------------------------------------------------------*/
new_kb.GetKeyMap(new_map->map, KEYBOARD_MAP_FILL_TYPE_COUNT, new_map->height, new_map->width);
controller->SetLedSequencePositions(mintaka_offset_values.default_values);
/*---------------------------------------------------------*\
| Create LEDs for the Matrix zone |
| Place keys in the layout to populate the matrix |
\*---------------------------------------------------------*/
for(size_t led_idx = 0; led_idx < new_zone.leds_count; led_idx++)
{
led new_led;
new_led.name = new_kb.GetKeyNameAt(led_idx);
new_led.value = new_kb.GetKeyValueAt(led_idx);
leds.push_back(new_led);
}
zones.push_back(new_zone);
SetupColors();
}
void RGBController_MintakaKeyboard::ResizeZone(int /*zone*/, int /*new_size*/)
{
/*---------------------------------------------------------*\
| This device does not support resizing zones |
\*---------------------------------------------------------*/
}
void RGBController_MintakaKeyboard::DeviceUpdateLEDs()
{
UpdateZoneLEDs(0);
}
void RGBController_MintakaKeyboard::UpdateZoneLEDs(int /*zone*/)
{
controller->SetMode(modes, active_mode, colors);
}
void RGBController_MintakaKeyboard::UpdateSingleLED(int led)
{
UpdateZoneLEDs(led);
}
void RGBController_MintakaKeyboard::DeviceUpdateMode()
{
UpdateZoneLEDs(0);
}

View File

@@ -0,0 +1,34 @@
/*---------------------------------------------------------*\
| RGBController_MintakaKeyboard.h |
| |
| Driver for VSG Mintaka Devices keyboard lighting |
| Based on KeychronKeyboardController |
| |
| Federico Scodelaro (pudymody) 08 Oct 2024 |
| |
| This file is part of the OpenRGB project |
| SPDX-License-Identifier: GPL-2.0-only |
\*---------------------------------------------------------*/
#pragma once
#include "RGBController.h"
#include "MintakaKeyboardController.h"
class RGBController_MintakaKeyboard : public RGBController
{
public:
RGBController_MintakaKeyboard(MintakaKeyboardController* controller_ptr);
~RGBController_MintakaKeyboard();
void SetupZones();
void ResizeZone(int zone, int new_size);
void DeviceUpdateLEDs();
void UpdateZoneLEDs(int zone);
void UpdateSingleLED(int led);
void DeviceUpdateMode();
private:
MintakaKeyboardController* controller;
};

View File

@@ -12,177 +12,181 @@
#include "RGBControllerKeyNames.h"
const char* KEY_EN_UNUSED = "";
const char* ZONE_EN_KEYBOARD = "Keyboard";
const char* KEY_EN_UNUSED = "";
const char* ZONE_EN_KEYBOARD = "Keyboard";
const char* KEY_EN_ESCAPE = "Key: Escape";
const char* KEY_EN_F1 = "Key: F1";
const char* KEY_EN_F2 = "Key: F2";
const char* KEY_EN_F3 = "Key: F3";
const char* KEY_EN_F4 = "Key: F4";
const char* KEY_EN_F5 = "Key: F5";
const char* KEY_EN_F6 = "Key: F6";
const char* KEY_EN_F7 = "Key: F7";
const char* KEY_EN_F8 = "Key: F8";
const char* KEY_EN_F9 = "Key: F9";
const char* KEY_EN_F10 = "Key: F10";
const char* KEY_EN_F11 = "Key: F11";
const char* KEY_EN_F12 = "Key: F12";
const char* KEY_EN_PRINT_SCREEN = "Key: Print Screen";
const char* KEY_EN_SCROLL_LOCK = "Key: Scroll Lock";
const char* KEY_EN_PAUSE_BREAK = "Key: Pause/Break";
const char* KEY_EN_POWER = "Key: Power";
const char* KEY_EN_ESCAPE = "Key: Escape";
const char* KEY_EN_F1 = "Key: F1";
const char* KEY_EN_F2 = "Key: F2";
const char* KEY_EN_F3 = "Key: F3";
const char* KEY_EN_F4 = "Key: F4";
const char* KEY_EN_F5 = "Key: F5";
const char* KEY_EN_F6 = "Key: F6";
const char* KEY_EN_F7 = "Key: F7";
const char* KEY_EN_F8 = "Key: F8";
const char* KEY_EN_F9 = "Key: F9";
const char* KEY_EN_F10 = "Key: F10";
const char* KEY_EN_F11 = "Key: F11";
const char* KEY_EN_F12 = "Key: F12";
const char* KEY_EN_PRINT_SCREEN = "Key: Print Screen";
const char* KEY_EN_SCROLL_LOCK = "Key: Scroll Lock";
const char* KEY_EN_PAUSE_BREAK = "Key: Pause/Break";
const char* KEY_EN_POWER = "Key: Power";
const char* KEY_EN_BACK_TICK = "Key: `";
const char* KEY_EN_1 = "Key: 1";
const char* KEY_EN_2 = "Key: 2";
const char* KEY_EN_3 = "Key: 3";
const char* KEY_EN_4 = "Key: 4";
const char* KEY_EN_5 = "Key: 5";
const char* KEY_EN_6 = "Key: 6";
const char* KEY_EN_7 = "Key: 7";
const char* KEY_EN_8 = "Key: 8";
const char* KEY_EN_9 = "Key: 9";
const char* KEY_EN_0 = "Key: 0";
const char* KEY_EN_MINUS = "Key: -";
const char* KEY_EN_PLUS = "Key: +";
const char* KEY_EN_EQUALS = "Key: =";
const char* KEY_EN_BACKSPACE = "Key: Backspace";
const char* KEY_EN_INSERT = "Key: Insert";
const char* KEY_EN_HOME = "Key: Home";
const char* KEY_EN_PAGE_UP = "Key: Page Up";
const char* KEY_EN_BACK_TICK = "Key: `";
const char* KEY_EN_1 = "Key: 1";
const char* KEY_EN_2 = "Key: 2";
const char* KEY_EN_3 = "Key: 3";
const char* KEY_EN_4 = "Key: 4";
const char* KEY_EN_5 = "Key: 5";
const char* KEY_EN_6 = "Key: 6";
const char* KEY_EN_7 = "Key: 7";
const char* KEY_EN_8 = "Key: 8";
const char* KEY_EN_9 = "Key: 9";
const char* KEY_EN_0 = "Key: 0";
const char* KEY_EN_MINUS = "Key: -";
const char* KEY_EN_PLUS = "Key: +";
const char* KEY_EN_EQUALS = "Key: =";
const char* KEY_EN_BACKSPACE = "Key: Backspace";
const char* KEY_EN_INSERT = "Key: Insert";
const char* KEY_EN_HOME = "Key: Home";
const char* KEY_EN_PAGE_UP = "Key: Page Up";
const char* KEY_EN_TAB = "Key: Tab";
const char* KEY_EN_Q = "Key: Q";
const char* KEY_EN_W = "Key: W";
const char* KEY_EN_E = "Key: E";
const char* KEY_EN_R = "Key: R";
const char* KEY_EN_T = "Key: T";
const char* KEY_EN_Y = "Key: Y";
const char* KEY_EN_U = "Key: U";
const char* KEY_EN_I = "Key: I";
const char* KEY_EN_O = "Key: O";
const char* KEY_EN_P = "Key: P";
const char* KEY_EN_LEFT_BRACKET = "Key: [";
const char* KEY_EN_RIGHT_BRACKET = "Key: ]";
const char* KEY_EN_BACK_SLASH = "Key: \\";
const char* KEY_EN_ANSI_BACK_SLASH = "Key: \\ (ANSI)";
const char* KEY_EN_DELETE = "Key: Delete";
const char* KEY_EN_END = "Key: End";
const char* KEY_EN_PAGE_DOWN = "Key: Page Down";
const char* KEY_EN_TAB = "Key: Tab";
const char* KEY_EN_Q = "Key: Q";
const char* KEY_EN_W = "Key: W";
const char* KEY_EN_E = "Key: E";
const char* KEY_EN_R = "Key: R";
const char* KEY_EN_T = "Key: T";
const char* KEY_EN_Y = "Key: Y";
const char* KEY_EN_U = "Key: U";
const char* KEY_EN_I = "Key: I";
const char* KEY_EN_O = "Key: O";
const char* KEY_EN_P = "Key: P";
const char* KEY_EN_LEFT_BRACKET = "Key: [";
const char* KEY_EN_RIGHT_BRACKET = "Key: ]";
const char* KEY_EN_BACK_SLASH = "Key: \\";
const char* KEY_EN_ANSI_BACK_SLASH = "Key: \\ (ANSI)";
const char* KEY_EN_DELETE = "Key: Delete";
const char* KEY_EN_END = "Key: End";
const char* KEY_EN_PAGE_DOWN = "Key: Page Down";
const char* KEY_EN_CAPS_LOCK = "Key: Caps Lock";
const char* KEY_EN_A = "Key: A";
const char* KEY_EN_S = "Key: S";
const char* KEY_EN_D = "Key: D";
const char* KEY_EN_F = "Key: F";
const char* KEY_EN_G = "Key: G";
const char* KEY_EN_H = "Key: H";
const char* KEY_EN_J = "Key: J";
const char* KEY_EN_K = "Key: K";
const char* KEY_EN_L = "Key: L";
const char* KEY_EN_SEMICOLON = "Key: ;";
const char* KEY_EN_QUOTE = "Key: '";
const char* KEY_EN_POUND = "Key: #";
const char* KEY_EN_ANSI_ENTER = "Key: Enter";
const char* KEY_EN_ISO_ENTER = "Key: Enter (ISO)";
const char* KEY_EN_CAPS_LOCK = "Key: Caps Lock";
const char* KEY_EN_A = "Key: A";
const char* KEY_EN_S = "Key: S";
const char* KEY_EN_D = "Key: D";
const char* KEY_EN_F = "Key: F";
const char* KEY_EN_G = "Key: G";
const char* KEY_EN_H = "Key: H";
const char* KEY_EN_J = "Key: J";
const char* KEY_EN_K = "Key: K";
const char* KEY_EN_L = "Key: L";
const char* KEY_EN_SEMICOLON = "Key: ;";
const char* KEY_EN_QUOTE = "Key: '";
const char* KEY_EN_POUND = "Key: #";
const char* KEY_EN_ANSI_ENTER = "Key: Enter";
const char* KEY_EN_ISO_ENTER = "Key: Enter (ISO)";
const char* KEY_EN_LEFT_SHIFT = "Key: Left Shift";
const char* KEY_EN_ISO_BACK_SLASH = "Key: \\ (ISO)";
const char* KEY_EN_Z = "Key: Z";
const char* KEY_EN_X = "Key: X";
const char* KEY_EN_C = "Key: C";
const char* KEY_EN_V = "Key: V";
const char* KEY_EN_B = "Key: B";
const char* KEY_EN_N = "Key: N";
const char* KEY_EN_M = "Key: M";
const char* KEY_EN_COMMA = "Key: ,";
const char* KEY_EN_PERIOD = "Key: .";
const char* KEY_EN_FORWARD_SLASH = "Key: /";
const char* KEY_EN_RIGHT_SHIFT = "Key: Right Shift";
const char* KEY_EN_UP_ARROW = "Key: Up Arrow";
const char* KEY_EN_LEFT_SHIFT = "Key: Left Shift";
const char* KEY_EN_ISO_BACK_SLASH = "Key: \\ (ISO)";
const char* KEY_EN_Z = "Key: Z";
const char* KEY_EN_X = "Key: X";
const char* KEY_EN_C = "Key: C";
const char* KEY_EN_V = "Key: V";
const char* KEY_EN_B = "Key: B";
const char* KEY_EN_N = "Key: N";
const char* KEY_EN_M = "Key: M";
const char* KEY_EN_COMMA = "Key: ,";
const char* KEY_EN_PERIOD = "Key: .";
const char* KEY_EN_FORWARD_SLASH = "Key: /";
const char* KEY_EN_RIGHT_SHIFT = "Key: Right Shift";
const char* KEY_EN_UP_ARROW = "Key: Up Arrow";
const char* KEY_EN_LEFT_CONTROL = "Key: Left Control";
const char* KEY_EN_LEFT_WINDOWS = "Key: Left Windows";
const char* KEY_EN_LEFT_FUNCTION = "Key: Left Fn";
const char* KEY_EN_LEFT_ALT = "Key: Left Alt";
const char* KEY_EN_SPACE = "Key: Space";
const char* KEY_EN_RIGHT_ALT = "Key: Right Alt";
const char* KEY_EN_RIGHT_FUNCTION = "Key: Right Fn";
const char* KEY_EN_RIGHT_WINDOWS = "Key: Right Windows";
const char* KEY_EN_MENU = "Key: Menu";
const char* KEY_EN_RIGHT_CONTROL = "Key: Right Control";
const char* KEY_EN_LEFT_ARROW = "Key: Left Arrow";
const char* KEY_EN_DOWN_ARROW = "Key: Down Arrow";
const char* KEY_EN_RIGHT_ARROW = "Key: Right Arrow";
const char* KEY_EN_LEFT_CONTROL = "Key: Left Control";
const char* KEY_EN_LEFT_WINDOWS = "Key: Left Windows";
const char* KEY_EN_LEFT_FUNCTION = "Key: Left Fn";
const char* KEY_EN_LEFT_ALT = "Key: Left Alt";
const char* KEY_EN_SPACE = "Key: Space";
const char* KEY_EN_RIGHT_ALT = "Key: Right Alt";
const char* KEY_EN_RIGHT_FUNCTION = "Key: Right Fn";
const char* KEY_EN_RIGHT_WINDOWS = "Key: Right Windows";
const char* KEY_EN_MENU = "Key: Menu";
const char* KEY_EN_RIGHT_CONTROL = "Key: Right Control";
const char* KEY_EN_LEFT_ARROW = "Key: Left Arrow";
const char* KEY_EN_DOWN_ARROW = "Key: Down Arrow";
const char* KEY_EN_RIGHT_ARROW = "Key: Right Arrow";
const char* KEY_EN_NUMPAD_LOCK = "Key: Num Lock";
const char* KEY_EN_NUMPAD_DIVIDE = "Key: Number Pad /";
const char* KEY_EN_NUMPAD_TIMES = "Key: Number Pad *";
const char* KEY_EN_NUMPAD_MINUS = "Key: Number Pad -";
const char* KEY_EN_NUMPAD_PLUS = "Key: Number Pad +";
const char* KEY_EN_NUMPAD_PERIOD = "Key: Number Pad .";
const char* KEY_EN_NUMPAD_ENTER = "Key: Number Pad Enter";
const char* KEY_EN_NUMPAD_0 = "Key: Number Pad 0";
const char* KEY_EN_NUMPAD_1 = "Key: Number Pad 1";
const char* KEY_EN_NUMPAD_2 = "Key: Number Pad 2";
const char* KEY_EN_NUMPAD_3 = "Key: Number Pad 3";
const char* KEY_EN_NUMPAD_4 = "Key: Number Pad 4";
const char* KEY_EN_NUMPAD_5 = "Key: Number Pad 5";
const char* KEY_EN_NUMPAD_6 = "Key: Number Pad 6";
const char* KEY_EN_NUMPAD_7 = "Key: Number Pad 7";
const char* KEY_EN_NUMPAD_8 = "Key: Number Pad 8";
const char* KEY_EN_NUMPAD_9 = "Key: Number Pad 9";
const char* KEY_EN_NUMPAD_LOCK = "Key: Num Lock";
const char* KEY_EN_NUMPAD_DIVIDE = "Key: Number Pad /";
const char* KEY_EN_NUMPAD_TIMES = "Key: Number Pad *";
const char* KEY_EN_NUMPAD_MINUS = "Key: Number Pad -";
const char* KEY_EN_NUMPAD_PLUS = "Key: Number Pad +";
const char* KEY_EN_NUMPAD_PERIOD = "Key: Number Pad .";
const char* KEY_EN_NUMPAD_ENTER = "Key: Number Pad Enter";
const char* KEY_EN_NUMPAD_0 = "Key: Number Pad 0";
const char* KEY_EN_NUMPAD_1 = "Key: Number Pad 1";
const char* KEY_EN_NUMPAD_2 = "Key: Number Pad 2";
const char* KEY_EN_NUMPAD_3 = "Key: Number Pad 3";
const char* KEY_EN_NUMPAD_4 = "Key: Number Pad 4";
const char* KEY_EN_NUMPAD_5 = "Key: Number Pad 5";
const char* KEY_EN_NUMPAD_6 = "Key: Number Pad 6";
const char* KEY_EN_NUMPAD_7 = "Key: Number Pad 7";
const char* KEY_EN_NUMPAD_8 = "Key: Number Pad 8";
const char* KEY_EN_NUMPAD_9 = "Key: Number Pad 9";
const char* KEY_EN_MEDIA_PLAY_PAUSE = "Key: Media Play/Pause";
const char* KEY_EN_MEDIA_PREVIOUS = "Key: Media Previous";
const char* KEY_EN_MEDIA_NEXT = "Key: Media Next";
const char* KEY_EN_MEDIA_STOP = "Key: Media Stop";
const char* KEY_EN_MEDIA_MUTE = "Key: Media Mute";
const char* KEY_EN_MEDIA_VOLUME_DOWN = "Key: Media Volume -";
const char* KEY_EN_MEDIA_VOLUME_UP = "Key: Media Volume +";
const char* KEY_EN_MEDIA_PLAY_PAUSE = "Key: Media Play/Pause";
const char* KEY_EN_MEDIA_PREVIOUS = "Key: Media Previous";
const char* KEY_EN_MEDIA_NEXT = "Key: Media Next";
const char* KEY_EN_MEDIA_STOP = "Key: Media Stop";
const char* KEY_EN_MEDIA_MUTE = "Key: Media Mute";
const char* KEY_EN_MEDIA_VOLUME_DOWN = "Key: Media Volume -";
const char* KEY_EN_MEDIA_VOLUME_UP = "Key: Media Volume +";
const char* KEY_JP_RO = "Key: _";
const char* KEY_JP_EJ = "Key: E/J";
const char* KEY_JP_ZENKAKU = "Key: 半角/全角";
const char* KEY_JP_KANA = "Key: かな";
const char* KEY_JP_HENKAN = "Key: 変換";
const char* KEY_JP_MUHENKAN = "Key: 無変換";
const char* KEY_JP_YEN = "Key: ¥";
const char* KEY_JP_AT = "Key: @";
const char* KEY_JP_CHEVRON = "Key: ^";
const char* KEY_JP_COLON = "Key: :";
const char* KEY_JP_RO = "Key: _";
const char* KEY_JP_EJ = "Key: E/J";
const char* KEY_JP_ZENKAKU = "Key: 半角/全角";
const char* KEY_JP_KANA = "Key: かな";
const char* KEY_JP_HENKAN = "Key: 変換";
const char* KEY_JP_MUHENKAN = "Key: 無変換";
const char* KEY_JP_YEN = "Key: ¥";
const char* KEY_JP_AT = "Key: @";
const char* KEY_JP_CHEVRON = "Key: ^";
const char* KEY_JP_COLON = "Key: :";
const char* KEY_KR_HAN = "Key: 한/영";
const char* KEY_KR_HANJA = "Key: 한자";
const char* KEY_KR_HAN = "Key: 한/영";
const char* KEY_KR_HANJA = "Key: 한자";
const char* KEY_NORD_AAL = "Key: Å";
const char* KEY_NORD_A_OE = "Key: Ä Ø";
const char* KEY_NORD_O_AE = "Key: Ö Æ";
const char* KEY_NORD_HALF = "Key: § ½";
const char* KEY_NORD_HYPHEN = "Key: - _";
const char* KEY_NORD_PLUS_QUESTION = "Key: + ?";
const char* KEY_NORD_ACUTE_GRAVE = "Key: ´ `";
const char* KEY_NORD_DOTS_CARET = "Key: ¨ ^";
const char* KEY_NORD_QUOTE = "Key: ' *";
const char* KEY_NORD_ANGLE_BRACKET = "Key: < >";
const char* KEY_NORD_AAL = "Key: Å";
const char* KEY_NORD_A_OE = "Key: Ä Ø";
const char* KEY_NORD_O_AE = "Key: Ö Æ";
const char* KEY_NORD_HALF = "Key: § ½";
const char* KEY_NORD_HYPHEN = "Key: - _";
const char* KEY_NORD_PLUS_QUESTION = "Key: + ?";
const char* KEY_NORD_ACUTE_GRAVE = "Key: ´ `";
const char* KEY_NORD_DOTS_CARET = "Key: ¨ ^";
const char* KEY_NORD_QUOTE = "Key: ' *";
const char* KEY_NORD_ANGLE_BRACKET = "Key: < >";
const char* KEY_DE_ESZETT = "Key: ß";
const char* KEY_DE_DIAERESIS_A = "Key: Ä";
const char* KEY_DE_DIAERESIS_O = "Key: Ö";
const char* KEY_DE_DIAERESIS_U = "Key: Ü";
const char* KEY_DE_ESZETT = "Key: ß";
const char* KEY_DE_DIAERESIS_A = "Key: Ä";
const char* KEY_DE_DIAERESIS_O = "Key: Ö";
const char* KEY_DE_DIAERESIS_U = "Key: Ü";
const char* KEY_FR_SUPER_2 = "Key: ²";
const char* KEY_FR_AMPERSAND = "Key: &";
const char* KEY_FR_ACUTE_E = "Key: é";
const char* KEY_FR_DOUBLEQUOTE = "Key: \"";
const char* KEY_FR_LEFT_PARENTHESIS = "Key: (";
const char* KEY_FR_GRAVE_E = "Key: è";
const char* KEY_FR_UNDERSCORE = "Key: _";
const char* KEY_FR_CEDILLA_C = "Key: ç";
const char* KEY_FR_GRAVE_A = "Key: à";
const char* KEY_FR_RIGHT_PARENTHESIS = "Key: )";
const char* KEY_FR_DOLLAR = "Key: $";
const char* KEY_FR_GRAVE_U = "Key: ù";
const char* KEY_FR_ASTERIX = "Key: *";
const char* KEY_FR_EXCLAIMATION = "Key: !";
const char* KEY_FR_SUPER_2 = "Key: ²";
const char* KEY_FR_AMPERSAND = "Key: &";
const char* KEY_FR_ACUTE_E = "Key: é";
const char* KEY_FR_DOUBLEQUOTE = "Key: \"";
const char* KEY_FR_LEFT_PARENTHESIS = "Key: (";
const char* KEY_FR_GRAVE_E = "Key: è";
const char* KEY_FR_UNDERSCORE = "Key: _";
const char* KEY_FR_CEDILLA_C = "Key: ç";
const char* KEY_FR_GRAVE_A = "Key: à";
const char* KEY_FR_RIGHT_PARENTHESIS = "Key: )";
const char* KEY_FR_DOLLAR = "Key: $";
const char* KEY_FR_GRAVE_U = "Key: ù";
const char* KEY_FR_ASTERIX = "Key: *";
const char* KEY_FR_EXCLAIMATION = "Key: !";
const char* KEY_ES_OPEN_QUESTION_MARK = "Key: ¿/¡";
const char* KEY_ES_TILDE = "Key: ´";
const char* KEY_ES_ENIE = "Key: Ñ";

View File

@@ -186,3 +186,7 @@ extern const char* KEY_FR_DOLLAR;
extern const char* KEY_FR_GRAVE_U;
extern const char* KEY_FR_ASTERIX;
extern const char* KEY_FR_EXCLAIMATION;
extern const char* KEY_ES_OPEN_QUESTION_MARK;
extern const char* KEY_ES_TILDE;
extern const char* KEY_ES_ENIE;

View File

@@ -225,6 +225,9 @@ static const std::map<std::string, led_label> led_label_lookup =
{ KEY_FR_GRAVE_U, { "ù" , "\xc3\xb9" }},
{ KEY_FR_ASTERIX, { "*" , "*" }},
{ KEY_FR_EXCLAIMATION, { "!" , "!" }},
{ KEY_ES_OPEN_QUESTION_MARK,{ "¿" , "¡" }},
{ KEY_ES_TILDE, { "´" , "¨" }},
{ KEY_ES_ENIE, { "ñ" , "Ñ" }},
};
void DeviceView::setController(RGBController * controller_ptr)