Update keymaps to use PDF keycode (#24633)

This commit is contained in:
Joel Challis 2024-11-23 13:35:34 +00:00 committed by GitHub
parent 4a5bae51cd
commit e4e015c0c8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
80 changed files with 286 additions and 1705 deletions

View File

@ -23,10 +23,7 @@ enum layer_number {
}; };
enum custom_keycodes { enum custom_keycodes {
QWERTY = SAFE_RANGE, LOWER = SAFE_RANGE,
COLEMAK,
DVORAK,
LOWER,
RAISE, RAISE,
ADJUST, ADJUST,
BACKLIT, BACKLIT,
@ -35,12 +32,9 @@ enum custom_keycodes {
RGBRST RGBRST
}; };
enum macro_keycodes { #define QWERTY PDF(_QWERTY)
KC_SAMPLEMACRO, #define COLEMAK PDF(_COLEMAK)
}; #define DVORAK PDF(_DVORAK)
//Macros
#define M_SAMPLE M(KC_SAMPLEMACRO)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Qwerty /* Qwerty
@ -169,25 +163,6 @@ void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) {
bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) { switch (keycode) {
case QWERTY:
if (record->event.pressed) {
set_single_persistent_default_layer(_QWERTY);
}
return false;
break;
case COLEMAK:
if (record->event.pressed) {
set_single_persistent_default_layer(_COLEMAK);
}
return false;
break;
case DVORAK:
if (record->event.pressed) {
set_single_persistent_default_layer(_DVORAK);
}
return false;
break;
case LOWER: case LOWER:
if (record->event.pressed) { if (record->event.pressed) {
//not sure how to have keyboard check mode and set it to a variable, so my work around //not sure how to have keyboard check mode and set it to a variable, so my work around

View File

@ -13,16 +13,14 @@ enum layer_names {
_ADJUST _ADJUST
}; };
enum custom_keycodes {
QWERTY = SAFE_RANGE,
COLEMAK,
DVORAK,
};
#define LOWER MO(_LOWER) #define LOWER MO(_LOWER)
#define RAISE MO(_RAISE) #define RAISE MO(_RAISE)
#define ADJUST MO(_ADJUST) #define ADJUST MO(_ADJUST)
#define QWERTY PDF(_QWERTY)
#define COLEMAK PDF(_COLEMAK)
#define DVORAK PDF(_DVORAK)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Qwerty /* Qwerty
* ,-----------------------------------------------------------------------------------. * ,-----------------------------------------------------------------------------------.
@ -138,24 +136,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
layer_state_t layer_state_set_user(layer_state_t state) { layer_state_t layer_state_set_user(layer_state_t state) {
return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
} }
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case QWERTY:
if (record->event.pressed) {
set_single_persistent_default_layer(_QWERTY);
}
return false;
case COLEMAK:
if (record->event.pressed) {
set_single_persistent_default_layer(_COLEMAK);
}
return false;
case DVORAK:
if (record->event.pressed) {
set_single_persistent_default_layer(_DVORAK);
}
return false;
}
return true;
}

View File

@ -23,9 +23,7 @@ enum sofle_layers {
}; };
enum custom_keycodes { enum custom_keycodes {
KC_QWERTY = SAFE_RANGE, KC_LOWER = SAFE_RANGE,
KC_COLEMAK,
KC_LOWER,
KC_RAISE, KC_RAISE,
KC_ADJUST, KC_ADJUST,
KC_PRVWD, KC_PRVWD,
@ -35,6 +33,9 @@ enum custom_keycodes {
KC_DLINE KC_DLINE
}; };
#define KC_QWERTY PDF(_QWERTY)
#define KC_COLEMAK PDF(_COLEMAK)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QWERTY] = LAYOUT( [_QWERTY] = LAYOUT(
@ -148,16 +149,6 @@ bool oled_task_user(void) {
bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) { switch (keycode) {
case KC_QWERTY:
if (record->event.pressed) {
set_single_persistent_default_layer(_QWERTY);
}
return false;
case KC_COLEMAK:
if (record->event.pressed) {
set_single_persistent_default_layer(_COLEMAK);
}
return false;
case KC_LOWER: case KC_LOWER:
if (record->event.pressed) { if (record->event.pressed) {
layer_on(_LOWER); layer_on(_LOWER);

View File

@ -12,12 +12,9 @@ enum layers {
#define FN1_CAPS LT(_FN1, KC_CAPS) #define FN1_CAPS LT(_FN1, KC_CAPS)
//custom keycode enums #define BASE_QWER PDF(_QWER)
enum custom_keycodes { #define BASE_COLE PDF(_COLE)
BASE_QWER = QK_USER, #define BASE_DVOR PDF(_DVOR)
BASE_COLE,
BASE_DVOR
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QWER] = LAYOUT( [_QWER] = LAYOUT(
@ -67,37 +64,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
), ),
*/ */
}; };
// macros to allow the user to set whatever default layer they want, even after reboot
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case BASE_QWER:
if (record->event.pressed) {
// when keycode BASE_QWER is pressed
set_single_persistent_default_layer(_QWER);
} else {
// when keycode BASE_QWER is released
}
break;
case BASE_COLE:
if (record->event.pressed) {
// when keycode BASE_COLE is pressed
set_single_persistent_default_layer(_COLE);
} else {
// when keycode BASE_COLE is released
}
break;
case BASE_DVOR:
if (record->event.pressed) {
// when keycode BASE_DVOR is pressed
set_single_persistent_default_layer(_DVOR);
} else {
// when keycode BASE_DVOR is released
}
break;
}
return true;
};

View File

@ -12,12 +12,9 @@ enum layers {
#define FN1_CAPS LT(_FN1, KC_CAPS) #define FN1_CAPS LT(_FN1, KC_CAPS)
//custom keycode enums #define BASE_QWER PDF(_QWER)
enum custom_keycodes { #define BASE_COLE PDF(_COLE)
BASE_QWER = QK_USER, #define BASE_DVOR PDF(_DVOR)
BASE_COLE,
BASE_DVOR
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QWER] = LAYOUT_83_ansi( [_QWER] = LAYOUT_83_ansi(
@ -67,37 +64,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
), ),
*/ */
}; };
// macros to allow the user to set whatever default layer they want, even after reboot
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case BASE_QWER:
if (record->event.pressed) {
// when keycode BASE_QWER is pressed
set_single_persistent_default_layer(_QWER);
} else {
// when keycode BASE_QWER is released
}
break;
case BASE_COLE:
if (record->event.pressed) {
// when keycode BASE_COLE is pressed
set_single_persistent_default_layer(_COLE);
} else {
// when keycode BASE_COLE is released
}
break;
case BASE_DVOR:
if (record->event.pressed) {
// when keycode BASE_DVOR is pressed
set_single_persistent_default_layer(_DVOR);
} else {
// when keycode BASE_DVOR is released
}
break;
}
return true;
};

View File

@ -12,12 +12,9 @@ enum layers {
#define FN1_CAPS LT(_FN1, KC_CAPS) #define FN1_CAPS LT(_FN1, KC_CAPS)
//custom keycode enums #define BASE_QWER PDF(_QWER)
enum custom_keycodes { #define BASE_COLE PDF(_COLE)
BASE_QWER = QK_USER, #define BASE_DVOR PDF(_DVOR)
BASE_COLE,
BASE_DVOR
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QWER] = LAYOUT_84_iso( [_QWER] = LAYOUT_84_iso(
@ -67,37 +64,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
), ),
*/ */
}; };
//macros to allow the user to set whatever default layer they want, even after reboot
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case BASE_QWER:
if (record->event.pressed) {
// when keycode BASE_QWER is pressed
set_single_persistent_default_layer(_QWER);
} else {
// when keycode BASE_QWER is released
}
break;
case BASE_COLE:
if (record->event.pressed) {
// when keycode BASE_COLE is pressed
set_single_persistent_default_layer(_COLE);
} else {
// when keycode BASE_COLE is released
}
break;
case BASE_DVOR:
if (record->event.pressed) {
// when keycode BASE_DVOR is pressed
set_single_persistent_default_layer(_DVOR);
} else {
// when keycode BASE_DVOR is released
}
break;
}
return true;
};

View File

@ -12,12 +12,9 @@ enum layers {
#define FN1_CAPS LT(_FN1, KC_CAPS) #define FN1_CAPS LT(_FN1, KC_CAPS)
//custom keycode enums #define BASE_QWER PDF(_QWER)
enum custom_keycodes { #define BASE_COLE PDF(_COLE)
BASE_QWER = QK_USER, #define BASE_DVOR PDF(_DVOR)
BASE_COLE,
BASE_DVOR
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QWER] = LAYOUT_83_ansi( [_QWER] = LAYOUT_83_ansi(
@ -67,26 +64,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
), ),
*/ */
}; };
// Macros to allow the user to set whatever default layer they want, even after reboot
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case BASE_QWER:
if (record->event.pressed) {
set_single_persistent_default_layer(_QWER);
}
break;
case BASE_COLE:
if (record->event.pressed) {
set_single_persistent_default_layer(_COLE);
}
break;
case BASE_DVOR:
if (record->event.pressed) {
set_single_persistent_default_layer(_DVOR);
}
break;
}
return true;
};

View File

@ -12,12 +12,9 @@ enum layers {
#define FN1_CAPS LT(_FN1, KC_CAPS) #define FN1_CAPS LT(_FN1, KC_CAPS)
//custom keycode enums #define BASE_QWER PDF(_QWER)
enum custom_keycodes { #define BASE_COLE PDF(_COLE)
BASE_QWER = QK_USER, #define BASE_DVOR PDF(_DVOR)
BASE_COLE,
BASE_DVOR
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QWER] = LAYOUT_84_iso( [_QWER] = LAYOUT_84_iso(
@ -67,26 +64,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
), ),
*/ */
}; };
// Macros to allow the user to set whatever default layer they want, even after reboot
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case BASE_QWER:
if (record->event.pressed) {
set_single_persistent_default_layer(_QWER);
}
break;
case BASE_COLE:
if (record->event.pressed) {
set_single_persistent_default_layer(_COLE);
}
break;
case BASE_DVOR:
if (record->event.pressed) {
set_single_persistent_default_layer(_DVOR);
}
break;
}
return true;
};

View File

@ -24,11 +24,9 @@ enum layers {
_L3, _L3,
}; };
enum custom_keycodes { #define QWERTY PDF(_QW)
DVORAK = SAFE_RANGE, #define DVORAK PDF(_DV)
QWERTY, #define COLEMAK PDF(_CM)
COLEMAK
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QW] = LAYOUT( /* Qwerty */ [_QW] = LAYOUT( /* Qwerty */
@ -68,26 +66,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, KC_LSFT, KC_B, KC_SPC, KC_C, _______, _______, _______ _______, KC_LSFT, KC_B, KC_SPC, KC_C, _______, _______, _______
) )
}; };
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch(keycode) {
case DVORAK:
if (record->event.pressed) {
set_single_persistent_default_layer(_DV);
}
return false;
case QWERTY:
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;
default:
return true;
}
return true;
};

View File

@ -28,16 +28,17 @@ enum planck_layers {
}; };
enum planck_keycodes { enum planck_keycodes {
QWERTY = SAFE_RANGE, PLOVER = SAFE_RANGE,
COLEMAK,
DVORAK,
PLOVER,
LOWER, LOWER,
RAISE, RAISE,
BACKLIT, BACKLIT,
EXT_PLV EXT_PLV
}; };
#define QWERTY PDF(_QWERTY)
#define COLEMAK PDF(_COLEMAK)
#define DVORAK PDF(_DVORAK)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Qwerty /* Qwerty
@ -177,25 +178,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) { switch (keycode) {
case QWERTY:
if (record->event.pressed) {
print("mode just switched to qwerty and this is a huge string\n");
set_single_persistent_default_layer(_QWERTY);
}
return false;
break;
case COLEMAK:
if (record->event.pressed) {
set_single_persistent_default_layer(_COLEMAK);
}
return false;
break;
case DVORAK:
if (record->event.pressed) {
set_single_persistent_default_layer(_DVORAK);
}
return false;
break;
case LOWER: case LOWER:
if (record->event.pressed) { if (record->event.pressed) {
layer_on(_LOWER); layer_on(_LOWER);

View File

@ -18,16 +18,13 @@
// Defines names for use in layer keycodes and the keymap // Defines names for use in layer keycodes and the keymap
enum layer_names { _QWERTY, _COLEMAK, _DVORAK, _LOWER, _RAISE, _ADJUST }; enum layer_names { _QWERTY, _COLEMAK, _DVORAK, _LOWER, _RAISE, _ADJUST };
enum layer_keycodes {
QWERTY = SAFE_RANGE,
COLEMAK,
DVORAK,
};
// Defines the keycodes used by our macros in process_record_user
#define LOWER MO(_LOWER) #define LOWER MO(_LOWER)
#define RAISE MO(_RAISE) #define RAISE MO(_RAISE)
#define QWERTY PDF(_QWERTY)
#define COLEMAK PDF(_COLEMAK)
#define DVORAK PDF(_DVORAK)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* BASE /* BASE
* ,-----------------------------------------------------------------------------------. * ,-----------------------------------------------------------------------------------.
@ -163,25 +160,3 @@ layer_state_t layer_state_set_user(layer_state_t state) {
state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST); state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST);
return state; return state;
} }
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case QWERTY:
if (record->event.pressed) {
print("mode just switched to qwerty and this is a huge string\n");
set_single_persistent_default_layer(_QWERTY);
}
return false;
case COLEMAK:
if (record->event.pressed) {
set_single_persistent_default_layer(_COLEMAK);
}
return false;
case DVORAK:
if (record->event.pressed) {
set_single_persistent_default_layer(_DVORAK);
}
return false;
}
return true;
}

View File

@ -28,10 +28,7 @@ enum plaid_layers {
}; };
enum plaid_keycodes { enum plaid_keycodes {
QWERTY = SAFE_RANGE, PLOVER = SAFE_RANGE,
COLEMAK,
DVORAK,
PLOVER,
EXT_PLV, EXT_PLV,
LED_1, LED_1,
LED_2, LED_2,
@ -48,6 +45,10 @@ enum plaid_keycodes {
#define LOWER MO(_LOWER) #define LOWER MO(_LOWER)
#define RAISE MO(_RAISE) #define RAISE MO(_RAISE)
#define QWERTY PDF(_QWERTY)
#define COLEMAK PDF(_COLEMAK)
#define DVORAK PDF(_DVORAK)
// array of keys considered modifiers for led purposes // array of keys considered modifiers for led purposes
const uint16_t modifiers[] = { const uint16_t modifiers[] = {
KC_LCTL, KC_LCTL,
@ -301,25 +302,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
led_keypress_update(LED_GREEN, led_config.green_mode, keycode, record); led_keypress_update(LED_GREEN, led_config.green_mode, keycode, record);
} }
switch (keycode) { switch (keycode) {
case QWERTY:
if (record->event.pressed) {
print("mode just switched to qwerty and this is a huge string\n");
set_single_persistent_default_layer(_QWERTY);
}
return false;
break;
case COLEMAK:
if (record->event.pressed) {
set_single_persistent_default_layer(_COLEMAK);
}
return false;
break;
case DVORAK:
if (record->event.pressed) {
set_single_persistent_default_layer(_DVORAK);
}
return false;
break;
case PLOVER: case PLOVER:
if (record->event.pressed) { if (record->event.pressed) {
layer_off(_RAISE); layer_off(_RAISE);

View File

@ -9,8 +9,7 @@ enum layer_names {
}; };
enum custom_keycodes { enum custom_keycodes {
QWERTY = SAFE_RANGE, LOWER = SAFE_RANGE,
LOWER,
RAISE, RAISE,
ADJUST, ADJUST,
}; };
@ -58,23 +57,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
}; };
bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) { switch (keycode) {
case QWERTY:
if (record->event.pressed) {
#ifdef AUDIO_ENABLE
PLAY_SONG(tone_qwerty);
#endif
set_single_persistent_default_layer(_QWERTY);
}
return false;
break;
case LOWER: case LOWER:
if (record->event.pressed) { if (record->event.pressed) {
layer_on(_LOWER); layer_on(_LOWER);

View File

@ -14,18 +14,13 @@ enum my_layers {
_ADJUST _ADJUST
}; };
enum custom_keycodes {
QWERTY = SAFE_RANGE,
COLEMAK,
DVORAK,
LOWER,
RAISE,
ADJUST,
};
#define LOWER MO(_LOWER) #define LOWER MO(_LOWER)
#define RAISE MO(_RAISE) #define RAISE MO(_RAISE)
#define QWERTY PDF(_QWERTY)
#define COLEMAK PDF(_COLEMAK)
#define DVORAK PDF(_DVORAK)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Qwerty /* Qwerty
@ -160,24 +155,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
layer_state_t layer_state_set_user(layer_state_t state) { layer_state_t layer_state_set_user(layer_state_t state) {
return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
} }
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case QWERTY:
if (record->event.pressed) {
set_single_persistent_default_layer(_QWERTY);
}
return false;
case COLEMAK:
if (record->event.pressed) {
set_single_persistent_default_layer(_COLEMAK);
}
return false;
case DVORAK:
if (record->event.pressed) {
set_single_persistent_default_layer(_DVORAK);
}
return false;
}
return true;
}

View File

@ -28,14 +28,15 @@ enum preonic_layers {
}; };
enum preonic_keycodes { enum preonic_keycodes {
QWERTY = SAFE_RANGE, LOWER = SAFE_RANGE,
COLEMAK,
DVORAK,
LOWER,
RAISE, RAISE,
BACKLIT BACKLIT
}; };
#define QWERTY PDF(_QWERTY)
#define COLEMAK PDF(_COLEMAK)
#define DVORAK PDF(_DVORAK)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Qwerty /* Qwerty
@ -169,24 +170,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) { switch (keycode) {
case QWERTY:
if (record->event.pressed) {
set_single_persistent_default_layer(_QWERTY);
}
return false;
break;
case COLEMAK:
if (record->event.pressed) {
set_single_persistent_default_layer(_COLEMAK);
}
return false;
break;
case DVORAK:
if (record->event.pressed) {
set_single_persistent_default_layer(_DVORAK);
}
return false;
break;
case LOWER: case LOWER:
if (record->event.pressed) { if (record->event.pressed) {
layer_on(_LOWER); layer_on(_LOWER);

View File

@ -16,10 +16,7 @@ extern rgblight_config_t rgblight_config;
#define _ADJUST 6 #define _ADJUST 6
enum preonic_keycodes { enum preonic_keycodes {
QWERTY = SAFE_RANGE, LOWER = SAFE_RANGE,
COLEMAK,
DVORAK,
LOWER,
RAISE, RAISE,
BACKLIT, BACKLIT,
RGBLED_TOGGLE, RGBLED_TOGGLE,
@ -42,6 +39,9 @@ enum preonic_keycodes {
#define LT_MC(kc) LT(_MOUSECURSOR, kc) // L-ayer T-ap M-ouse C-ursor #define LT_MC(kc) LT(_MOUSECURSOR, kc) // L-ayer T-ap M-ouse C-ursor
#define LT_RAI(kc) LT(_RAISE, kc) // L-ayer T-ap to Raise #define LT_RAI(kc) LT(_RAISE, kc) // L-ayer T-ap to Raise
#define QWERTY PDF(_QWERTY)
#define COLEMAK PDF(_COLEMAK)
#define DVORAK PDF(_DVORAK)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
@ -213,18 +213,6 @@ void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) {
bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) { switch (keycode) {
case QWERTY:
if (record->event.pressed) {
set_single_persistent_default_layer(_QWERTY);
}
return false;
break;
case COLEMAK:
if (record->event.pressed) {
set_single_persistent_default_layer(_COLEMAK);
}
return false;
break;
case LOWER: case LOWER:
if (record->event.pressed) { if (record->event.pressed) {
//not sure how to have keyboard check mode and set it to a variable, so my work around //not sure how to have keyboard check mode and set it to a variable, so my work around

View File

@ -16,10 +16,7 @@ extern rgblight_config_t rgblight_config;
#define _ADJUST 6 #define _ADJUST 6
enum preonic_keycodes { enum preonic_keycodes {
QWERTY = SAFE_RANGE, LOWER = SAFE_RANGE,
COLEMAK,
DVORAK,
LOWER,
RAISE, RAISE,
BACKLIT, BACKLIT,
RGBLED_TOGGLE, RGBLED_TOGGLE,
@ -181,7 +178,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |------+------+------+------+------+------+------+------+------+------+------+------+--------------------. * |------+------+------+------+------+------+------+------+------+------+------+------+--------------------.
* | |RGB TG|RGB ST|RGBH -|RGBH +|RGBS -|RGBS +|RGBV -|RGBV +| | | Del | | | | * | |RGB TG|RGB ST|RGBH -|RGBH +|RGBS -|RGBS +|RGBV -|RGBV +| | | Del | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------|
* | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty| | | | | | | | * | | | |Aud on|Audoff|AGnorm|AGswap| | | | | | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------|
* | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | BL + |BL ST |BLSTEP| BL TG| | | | * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | BL + |BL ST |BLSTEP| BL TG| | | |
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------|
@ -191,7 +188,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_ADJUST] = LAYOUT( [_ADJUST] = LAYOUT(
QK_BOOT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_VOLD, KC_VOLU, KC_MUTE, QK_BOOT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_VOLD, KC_VOLU, KC_MUTE,
_______, UG_TOGG, UG_NEXT, UG_HUEU, UG_HUED, UG_SATU, UG_SATD, UG_VALU, UG_VALD, _______, _______, KC_DEL, _______, _______, _______, _______, UG_TOGG, UG_NEXT, UG_HUEU, UG_HUED, UG_SATU, UG_SATD, UG_VALU, UG_VALD, _______, _______, KC_DEL, _______, _______, _______,
_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, _______, _______, _______, _______, _______, _______, _______, _______,
_______, AU_PREV, AU_NEXT, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, BL_DOWN, BL_UP, BL_STEP, BL_TOGG, _______, _______, _______, _______, AU_PREV, AU_NEXT, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, BL_DOWN, BL_UP, BL_STEP, BL_TOGG, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
) )
@ -218,12 +215,6 @@ void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) {
bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) { switch (keycode) {
case QWERTY:
if (record->event.pressed) {
set_single_persistent_default_layer(_QWERTY);
}
return false;
break;
case LOWER: case LOWER:
if (record->event.pressed) { if (record->event.pressed) {
//not sure how to have keyboard check mode and set it to a variable, so my work around //not sure how to have keyboard check mode and set it to a variable, so my work around

View File

@ -13,10 +13,7 @@
#define _ADJUST 6 #define _ADJUST 6
enum preonic_keycodes { enum preonic_keycodes {
QWERTY = SAFE_RANGE, LOWER = SAFE_RANGE,
COLEMAK,
DVORAK,
LOWER,
RAISE, RAISE,
BACKLIT, BACKLIT,
RGBLED_TOGGLE, RGBLED_TOGGLE,
@ -39,6 +36,10 @@ enum preonic_keycodes {
#define LT_MC(kc) LT(_MOUSECURSOR, kc) // L-ayer T-ap M-ouse C-ursor #define LT_MC(kc) LT(_MOUSECURSOR, kc) // L-ayer T-ap M-ouse C-ursor
#define LT_RAI(kc) LT(_RAISE, kc) // L-ayer T-ap to Raise #define LT_RAI(kc) LT(_RAISE, kc) // L-ayer T-ap to Raise
#define QWERTY PDF(_QWERTY)
#define COLEMAK PDF(_COLEMAK)
#define DVORAK PDF(_DVORAK)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Qwerty /* Qwerty
@ -200,18 +201,6 @@ layer_state_t layer_state_set_user(layer_state_t state) {
bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) { switch (keycode) {
case QWERTY:
if (record->event.pressed) {
set_single_persistent_default_layer(_QWERTY);
}
return false;
break;
case COLEMAK:
if (record->event.pressed) {
set_single_persistent_default_layer(_COLEMAK);
}
return false;
break;
case LOWER: case LOWER:
if (record->event.pressed) { if (record->event.pressed) {
//not sure how to have keyboard check mode and set it to a variable, so my work around //not sure how to have keyboard check mode and set it to a variable, so my work around

View File

@ -48,15 +48,14 @@ enum custom_layer {
}; };
enum custom_keycodes { enum custom_keycodes {
QWERTY = SAFE_RANGE, LOWER = SAFE_RANGE,
ALT,
CTRL,
LOWER,
RAISE, RAISE,
MOUSE,
ADJUST ADJUST
}; };
#define QWERTY PDF(_QWERTY)
#define MOUSE PDF(_MOUSE)
// TAP DANCE *********************************************************** // TAP DANCE ***********************************************************
//Tap Dance Declarations //Tap Dance Declarations
enum { enum {
@ -569,12 +568,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return false; return false;
} }
return true; return true;
case QWERTY:
if (record->event.pressed) {
set_single_persistent_default_layer(_QWERTY);
}
return false;
break;
case LOWER: case LOWER:
if (record->event.pressed) { if (record->event.pressed) {
layer_on(_LOWER); layer_on(_LOWER);
@ -584,7 +577,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
update_tri_layer(_LOWER, _RAISE, _ADJUST); update_tri_layer(_LOWER, _RAISE, _ADJUST);
} }
return false; return false;
break;
case RAISE: case RAISE:
if (record->event.pressed) { if (record->event.pressed) {
layer_on(_RAISE); layer_on(_RAISE);
@ -594,13 +586,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
update_tri_layer(_LOWER, _RAISE, _ADJUST); update_tri_layer(_LOWER, _RAISE, _ADJUST);
} }
return false; return false;
break;
case MOUSE:
if (record->event.pressed) {
set_single_persistent_default_layer(_MOUSE);
}
return false;
break;
} }
return true; return true;
}; };

View File

@ -30,10 +30,7 @@ enum custom_layer {
}; };
enum custom_keycodes { enum custom_keycodes {
QWERTY = SAFE_RANGE, LOWER = SAFE_RANGE,
COLEMAK,
DVORAK,
LOWER,
RAISE, RAISE,
BACKLIT BACKLIT
}; };
@ -189,7 +186,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------| * |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | Reset| | | | | | | | | | Del | * | | | | Reset| | | | | | | | | | Del |
* |------+------+------+------+------+------+------+-------------+------+------+------+------+------| * |------+------+------+------+------+------+------+-------------+------+------+------+------+------|
* | | | | | |Audoff|Aud on|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | * | | | | | |Audoff|Aud on|AGnorm|AGswap| | | | | |
* |------+------+------+------+------+------+------+------|------+------+------+------+------+------| * |------+------+------+------+------+------+------+------|------+------+------+------+------+------|
* | | | |Voice-|Voice+|Musoff|Mus on| | | | | | | | * | | | |Voice-|Voice+|Musoff|Mus on| | | | | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------| * |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
@ -199,7 +196,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_ADJUST] = LAYOUT( [_ADJUST] = LAYOUT(
_______, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
XXXXXXX, XXXXXXX, XXXXXXX, QK_BOOT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_DEL, XXXXXXX, XXXXXXX, XXXXXXX, QK_BOOT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_DEL,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, AU_ON, AU_OFF, AG_NORM, AG_SWAP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______,
XXXXXXX, XXXXXXX, XXXXXXX, AU_PREV, AU_NEXT, MU_ON, MU_OFF, MI_ON, MI_OFF, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, AU_PREV, AU_NEXT, MU_ON, MU_OFF, MI_ON, MI_OFF, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, _______, _______, _______, _______, _______, _______, _______,_______,_______, _______, _______ XXXXXXX, _______, _______, _______, _______, _______, _______, _______,_______,_______, _______, _______
) )
@ -209,15 +206,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) { switch (keycode) {
case QWERTY:
if (record->event.pressed) {
#ifdef AUDIO_ENABLE
PLAY_SONG(tone_qwerty);
#endif
set_single_persistent_default_layer(_QWERTY);
}
return false;
break;
case LOWER: case LOWER:
if (record->event.pressed) { if (record->event.pressed) {
layer_on(_LOWER); layer_on(_LOWER);

View File

@ -47,15 +47,14 @@ enum custom_layer {
}; };
enum custom_keycodes { enum custom_keycodes {
QWERTY = SAFE_RANGE, LOWER = SAFE_RANGE,
ALT,
CTRL,
LOWER,
RAISE, RAISE,
MOUSE,
ADJUST ADJUST
}; };
#define QWERTY PDF(_QWERTY)
#define MOUSE PDF(_MOUSE)
// TAP DANCE *********************************************************** // TAP DANCE ***********************************************************
//Tap Dance Declarations //Tap Dance Declarations
enum { enum {
@ -499,12 +498,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return false; return false;
} }
return true; return true;
case QWERTY:
if (record->event.pressed) {
set_single_persistent_default_layer(_QWERTY);
}
return false;
break;
case LOWER: case LOWER:
if (record->event.pressed) { if (record->event.pressed) {
layer_on(_LOWER); layer_on(_LOWER);
@ -514,7 +507,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
update_tri_layer(_LOWER, _RAISE, _ADJUST); update_tri_layer(_LOWER, _RAISE, _ADJUST);
} }
return false; return false;
break;
case RAISE: case RAISE:
if (record->event.pressed) { if (record->event.pressed) {
layer_on(_RAISE); layer_on(_RAISE);
@ -524,13 +516,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
update_tri_layer(_LOWER, _RAISE, _ADJUST); update_tri_layer(_LOWER, _RAISE, _ADJUST);
} }
return false; return false;
break;
case MOUSE:
if (record->event.pressed) {
set_single_persistent_default_layer(_MOUSE);
}
return false;
break;
} }
return true; return true;
}; };

View File

@ -27,16 +27,17 @@ enum ortho_brass_layers {
}; };
enum ortho_brass_keycodes { enum ortho_brass_keycodes {
QWERTY = SAFE_RANGE, PLOVER = SAFE_RANGE,
COLEMAK,
DVORAK,
PLOVER,
EXT_PLV EXT_PLV
}; };
#define LOWER MO(_LOWER) #define LOWER MO(_LOWER)
#define RAISE MO(_RAISE) #define RAISE MO(_RAISE)
#define QWERTY PDF(_QWERTY)
#define COLEMAK PDF(_COLEMAK)
#define DVORAK PDF(_DVORAK)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Qwerty /* Qwerty
@ -172,24 +173,6 @@ layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_laye
bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) { switch (keycode) {
case QWERTY:
if (record->event.pressed) {
set_single_persistent_default_layer(_QWERTY);
}
return false;
break;
case COLEMAK:
if (record->event.pressed) {
set_single_persistent_default_layer(_COLEMAK);
}
return false;
break;
case DVORAK:
if (record->event.pressed) {
set_single_persistent_default_layer(_DVORAK);
}
return false;
break;
case PLOVER: case PLOVER:
if (record->event.pressed) { if (record->event.pressed) {
layer_off(_RAISE); layer_off(_RAISE);

View File

@ -27,15 +27,16 @@ enum preonic_layers {
}; };
enum preonic_keycodes { enum preonic_keycodes {
QWERTY = SAFE_RANGE, BACKLIT = SAFE_RANGE,
COLEMAK,
DVORAK,
BACKLIT
}; };
#define LOWER MO(_LOWER) #define LOWER MO(_LOWER)
#define RAISE MO(_RAISE) #define RAISE MO(_RAISE)
#define QWERTY PDF(_QWERTY)
#define COLEMAK PDF(_COLEMAK)
#define DVORAK PDF(_DVORAK)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Qwerty /* Qwerty
@ -172,24 +173,6 @@ layer_state_t layer_state_set_user(layer_state_t state) {
bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) { switch (keycode) {
case QWERTY:
if (record->event.pressed) {
set_single_persistent_default_layer(_QWERTY);
}
return false;
break;
case COLEMAK:
if (record->event.pressed) {
set_single_persistent_default_layer(_COLEMAK);
}
return false;
break;
case DVORAK:
if (record->event.pressed) {
set_single_persistent_default_layer(_DVORAK);
}
return false;
break;
case BACKLIT: case BACKLIT:
if (record->event.pressed) { if (record->event.pressed) {
register_code(keycode_config(KC_LGUI)); register_code(keycode_config(KC_LGUI));
@ -200,7 +183,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
unregister_code(keycode_config(KC_LGUI)); unregister_code(keycode_config(KC_LGUI));
} }
return false; return false;
break;
} }
return true; return true;
}; };

View File

@ -27,15 +27,16 @@ enum layer_names {
}; };
enum custom_keycodes { enum custom_keycodes {
QWERTY = SAFE_RANGE, BACKLIT = SAFE_RANGE,
COLEMAK,
DVORAK,
BACKLIT
}; };
#define LOWER MO(_LOWER) #define LOWER MO(_LOWER)
#define RAISE MO(_RAISE) #define RAISE MO(_RAISE)
#define QWERTY PDF(_QWERTY)
#define COLEMAK PDF(_COLEMAK)
#define DVORAK PDF(_DVORAK)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Qwerty /* Qwerty
@ -172,24 +173,6 @@ layer_state_t layer_state_set_user(layer_state_t state) {
bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) { switch (keycode) {
case QWERTY:
if (record->event.pressed) {
set_single_persistent_default_layer(_QWERTY);
}
return false;
break;
case COLEMAK:
if (record->event.pressed) {
set_single_persistent_default_layer(_COLEMAK);
}
return false;
break;
case DVORAK:
if (record->event.pressed) {
set_single_persistent_default_layer(_DVORAK);
}
return false;
break;
case BACKLIT: case BACKLIT:
if (record->event.pressed) { if (record->event.pressed) {
register_code(keycode_config(KC_LGUI)); register_code(keycode_config(KC_LGUI));
@ -200,7 +183,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
unregister_code(keycode_config(KC_LGUI)); unregister_code(keycode_config(KC_LGUI));
} }
return false; return false;
break;
} }
return true; return true;
}; };

View File

@ -26,13 +26,14 @@ enum layers {
}; };
enum keycodes { enum keycodes {
QWERTY = SAFE_RANGE, LOWER = SAFE_RANGE,
COLEMAK,
DVORAK,
LOWER,
RAISE, RAISE,
}; };
#define QWERTY PDF(_QWERTY)
#define COLEMAK PDF(_COLEMAK)
#define DVORAK PDF(_DVORAK)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Qwerty /* Qwerty
@ -164,24 +165,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) { switch (keycode) {
case QWERTY:
if (record->event.pressed) {
set_single_persistent_default_layer(_QWERTY);
}
return false;
break;
case COLEMAK:
if (record->event.pressed) {
set_single_persistent_default_layer(_COLEMAK);
}
return false;
break;
case DVORAK:
if (record->event.pressed) {
set_single_persistent_default_layer(_DVORAK);
}
return false;
break;
case LOWER: case LOWER:
if (record->event.pressed) { if (record->event.pressed) {
layer_on(_LOWER); layer_on(_LOWER);

View File

@ -29,13 +29,14 @@ enum layer_names {
}; };
enum custom_keycodes { enum custom_keycodes {
QWERTY = SAFE_RANGE, PLOVER = SAFE_RANGE,
COLEMAK,
DVORAK,
PLOVER,
EXT_PLV EXT_PLV
}; };
#define QWERTY PDF(_QWERTY)
#define COLEMAK PDF(_COLEMAK)
#define DVORAK PDF(_DVORAK)
#define ST_BOLT QK_STENO_BOLT #define ST_BOLT QK_STENO_BOLT
#define ST_GEM QK_STENO_GEMINI #define ST_GEM QK_STENO_GEMINI
@ -195,21 +196,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) { switch (keycode) {
case QWERTY:
if (record->event.pressed) {
set_single_persistent_default_layer(_QWERTY);
}
return false;
case COLEMAK:
if (record->event.pressed) {
set_single_persistent_default_layer(_COLEMAK);
}
return false;
case DVORAK:
if (record->event.pressed) {
set_single_persistent_default_layer(_DVORAK);
}
return false;
case PLOVER: case PLOVER:
if (!record->event.pressed) { if (!record->event.pressed) {
layer_on(_PLOVER); layer_on(_PLOVER);

View File

@ -33,10 +33,7 @@ enum terminus_mini_layers {
}; };
enum terminus_mini_keycodes { enum terminus_mini_keycodes {
COLEMAK = SAFE_RANGE, LOWER = SAFE_RANGE,
QWERTY,
DVORAK,
LOWER,
RAISE, RAISE,
FUNCTION, FUNCTION,
MOUSE, MOUSE,
@ -48,6 +45,10 @@ enum terminus_mini_keycodes {
#define SPC_LW LT(_LOWER, KC_SPC) #define SPC_LW LT(_LOWER, KC_SPC)
#define ENT_RS LT(_RAISE, KC_ENT) #define ENT_RS LT(_RAISE, KC_ENT)
#define QWERTY PDF(_QWERTY)
#define COLEMAK PDF(_COLEMAK)
#define DVORAK PDF(_DVORAK)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Colemak - /* Colemak -
* ,----------------------------------------------------------------------------------. * ,----------------------------------------------------------------------------------.
@ -204,24 +205,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// Cases to switch default layer to QWERTY, COLEMAK or DVORAK and to access ADJUST layer // Cases to switch default layer to QWERTY, COLEMAK or DVORAK and to access ADJUST layer
bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) { switch (keycode) {
case QWERTY:
if (record->event.pressed) {
set_single_persistent_default_layer(_QWERTY);
}
return false;
break;
case COLEMAK:
if (record->event.pressed) {
set_single_persistent_default_layer(_COLEMAK);
}
return false;
break;
case DVORAK:
if (record->event.pressed) {
set_single_persistent_default_layer(_DVORAK);
}
return false;
break;
case LOWER: case LOWER:
if (record->event.pressed) { if (record->event.pressed) {
layer_on(_LOWER); layer_on(_LOWER);

View File

@ -8,14 +8,12 @@ enum layer_names {
_ADJUST, _ADJUST,
}; };
enum custom_keycodes {
QWERTY = SAFE_RANGE,
COLEMAK,
};
#define LOWER MO(_LOWER) #define LOWER MO(_LOWER)
#define RAISE MO(_RAISE) #define RAISE MO(_RAISE)
#define QWERTY PDF(_QWERTY)
#define COLEMAK PDF(_COLEMAK)
// Each layer gets a name for readability, which is then used in the keymap matrix below. // 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. // 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 // Layer names don't all need to be of the same length, obviously, and you can also skip them
@ -65,19 +63,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
layer_state_t layer_state_set_user(layer_state_t state) { layer_state_t layer_state_set_user(layer_state_t state) {
return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
} }
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case QWERTY:
if (record->event.pressed) {
set_single_persistent_default_layer(_QWERTY);
}
return false;
case COLEMAK:
if (record->event.pressed) {
set_single_persistent_default_layer(_COLEMAK);
}
return false;
}
return true;
}

View File

@ -11,16 +11,14 @@ enum jian_layers {
_BCKLT_ADJ _BCKLT_ADJ
}; };
enum jian_keycodes {
QWERTY = SAFE_RANGE,
DVORAK,
COLEMAK,
WORKMAN
};
#define RAISE_T(kc) LT(_RAISE, kc) #define RAISE_T(kc) LT(_RAISE, kc)
#define LOWER_T(kc) LT(_LOWER, kc) #define LOWER_T(kc) LT(_LOWER, kc)
#define QWERTY PDF(_QWERTY)
#define COLEMAK PDF(_COLEMAK)
#define DVORAK PDF(_DVORAK)
#define WORKMAN PDF(_WORKMAN)
#ifdef SWAP_HANDS_ENABLE #ifdef SWAP_HANDS_ENABLE
#define SW_TG SH_TOGG #define SW_TG SH_TOGG
#else #else
@ -92,29 +90,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
layer_state_t layer_state_set_user(layer_state_t state) { layer_state_t layer_state_set_user(layer_state_t state) {
return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
} }
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case QWERTY:
if (record->event.pressed) {
set_single_persistent_default_layer(_QWERTY);
}
return false;
case DVORAK:
if (record->event.pressed) {
set_single_persistent_default_layer(_DVORAK);
}
return false;
case COLEMAK:
if (record->event.pressed) {
set_single_persistent_default_layer(_COLEMAK);
}
return false;
case WORKMAN:
if (record->event.pressed) {
set_single_persistent_default_layer(_WORKMAN);
}
return false;
}
return true;
}

View File

@ -63,12 +63,6 @@ uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) {
} }
} }
// Defines the keycodes used by our macros in process_record_user
enum custom_keycodes {
MAC = SAFE_RANGE,
WIN,
};
// Key Macro // Key Macro
#define ESC_NUM TD(TD_ESC_NUM) #define ESC_NUM TD(TD_ESC_NUM)
#define S_CAP TD(TD_LSFT_CAPS) #define S_CAP TD(TD_LSFT_CAPS)
@ -82,7 +76,8 @@ enum custom_keycodes {
#define ALT_GRV LALT(KC_GRV) #define ALT_GRV LALT(KC_GRV)
#define LOWER MO(_LOWER) #define LOWER MO(_LOWER)
#define NUM TG(_NUM) #define NUM TG(_NUM)
#define MAC PDF(_MAC)
#define WIN PDF(_WIN)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_MAC] = LAYOUT_jp( [_MAC] = LAYOUT_jp(
@ -146,26 +141,6 @@ const uint8_t music_map[MATRIX_ROWS][MATRIX_COLS] = LAYOUT_jp(
); );
#endif #endif
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case MAC: // Change default ayer --> Write to EEPROM
if (record->event.pressed) {
set_single_persistent_default_layer(_MAC);
}
return false;
break;
case WIN: // Change default ayer --> Write to EEPROM
if (record->event.pressed) {
set_single_persistent_default_layer(_WIN);
}
return false;
break;
default:
break;
}
return true;
}
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// RGB Light settings // RGB Light settings
#ifdef RGBLIGHT_LAYERS #ifdef RGBLIGHT_LAYERS

Some files were not shown because too many files have changed in this diff Show More