summaryrefslogtreecommitdiff
path: root/keyboards/jkeys_design/gentleman65/keymaps/briianpowell/keymap.c
diff options
context:
space:
mode:
authorBrian <brian@powell.place>2023-07-07 07:33:08 -0700
committerGitHub <noreply@github.com>2023-07-08 00:33:08 +1000
commitea9fa4c648b7d14ef9c51706e8119e54bd82f29f (patch)
treea19c23886512e19429f409613d0207607021aefa /keyboards/jkeys_design/gentleman65/keymaps/briianpowell/keymap.c
parent9f4f1de0019fe04354643c3719d273af436db525 (diff)
Adding Custom Shift Key Implementation for BriianPowell's Gentleman65 Keymap (#21315)
Diffstat (limited to 'keyboards/jkeys_design/gentleman65/keymaps/briianpowell/keymap.c')
-rw-r--r--keyboards/jkeys_design/gentleman65/keymaps/briianpowell/keymap.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/keyboards/jkeys_design/gentleman65/keymaps/briianpowell/keymap.c b/keyboards/jkeys_design/gentleman65/keymaps/briianpowell/keymap.c
index 619231a6ab..cb6fff1a0f 100644
--- a/keyboards/jkeys_design/gentleman65/keymaps/briianpowell/keymap.c
+++ b/keyboards/jkeys_design/gentleman65/keymaps/briianpowell/keymap.c
@@ -14,6 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include QMK_KEYBOARD_H
+#include "features/custom_shift_keys.h"
#define FN_ESC LT(_FUNC, KC_ESC)
@@ -29,6 +30,10 @@ enum gentleman_keycodes {
FUNC,
};
+const custom_shift_key_t custom_shift_keys[] = {{KC_ESC, KC_TILD}};
+
+uint8_t NUM_CUSTOM_SHIFT_KEYS = sizeof(custom_shift_keys) / sizeof(custom_shift_key_t);
+
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QWERTY] = LAYOUT_65_ansi_rwkl_split_bs(
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, KC_TRNS,
@@ -78,6 +83,9 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ if (!process_custom_shift_keys(keycode, record)) {
+ return false;
+ }
switch (keycode) {
case QWERTY:
if (record->event.pressed) {
@@ -90,7 +98,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
return false;
}
-
+
return true;
}
-