Adding Custom Shift Key Implementation for BriianPowell's Gentleman65 Keymap (#21315)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user