diff --git a/src/gui/keymap.cpp b/src/gui/keymap.cpp index f37ff8dd..a6bf1eb0 100644 --- a/src/gui/keymap.cpp +++ b/src/gui/keymap.cpp @@ -921,6 +921,30 @@ static QHash getMap(KeyMap::Model model, KeyMap::Layout layout){ map["lock"].height = 8; break; } + case KeyMap::K70_CORE_RGB:{ + map = getMap(KeyMap::K70, layout); + map["lock"] = {nullptr, "Lock", "lock", 20, 2, NS, false, true}; // F1 alternate + map["profswitch"] = {nullptr, "Profile Switch", "profswitch", 32, 2, 11, 11, false, true}; // F2 alternate + map["light"] = {nullptr, "Light", "light", 50, 2, NS, false, true}; // F3 and F4 alternate + map["stop"] = {nullptr, "Stop", "stop", 76, 2, 11, 11, false, true}; // F5 alternate + map["prev"] = { nullptr, "Previous", "prev", 88, 2, 11, 11, false, true}; // F6 alternate + map["play"] = { nullptr, "Play", "play", 100, 2, 11, 11, false, true}; // F7 alternate + map["next"] = { nullptr, "Next", "next", 112, 2, 11, 11, false, true}; // F8 alternate + map["ctrlwheelb"] = {nullptr, "Wheel", "ctrlwheelb", 168, 2, NS, false, true}; // F12 alternate + + // This is the media button that defaults to play + // We already have a play Fn button so we want to map it to something else so it can be programmed + map["mr"] = { nullptr, "Macro", "mr", 227, 14, 16, 11, false, true}; + + // K70 Core RGB has a volume knob that can be pressed + map["mute"] = {nullptr, "Mute", "mute", 259, 14, NS, false, true}; + + // Replace rwin with Fn + map["fn"] = KStrafeKeys[3]; + map["fn"].x = map["rwin"].x; + map.remove("rwin"); + break; + } case KeyMap::STRAFE_MK2:{ map = getMap(KeyMap::K70MK2, layout); // move everything right to make the space for the left sidelight @@ -1695,6 +1719,8 @@ KeyMap::Model KeyMap::getModel(const QString& name){ return K65_MINI; if(lower == "k70pro") return K70_PRO; + if(lower == "k70_core_rgb") + return K70_CORE_RGB; return NO_MODEL; } @@ -1782,6 +1808,8 @@ QString KeyMap::getModel(KeyMap::Model model){ return "k65_mini"; case K70_PRO: return "k70pro"; + case K70_CORE_RGB: + return "k70_core_rgb"; default: return ""; } @@ -1798,6 +1826,8 @@ int KeyMap::modelWidth(Model model){ switch(model){ case K60: return K60_WIDTH; + case K70_CORE_RGB: + return K60_WIDTH; case K60_TKL: return K60_TKL_WIDTH; case K63: @@ -1871,6 +1901,7 @@ int KeyMap::modelHeight(Model model){ case K70MK2: case K70_PRO: case K70_TKL: + case K70_CORE_RGB: case K95: case K95L: case STRAFE: diff --git a/src/gui/keymap.h b/src/gui/keymap.h index ab504e03..1c443c7b 100644 --- a/src/gui/keymap.h +++ b/src/gui/keymap.h @@ -93,6 +93,7 @@ public: K70_TKL, MM700, K70_PRO, + K70_CORE_RGB, _MODEL_MAX }; // Key layouts (ordered alphabetically by name)