mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-07-24 10:01:13 +00:00
Phantom keymap updates
Further updates - tidying and removing cruft. Thank you @zvecr on Discord for the help!
This commit is contained in:
parent
fc7d8936a0
commit
2b182d00af
@ -1,28 +1,15 @@
|
|||||||
#include QMK_KEYBOARD_H
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
extern keymap_config_t keymap_config;
|
|
||||||
|
|
||||||
|
|
||||||
// Used for SHIFT_ESC
|
|
||||||
#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT))
|
|
||||||
|
|
||||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
|
||||||
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
|
||||||
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
|
||||||
// entirely and just use numbers.
|
|
||||||
enum layer_names {
|
enum layer_names {
|
||||||
_QW,
|
_QW,
|
||||||
_DV,
|
_DV,
|
||||||
_CM,
|
_CM,
|
||||||
_FL,
|
_FL,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum planck_keycodes {
|
enum planck_keycodes { DVORAK = SAFE_RANGE, QWERTY, COLEMAK };
|
||||||
DVORAK = SAFE_RANGE,
|
|
||||||
QWERTY,
|
|
||||||
COLEMAK
|
|
||||||
};
|
|
||||||
|
|
||||||
|
// clang-format off
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
[_QW] = LAYOUT_tkl_ansi( /* Layer 0: Qwerty */ \
|
[_QW] = LAYOUT_tkl_ansi( /* Layer 0: Qwerty */ \
|
||||||
@ -62,28 +49,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
),
|
),
|
||||||
|
|
||||||
};
|
};
|
||||||
|
// clang-format on
|
||||||
|
|
||||||
enum function_id {
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
SHIFT_ESC,
|
if (record->event.pressed) {
|
||||||
};
|
switch (keycode) {
|
||||||
|
case DVORAK:
|
||||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
set_single_persistent_default_layer(_DV);
|
||||||
switch(keycode) {
|
return false;
|
||||||
case DVORAK:
|
case QWERTY:
|
||||||
if (record->event.pressed) {
|
set_single_persistent_default_layer(_QW);
|
||||||
set_single_persistent_default_layer(_DV);
|
return false;
|
||||||
}
|
case COLEMAK:
|
||||||
return false;
|
set_single_persistent_default_layer(_CM);
|
||||||
case QWERTY:
|
return false;
|
||||||
if (record->event.pressed) {
|
}
|
||||||
set_single_persistent_default_layer(_QW);
|
}
|
||||||
}
|
|
||||||
return false;
|
|
||||||
case COLEMAK:
|
|
||||||
if (record->event.pressed) {
|
|
||||||
set_single_persistent_default_layer(_CM);
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user