mirror of
https://github.com/ckb-next/ckb-next.git
synced 2026-10-10 12:27:21 -04:00
gui: Add support for K70 Core RGB
Squashed commit of the following:
commit 2b55d3d755
Author: Joseph Crowell <[email protected]>
Date: Wed Jul 2 20:16:44 2025 +1000
patch dialpress to mute instead of making it it's own thing
commit 200275fb44
Author: Joseph Crowell <[email protected]>
Date: Wed Jul 2 19:46:02 2025 +1000
fix keymaps
commit 98be649794
Author: Joseph Crowell <[email protected]>
Date: Sat May 31 18:31:52 2025 +1000
change "knobpress" to "dialpress"
commit 9002d5834d
Author: Joseph Crowell <[email protected]>
Date: Thu Apr 10 19:56:14 2025 +1000
add the Fn modified keys back and place them above the function
commit 0701a3d44a
Author: Joseph Crowell <[email protected]>
Date: Wed Apr 9 18:28:31 2025 +1000
correct comment
commit f4843cf8e2
Author: Joseph Crowell <[email protected]>
Date: Tue Apr 8 02:24:02 2025 +1000
don't remove volume up and down
commit 356d1beb7c
Author: Joseph Crowell <[email protected]>
Date: Tue Apr 8 01:23:51 2025 +1000
don't duplicate case
commit 47de05de18
Author: Trashguy <[email protected]>
Date: Fri Dec 6 05:34:22 2024 -0500
Knob functionality
commit 378c0555ea
Author: Trashguy <[email protected]>
Date: Wed Dec 4 00:57:30 2024 -0500
Added support for k70 core rgb
Co-authored-by: Trashguy <[email protected]>
This commit is contained in:
co-authored by
Trashguy
parent
e78f03e471
commit
1f57a4e04b
@@ -921,6 +921,30 @@ static QHash<QString, Key> 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:
|
||||
|
||||
@@ -93,6 +93,7 @@ public:
|
||||
K70_TKL,
|
||||
MM700,
|
||||
K70_PRO,
|
||||
K70_CORE_RGB,
|
||||
_MODEL_MAX
|
||||
};
|
||||
// Key layouts (ordered alphabetically by name)
|
||||
|
||||
Reference in New Issue
Block a user