Fix K5 V2 layout and add ANSI Enter Expansion

This commit is contained in:
Daniel Clark
2026-07-14 21:45:18 -05:00
committed by Adam Honse
parent 5da92fca4e
commit 75463b8772
2 changed files with 32 additions and 0 deletions
@@ -43,6 +43,35 @@ typedef struct
const keychron_patch_entry* patch;
} keychron_patch;
/*---------------------------------------------------------*\
| Keychron K5 V2 ANSI Encoder |
\*---------------------------------------------------------*/
#define KEYCHRON_K5_V2_ANSI_RGB_PATCH_ENTRIES_COUNT \
(sizeof(keychron_k5_v2_ansi_rgb_patch_entries) / sizeof(keychron_patch_entry))
static const keychron_patch_entry keychron_k5_v2_ansi_rgb_patch_entries[] =
{
{ 18, 0, 19 },
{ 19, 0, 20 },
{ 39, 1, 19 },
{ 40, 1, 20 },
{ 60, 2, 19 },
{ 61, 2, 20 },
{ 74, 3, 12 },
{ 77, 3, 19 },
{ 89, 4, 12 },
{ 93, 4, 19 },
{ 107, 5, 19 },
{ 94, 5, 20 },
};
static const keychron_patch keychron_k5_v2_ansi_rgb_patch =
{
KEYCHRON_K5_V2_ANSI_RGB_PID,
KEYCHRON_K5_V2_ANSI_RGB_PATCH_ENTRIES_COUNT,
keychron_k5_v2_ansi_rgb_patch_entries
};
/*---------------------------------------------------------*\
| Keychron Q2 ANSI Encoder |
\*---------------------------------------------------------*/
@@ -95,6 +124,7 @@ static const keychron_patch* keychron_patches[] =
{
&keychron_q2_ansi_encoder_patch,
&keychron_q6_ultra_8k_ansi_patch,
&keychron_k5_v2_ansi_rgb_patch,
};
QMKKeychronController::QMKKeychronController(hid_device* dev_handle, const char *path, unsigned short dev_pid)
+2
View File
@@ -1246,6 +1246,7 @@ void DeviceView::InitDeviceView()
| Left Shift |
| Right Shift |
| Backspace |
| ANSI Enter |
| Number Pad 0 |
| |
| Fill Up or Down: |
@@ -1262,6 +1263,7 @@ void DeviceView::InitDeviceView()
|| ( controller->GetLEDDisplayName(color_idx) == KEY_EN_LEFT_SHIFT )
|| ( controller->GetLEDDisplayName(color_idx) == KEY_EN_RIGHT_SHIFT)
|| ( controller->GetLEDDisplayName(color_idx) == KEY_EN_BACKSPACE )
|| ( controller->GetLEDDisplayName(color_idx) == KEY_EN_ANSI_ENTER )
|| ( controller->GetLEDDisplayName(color_idx) == KEY_EN_NUMPAD_0 ) )
{
led_pos[color_idx].matrix_w += 1.0f;