From 1f57a4e04b4728f458c988a10a4c8a9a64e2b1f5 Mon Sep 17 00:00:00 2001 From: Joseph Crowell Date: Mon, 28 Jul 2025 22:26:20 +0300 Subject: [PATCH] gui: Add support for K70 Core RGB Squashed commit of the following: commit 2b55d3d755ad1a2201a86fc8ad412de7ddd410e4 Author: Joseph Crowell Date: Wed Jul 2 20:16:44 2025 +1000 patch dialpress to mute instead of making it it's own thing commit 200275fb447068b352d39b34f3ef5bad5a37a0e1 Author: Joseph Crowell Date: Wed Jul 2 19:46:02 2025 +1000 fix keymaps commit 98be649794e9914dfcc9b16420544494e025ad95 Author: Joseph Crowell Date: Sat May 31 18:31:52 2025 +1000 change "knobpress" to "dialpress" commit 9002d5834d4f63ea3ac257f526a9a2b212e44a48 Author: Joseph Crowell Date: Thu Apr 10 19:56:14 2025 +1000 add the Fn modified keys back and place them above the function commit 0701a3d44adaa01fbd58368eefcc98e5b59093d8 Author: Joseph Crowell Date: Wed Apr 9 18:28:31 2025 +1000 correct comment commit f4843cf8e2d3c93f1bbb4f06a30fd59344573e16 Author: Joseph Crowell Date: Tue Apr 8 02:24:02 2025 +1000 don't remove volume up and down commit 356d1beb7c6553bf8de561d7b8aab3ca693fd56e Author: Joseph Crowell Date: Tue Apr 8 01:23:51 2025 +1000 don't duplicate case commit 47de05de1836af9d7845acce5b43c85728ee5b3c Author: Trashguy Date: Fri Dec 6 05:34:22 2024 -0500 Knob functionality commit 378c0555ea8d12d2574cdc8652e96def39f622a0 Author: Trashguy Date: Wed Dec 4 00:57:30 2024 -0500 Added support for k70 core rgb Co-authored-by: Trashguy --- src/gui/keymap.cpp | 31 +++++++++++++++++++++++++++++++ src/gui/keymap.h | 1 + 2 files changed, 32 insertions(+) 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)