From 742b477f6f08656cf007ec07bd4cd671668a6ed1 Mon Sep 17 00:00:00 2001 From: Adam Honse Date: Mon, 21 Jun 2021 20:27:58 -0500 Subject: [PATCH] Add keymap for Blade 14 2021 --- Controllers/RazerController/RazerDevices.h | 91 +++++++++++++++++++++- 1 file changed, 89 insertions(+), 2 deletions(-) diff --git a/Controllers/RazerController/RazerDevices.h b/Controllers/RazerController/RazerDevices.h index e9bdca4c4..4c2ac9201 100644 --- a/Controllers/RazerController/RazerDevices.h +++ b/Controllers/RazerController/RazerDevices.h @@ -408,6 +408,93 @@ static const razer_key blackwidow_chroma_te_keymap[] = { 0, 5, 17, "Key: Right Arrow" }, }; +#define BLADE_14_2021_KEYMAP_SIZE (sizeof(blade_14_2021_keymap) / sizeof(blade_14_2021_keymap[0])) + +static const razer_key blade_14_2021_keymap[] = +{ + /*---------------------------------------------------------------------*\ + | Zone, Row, Column, Key | + \*---------------------------------------------------------------------*/ + { 0, 0, 1, "Key: Escape" }, + { 0, 0, 2, "Key: F1" }, + { 0, 0, 3, "Key: F2" }, + { 0, 0, 4, "Key: F3" }, + { 0, 0, 5, "Key: F4" }, + { 0, 0, 6, "Key: F5" }, + { 0, 0, 7, "Key: F6" }, + { 0, 0, 8, "Key: F7" }, + { 0, 0, 9, "Key: F8" }, + { 0, 0, 10, "Key: F9" }, + { 0, 0, 11, "Key: F10" }, + { 0, 0, 12, "Key: F11" }, + { 0, 0, 13, "Key: F12" }, + { 0, 0, 14, "Key: Delete" }, + { 0, 0, 15, "Key: Power" }, + { 0, 1, 1, "Key: `" }, + { 0, 1, 2, "Key: 1" }, + { 0, 1, 3, "Key: 2" }, + { 0, 1, 4, "Key: 3" }, + { 0, 1, 5, "Key: 4" }, + { 0, 1, 6, "Key: 5" }, + { 0, 1, 7, "Key: 6" }, + { 0, 1, 8, "Key: 7" }, + { 0, 1, 9, "Key: 8" }, + { 0, 1, 10, "Key: 9" }, + { 0, 1, 11, "Key: 0" }, + { 0, 1, 12, "Key: -" }, + { 0, 1, 13, "Key: =" }, + { 0, 1, 15, "Key: Backspace" }, + { 0, 2, 1, "Key: Tab" }, + { 0, 2, 2, "Key: Q" }, + { 0, 2, 3, "Key: W" }, + { 0, 2, 4, "Key: E" }, + { 0, 2, 5, "Key: R" }, + { 0, 2, 6, "Key: T" }, + { 0, 2, 7, "Key: Y" }, + { 0, 2, 8, "Key: U" }, + { 0, 2, 9, "Key: I" }, + { 0, 2, 10, "Key: O" }, + { 0, 2, 11, "Key: P" }, + { 0, 2, 12, "Key: [" }, + { 0, 2, 13, "Key: ]" }, + { 0, 2, 15, "Key: \\ (ANSI)" }, + { 0, 3, 1, "Key: Caps Lock" }, + { 0, 3, 2, "Key: A" }, + { 0, 3, 3, "Key: S" }, + { 0, 3, 4, "Key: D" }, + { 0, 3, 5, "Key: F" }, + { 0, 3, 6, "Key: G" }, + { 0, 3, 7, "Key: H" }, + { 0, 3, 8, "Key: J" }, + { 0, 3, 9, "Key: K" }, + { 0, 3, 10, "Key: L" }, + { 0, 3, 11, "Key: ;" }, + { 0, 3, 12, "Key: '" }, + { 0, 3, 15, "Key: Enter" }, + { 0, 4, 1, "Key: Left Shift" }, + { 0, 4, 3, "Key: Z" }, + { 0, 4, 4, "Key: X" }, + { 0, 4, 5, "Key: C" }, + { 0, 4, 6, "Key: V" }, + { 0, 4, 7, "Key: B" }, + { 0, 4, 8, "Key: N" }, + { 0, 4, 9, "Key: M" }, + { 0, 4, 10, "Key: ," }, + { 0, 4, 11, "Key: ." }, + { 0, 4, 12, "Key: /" }, + { 0, 4, 15, "Key: Right Shift" }, + { 0, 5, 1, "Key: Left Control" }, + { 0, 5, 2, "Key: Left Fn" }, + { 0, 5, 3, "Key: Left Windows" }, + { 0, 5, 5, "Key: Left Alt" }, + { 0, 5, 9, "Key: Right Alt" }, + { 0, 5, 11, "Key: Right Control" }, + { 0, 5, 12, "Key: Left Arrow" }, + { 0, 5, 13, "Key: Up Arrow" }, + { 0, 5, 14, "Key: Right Arrow" }, + { 0, 5, 15, "Key: Down Arrow" }, +}; + #define BLADE_PRO_2017_KEYMAP_SIZE (sizeof(blade_pro_2017_keymap) / sizeof(blade_pro_2017_keymap[0])) static const razer_key blade_pro_2017_keymap[] = @@ -2548,8 +2635,8 @@ static const razer_device blade_14_2021_device = NULL, NULL }, - NULL, - 0 + blade_14_2021_keymap, + BLADE_14_2021_KEYMAP_SIZE }; /*-------------------------------------------------------------*\