Compare commits

...

37 Commits

Author SHA1 Message Date
JIKEDINGZHI
c760ed2436
Merge 024736fbfb into 859dab864a 2024-11-23 11:11:05 -08:00
Joel Challis
859dab864a
Remove keyboard use of eeconfig_read_default_layer (#24635) 2024-11-23 17:43:45 +00:00
Dasky
1f7d10902a
Add pointing tests (#24513) 2024-11-23 16:34:32 +00:00
Ryan
d189de24a0
Simple Python script to show polling rate (#24622) 2024-11-23 14:07:18 +00:00
Joel Challis
e4e015c0c8
Update keymaps to use PDF keycode (#24633) 2024-11-23 13:35:34 +00:00
NaturalZh
024736fbfb update skyloong/gk104/q1/ansi/readme.md 2024-10-26 16:25:41 +08:00
NaturalZh
302e03710e update skyloong/gk104/q1 2024-10-26 16:15:41 +08:00
NaturalZh
930e25adf4 update skyloong/gk104/q1 2024-10-18 16:10:40 +08:00
NaturalZh
1c1c8a4102 Delete skyloong/gk104/q1/ansi/keymaps/via 2024-08-30 19:02:38 +08:00
NaturalZh
647579a4fe Merge branch 'develop' into gk104_q1_ansi 2024-08-30 18:12:24 +08:00
NaturalZh
99d5cbe7e3 update skyloong/gk104/q1 about layer switch. 2024-07-24 16:23:29 +08:00
NaturalZh
1742362c0b delete skyloong/gk104/q1/readme.md and add skyloong/gk104/q1/ansi/readme.md. 2024-07-23 16:04:02 +08:00
NaturalZh
ee2d3a8c28 update skyloong/gk104/q1/ansi/keyboard.json about rgb matrix layout location 2024-07-17 10:57:33 +08:00
NaturalZh
2c01d31446 update skyloong/gk104/q1 about gpio command 2024-07-16 19:13:33 +08:00
NaturalZh
fa8e8ddd5d update skyloong/gk104/q1/q1.c 2024-05-17 19:33:41 +08:00
NaturalZh
a2337b7509 update skyloong/gk104/q1/q1.c and config.h 2024-04-03 17:17:00 +08:00
NaturalZh
822dbcd654 update skyloong/gk104/q1 2024-04-03 16:54:33 +08:00
NaturalZh
c4edd10464 update skyloong/gk104/q1/matrix.c. 2024-04-03 11:29:50 +08:00
NaturalZh
498a809b16 Update skyloong/gk104/q1/readme.md 2024-04-03 11:29:49 +08:00
NaturalZh
58ee8f83e5 Corrected the definition of the variable in matrix.c . 2024-04-03 11:29:49 +08:00
JIKEDINGZHI
7cc5749f0f Update keyboards/skyloong/gk104/q1/led_hc595.c
OK, Thank you.

Co-authored-by: Drashna Jaelre <drashna@live.com>
2024-04-03 11:29:49 +08:00
JIKEDINGZHI
6b1c2620c0 Update keyboards/skyloong/gk104/q1/led_hc595.c
OK, Thank you.

Co-authored-by: Drashna Jaelre <drashna@live.com>
2024-04-03 11:29:48 +08:00
NaturalZh
8851b89c27 cancel RGB matrix indicator 2024-04-03 11:29:48 +08:00
JIKEDINGZHI
ce713759a8 Update readme.md 2024-04-03 11:29:48 +08:00
NaturalZh
509fcdc65c update skyloong/gk104/q1 keyboard dip switch define 2024-04-03 11:29:47 +08:00
JIKEDINGZHI
004542d6ad Update keyboards/skyloong/gk104/q1/mcuconf.h
Yes, SPI1 didn`t be used. Thank you.

Co-authored-by: Joel Challis <git@zvecr.com>
2024-04-03 11:29:47 +08:00
JIKEDINGZHI
809414da30 Update keyboards/skyloong/gk104/q1/matrix.c
OK, I see. Thank you very much.

Co-authored-by: Joel Challis <git@zvecr.com>
2024-04-03 11:29:47 +08:00
JIKEDINGZHI
1f6a3e9b36 Update keyboards/skyloong/gk104/q1/matrix.c
OK, Thank you.

Co-authored-by: Joel Challis <git@zvecr.com>
2024-04-03 11:29:46 +08:00
JIKEDINGZHI
8aa6b64ccc Update keyboards/skyloong/gk104/q1/info.json
OK, Thank you.

Co-authored-by: Joel Challis <git@zvecr.com>
2024-04-03 11:29:46 +08:00
JIKEDINGZHI
03e93ea4f1 Update keyboards/skyloong/gk104/q1/config.h
OK, I see.

Co-authored-by: Joel Challis <git@zvecr.com>
2024-04-03 11:29:46 +08:00
JIKEDINGZHI
bf8b3207a1 Update keyboards/skyloong/gk104/q1/config.h
OK, I see.

Co-authored-by: Joel Challis <git@zvecr.com>
2024-04-03 11:29:45 +08:00
JIKEDINGZHI
27c0890cf8 Update keyboards/skyloong/gk104/q1/info.json
OK, Thank you.

Co-authored-by: Joel Challis <git@zvecr.com>
2024-04-03 11:29:45 +08:00
JIKEDINGZHI
52cff32dcb Update keyboards/skyloong/gk104/q1/ansi/rules.mk
OK, Thank you.

Co-authored-by: Joel Challis <git@zvecr.com>
2024-04-03 11:29:45 +08:00
NaturalZh
265cc536bd update GK104 Q1 keyboard encoder setting 2024-04-03 11:29:44 +08:00
NaturalZh
6209b157ee Update skyloong/gk104 q1 ansi keyboard 2024-04-03 11:29:44 +08:00
NaturalZh
47b1f3871b gk104_q1_ansi compiled pass. 2024-04-03 11:29:43 +08:00
NaturalZh
5ae58a483e Create gk104_q1_ansi keyboard 2024-04-03 11:29:43 +08:00
123 changed files with 2459 additions and 1734 deletions

View File

@ -21,8 +21,10 @@ $(TEST_OUTPUT)_SRC := \
$(SRC) \ $(SRC) \
$(QUANTUM_PATH)/keymap_introspection.c \ $(QUANTUM_PATH)/keymap_introspection.c \
tests/test_common/matrix.c \ tests/test_common/matrix.c \
tests/test_common/pointing_device_driver.c \
tests/test_common/test_driver.cpp \ tests/test_common/test_driver.cpp \
tests/test_common/keyboard_report_util.cpp \ tests/test_common/keyboard_report_util.cpp \
tests/test_common/mouse_report_util.cpp \
tests/test_common/keycode_util.cpp \ tests/test_common/keycode_util.cpp \
tests/test_common/keycode_table.cpp \ tests/test_common/keycode_table.cpp \
tests/test_common/test_fixture.cpp \ tests/test_common/test_fixture.cpp \

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

View File

@ -62,12 +62,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)
@ -80,7 +74,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_ansi( [_MAC] = LAYOUT_ansi(
@ -134,26 +129,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
) )
}; };
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

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(
@ -136,26 +131,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
) )
}; };
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

View File

@ -19,13 +19,14 @@
enum layer_number { _QWERTY = 0, _COLEMAK, _DVORAK, _LOWER, _RAISE, _ADJUST }; enum layer_number { _QWERTY = 0, _COLEMAK, _DVORAK, _LOWER, _RAISE, _ADJUST };
// Defines the keycodes used by our macros in process_record_user
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)
// clang-format off // clang-format off
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Qwerty /* Qwerty
@ -141,27 +142,6 @@ 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;
}
bool led_update_user(led_t led_state) { bool led_update_user(led_t led_state) {
board_set_led_by_index(0, LED_YELLOW, led_state.caps_lock); board_set_led_by_index(0, LED_YELLOW, led_state.caps_lock);
board_set_led_by_index(1, LED_YELLOW, led_state.scroll_lock); board_set_led_by_index(1, LED_YELLOW, led_state.scroll_lock);

View File

@ -19,13 +19,14 @@
enum layer_number { _QWERTY = 0, _COLEMAK, _DVORAK, _LOWER, _RAISE, _ADJUST }; enum layer_number { _QWERTY = 0, _COLEMAK, _DVORAK, _LOWER, _RAISE, _ADJUST };
// Defines the keycodes used by our macros in process_record_user
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)
// clang-format off // clang-format off
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Qwerty /* Qwerty
@ -141,27 +142,6 @@ 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;
}
bool led_update_user(led_t led_state) { bool led_update_user(led_t led_state) {
board_set_led_by_index(0, LED_YELLOW, led_state.caps_lock); board_set_led_by_index(0, LED_YELLOW, led_state.caps_lock);
board_set_led_by_index(1, LED_YELLOW, led_state.scroll_lock); board_set_led_by_index(1, LED_YELLOW, led_state.scroll_lock);

View File

@ -13,8 +13,7 @@ enum layer_names {
}; };
enum custom_keycodes { enum custom_keycodes {
QWERTY = SAFE_RANGE, LOWER = SAFE_RANGE,
LOWER,
RAISE, RAISE,
ADJUST, ADJUST,
}; };
@ -88,7 +87,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_ADJUST] = LAYOUT_ortho_5x14( [_ADJUST] = LAYOUT_ortho_5x14(
_______, 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, _______,
_______, _______, QK_BOOT, UG_TOGG, UG_NEXT, UG_HUED, UG_HUEU, UG_SATD, UG_SATU, UG_VALD, UG_VALU, _______, KC_DEL, _______, _______, _______, QK_BOOT, UG_TOGG, UG_NEXT, UG_HUED, UG_HUEU, UG_SATD, UG_SATU, UG_VALD, UG_VALU, _______, KC_DEL, _______,
_______, _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, _______, _______, _______, _______, _______, _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
) )
@ -98,12 +97,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 LOWER: case LOWER:
if (record->event.pressed) { if (record->event.pressed) {
layer_on(_LOWER); layer_on(_LOWER);

View File

@ -5,11 +5,6 @@ enum layer_names {
_LOWER _LOWER
}; };
enum custom_keycodes {
QWERTY = SAFE_RANGE,
LOWER
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Qwerty /* Qwerty
* ,-----------------------------------------------------------------------------------. * ,-----------------------------------------------------------------------------------.
@ -29,7 +24,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
QK_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, QK_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_ENT, KC_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT KC_LCTL, KC_LALT, KC_LGUI, MO(_LOWER), KC_ENT, KC_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
), ),
/* Lower /* Lower
@ -53,21 +48,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
UG_TOGG, QK_BOOT, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY UG_TOGG, QK_BOOT, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
) )
}; };
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 LOWER:
if (record->event.pressed) {
layer_on(_LOWER);
} else {
layer_off(_LOWER);
}
return false;
}
return true;
};

View File

@ -8,8 +8,7 @@ enum layer_names {
}; };
enum custom_keycodes { enum custom_keycodes {
QWERTY = SAFE_RANGE, LOWER = SAFE_RANGE,
LOWER,
RAISE RAISE
}; };
@ -83,7 +82,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |------+------+------+------+------+------+------+------+------+------+------+------| * |------+------+------+------+------+------+------+------+------+------+------+------|
* | | Reset| | | | | | | | | | Del | * | | Reset| | | | | | | | | | Del |
* |------+------+------+------+------+-------------+------+------+------+------+------| * |------+------+------+------+------+-------------+------+------+------+------+------|
* | | | |Aud on|AudOff|AGnorm|AGswap|Qwerty| | | | | * | | | |Aud on|AudOff|AGnorm|AGswap| | | | | |
* |------+------+------+------+------+------|------+------+------+------+------+------| * |------+------+------+------+------+------|------+------+------+------+------+------|
* | |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | | * | |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------| * |------+------+------+------+------+------+------+------+------+------+------+------|
@ -93,7 +92,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_ADJUST] = LAYOUT_ortho_5x12( [_ADJUST] = LAYOUT_ortho_5x12(
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,
_______, QK_BOOT, DB_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, _______, QK_BOOT, DB_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL,
_______, _______, MU_NEXT, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, _______, _______, _______, _______, _______, MU_NEXT, AU_ON, AU_OFF, AG_NORM, AG_SWAP, _______, _______, _______, _______, _______,
_______, AU_PREV, AU_NEXT, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, _______, AU_PREV, AU_NEXT, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
) )
@ -101,11 +100,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 LOWER: case LOWER:
if (record->event.pressed) { if (record->event.pressed) {
layer_on(_LOWER); layer_on(_LOWER);

View File

@ -26,10 +26,7 @@ enum layer_names {
}; };
enum custom_keycodes { enum custom_keycodes {
KC_QWRTY = SAFE_RANGE, KC_PRVWD = SAFE_RANGE,
KC_COLMK,
KC_HRM,
KC_PRVWD,
KC_NXTWD KC_NXTWD
}; };
@ -46,6 +43,10 @@ enum custom_keycodes {
#define HRM_RC MT(MOD_RCTL, KC_K) #define HRM_RC MT(MOD_RCTL, KC_K)
#define HRM_RS MT(MOD_RSFT, KC_J) #define HRM_RS MT(MOD_RSFT, KC_J)
#define KC_QWRTY PDF(_QWERTY)
#define KC_COLMK PDF(_COLEMAK)
#define KC_HRM PDF(_HRM)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* /*
* QWERTY * QWERTY
@ -188,21 +189,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 KC_QWRTY:
if (record->event.pressed) {
set_single_persistent_default_layer(_QWERTY);
}
return false;
case KC_COLMK:
if (record->event.pressed) {
set_single_persistent_default_layer(_COLEMAK);
}
return false;
case KC_HRM:
if (record->event.pressed) {
set_single_persistent_default_layer(_HRM);
}
return false;
case KC_PRVWD: case KC_PRVWD:
if (record->event.pressed) { if (record->event.pressed) {
register_mods(mod_config(MOD_LCTL)); register_mods(mod_config(MOD_LCTL));

View File

@ -26,10 +26,7 @@ enum layer_names {
}; };
enum custom_keycodes { enum custom_keycodes {
KC_QWRTY = SAFE_RANGE, KC_PRVWD = SAFE_RANGE,
KC_COLMK,
KC_HRM,
KC_PRVWD,
KC_NXTWD KC_NXTWD
}; };
@ -46,6 +43,10 @@ enum custom_keycodes {
#define HRM_RC MT(MOD_RCTL, KC_K) #define HRM_RC MT(MOD_RCTL, KC_K)
#define HRM_RS MT(MOD_RSFT, KC_J) #define HRM_RS MT(MOD_RSFT, KC_J)
#define KC_QWRTY PDF(_QWERTY)
#define KC_COLMK PDF(_COLEMAK)
#define KC_HRM PDF(_HRM)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* /*
* QWERTY * QWERTY
@ -188,21 +189,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 KC_QWRTY:
if (record->event.pressed) {
set_single_persistent_default_layer(_QWERTY);
}
return false;
case KC_COLMK:
if (record->event.pressed) {
set_single_persistent_default_layer(_COLEMAK);
}
return false;
case KC_HRM:
if (record->event.pressed) {
set_single_persistent_default_layer(_HRM);
}
return false;
case KC_PRVWD: case KC_PRVWD:
if (record->event.pressed) { if (record->event.pressed) {
register_mods(mod_config(MOD_LCTL)); register_mods(mod_config(MOD_LCTL));

View File

@ -26,10 +26,7 @@ enum layer_names {
}; };
enum custom_keycodes { enum custom_keycodes {
KC_QWRTY = SAFE_RANGE, KC_PRVWD = SAFE_RANGE,
KC_COLMK,
KC_HRM,
KC_PRVWD,
KC_NXTWD KC_NXTWD
}; };
@ -46,6 +43,10 @@ enum custom_keycodes {
#define HRM_RC MT(MOD_RCTL, KC_K) #define HRM_RC MT(MOD_RCTL, KC_K)
#define HRM_RS MT(MOD_RSFT, KC_J) #define HRM_RS MT(MOD_RSFT, KC_J)
#define KC_QWRTY PDF(_QWERTY)
#define KC_COLMK PDF(_COLEMAK)
#define KC_HRM PDF(_HRM)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* /*
* QWERTY * QWERTY
@ -188,21 +189,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 KC_QWRTY:
if (record->event.pressed) {
set_single_persistent_default_layer(_QWERTY);
}
return false;
case KC_COLMK:
if (record->event.pressed) {
set_single_persistent_default_layer(_COLEMAK);
}
return false;
case KC_HRM:
if (record->event.pressed) {
set_single_persistent_default_layer(_HRM);
}
return false;
case KC_PRVWD: case KC_PRVWD:
if (record->event.pressed) { if (record->event.pressed) {
register_mods(mod_config(MOD_LCTL)); register_mods(mod_config(MOD_LCTL));

View File

@ -26,10 +26,7 @@ enum layer_names {
}; };
enum custom_keycodes { enum custom_keycodes {
KC_QWRTY = SAFE_RANGE, KC_PRVWD = SAFE_RANGE,
KC_COLMK,
KC_HRM,
KC_PRVWD,
KC_NXTWD KC_NXTWD
}; };
@ -46,6 +43,10 @@ enum custom_keycodes {
#define HRM_RC MT(MOD_RCTL, KC_K) #define HRM_RC MT(MOD_RCTL, KC_K)
#define HRM_RS MT(MOD_RSFT, KC_J) #define HRM_RS MT(MOD_RSFT, KC_J)
#define KC_QWRTY PDF(_QWERTY)
#define KC_COLMK PDF(_COLEMAK)
#define KC_HRM PDF(_HRM)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* /*
* QWERTY * QWERTY
@ -188,21 +189,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 KC_QWRTY:
if (record->event.pressed) {
set_single_persistent_default_layer(_QWERTY);
}
return false;
case KC_COLMK:
if (record->event.pressed) {
set_single_persistent_default_layer(_COLEMAK);
}
return false;
case KC_HRM:
if (record->event.pressed) {
set_single_persistent_default_layer(_HRM);
}
return false;
case KC_PRVWD: case KC_PRVWD:
if (record->event.pressed) { if (record->event.pressed) {
register_mods(mod_config(MOD_LCTL)); register_mods(mod_config(MOD_LCTL));

View File

@ -26,15 +26,13 @@ enum layer_names {
_CMD, _CMD,
}; };
enum corgi_keycodes {
QWERTY = SAFE_RANGE,
COLEMAK
};
#define LOWER MO(_LOWER) #define LOWER MO(_LOWER)
#define RAISE MO(_RAISE) #define RAISE MO(_RAISE)
#define CMD MO(_CMD) #define CMD MO(_CMD)
#define QWERTY PDF(_QWERTY)
#define COLEMAK PDF(_COLEMAK)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Qwerty /* Qwerty
* ,-----------------------------------------------------------------------------------. * ,-----------------------------------------------------------------------------------.
@ -136,21 +134,3 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
tap_code(clockwise ? KC_VOLU : KC_VOLD); tap_code(clockwise ? KC_VOLU : KC_VOLD);
return true; return true;
} }
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;
break;
case COLEMAK:
if (record->event.pressed) {
set_single_persistent_default_layer(_COLEMAK);
}
return false;
break;
}
return true;
}

View File

@ -28,17 +28,15 @@ enum layers {
_FN _FN
}; };
enum keycodes {
QWERTY = SAFE_RANGE,
WORKMAN,
COLEMAK,
DVORAK
};
#define FN MO(_FN) #define FN MO(_FN)
#define LOWER MO(_LOWER) #define LOWER MO(_LOWER)
#define RAISE MO(_RAISE) #define RAISE MO(_RAISE)
#define QWERTY PDF(_QWERTY)
#define WORKMAN PDF(_WORKMAN)
#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
@ -213,29 +211,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 WORKMAN:
if (record->event.pressed) {
set_single_persistent_default_layer(_WORKMAN);
}
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

@ -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

@ -30,9 +30,7 @@ enum lime_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,
@ -47,6 +45,9 @@ enum custom_keycodes {
KC_JOYSTICK_DEBUG, KC_JOYSTICK_DEBUG,
}; };
#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 * QWERTY
@ -480,16 +481,6 @@ bool showedJump = true;
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

@ -24,15 +24,11 @@ enum planck_layers {
}; };
#define L1 PDF(_1)
enum planck_keycodes { #define L2 PDF(_2)
L1 = SAFE_RANGE, #define L3 PDF(_3)
L2,
L3
};
#define LOWER MO(_4) #define LOWER MO(_4)
#define IND_1 D4 #define IND_1 D4
#define IND_2 C6 #define IND_2 C6
#define IND_3 D7 #define IND_3 D7
@ -66,27 +62,6 @@ layer_state_t layer_state_set_user(layer_state_t state) {
return state; return state;
} }
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case L1:
if (record->event.pressed) {
set_single_persistent_default_layer(_1);
}
return false;
case L2:
if (record->event.pressed) {
set_single_persistent_default_layer(_2);
}
return false;
case L3:
if (record->event.pressed) {
set_single_persistent_default_layer(_3);
}
return false;
}
return true;
}
void matrix_init_user(void) { void matrix_init_user(void) {
//init the Pro Micro on-board LEDs //init the Pro Micro on-board LEDs
gpio_set_pin_output(IND_1); gpio_set_pin_output(IND_1);

View File

@ -15,16 +15,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
* ,-----------------------------------------------------------------------------------. * ,-----------------------------------------------------------------------------------.
@ -140,24 +138,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

@ -14,16 +14,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
* ,-----------------------------------------------------------------------------------. * ,-----------------------------------------------------------------------------------.
@ -139,23 +137,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);
}
break;
case COLEMAK:
if (record->event.pressed) {
set_single_persistent_default_layer(_COLEMAK);
}
break;
case DVORAK:
if (record->event.pressed) {
set_single_persistent_default_layer(_DVORAK);
}
break;
}
return true;
}

View File

@ -14,16 +14,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] = LAYOUT_all( [_QWERTY] = LAYOUT_all(
@ -72,26 +70,6 @@ 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);
}
break;
case COLEMAK:
if (record->event.pressed) {
set_single_persistent_default_layer(_COLEMAK);
}
break;
case DVORAK:
if (record->event.pressed) {
set_single_persistent_default_layer(_DVORAK);
}
break;
}
return true;
}
bool encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
if (clockwise) { if (clockwise) {

View File

@ -14,16 +14,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] = LAYOUT_all( [_QWERTY] = LAYOUT_all(
@ -72,26 +70,6 @@ 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);
}
break;
case COLEMAK:
if (record->event.pressed) {
set_single_persistent_default_layer(_COLEMAK);
}
break;
case DVORAK:
if (record->event.pressed) {
set_single_persistent_default_layer(_DVORAK);
}
break;
}
return true;
}
bool encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
if (clockwise) { if (clockwise) {

View File

@ -27,18 +27,13 @@ enum layers {
_ADJUST, _ADJUST,
}; };
enum custom_keycodes { #define LOWER MO(_LOWER)
QWERTY = SAFE_RANGE, #define RAISE MO(_RAISE)
COLEMAK,
DVORAK,
LOWER,
RAISE,
EUCALYN,
ADJUST,
};
#define LOWER MO(_LOWER) #define QWERTY PDF(_QWERTY)
#define RAISE MO(_RAISE) #define COLEMAK PDF(_COLEMAK)
#define DVORAK PDF(_DVORAK)
#define EUCALYN PDF(_EUCALYN)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
@ -174,33 +169,3 @@ enum layers {
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;
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 EUCALYN:
if (record->event.pressed) {
set_single_persistent_default_layer(_EUCALYN);
}
return false;
break;
}
return true;
}

View File

@ -39,11 +39,12 @@ enum layer_names {
#define OS_GUI OSM(MOD_LGUI) #define OS_GUI OSM(MOD_LGUI)
#define OS_ALT OSM(MOD_LALT) #define OS_ALT OSM(MOD_LALT)
#define QWERTY PDF(_QWERTY)
#define COLEMAK PDF(_COLMAK)
enum keycodes { enum keycodes {
QWERTY = SAFE_RANGE,
COLEMAK,
// layers // layers
SYM, SYM = SAFE_RANGE,
MISC, MISC,
// special keys // special keys
ENC_PRS, ENC_PRS,
@ -233,16 +234,6 @@ uint16_t last_rgb_char = 0;
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(_COLMAK);
}
return false;
case SYM: case SYM:
if (record->event.pressed) { if (record->event.pressed) {
layer_on(_SYM); layer_on(_SYM);

View File

@ -13,8 +13,7 @@ enum layer_number {
}; };
enum custom_keycodes { enum custom_keycodes {
QWERTY = SAFE_RANGE, ADJUST = SAFE_RANGE,
ADJUST,
RGBRST RGBRST
}; };
@ -56,13 +55,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);
}
break;
case ADJUST: case ADJUST:
if (record->event.pressed) { if (record->event.pressed) {
layer_on(_ADJUST); layer_on(_ADJUST);

View File

@ -13,8 +13,7 @@ enum layer_number {
}; };
enum custom_keycodes { enum custom_keycodes {
QWERTY = SAFE_RANGE, ADJUST = SAFE_RANGE,
ADJUST,
RGBRST RGBRST
}; };
@ -56,13 +55,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);
}
break;
case ADJUST: case ADJUST:
if (record->event.pressed) { if (record->event.pressed) {
layer_on(_ADJUST); layer_on(_ADJUST);

View File

@ -13,8 +13,7 @@ enum layer_number {
}; };
enum custom_keycodes { enum custom_keycodes {
QWERTY = SAFE_RANGE, ADJUST = SAFE_RANGE,
ADJUST,
RGBRST RGBRST
}; };
@ -58,13 +57,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);
}
break;
case ADJUST: case ADJUST:
if (record->event.pressed) { if (record->event.pressed) {
layer_on(_ADJUST); layer_on(_ADJUST);

View File

@ -13,8 +13,7 @@ enum layer_number {
}; };
enum custom_keycodes { enum custom_keycodes {
QWERTY = SAFE_RANGE, ADJUST = SAFE_RANGE,
ADJUST,
RGBRST RGBRST
}; };
@ -62,13 +61,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);
}
break;
case ADJUST: case ADJUST:
if (record->event.pressed) { if (record->event.pressed) {
layer_on(_ADJUST); layer_on(_ADJUST);

View File

@ -13,8 +13,7 @@ enum layer_number {
}; };
enum custom_keycodes { enum custom_keycodes {
QWERTY = SAFE_RANGE, ADJUST = SAFE_RANGE,
ADJUST,
RGBRST RGBRST
}; };
@ -62,13 +61,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);
}
break;
case ADJUST: case ADJUST:
if (record->event.pressed) { if (record->event.pressed) {
layer_on(_ADJUST); layer_on(_ADJUST);

View File

@ -13,8 +13,7 @@ enum layer_number {
}; };
enum custom_keycodes { enum custom_keycodes {
QWERTY = SAFE_RANGE, ADJUST = SAFE_RANGE,
ADJUST,
RGBRST RGBRST
}; };
@ -62,13 +61,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);
}
break;
case ADJUST: case ADJUST:
if (record->event.pressed) { if (record->event.pressed) {
layer_on(_ADJUST); layer_on(_ADJUST);

View File

@ -13,8 +13,7 @@ enum layer_number {
}; };
enum custom_keycodes { enum custom_keycodes {
QWERTY = SAFE_RANGE, ADJUST = SAFE_RANGE,
ADJUST,
RGBRST RGBRST
}; };
@ -68,13 +67,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);
}
break;
case ADJUST: case ADJUST:
if (record->event.pressed) { if (record->event.pressed) {
layer_on(_ADJUST); layer_on(_ADJUST);

View File

@ -13,8 +13,7 @@ enum layer_number {
}; };
enum custom_keycodes { enum custom_keycodes {
QWERTY = SAFE_RANGE, ADJUST = SAFE_RANGE,
ADJUST,
RGBRST RGBRST
}; };
@ -68,13 +67,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);
}
break;
case ADJUST: case ADJUST:
if (record->event.pressed) { if (record->event.pressed) {
layer_on(_ADJUST); layer_on(_ADJUST);

View File

@ -15,8 +15,7 @@ enum layer_number {
}; };
enum custom_keycodes { enum custom_keycodes {
QWERTY = SAFE_RANGE, ADJUST = SAFE_RANGE,
ADJUST,
RGBRST RGBRST
}; };
@ -70,13 +69,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);
}
break;
case ADJUST: case ADJUST:
if (record->event.pressed) { if (record->event.pressed) {
layer_on(_ADJUST); layer_on(_ADJUST);

View File

@ -13,8 +13,7 @@ enum layer_number {
}; };
enum custom_keycodes { enum custom_keycodes {
QWERTY = SAFE_RANGE, ADJUST = SAFE_RANGE,
ADJUST,
RGBRST RGBRST
}; };
@ -68,13 +67,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);
}
break;
case ADJUST: case ADJUST:
if (record->event.pressed) { if (record->event.pressed) {
layer_on(_ADJUST); layer_on(_ADJUST);

View File

@ -26,14 +26,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
@ -167,21 +168,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 LOWER: case LOWER:
if (record->event.pressed) { if (record->event.pressed) {
layer_on(_LOWER); layer_on(_LOWER);

View File

@ -34,16 +34,14 @@ enum layer_names {
_ADJUST _ADJUST
}; };
enum custom_keycodes {
QWERTY = SAFE_RANGE,
COLEMAK,
DVORAK
};
#define LS__SPC MT(MOD_LSFT, KC_SPC) #define LS__SPC MT(MOD_LSFT, KC_SPC)
#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] = LAYOUT( [_QWERTY] = LAYOUT(
@ -88,27 +86,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;
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;
}
return true;
}

View File

@ -19,13 +19,6 @@
#include "lib/oled_helper.h" #include "lib/oled_helper.h"
#endif #endif
enum custom_keycode {
Mac_CS = SAFE_RANGE,
Mac_PS,
Win_CS,
Win_PS,
IOS_CS,
};
enum layerID { enum layerID {
MAC_CS_1 = 0, MAC_CS_1 = 0,
MAC_CS_2, MAC_CS_2,
@ -40,6 +33,12 @@ enum layerID {
SETTING, SETTING,
}; };
#define Mac_CS PDF(MAC_CS_1)
#define Mac_PS PDF(MAC_PS_1)
#define Win_CS PDF(WIN_CS_1)
#define Win_PS PDF(WIN_PS_1)
#define IOS_CS PDF(IOS_CS_1)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// Mac // Mac
// Clip Studio // Clip Studio
@ -234,44 +233,6 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
return true; return true;
} }
// custom keycode
// switch default layer
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case Mac_CS:
if (record->event.pressed) {
set_single_persistent_default_layer(MAC_CS_1);
}
return false;
break;
case Mac_PS:
if (record->event.pressed) {
set_single_persistent_default_layer(MAC_PS_1);
}
return false;
break;
case Win_CS:
if (record->event.pressed) {
set_single_persistent_default_layer(WIN_CS_1);
}
return false;
break;
case Win_PS:
if (record->event.pressed) {
set_single_persistent_default_layer(WIN_PS_1);
}
return false;
break;
case IOS_CS:
if (record->event.pressed) {
set_single_persistent_default_layer(IOS_CS_1);
}
return false;
break;
}
return true;
}
// OLED Display // OLED Display
#ifdef OLED_ENABLE #ifdef OLED_ENABLE
bool oled_task_user(void) { bool oled_task_user(void) {

View File

@ -31,10 +31,7 @@ enum planck_layers {
}; };
enum planck_keycodes { enum planck_keycodes {
QWERTY = SAFE_RANGE, PLOVER = SAFE_RANGE,
COLEMAK,
DVORAK,
PLOVER,
BACKLIT, BACKLIT,
EXT_PLV EXT_PLV
}; };
@ -42,6 +39,10 @@ enum planck_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)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Qwerty /* Qwerty
@ -184,25 +185,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) {
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 BACKLIT: case BACKLIT:
if (record->event.pressed) { if (record->event.pressed) {
register_code(KC_RSFT); register_code(KC_RSFT);

View File

@ -18,11 +18,15 @@
enum planck_layers { _QWERTY, _COLEMAK, _DVORAK, _LOWER, _RAISE, _PLOVER, _ADJUST }; enum planck_layers { _QWERTY, _COLEMAK, _DVORAK, _LOWER, _RAISE, _PLOVER, _ADJUST };
enum planck_keycodes { QWERTY = SAFE_RANGE, COLEMAK, DVORAK, PLOVER, BACKLIT, EXT_PLV }; enum planck_keycodes { PLOVER = SAFE_RANGE, BACKLIT, 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)
/* clang-format off */ /* clang-format off */
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
@ -230,25 +234,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
} }
#endif #endif
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 BACKLIT: case BACKLIT:
if (record->event.pressed) { if (record->event.pressed) {
register_code(KC_RSFT); register_code(KC_RSFT);

View File

@ -27,14 +27,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
@ -168,24 +169,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

@ -25,9 +25,7 @@ enum layer_number {
}; };
enum custom_keycodes { enum custom_keycodes {
QWERTY = SAFE_RANGE, FN = SAFE_RANGE,
MACROPAD,
FN,
ADJ, ADJ,
BACKLIT, BACKLIT,
RGBRST RGBRST
@ -37,7 +35,8 @@ enum macro_keycodes {
KC_SAMPLEMACRO, KC_SAMPLEMACRO,
}; };
#define QWERT PDF(_QWERTY)
#define MACROPAD PDF(_MACROPAD)
#define FN_ESC LT(_FN, KC_ESC) #define FN_ESC LT(_FN, KC_ESC)
#define FN_CAPS LT(_FN, KC_CAPS) #define FN_CAPS LT(_FN, KC_CAPS)
@ -109,18 +108,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
//uint8_t shifted = get_mods() & (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)); //uint8_t shifted = get_mods() & (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT));
switch (keycode) { switch (keycode) {
case QWERTY:
if (record->event.pressed) {
set_single_persistent_default_layer(_QWERTY);
}
return false;
break;
case MACROPAD:
if(record->event.pressed) {
set_single_persistent_default_layer(_MACROPAD);
}
return false;
break;
case FN: case FN:
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

@ -17,15 +17,16 @@ enum layer_number {
}; };
enum custom_keycodes { enum custom_keycodes {
QWERTY = SAFE_RANGE, FN = SAFE_RANGE,
COLEMAK,
FN,
ADJ, ADJ,
RGBRST RGBRST
}; };
#define FN_CAPS LT(_FN, KC_CAPS) #define FN_CAPS LT(_FN, KC_CAPS)
#define QWERTY PDF(_QWERTY)
#define COLEMAK PDF(_COLEMAK)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* / QWERTY \ /* / QWERTY \
* /-----------------------------------------\ /-----------------------------------------\ * /-----------------------------------------\ /-----------------------------------------\
@ -131,16 +132,6 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
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 FN: case FN:
if (record->event.pressed) { if (record->event.pressed) {
layer_on(_FN); layer_on(_FN);

View File

@ -17,15 +17,16 @@ enum layer_number {
}; };
enum custom_keycodes { enum custom_keycodes {
QWERTY = SAFE_RANGE, FN = SAFE_RANGE,
COLEMAK,
FN,
ADJ, ADJ,
RGBRST RGBRST
}; };
#define FN_CAPS LT(_FN, KC_CAPS) #define FN_CAPS LT(_FN, KC_CAPS)
#define QWERTY PDF(_QWERTY)
#define COLEMAK PDF(_COLEMAK)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* / QWERTY \ /* / QWERTY \
* /-----------------------------------------\ /-----------------------------------------\ * /-----------------------------------------\ /-----------------------------------------\
@ -131,16 +132,6 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
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 FN: case FN:
if (record->event.pressed) { if (record->event.pressed) {
layer_on(_FN); layer_on(_FN);

View File

@ -17,17 +17,13 @@ enum comet46_layers
_ADJUST, _ADJUST,
}; };
enum custom_keycodes {
QWERTY = SAFE_RANGE,
COLEMAK,
DVORAK,
LOWER,
RAISE,
};
#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
@ -175,8 +171,7 @@ void matrix_init_user(void) {
} }
void matrix_scan_user(void) { void matrix_scan_user(void) {
uint8_t layer = get_highest_layer(layer_state); uint8_t layer = get_highest_layer(layer_state | default_layer_state);
uint8_t default_layer = biton32(eeconfig_read_default_layer());
switch (layer) { switch (layer) {
case _LOWER: case _LOWER:
set_led_red; set_led_red;
@ -187,8 +182,6 @@ void matrix_scan_user(void) {
case _ADJUST: case _ADJUST:
set_led_magenta; set_led_magenta;
break; break;
default:
switch (default_layer) {
case _COLEMAK: case _COLEMAK:
set_led_white; set_led_white;
break; break;
@ -199,27 +192,4 @@ void matrix_scan_user(void) {
set_led_green; set_led_green;
break; break;
} }
break;
}
}; };
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case QWERTY:
if (record->event.pressed) {
set_single_persistent_default_layer(_QWERTY);
}
break;
case COLEMAK:
if (record->event.pressed) {
set_single_persistent_default_layer(_COLEMAK);
}
break;
case DVORAK:
if (record->event.pressed) {
set_single_persistent_default_layer(_DVORAK);
}
break;
}
return true;
}

View File

@ -18,17 +18,13 @@ enum comet46_layers
_ADJUST, _ADJUST,
}; };
enum custom_keycodes {
QWERTY = SAFE_RANGE,
COLEMAK,
DVORAK,
LOWER,
RAISE,
};
#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
@ -157,11 +153,8 @@ bool oled_task_user(void) {
// Layer state // Layer state
char layer_str[22]; char layer_str[22];
oled_write_P(PSTR("Layer: "), false); oled_write_P(PSTR("Layer: "), false);
uint8_t layer = get_highest_layer(layer_state); uint8_t layer = get_highest_layer(layer_state | default_layer_state);
uint8_t default_layer = get_highest_layer(eeconfig_read_default_layer());
switch (layer) { switch (layer) {
case _QWERTY:
switch (default_layer) {
case _QWERTY: case _QWERTY:
snprintf(layer_str, sizeof(layer_str), "Qwerty"); snprintf(layer_str, sizeof(layer_str), "Qwerty");
break; break;
@ -171,11 +164,6 @@ bool oled_task_user(void) {
case _DVORAK: case _DVORAK:
snprintf(layer_str, sizeof(layer_str), "Dvorak"); snprintf(layer_str, sizeof(layer_str), "Dvorak");
break; break;
default:
snprintf(layer_str, sizeof(layer_str), "Undef-%d", default_layer);
break;
}
break;
case _RAISE: case _RAISE:
snprintf(layer_str, sizeof(layer_str), "Raise"); snprintf(layer_str, sizeof(layer_str), "Raise");
break; break;
@ -207,22 +195,5 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
set_keylog(keycode); set_keylog(keycode);
} }
#endif #endif
switch (keycode) {
case QWERTY:
if (record->event.pressed) {
set_single_persistent_default_layer(_QWERTY);
}
break;
case COLEMAK:
if (record->event.pressed) {
set_single_persistent_default_layer(_COLEMAK);
}
break;
case DVORAK:
if (record->event.pressed) {
set_single_persistent_default_layer(_DVORAK);
}
break;
}
return true; return true;
} }

View File

@ -0,0 +1,362 @@
{
"keyboard_name": "GK104 Q1_ANSI_1.0.0",
"rgb_matrix": {
"layout": [
{"matrix": [0, 0],"x": 0, "y": 0, "flags": 4},
{"matrix": [0, 1], "x": 21, "y": 0, "flags": 4},
{"matrix": [0, 2], "x": 31, "y": 0, "flags": 4},
{"matrix": [0, 3], "x": 41, "y": 0, "flags": 4},
{"matrix": [0, 4], "x": 52, "y": 0, "flags": 4},
{"matrix": [0, 5], "x": 67, "y": 0, "flags": 4},
{"matrix": [0, 6], "x": 77, "y": 0, "flags": 4},
{"matrix": [0, 7], "x": 88, "y": 0, "flags": 4},
{"matrix": [6, 7], "x": 98, "y": 0, "flags": 4},
{"matrix": [0, 8], "x": 113, "y": 0, "flags": 4},
{"matrix": [0, 9], "x": 124, "y": 0, "flags": 4},
{"matrix": [0, 10], "x": 134, "y": 0, "flags": 4},
{"matrix": [6, 10], "x": 144, "y": 0, "flags": 4},
{"matrix": [0, 11], "x": 157, "y": 0, "flags": 4},
{"matrix": [0, 12], "x": 167, "y": 0, "flags": 4},
{"matrix": [6, 12], "x": 178, "y": 0, "flags": 4},
{"matrix": [1, 0], "x": 0, "y": 18, "flags": 4},
{"matrix": [1, 1], "x": 10, "y": 18, "flags": 4},
{"matrix": [1, 2], "x": 21, "y": 18, "flags": 4},
{"matrix": [6, 2], "x": 31, "y": 18, "flags": 4},
{"matrix": [1, 3], "x": 41, "y": 18, "flags": 4},
{"matrix": [1, 4], "x": 52, "y": 18, "flags": 4},
{"matrix": [1, 5], "x": 62, "y": 18, "flags": 4},
{"matrix": [1, 6], "x": 72, "y": 18, "flags": 4},
{"matrix": [6, 6], "x": 82, "y": 18, "flags": 4},
{"matrix": [1, 7], "x": 93, "y": 18, "flags": 4},
{"matrix": [1, 8], "x": 103, "y": 18, "flags": 4},
{"matrix": [6, 8], "x": 113, "y": 18, "flags": 4},
{"matrix": [1, 9], "x": 124, "y": 18, "flags": 4},
{"matrix": [1, 10], "x": 143, "y": 18, "flags": 4},
{"matrix": [1, 11], "x": 157, "y": 18, "flags": 4},
{"matrix": [1, 12], "x": 167, "y": 18, "flags": 4},
{"matrix": [3, 12], "x": 178, "y": 18, "flags": 4},
{"matrix": [1, 13], "x": 193, "y": 18, "flags": 4},
{"matrix": [1, 14], "x": 203, "y": 18, "flags": 4},
{"matrix": [4, 14], "x": 214, "y": 18, "flags": 4},
{"matrix": [1, 15], "x": 224, "y": 18, "flags": 4},
{"matrix": [2, 0], "x": 3, "y": 29, "flags": 4},
{"matrix": [2, 1], "x": 15, "y": 29, "flags": 4},
{"matrix": [2, 2], "x": 26, "y": 29, "flags": 4},
{"matrix": [5, 2], "x": 36, "y": 29, "flags": 4},
{"matrix": [2, 3], "x": 46, "y": 29, "flags": 4},
{"matrix": [2, 4], "x": 57, "y": 29, "flags": 4},
{"matrix": [2, 5], "x": 67, "y": 29, "flags": 4},
{"matrix": [2, 6], "x": 77, "y": 29, "flags": 4},
{"matrix": [5, 6], "x": 88, "y": 29, "flags": 4},
{"matrix": [2, 7], "x": 98, "y": 29, "flags": 4},
{"matrix": [2, 8], "x": 108, "y": 29, "flags": 4},
{"matrix": [2, 9], "x": 118, "y": 29, "flags": 4},
{"matrix": [6, 9], "x": 129, "y": 29, "flags": 4},
{"matrix": [2, 10], "x": 142, "y": 29, "flags": 4},
{"matrix": [2, 11], "x": 157, "y": 29, "flags": 4},
{"matrix": [3, 11], "x": 167, "y": 29, "flags": 4},
{"matrix": [2, 12], "x": 178, "y": 29, "flags": 4},
{"matrix": [2, 13], "x": 193, "y": 29, "flags": 4},
{"matrix": [2, 14], "x": 203, "y": 29, "flags": 4},
{"matrix": [5, 14], "x": 214, "y": 29, "flags": 4},
{"matrix": [2, 15], "x": 224, "y": 34, "flags": 4},
{"matrix": [3, 0], "x": 5, "y": 41, "flags": 4},
{"matrix": [3, 1], "x": 18, "y": 41, "flags": 4},
{"matrix": [3, 2], "x": 28, "y": 41, "flags": 4},
{"matrix": [4, 2], "x": 39, "y": 41, "flags": 4},
{"matrix": [3, 3], "x": 49, "y": 41, "flags": 4},
{"matrix": [3, 4], "x": 59, "y": 41, "flags": 4},
{"matrix": [3, 5], "x": 70, "y": 41, "flags": 4},
{"matrix": [6, 5], "x": 80, "y": 41, "flags": 4},
{"matrix": [3, 6], "x": 90, "y": 41, "flags": 4},
{"matrix": [3, 7], "x": 100, "y": 41, "flags": 4},
{"matrix": [3, 8], "x": 111, "y": 41, "flags": 4},
{"matrix": [3, 9], "x": 121, "y": 41, "flags": 4},
{"matrix": [3, 10], "x": 131, "y": 41, "flags": 4},
{"matrix": [3, 13], "x": 193, "y": 41, "flags": 4},
{"matrix": [3, 14], "x": 203, "y": 41, "flags": 4},
{"matrix": [3, 15], "x": 214, "y": 41, "flags": 4},
{"matrix": [4, 0], "x": 10, "y": 52, "flags": 4},
{"matrix": [4, 1], "x": 23, "y": 52, "flags": 4},
{"matrix": [6, 1], "x": 34, "y": 52, "flags": 4},
{"matrix": [4, 3], "x": 44, "y": 52, "flags": 4},
{"matrix": [6, 3], "x": 54, "y": 52, "flags": 4},
{"matrix": [4, 4], "x": 64, "y": 52, "flags": 4},
{"matrix": [6, 4], "x": 75, "y": 52, "flags": 4},
{"matrix": [4, 5], "x": 85, "y": 52, "flags": 4},
{"matrix": [4, 6], "x": 95, "y": 52, "flags": 4},
{"matrix": [4, 7], "x": 106, "y": 52, "flags": 4},
{"matrix": [4, 8], "x": 116, "y": 52, "flags": 4},
{"matrix": [4, 10], "x": 136, "y": 52, "flags": 4},
{"matrix": [4, 11], "x": 168, "y": 52, "flags": 4},
{"matrix": [4, 13], "x": 193, "y": 52, "flags": 4},
{"matrix": [6, 13], "x": 203, "y": 52, "flags": 4},
{"matrix": [4, 15], "x": 214, "y": 52, "flags": 4},
{"matrix": [6, 15], "x": 224, "y": 57, "flags": 4},
{"matrix": [5, 0], "x": 0, "y": 64, "flags": 4},
{"matrix": [6, 0], "x": 13, "y": 64, "flags": 4},
{"matrix": [5, 1], "x": 26, "y": 64, "flags": 4},
{"matrix": [5, 3], "x": 54, "y": 64, "flags": 4},
{"matrix": [5, 4], "x": 72, "y": 64, "flags": 4},
{"matrix": [5, 5], "x": 87, "y": 64, "flags": 4},
{"matrix": [5, 7], "x": 103, "y": 64, "flags": 4},
{"matrix": [5, 8], "x": 116, "y": 64, "flags": 4},
{"matrix": [5, 9], "x": 129, "y": 64, "flags": 4},
{"matrix": [5, 10], "x": 142, "y": 64, "flags": 4},
{"matrix": [5, 11], "x": 157, "y": 64, "flags": 4},
{"matrix": [6, 11], "x": 167, "y": 64, "flags": 4},
{"matrix": [4, 12], "x": 178, "y": 64, "flags": 4},
{"matrix": [5, 13], "x": 198, "y": 64, "flags": 4},
{"matrix": [5, 15], "x": 214, "y": 64, "flags": 4}
]
},
"usb": {
"device_version": "1.0.0",
"pid": "0x6104"
},
"layouts": {
"LAYOUT_all": {
"layout": [
{"label": "ESC", "matrix": [0, 0], "x": 0, "y": 0},
{"label": "F1", "matrix": [0, 1], "x": 2, "y": 0},
{"label": "F2", "matrix": [0, 2], "x": 3, "y": 0},
{"label": "F3", "matrix": [0, 3], "x": 4, "y": 0},
{"label": "F4", "matrix": [0, 4], "x": 5, "y": 0},
{"label": "F5", "matrix": [0, 5], "x": 6.5, "y": 0},
{"label": "F6", "matrix": [0, 6], "x": 7.5, "y": 0},
{"label": "F7", "matrix": [0, 7], "x": 8.5, "y": 0},
{"label": "F8", "matrix": [6, 7], "x": 9.5, "y": 0},
{"label": "F9", "matrix": [0, 8], "x": 11, "y": 0},
{"label": "F10", "matrix": [0, 9], "x": 12, "y": 0},
{"label": "F11", "matrix": [0, 10], "x": 13, "y": 0},
{"label": "F12", "matrix": [6, 10], "x": 14, "y": 0},
{"label": "PrtSc", "matrix": [0, 11], "x": 15.25, "y": 0},
{"label": "ScrLK", "matrix": [0, 12], "x": 16.25, "y": 0},
{"label": "Pause", "matrix": [6, 12], "x": 17.25, "y": 0},
{"label": "En1", "matrix": [0, 14], "x": 20.75, "y": 0},
{"label": "En2", "matrix": [0, 15], "x": 21.75, "y": 0},
{"label": "~", "matrix": [1, 0], "x": 0, "y": 1.5},
{"label": "1", "matrix": [1, 1], "x": 1, "y": 1.5},
{"label": "2", "matrix": [1, 2], "x": 2, "y": 1.5},
{"label": "3", "matrix": [6, 2], "x": 3, "y": 1.5},
{"label": "4", "matrix": [1, 3], "x": 4, "y": 1.5},
{"label": "5", "matrix": [1, 4], "x": 5, "y": 1.5},
{"label": "6", "matrix": [1, 5], "x": 6, "y": 1.5},
{"label": "7", "matrix": [1, 6], "x": 7, "y": 1.5},
{"label": "8", "matrix": [6, 6], "x": 8, "y": 1.5},
{"label": "9", "matrix": [1, 7], "x": 9, "y": 1.5},
{"label": "0", "matrix": [1, 8], "x": 10, "y": 1.5},
{"label": "-_", "matrix": [6, 8], "x": 11, "y": 1.5},
{"label": "=+", "matrix": [1, 9], "x": 12, "y": 1.5},
{"label": "BS", "matrix": [1, 10], "x": 13, "y": 1.5, "w": 2},
{"label": "INS", "matrix": [1, 11], "x": 15.25, "y": 1.5},
{"label": "HOME", "matrix": [1, 12], "x": 16.25, "y": 1.5},
{"label": "PgUp", "matrix": [3, 12], "x": 17.25, "y": 1.5},
{"label": "NumLk", "matrix": [1, 13], "x": 18.75, "y": 1.5},
{"label": "P/", "matrix": [1, 14], "x": 19.75, "y": 1.5},
{"label": "P*", "matrix": [4, 14], "x": 20.75, "y": 1.5},
{"label": "P-", "matrix": [1, 15], "x": 21.75, "y": 1.5},
{"label": "Tab", "matrix": [2, 0], "x": 0, "y": 2.5, "w": 1.5},
{"label": "Q", "matrix": [2, 1], "x": 1.5, "y": 2.5},
{"label": "W", "matrix": [2, 2], "x": 2.5, "y": 2.5},
{"label": "E", "matrix": [5, 2], "x": 3.5, "y": 2.5},
{"label": "R", "matrix": [2, 3], "x": 4.5, "y": 2.5},
{"label": "T", "matrix": [2, 4], "x": 5.5, "y": 2.5},
{"label": "Y", "matrix": [2, 5], "x": 6.5, "y": 2.5},
{"label": "U", "matrix": [2, 6], "x": 7.5, "y": 2.5},
{"label": "I", "matrix": [5, 6], "x": 8.5, "y": 2.5},
{"label": "O", "matrix": [2, 7], "x": 9.5, "y": 2.5},
{"label": "P", "matrix": [2, 8], "x": 10.5, "y": 2.5},
{"label": "[", "matrix": [2, 9], "x": 11.5, "y": 2.5},
{"label": "]", "matrix": [6, 9], "x": 12.5, "y": 2.5},
{"label": "|", "matrix": [2, 10], "x": 13.5, "y": 2.5, "w": 1.5},
{"label": "DEL", "matrix": [2, 11], "x": 15.25, "y": 2.5},
{"label": "END", "matrix": [3, 11], "x": 16.25, "y": 2.5},
{"label": "PgDn", "matrix": [2, 12], "x": 17.25, "y": 2.5},
{"label": "P7", "matrix": [2, 13], "x": 18.75, "y": 2.5},
{"label": "P8", "matrix": [2, 14], "x": 19.75, "y": 2.5},
{"label": "P9", "matrix": [5, 14], "x": 20.75, "y": 2.5},
{"label": "P+", "matrix": [2, 15], "x": 21.75, "y": 2.5, "h": 2.0},
{"label": "Cap", "matrix": [3, 0], "x": 0, "y": 3.5, "w": 1.75},
{"label": "A", "matrix": [3, 1], "x": 1.75, "y": 3.5},
{"label": "S", "matrix": [3, 2], "x": 2.75, "y": 3.5},
{"label": "D", "matrix": [4, 2], "x": 3.75, "y": 3.5},
{"label": "F", "matrix": [3, 3], "x": 4.75, "y": 3.5},
{"label": "G", "matrix": [3, 4], "x": 5.75, "y": 3.5},
{"label": "H", "matrix": [3, 5], "x": 6.75, "y": 3.5},
{"label": "J", "matrix": [6, 5], "x": 7.75, "y": 3.5},
{"label": "K", "matrix": [3, 6], "x": 8.75, "y": 3.5},
{"label": "L", "matrix": [3, 7], "x": 9.75, "y": 3.5},
{"label": ";", "matrix": [3, 8], "x": 10.75, "y": 3.5},
{"label": "'", "matrix": [3, 9], "x": 11.75, "y": 3.5},
{"label": "Ent", "matrix": [3, 10], "x": 12.75, "y": 3.5, "w": 2.25},
{"label": "P4", "matrix": [3, 13], "x": 18.75, "y": 3.5},
{"label": "P5", "matrix": [3, 14], "x": 19.75, "y": 3.5},
{"label": "P6", "matrix": [3, 15], "x": 20.75, "y": 3.5},
{"label": "Shift", "matrix": [4, 0], "x": 0, "y": 4.5, "w": 2.25},
{"label": "Z", "matrix": [4, 1], "x": 2.25, "y": 4.5},
{"label": "X", "matrix": [6, 1], "x": 3.25, "y": 4.5},
{"label": "C", "matrix": [4, 3], "x": 4.25, "y": 4.5},
{"label": "V", "matrix": [6, 3], "x": 5.25, "y": 4.5},
{"label": "B", "matrix": [4, 4], "x": 6.25, "y": 4.5},
{"label": "N", "matrix": [6, 4], "x": 7.25, "y": 4.5},
{"label": "M", "matrix": [4, 5], "x": 8.25, "y": 4.5},
{"label": ",", "matrix": [4, 6], "x": 9.25, "y": 4.5},
{"label": ".", "matrix": [4, 7], "x": 10.25, "y": 4.5},
{"label": "?", "matrix": [4, 8], "x": 11.25, "y": 4.5},
{"label": "Shift", "matrix": [4, 10], "x": 12.25, "y": 4.5, "w": 2.75},
{"label": "Up", "matrix": [4, 11], "x": 16.25, "y": 4.5},
{"label": "P1", "matrix": [4, 13], "x": 18.75, "y": 4.5},
{"label": "P2", "matrix": [6, 13], "x": 19.75, "y": 4.5},
{"label": "P3", "matrix": [4, 15], "x": 20.75, "y": 4.5},
{"label": "PENT", "matrix": [6, 15], "x": 21.75, "y": 4.5, "h": 2.0},
{"label": "Ctrl", "matrix": [5, 0], "x": 0, "y": 5.5, "w": 1.25},
{"label": "Com", "matrix": [6, 0], "x": 1.25, "y": 5.5, "w": 1.25},
{"label": "Alt", "matrix": [5, 1], "x": 2.5, "y": 5.5, "w": 1.25},
{"label": "SPAC1", "matrix": [5, 3], "x": 3.75, "y": 5.5, "w": 3.125, "h": 0.5},
{"label": "SPAC", "matrix": [5, 4], "x": 3.75, "y": 6, "w": 6.25, "h":0.5},
{"label": "SPAC2", "matrix": [5, 5], "x": 6.875, "y": 5.5, "w": 3.125, "h":0.5},
{"label": "Alt", "matrix": [5, 7], "x": 10, "y": 5.5, "w": 1.25},
{"label": "Fn", "matrix": [5, 8], "x": 11.25, "y": 5.5, "w": 1.25},
{"label": "Menu", "matrix": [5, 9], "x": 12.5, "y": 5.5, "w": 1.25},
{"label": "Ctrl", "matrix": [5, 10], "x": 13.75, "y": 5.5, "w": 1.25},
{"label": "Left", "matrix": [5, 11], "x": 15.25, "y": 5.5},
{"label": "Down", "matrix": [6, 11], "x": 16.25, "y": 5.5},
{"label": "Right", "matrix": [4, 12], "x": 17.25, "y": 5.5},
{"label": "P0", "matrix": [5, 13], "x": 18.75, "y": 5.5, "w": 2},
{"label": "PDOT", "matrix": [5, 15], "x": 20.75, "y": 5.5}
]
},
"LAYOUT_104_ansi_split_space": {
"layout": [
{"label": "ESC", "matrix": [0, 0], "x": 0, "y": 0},
{"label": "F1", "matrix": [0, 1], "x": 2, "y": 0},
{"label": "F2", "matrix": [0, 2], "x": 3, "y": 0},
{"label": "F3", "matrix": [0, 3], "x": 4, "y": 0},
{"label": "F4", "matrix": [0, 4], "x": 5, "y": 0},
{"label": "F5", "matrix": [0, 5], "x": 6.5, "y": 0},
{"label": "F6", "matrix": [0, 6], "x": 7.5, "y": 0},
{"label": "F7", "matrix": [0, 7], "x": 8.5, "y": 0},
{"label": "F8", "matrix": [6, 7], "x": 9.5, "y": 0},
{"label": "F9", "matrix": [0, 8], "x": 11, "y": 0},
{"label": "F10", "matrix": [0, 9], "x": 12, "y": 0},
{"label": "F11", "matrix": [0, 10], "x": 13, "y": 0},
{"label": "F12", "matrix": [6, 10], "x": 14, "y": 0},
{"label": "PrtSc", "matrix": [0, 11], "x": 15.25, "y": 0},
{"label": "ScrLK", "matrix": [0, 12], "x": 16.25, "y": 0},
{"label": "Pause", "matrix": [6, 12], "x": 17.25, "y": 0},
{"label": "En1", "matrix": [0, 14], "x": 20.75, "y": 0},
{"label": "En2", "matrix": [0, 15], "x": 21.75, "y": 0},
{"label": "~", "matrix": [1, 0], "x": 0, "y": 1.5},
{"label": "1", "matrix": [1, 1], "x": 1, "y": 1.5},
{"label": "2", "matrix": [1, 2], "x": 2, "y": 1.5},
{"label": "3", "matrix": [6, 2], "x": 3, "y": 1.5},
{"label": "4", "matrix": [1, 3], "x": 4, "y": 1.5},
{"label": "5", "matrix": [1, 4], "x": 5, "y": 1.5},
{"label": "6", "matrix": [1, 5], "x": 6, "y": 1.5},
{"label": "7", "matrix": [1, 6], "x": 7, "y": 1.5},
{"label": "8", "matrix": [6, 6], "x": 8, "y": 1.5},
{"label": "9", "matrix": [1, 7], "x": 9, "y": 1.5},
{"label": "0", "matrix": [1, 8], "x": 10, "y": 1.5},
{"label": "-_", "matrix": [6, 8], "x": 11, "y": 1.5},
{"label": "=+", "matrix": [1, 9], "x": 12, "y": 1.5},
{"label": "BS", "matrix": [1, 10], "x": 13, "y": 1.5, "w": 2},
{"label": "INS", "matrix": [1, 11], "x": 15.25, "y": 1.5},
{"label": "HOME", "matrix": [1, 12], "x": 16.25, "y": 1.5},
{"label": "PgUp", "matrix": [3, 12], "x": 17.25, "y": 1.5},
{"label": "NumLk", "matrix": [1, 13], "x": 18.75, "y": 1.5},
{"label": "P/", "matrix": [1, 14], "x": 19.75, "y": 1.5},
{"label": "P*", "matrix": [4, 14], "x": 20.75, "y": 1.5},
{"label": "P-", "matrix": [1, 15], "x": 21.75, "y": 1.5},
{"label": "Tab", "matrix": [2, 0], "x": 0, "y": 2.5, "w": 1.5},
{"label": "Q", "matrix": [2, 1], "x": 1.5, "y": 2.5},
{"label": "W", "matrix": [2, 2], "x": 2.5, "y": 2.5},
{"label": "E", "matrix": [5, 2], "x": 3.5, "y": 2.5},
{"label": "R", "matrix": [2, 3], "x": 4.5, "y": 2.5},
{"label": "T", "matrix": [2, 4], "x": 5.5, "y": 2.5},
{"label": "Y", "matrix": [2, 5], "x": 6.5, "y": 2.5},
{"label": "U", "matrix": [2, 6], "x": 7.5, "y": 2.5},
{"label": "I", "matrix": [5, 6], "x": 8.5, "y": 2.5},
{"label": "O", "matrix": [2, 7], "x": 9.5, "y": 2.5},
{"label": "P", "matrix": [2, 8], "x": 10.5, "y": 2.5},
{"label": "[", "matrix": [2, 9], "x": 11.5, "y": 2.5},
{"label": "]", "matrix": [6, 9], "x": 12.5, "y": 2.5},
{"label": "|", "matrix": [2, 10], "x": 13.5, "y": 2.5, "w": 1.5},
{"label": "DEL", "matrix": [2, 11], "x": 15.25, "y": 2.5},
{"label": "END", "matrix": [3, 11], "x": 16.25, "y": 2.5},
{"label": "PgDn", "matrix": [2, 12], "x": 17.25, "y": 2.5},
{"label": "P7", "matrix": [2, 13], "x": 18.75, "y": 2.5},
{"label": "P8", "matrix": [2, 14], "x": 19.75, "y": 2.5},
{"label": "P9", "matrix": [5, 14], "x": 20.75, "y": 2.5},
{"label": "P+", "matrix": [2, 15], "x": 21.75, "y": 2.5, "h": 2.0},
{"label": "Cap", "matrix": [3, 0], "x": 0, "y": 3.5, "w": 1.75},
{"label": "A", "matrix": [3, 1], "x": 1.75, "y": 3.5},
{"label": "S", "matrix": [3, 2], "x": 2.75, "y": 3.5},
{"label": "D", "matrix": [4, 2], "x": 3.75, "y": 3.5},
{"label": "F", "matrix": [3, 3], "x": 4.75, "y": 3.5},
{"label": "G", "matrix": [3, 4], "x": 5.75, "y": 3.5},
{"label": "H", "matrix": [3, 5], "x": 6.75, "y": 3.5},
{"label": "J", "matrix": [6, 5], "x": 7.75, "y": 3.5},
{"label": "K", "matrix": [3, 6], "x": 8.75, "y": 3.5},
{"label": "L", "matrix": [3, 7], "x": 9.75, "y": 3.5},
{"label": ";", "matrix": [3, 8], "x": 10.75, "y": 3.5},
{"label": "'", "matrix": [3, 9], "x": 11.75, "y": 3.5},
{"label": "Ent", "matrix": [3, 10], "x": 12.75, "y": 3.5, "w": 2.25},
{"label": "P4", "matrix": [3, 13], "x": 18.75, "y": 3.5},
{"label": "P5", "matrix": [3, 14], "x": 19.75, "y": 3.5},
{"label": "P6", "matrix": [3, 15], "x": 20.75, "y": 3.5},
{"label": "Shift", "matrix": [4, 0], "x": 0, "y": 4.5, "w": 2.25},
{"label": "Z", "matrix": [4, 1], "x": 2.25, "y": 4.5},
{"label": "X", "matrix": [6, 1], "x": 3.25, "y": 4.5},
{"label": "C", "matrix": [4, 3], "x": 4.25, "y": 4.5},
{"label": "V", "matrix": [6, 3], "x": 5.25, "y": 4.5},
{"label": "B", "matrix": [4, 4], "x": 6.25, "y": 4.5},
{"label": "N", "matrix": [6, 4], "x": 7.25, "y": 4.5},
{"label": "M", "matrix": [4, 5], "x": 8.25, "y": 4.5},
{"label": ",", "matrix": [4, 6], "x": 9.25, "y": 4.5},
{"label": ".", "matrix": [4, 7], "x": 10.25, "y": 4.5},
{"label": "?", "matrix": [4, 8], "x": 11.25, "y": 4.5},
{"label": "Shift", "matrix": [4, 10], "x": 12.25, "y": 4.5, "w": 2.75},
{"label": "Up", "matrix": [4, 11], "x": 16.25, "y": 4.5},
{"label": "P1", "matrix": [4, 13], "x": 18.75, "y": 4.5},
{"label": "P2", "matrix": [6, 13], "x": 19.75, "y": 4.5},
{"label": "P3", "matrix": [4, 15], "x": 20.75, "y": 4.5},
{"label": "PENT", "matrix": [6, 15], "x": 21.75, "y": 4.5, "h": 2.0},
{"label": "Ctrl", "matrix": [5, 0], "x": 0, "y": 5.5, "w": 1.25},
{"label": "Com", "matrix": [6, 0], "x": 1.25, "y": 5.5, "w": 1.25},
{"label": "Alt", "matrix": [5, 1], "x": 2.5, "y": 5.5, "w": 1.25},
{"label": "SPAC1", "matrix": [5, 3], "x": 3.75, "y": 5.5, "w": 3.125},
{"label": "SPAC2", "matrix": [5, 5], "x": 6.875, "y": 5.5, "w": 3.125},
{"label": "Alt", "matrix": [5, 7], "x": 10, "y": 5.5, "w": 1.25},
{"label": "Fn", "matrix": [5, 8], "x": 11.25, "y": 5.5, "w": 1.25},
{"label": "Menu", "matrix": [5, 9], "x": 12.5, "y": 5.5, "w": 1.25},
{"label": "Ctrl", "matrix": [5, 10], "x": 13.75, "y": 5.5, "w": 1.25},
{"label": "Left", "matrix": [5, 11], "x": 15.25, "y": 5.5},
{"label": "Down", "matrix": [6, 11], "x": 16.25, "y": 5.5},
{"label": "Right", "matrix": [4, 12], "x": 17.25, "y": 5.5},
{"label": "P0", "matrix": [5, 13], "x": 18.75, "y": 5.5, "w": 2},
{"label": "PDOT", "matrix": [5, 15], "x": 20.75, "y": 5.5}
]
}
}
}

View File

@ -0,0 +1,89 @@
// Copyright 2023 NaturalZh (@NaturalZh)
// SPDX-License-Identifier: GPL-2.0-or-later
#include QMK_KEYBOARD_H
enum layer_names {
_WIN,
_MAC,
_WIN_INDEX,
_MAC_INDEX
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_WIN] = LAYOUT_all(
KC_ESC, 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_PSCR, KC_SCRL, KC_PAUS, KC_MUTE, RGB_TOG,
KC_GRV, 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_INS, KC_HOME, KC_PGUP, KC_NUM, KC_PSLS, KC_PAST, KC_PMNS,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(_WIN_INDEX), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT
),
[_MAC] = LAYOUT_all(
KC_ESC, KC_F14, KC_F15, C(KC_UP), G(KC_D), G(KC_SPC), LAG(KC_EJCT), KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_PSCR, KC_SCRL, KC_PAUS, KC_MUTE, RGB_TOG,
KC_GRV, 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_INS, KC_HOME, KC_PGUP, KC_NUM, KC_PSLS, KC_PAST, KC_PMNS,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT,
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_SPC, KC_RCMD, MO(_MAC_INDEX), KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT
),
[_WIN_INDEX] = LAYOUT_all(
_______, KC_F14, KC_F15, G(KC_TAB), KC_WSCH, G(C(KC_S)), KC_SLEP, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, G(KC_SPC), RCS(KC_SPC), G(RCS(KC_4)), KC_MUTE, RGB_TOG,
_______, _______, _______, _______, _______, _______, DF(_WIN), DF(_MAC), _______, _______, RGB_TOG, RGB_RMOD, RGB_MOD, KC_DEL, KC_INS, KC_HOME, KC_PGUP, KC_NUM, KC_PSLS, KC_PAST, KC_PMNS,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_P4, KC_P5, KC_P6,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, KC_P1, KC_P2, KC_P3, KC_PENT,
KC_LCTL, KC_LGUI, KC_LALT, _______, _______, _______, KC_RALT, _______, KC_APP, _______, RGB_SPD, RGB_VAD, RGB_SPI, KC_P0, KC_PDOT
),
[_MAC_INDEX] = LAYOUT_all(
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, G(KC_SPC), RCS(KC_SPC), G(RCS(KC_4)), KC_MUTE, RGB_TOG,
_______, _______, _______, _______, _______, _______, DF(_WIN), DF(_MAC), _______, _______, RGB_TOG, RGB_RMOD, RGB_MOD, KC_DEL, KC_INS, KC_HOME, KC_PGUP, KC_NUM, KC_PSLS, KC_PAST, KC_PMNS,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_P4, KC_P5, KC_P6,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, KC_P1, KC_P2, KC_P3, KC_PENT,
KC_LCTL, KC_LALT, KC_LGUI, _______, _______, _______, KC_RCMD, _______, KC_RALT, _______, RGB_SPD, RGB_VAD, RGB_SPI, KC_P0, KC_PDOT
)
};
#if defined(ENCODER_MAP_ENABLE)
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
[_WIN] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(C(KC_MINS), C(KC_EQL))},
[_MAC] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(G(KC_MINS), G(KC_EQL))},
[_WIN_INDEX] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(C(KC_MINS), C(KC_EQL))},
[_MAC_INDEX] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(G(KC_MINS), G(KC_EQL))}
};
#endif
#if defined(DIP_SWITCH_MAP_ENABLE)
const uint16_t PROGMEM dip_switch_map[NUM_DIP_SWITCHES][NUM_DIP_STATES] = {
DIP_SWITCH_OFF_ON(DF(_WIN), DF(_MAC)),
};
#endif
bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
switch (get_highest_layer(layer_state)) {
case 2:{
RGB_MATRIX_INDICATOR_SET_COLOR(WIN_MOD_INDEX, 255, 255, 255);
if (!rgb_matrix_get_flags()) {
RGB_MATRIX_INDICATOR_SET_COLOR(MAC_MOD_INDEX, 0, 0, 0);
}
} break;
case 3:{
RGB_MATRIX_INDICATOR_SET_COLOR(MAC_MOD_INDEX, 255, 255, 255);
if (!rgb_matrix_get_flags()) {
RGB_MATRIX_INDICATOR_SET_COLOR(WIN_MOD_INDEX, 0, 0, 0);
}
} break;
default:{
if (!rgb_matrix_get_flags()) {
RGB_MATRIX_INDICATOR_SET_COLOR(WIN_MOD_INDEX, 0, 0, 0);
RGB_MATRIX_INDICATOR_SET_COLOR(MAC_MOD_INDEX, 0, 0, 0);
}
}
}
return true;
}

View File

@ -0,0 +1,2 @@
ENCODER_MAP_ENABLE = yes
DIP_SWITCH_MAP_ENABLE = yes

View File

@ -0,0 +1,34 @@
# GK104 Q1 Digital Indicator Keyboard
![GK104 Q1 PCBAS](https://i.imgur.com/EPuSVUAh.jpeg)
![GK104 Q1 keyboard](https://i.imgur.com/fuswwLph.png)
## The PCB features:
* QMK & VIA compatibility
* RGB Matrix backlight
* Mechanical switches Keyboard with LED display.
The following is the QMK Firmware for the Destop 100% keylayout - designed by Dongguan Jizhi Electronic Technology Co., Ltd
* Keyboard Maintainer: [NaturalZh](https://github.com/NaturalZh)
* Hardware Supported: DestopPCB for Skyloong keylayout 100%, STM32F103C8T6
* Hardware Availability: [Skyloong CN](http://www.skyloong.com.cn) & [Skyloong HK](https://skyloongtech.com/product-category/keyboards/qmkvia-keyboard/)
Make example for this keyboard (after setting up your build environment):
make skyloong/gk104/q1/ansi:default
Flashing example for this keyboard:
make skyloong/gk104/q1/ansi:default:flash
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
## Bootloader
Enter the bootloader in 3 ways:
* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard
* **Physical reset button**: Briefly press the button on the back of the PCB - some may have pads you must short instead
* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available

View File

@ -0,0 +1,3 @@
CUSTOM_MATRIX = lite
SRC += matrix.c
SRC += led_hc595.c

View File

@ -0,0 +1,30 @@
// Copyright 2023 JZ-Skyloong (@JZ-Skyloong)
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#define MAC_PIN C13
#define MATRIX_ROWS 7
#define MATRIX_COLS 16
#define MATRIX_ROW_PINS {A8, A9, A10, A15, B6, B7, B9}
#ifdef ENCODER_ENABLE
# define ENCODER_MAP_KEY_DELAY 10
#endif
#ifdef RGB_MATRIX_ENABLE
# define AW20216S_CS_PIN_1 B12
# define AW20216S_CS_PIN_2 B11
// Hardware enable lines may be connected to the same pin
# define AW20216S_EN_PIN B5
# define NUM_LOCK_INDEX 33
# define WIN_MOD_INDEX 22
# define MAC_MOD_INDEX 23
# define WIN_LOCK_INDEX 93
# define CAPS_LOCK_INDEX 58
# define SCR_LOCK_INDEX 14
#endif // RGB_MATRIX_ENABLE

View File

@ -0,0 +1,9 @@
// Copyright 2023 JZ-Skyloong (@JZ-Skyloong)
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#define HAL_USE_SPI TRUE
#define SPI_USE_WAIT TRUE
#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
#include_next <halconf.h>

View File

@ -0,0 +1,77 @@
{
"manufacturer": "skyloong",
"maintainer": "NaturalZh",
"bootloader": "stm32duino",
"debounce": 10,
"build": {
"debounce_type": "asym_eager_defer_pk"
},
"eeprom": {
"wear_leveling": {
"backing_size": 4096
}
},
"encoder": {
"rotary": [
{"pin_a": "A1", "pin_b": "A0"},
{"pin_a": "A3", "pin_b": "A2"}
]
},
"features": {
"bootmagic": true,
"command": true,
"console": false,
"dip_switch": true,
"encoder": true,
"extrakey": true,
"mousekey": true,
"nkro": true,
"rgb_matrix": true
},
"indicators": {
"num_lock": "C15",
"caps_lock": "C14"
},
"dip_switch":{
"pins":["A4"]
},
"processor": "STM32F103",
"rgb_matrix": {
"animations": {
"band_spiral_val": true,
"breathing": true,
"cycle_all": true,
"cycle_left_right": true,
"cycle_out_in": true,
"cycle_out_in_dual": true,
"cycle_pinwheel": true,
"cycle_spiral": true,
"cycle_up_down": true,
"digital_rain": true,
"dual_beacon": true,
"jellybean_raindrops": true,
"pixel_rain": true,
"rainbow_moving_chevron": true,
"raindrops": true,
"solid_reactive_multinexus": true,
"solid_reactive_multiwide": true,
"solid_reactive_simple": true,
"solid_splash": true,
"splash": true,
"typing_heatmap": true
},
"driver": "aw20216s",
"hue_steps": 20,
"max_brightness": 200,
"sat_steps": 20,
"speed_steps": 20,
"val_steps": 20,
"sleep": true
},
"url": "https://www.skyloong.vip",
"usb": {
"max_power": 380,
"vid": "0x1EA7"
}
}

View File

@ -0,0 +1,62 @@
// Copyright 2023 NaturalZh (@NaturalZh)
// SPDX-License-Identifier: GPL-2.0-or-later
#include "led_hc595.h"
#ifndef HC595_ST_PIN
# error hc595: no storage register clock pins defined!
#endif
#ifndef HC595_SH_PIN
# error hc595: no shift register clock pins defined!
#endif
#ifndef HC595_DS
# error hc595: no serial data input pins defined!
#endif
#define CLOCK_TIME 15
static inline void gpio_set_pin_output_write_low(pin_t pin) {
ATOMIC_BLOCK_FORCEON {
gpio_set_pin_output(pin);
gpio_write_pin_low(pin);
}
}
static inline void gpio_set_pin_output_write_high(pin_t pin) {
ATOMIC_BLOCK_FORCEON {
gpio_set_pin_output(pin);
gpio_write_pin_high(pin);
}
}
static inline void select_delay(uint16_t n) {
while (n-- > 0) {
asm volatile("nop" ::: "memory");
};
}
static inline void clockPulse(uint16_t n) {
gpio_write_pin_high(HC595_SH_PIN);
gpio_write_pin_high(HC595_ST_PIN);
select_delay(n);
gpio_write_pin_low(HC595_SH_PIN);
gpio_write_pin_low(HC595_ST_PIN);
}
void s_serial_to_parallel(uint8_t data) __attribute__((unused));
void s_serial_to_parallel(uint8_t data) { // Serial port to parallel port function
gpio_set_pin_output_write_low(HC595_DS);
gpio_set_pin_output_write_low(HC595_SH_PIN);
gpio_set_pin_output_write_low(HC595_ST_PIN);
for(uint8_t i = 0; i < 8; i++) {
if(data & 0x01){
gpio_write_pin_high(HC595_DS);
}else{
gpio_write_pin_low(HC595_DS);
}
clockPulse(CLOCK_TIME);
data >>= 1; // Move the data one digit to the right
}
}

View File

@ -0,0 +1,31 @@
// Copyright 2023 NaturalZh (@NaturalZh)
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
//#include "quantum.h"
#include "atomic_util.h"
#include "gpio.h"
#define HC595_ST_PIN B1 //74HC595 storage register clock input
#define HC595_SH_PIN B0 //74HC595 shift register clock input
#define HC595_DS B3 // 74HC595 serial data input
/*
*LED display driver.74HC595 Serial to parallel control LED field on/off.
* data(default):1-on/0-off (left low bit)
* bit0 --- NUM indicator
* bit1 --- CAPS indicator
* bit2 --- SCR indicator
* bit3 --- WinLock indicator
* bit4 --- Skyloong LOGO display
* bit5 --- Win layer indicator
* bit6 --- MAC layer indicator
*/
#define NUM_ON 0b10000000
#define CAPS_ON 0b01000000
#define SCR_ON 0b00100000
#define WINLK_ON 0b00010000
#define SKYLOONG 0b00001000
#define WIN_ON 0b00000010
#define MAC_ON 0b00000100
void s_serial_to_parallel(uint8_t data);

View File

@ -0,0 +1,153 @@
// Copyright 2023 NaturaZh (@NaturalZh)
// SPDX-License-Identifier: GPL-2.0-or-later
//Matrix read rows set col:DIODE_DIRECTION == ROW2COL
#include <string.h>
#include "atomic_util.h"
#include "debounce.h"
#define ClOCK_TIME 15
#define MATRIX_INPUT_PRESSED_STATE 0
#define HC595_ST_PIN A6
#define HC595_SH_PIN A5
#define HC595_DS_PIN A7 //定义74HC595的串口数据输入端
/* matrix state(1:on, 0:off) */
extern matrix_row_t raw_matrix[MATRIX_ROWS]; // raw values
extern matrix_row_t matrix[MATRIX_ROWS]; // debounced values
pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
// user-defined overridable functions
__attribute__((weak)) void matrix_read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col, matrix_row_t row_shifter);
static inline void select_delay(uint16_t n) {
while (n-- > 0) {
asm volatile("nop" ::: "memory");
};
}
static inline void gpio_set_pin_output_write_low(pin_t pin) {
ATOMIC_BLOCK_FORCEON {
gpio_set_pin_output(pin);
gpio_write_pin_low(pin);
}
}
static inline void gpio_set_pin_output_write_high(pin_t pin) {
ATOMIC_BLOCK_FORCEON {
gpio_set_pin_output(pin);
gpio_write_pin_high(pin);
}
}
static inline void gpio_set_pin_input_high_atomic(pin_t pin) {
ATOMIC_BLOCK_FORCEON {
gpio_set_pin_input_high(pin);
}
}
static inline uint8_t read_matrix_pin(pin_t pin) {
if (pin != NO_PIN) {
return (gpio_read_pin(pin) == MATRIX_INPUT_PRESSED_STATE) ? 0 : 1;
} else {
return 1;
}
}
static inline void clock_pulse(uint16_t n) {
gpio_write_pin_high(HC595_SH_PIN);
gpio_write_pin_high(HC595_ST_PIN);
select_delay(n);
gpio_write_pin_low(HC595_SH_PIN);
gpio_write_pin_low(HC595_ST_PIN);
}
// matrix code
static bool select_col(uint8_t col) {
gpio_set_pin_output_write_high(HC595_DS_PIN);
for (uint8_t m = 0; m <= col; m++) {
if(m == 0){
gpio_write_pin_low(HC595_DS_PIN);
}else{
gpio_write_pin_high(HC595_DS_PIN);
}
clock_pulse(ClOCK_TIME);
}
return true;
}
static void unselect_col(uint8_t col) {
uint8_t x = (MATRIX_COLS - col);
gpio_set_pin_output_write_high(HC595_DS_PIN);
for (uint8_t y = 0; y < x ; y++) {
clock_pulse(ClOCK_TIME);
}
}
static void unselect_cols(void) {
gpio_set_pin_output_write_low(HC595_SH_PIN);
gpio_set_pin_output_write_low(HC595_ST_PIN);
gpio_set_pin_output_write_high(HC595_DS_PIN);
for (uint8_t x = 0; x < MATRIX_COLS; x++) {
clock_pulse(ClOCK_TIME);
}
}
__attribute__((weak)) void matrix_init_pins(void) {
unselect_cols();
for (uint8_t x = 0; x < MATRIX_ROWS; x++) {
if (row_pins[x] != NO_PIN) {
gpio_set_pin_input_high_atomic(row_pins[x]);
}
}
}
__attribute__((weak)) void matrix_read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col, matrix_row_t row_shifter) {
bool key_pressed = false;
// Select col
if (!select_col(current_col)) { // select col
return; // skip NO_PIN col
}
matrix_output_select_delay();
// For each row...
for (uint8_t row_index = 0; row_index < MATRIX_ROWS; row_index++) {
// Check row pin state
if (read_matrix_pin(row_pins[row_index]) == 0) {
// Pin LO, set col bit
current_matrix[row_index] |= row_shifter;
key_pressed = true;
} else {
// Pin HI, clear col bit
current_matrix[row_index] &= ~row_shifter;
}
}
// Unselect col
unselect_col(current_col);
matrix_output_unselect_delay(current_col, key_pressed); // wait for all Row signals to go HIGH
}
void matrix_init_custom(void) {
matrix_init_pins();
}
bool matrix_scan_custom(matrix_row_t current_matrix[]) {
matrix_row_t temp_matrix[MATRIX_ROWS] = {0};
// Set col, read rows
matrix_row_t row_shifter = MATRIX_ROW_SHIFTER;
for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++, row_shifter <<= 1) {
matrix_read_rows_on_col(temp_matrix, current_col, row_shifter);
}
bool changed = memcmp(raw_matrix, temp_matrix, sizeof(temp_matrix)) != 0;
if (changed) memcpy(raw_matrix, temp_matrix, sizeof(temp_matrix));
return changed;
}

View File

@ -0,0 +1,12 @@
// Copyright 2023 JZ-Skyloong (@JZ-Skyloong)
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include_next <mcuconf.h>
#undef STM32_SPI_USE_SPI2
#define STM32_SPI_USE_SPI2 TRUE
#undef STM32_SPI_USE_DMA
#define STM32_SPI_USE_DMA TRUE

View File

@ -0,0 +1,294 @@
// Copyright 2023 NaturalZh (@NaturalZh)
// SPDX-License-Identifier: GPL-2.0-or-later
#include "quantum.h"
#include "led_hc595.h"
uint8_t IND = 0; //buffer of LED Display
int FN_ON = 0;
bool WIN_LOCK = 0;
#if defined(RGB_MATRIX_ENABLE) /*&& defined(CAPS_LOCK_INDEX)*/
const aw20216s_led_t PROGMEM g_aw20216s_leds[AW20216S_LED_COUNT] = {
/* Each AW20216 channel is controlled by a register at some offset between 0x00
* and 0xD7 inclusive.
* See drivers/awinic/aw20216.h for the mapping between register offsets and
* driver pin locations.
* driver
* | R location
* | | G location
* | | | B location
* | | | | */
{0, CS1_SW1, CS2_SW1, CS3_SW1}, //ESC
{0, CS1_SW3, CS2_SW3, CS3_SW3}, //F1
{0, CS1_SW4, CS2_SW4, CS3_SW4},
{0, CS1_SW5, CS2_SW5, CS3_SW5}, //F3
{0, CS1_SW6, CS2_SW6, CS3_SW6},
{0, CS1_SW7, CS2_SW7, CS3_SW7}, //F5
{0, CS1_SW8, CS2_SW8, CS3_SW8},
{0, CS1_SW9, CS2_SW9, CS3_SW9}, //F7
{0, CS1_SW10, CS2_SW10, CS3_SW10},
{0, CS1_SW11, CS2_SW11, CS3_SW11}, //F9
{0, CS1_SW12, CS2_SW12, CS3_SW12}, //F10
{0, CS10_SW2, CS11_SW2, CS12_SW2},
{0, CS10_SW3, CS11_SW3, CS12_SW3}, //F12
{0, CS10_SW4, CS11_SW4, CS12_SW4}, //PrtSc
{0, CS10_SW5, CS11_SW5, CS12_SW5}, //Scroll
{0, CS10_SW6, CS11_SW6, CS12_SW6}, //Pause
//encoder no led
//encoder no led
{0, CS4_SW1, CS5_SW1, CS6_SW1}, //`~
{0, CS4_SW2, CS5_SW2, CS6_SW2}, //1
{0, CS4_SW3, CS5_SW3, CS6_SW3}, //2
{0, CS4_SW4, CS5_SW4, CS6_SW4},
{0, CS4_SW5, CS5_SW5, CS6_SW5}, //4
{0, CS4_SW6, CS5_SW6, CS6_SW6},
{0, CS4_SW7, CS5_SW7, CS6_SW7}, //6
{0, CS4_SW8, CS5_SW8, CS6_SW8},
{0, CS4_SW9, CS5_SW9, CS6_SW9}, //8
{0, CS4_SW10, CS5_SW10, CS6_SW10},
{0, CS4_SW11, CS5_SW11, CS6_SW11}, //0
{0, CS4_SW12, CS5_SW12, CS6_SW12}, //-_
{0, CS13_SW2, CS14_SW2, CS15_SW2}, //=+
{0, CS13_SW3, CS14_SW3, CS15_SW3}, //BS
{0, CS13_SW4, CS14_SW4, CS15_SW4}, //INS
{0, CS13_SW5, CS14_SW5, CS15_SW5}, //Home
{0, CS13_SW6, CS14_SW6, CS15_SW6}, //PgUp
{0, CS13_SW7, CS14_SW7, CS15_SW7}, //NumLK
{0, CS13_SW8, CS14_SW8, CS15_SW8}, //P/
{0, CS13_SW9, CS14_SW9, CS15_SW9}, //P*
{0, CS13_SW10, CS14_SW10, CS15_SW10}, //P-
{0, CS7_SW1, CS8_SW1, CS9_SW1}, //Tab
{0, CS7_SW2, CS8_SW2, CS9_SW2}, //Q
{0, CS7_SW3, CS8_SW3, CS9_SW3}, //W
{0, CS7_SW4, CS8_SW4, CS9_SW4}, //E
{0, CS7_SW5, CS8_SW5, CS9_SW5}, //R
{0, CS7_SW6, CS8_SW6, CS9_SW6}, //T
{0, CS7_SW7, CS8_SW7, CS9_SW7}, //Y
{0, CS7_SW8, CS8_SW8, CS9_SW8}, //U
{0, CS7_SW9, CS8_SW9, CS9_SW9}, //I
{0, CS7_SW10, CS8_SW10, CS9_SW10}, //O
{0, CS7_SW11, CS8_SW11, CS9_SW11}, //P
{0, CS7_SW12, CS8_SW12, CS9_SW12}, //[
{0, CS16_SW2, CS17_SW2, CS18_SW2}, //]
{0, CS16_SW3, CS17_SW3, CS18_SW3}, //|
{0, CS16_SW4, CS17_SW4, CS18_SW4}, //DEL
{0, CS16_SW5, CS17_SW5, CS18_SW5}, //END
{0, CS16_SW6, CS17_SW6, CS18_SW6}, //PgDn
{0, CS16_SW7, CS17_SW7, CS18_SW7}, //P7
{0, CS16_SW8, CS17_SW8, CS18_SW8}, //P8
{0, CS16_SW9, CS17_SW9, CS18_SW9}, //P9
{0, CS16_SW10, CS17_SW10, CS18_SW10}, //P+
{1, CS1_SW1, CS2_SW1, CS3_SW1}, //Cap
{1, CS1_SW2, CS2_SW2, CS3_SW2}, //A
{1, CS1_SW3, CS2_SW3, CS3_SW3}, //S
{1, CS1_SW4, CS2_SW4, CS3_SW4}, //D
{1, CS1_SW5, CS2_SW5, CS3_SW5}, //F
{1, CS1_SW6, CS2_SW6, CS3_SW6}, //G
{1, CS1_SW7, CS2_SW7, CS3_SW7}, //H
{1, CS1_SW8, CS2_SW8, CS3_SW8}, //J
{1, CS1_SW9, CS2_SW9, CS3_SW9}, //K
{1, CS1_SW10, CS2_SW10, CS3_SW10}, //L
{1, CS1_SW11, CS2_SW11, CS3_SW11}, //;
{1, CS1_SW12, CS2_SW12, CS3_SW12}, //.
{1, CS10_SW2, CS11_SW2, CS12_SW2}, //Ent
{1, CS10_SW5, CS11_SW5, CS12_SW5}, //P4
{1, CS10_SW6, CS11_SW6, CS12_SW6}, //P5
{1, CS10_SW7, CS11_SW7, CS12_SW7}, //P6
{1, CS4_SW1, CS5_SW1, CS6_SW1}, //Shift
{1, CS4_SW2, CS5_SW2, CS6_SW2}, //Z
{1, CS4_SW3, CS5_SW3, CS6_SW3}, //X
{1, CS4_SW4, CS5_SW4, CS6_SW4}, //C
{1, CS4_SW5, CS5_SW5, CS6_SW5}, //V
{1, CS4_SW6, CS5_SW6, CS6_SW6}, //B
{1, CS4_SW7, CS5_SW7, CS6_SW7}, //N
{1, CS4_SW8, CS5_SW8, CS6_SW8}, //M
{1, CS4_SW9, CS5_SW9, CS6_SW9}, //,
{1, CS4_SW10, CS5_SW10, CS6_SW10}, //.
{1, CS4_SW11, CS5_SW11, CS6_SW11}, //?
{1, CS13_SW2, CS14_SW2, CS15_SW2}, //Shift
{1, CS10_SW3, CS11_SW3, CS12_SW3}, //Up
{1, CS13_SW5, CS14_SW5, CS15_SW5}, //P1
{1, CS13_SW6, CS14_SW6, CS15_SW6}, //P2
{1, CS13_SW7, CS14_SW7, CS15_SW7}, //P3
{1, CS16_SW7, CS17_SW7, CS18_SW7}, //PENT
{1, CS7_SW1, CS8_SW1, CS9_SW1}, //Ctrl
{1, CS7_SW2, CS8_SW2, CS9_SW2}, //Com
{1, CS7_SW3, CS8_SW3, CS9_SW3}, //Alt
{1, CS7_SW4, CS8_SW4, CS9_SW4}, //SPAC1
{1, CS7_SW6, CS8_SW6, CS9_SW6}, //SPAC
{1, CS7_SW8, CS8_SW8, CS9_SW8}, //SPAC2
{1, CS7_SW10, CS8_SW10, CS9_SW10}, //Alt
{1, CS7_SW11, CS8_SW11, CS9_SW11}, //Fn
{1, CS7_SW12, CS8_SW12, CS9_SW12}, //Menu
{1, CS16_SW2, CS17_SW2, CS18_SW2}, //Ctrl
{1, CS16_SW3, CS17_SW3, CS18_SW3}, //Left
{1, CS13_SW3, CS14_SW3, CS15_SW3}, //Down
{1, CS16_SW4, CS17_SW4, CS18_SW4}, //Right
{1, CS16_SW5, CS17_SW5, CS18_SW5}, //P0
{1, CS16_SW6, CS17_SW6, CS18_SW6} //PDot
};
#endif
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
if (!process_record_user(keycode, record)) {
return false;
}
switch (keycode) {
# ifdef RGB_MATRIX_ENABLE
case RGB_TOG:
if (record->event.pressed) {
switch (rgb_matrix_get_flags()) {
case LED_FLAG_ALL: {
rgb_matrix_set_flags(LED_FLAG_NONE);
rgb_matrix_set_color_all(0, 0, 0);
} break;
default: {
rgb_matrix_set_flags(LED_FLAG_ALL);
} break;
}
}
return false;
case RGB_VAI:
rgb_matrix_set_flags(LED_FLAG_ALL);
return true;
# endif
case MO(1):
if (record->event.pressed) {
FN_ON = 1;
} else {
FN_ON = 0;
}
return true;
case MO(2):
if (record->event.pressed) {
FN_ON = 1;
} else {
FN_ON = 0;
}
return true;
case MO(3):
if (record->event.pressed) {
FN_ON = 1;
} else {
FN_ON = 0;
}
return true;
case KC_LGUI:
if (FN_ON){
if ( record->event.pressed){
WIN_LOCK = !WIN_LOCK ; //change win lock state
}
if (!WIN_LOCK) {
IND = IND & (~WINLK_ON); //Close win lock display
s_serial_to_parallel(IND);
return false; //windows key locked do nothing
}
s_serial_to_parallel(IND);
}
if (WIN_LOCK) {
IND = IND | WINLK_ON; //Open win lock display
s_serial_to_parallel(IND);
return false; //windows key locked do nothing
}
return true; // continue all further processing of this key
case DF(0):
set_single_persistent_default_layer(0);
return true;
case DF(1):
set_single_persistent_default_layer(1);
return true;
default:
return true;
}
s_serial_to_parallel(IND);
}
void suspend_power_down_kb() {
gpio_write_pin_low(MAC_PIN);
s_serial_to_parallel(0);
suspend_power_down_user();
}
void suspend_wakeup_init_kb() {
s_serial_to_parallel(IND);
suspend_wakeup_init_user();
}
bool shutdown_kb(bool jump_to_bootloader) {
s_serial_to_parallel(0);
return true;
}
layer_state_t default_layer_state_set_kb(layer_state_t state) {
switch (get_highest_layer(state)) {
case 0:
gpio_write_pin_low(MAC_PIN);
//switch to win layer display
IND = IND & (~MAC_ON);
IND = IND | WIN_ON;
break;
case 1:
gpio_write_pin_high(MAC_PIN);
//switch to mac layer display
IND = IND & (~WIN_ON);
IND = IND | MAC_ON;
break;
}
s_serial_to_parallel(IND);
return state;
}
bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) {
if (!rgb_matrix_indicators_advanced_user(led_min, led_max)) {
return false;
}
//caps lock display
if (host_keyboard_led_state().caps_lock) {
IND = IND | CAPS_ON;
} else {
IND = IND & (~CAPS_ON);
}
//number lock display
if (host_keyboard_led_state().num_lock) {
IND = IND | NUM_ON;
} else {
IND = IND & (~NUM_ON);
}
//scroll lock display
if (host_keyboard_led_state().scroll_lock) {
IND = IND | SCR_ON;
} else {
IND = IND & (~SCR_ON);
}
s_serial_to_parallel(IND);
return true;
}
void board_init(void) {
// JTAG-DP Disabled and SW-DP Disabled
AFIO->MAPR = (AFIO->MAPR & ~AFIO_MAPR_SWJ_CFG_Msk) | AFIO_MAPR_SWJ_CFG_DISABLE;
gpio_set_pin_output(MAC_PIN);
gpio_write_pin_high(MAC_PIN);
s_serial_to_parallel(0xFF);
IND = SKYLOONG;
}

View File

@ -12,14 +12,15 @@ enum sofle_layers {
}; };
enum custom_keycodes { enum custom_keycodes {
KC_QWERTY = QK_USER, KC_PRVWD = QK_USER,
KC_COLEMAK,
KC_PRVWD,
KC_NXTWD, KC_NXTWD,
KC_LSTRT, KC_LSTRT,
KC_LEND KC_LEND
}; };
#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 * QWERTY
@ -134,16 +135,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 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_PRVWD: case KC_PRVWD:
if (record->event.pressed) { if (record->event.pressed) {
if (keymap_config.swap_lctl_lgui) { if (keymap_config.swap_lctl_lgui) {

View File

@ -76,15 +76,16 @@ enum sofle_layers {
}; };
enum custom_keycodes { enum custom_keycodes {
KC_QWERTY = SAFE_RANGE, KC_LOWER = SAFE_RANGE,
KC_COLEMAK,
KC_COLEMAKDH,
KC_LOWER,
KC_RAISE, KC_RAISE,
KC_ADJUST, KC_ADJUST,
KC_D_MUTE KC_D_MUTE
}; };
#define KC_QWERTY PDF(_QWERTY)
#define KC_COLEMAK PDF(_COLEMAK)
#define KC_COLEMAKDH PDF(_COLEMAKDH)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* /*
* QWERTY * QWERTY
@ -478,21 +479,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_COLEMAKDH:
if (record->event.pressed) {
set_single_persistent_default_layer(_COLEMAKDH);
}
return false;
case KC_LOWER: case KC_LOWER:
if (record->event.pressed) { if (record->event.pressed) {
layer_on(_LOWER); layer_on(_LOWER);

View File

@ -14,14 +14,15 @@ enum layer_names {
}; };
enum subatomic_keycodes { enum subatomic_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
@ -154,24 +155,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

@ -18,11 +18,9 @@
#define L_CURBR LSFT(KC_LBRC) #define L_CURBR LSFT(KC_LBRC)
#define R_CURBR LSFT(KC_RBRC) #define R_CURBR LSFT(KC_RBRC)
enum custom_keycodes { #define QWERTY PDF(_QW)
DVORAK = SAFE_RANGE, #define COLEMAK PDF(_CM)
QWERTY, #define DVORAK PDF(_DV)
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 */
@ -62,26 +60,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

@ -26,9 +26,7 @@ enum grandiceps_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,
@ -39,7 +37,8 @@ enum custom_keycodes {
KC_TEAMS KC_TEAMS
}; };
#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] = {
/* /*
@ -154,19 +153,7 @@ 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 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

@ -10,14 +10,15 @@ enum layer_names {
}; };
enum custom_keycodes { enum custom_keycodes {
QWERTY = SAFE_RANGE, LOWER = SAFE_RANGE,
COLEMAK,
DVORAK,
LOWER,
RAISE, RAISE,
ADJUST 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
@ -134,24 +135,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

@ -24,8 +24,7 @@ enum waldo_layers {
}; };
enum waldo_keycodes { enum waldo_keycodes {
QWERTY = SAFE_RANGE, BACKLIT = SAFE_RANGE,
BACKLIT
}; };
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
@ -78,12 +77,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 BACKLIT: case BACKLIT:
if (record->event.pressed) { if (record->event.pressed) {
#ifdef BACKLIGHT_ENABLE #ifdef BACKLIGHT_ENABLE

6
tests/mousekeys/config.h Normal file
View File

@ -0,0 +1,6 @@
// Copyright 2024 Dasky (@daskygit)
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include "test_common.h"

1
tests/mousekeys/test.mk Normal file
View File

@ -0,0 +1 @@
MOUSEKEY_ENABLE = yes

View File

@ -0,0 +1,109 @@
// Copyright 2024 Dasky (@daskygit)
// SPDX-License-Identifier: GPL-2.0-or-later
#include "gtest/gtest.h"
#include "mouse_report_util.hpp"
#include "test_common.hpp"
using testing::_;
struct MouseKeyExpectations {
int16_t x;
int16_t y;
int16_t h;
int16_t v;
uint16_t button_mask;
};
class Mousekey : public TestFixture {};
class MousekeyParametrized : public ::testing::WithParamInterface<std::pair<KeymapKey, MouseKeyExpectations>>, public Mousekey {};
TEST_F(Mousekey, SendMouseNotCalledWhenNoKeyIsPressed) {
TestDriver driver;
EXPECT_NO_MOUSE_REPORT(driver);
run_one_scan_loop();
}
TEST_F(Mousekey, PressAndHoldCursorUpIsCorrectlyReported) {
TestDriver driver;
KeymapKey mouse_key = KeymapKey{0, 0, 0, QK_MOUSE_CURSOR_UP};
set_keymap({mouse_key});
EXPECT_MOUSE_REPORT(driver, (0, -8, 0, 0, 0));
mouse_key.press();
run_one_scan_loop();
EXPECT_MOUSE_REPORT(driver, (0, -2, 0, 0, 0));
idle_for(MOUSEKEY_INTERVAL);
EXPECT_EMPTY_MOUSE_REPORT(driver);
mouse_key.release();
run_one_scan_loop();
VERIFY_AND_CLEAR(driver);
}
TEST_F(Mousekey, PressAndHoldButtonOneCorrectlyReported) {
TestDriver driver;
KeymapKey mouse_key = KeymapKey{0, 0, 0, QK_MOUSE_BUTTON_1};
set_keymap({mouse_key});
EXPECT_MOUSE_REPORT(driver, (0, 0, 0, 0, 1));
mouse_key.press();
run_one_scan_loop();
idle_for(MOUSEKEY_INTERVAL);
EXPECT_EMPTY_MOUSE_REPORT(driver);
mouse_key.release();
run_one_scan_loop();
VERIFY_AND_CLEAR(driver);
}
TEST_P(MousekeyParametrized, PressAndReleaseIsCorrectlyReported) {
TestDriver driver;
KeymapKey mouse_key = GetParam().first;
MouseKeyExpectations expectations = GetParam().second;
set_keymap({mouse_key});
EXPECT_MOUSE_REPORT(driver, (expectations.x, expectations.y, expectations.h, expectations.v, expectations.button_mask));
mouse_key.press();
run_one_scan_loop();
EXPECT_EMPTY_MOUSE_REPORT(driver);
mouse_key.release();
run_one_scan_loop();
EXPECT_NO_MOUSE_REPORT(driver);
run_one_scan_loop();
VERIFY_AND_CLEAR(driver);
}
// clang-format off
INSTANTIATE_TEST_CASE_P(
Keys,
MousekeyParametrized,
::testing::Values(
// Key , X, Y, H, V, Buttons Mask
std::make_pair(KeymapKey{0, 0, 0, QK_MOUSE_BUTTON_1}, MouseKeyExpectations{ 0, 0, 0, 0, 1}),
std::make_pair(KeymapKey{0, 0, 0, QK_MOUSE_BUTTON_2}, MouseKeyExpectations{ 0, 0, 0, 0, 2}),
std::make_pair(KeymapKey{0, 0, 0, QK_MOUSE_BUTTON_3}, MouseKeyExpectations{ 0, 0, 0, 0, 4}),
std::make_pair(KeymapKey{0, 0, 0, QK_MOUSE_BUTTON_4}, MouseKeyExpectations{ 0, 0, 0, 0, 8}),
std::make_pair(KeymapKey{0, 0, 0, QK_MOUSE_BUTTON_5}, MouseKeyExpectations{ 0, 0, 0, 0, 16}),
std::make_pair(KeymapKey{0, 0, 0, QK_MOUSE_BUTTON_6}, MouseKeyExpectations{ 0, 0, 0, 0, 32}),
std::make_pair(KeymapKey{0, 0, 0, QK_MOUSE_BUTTON_7}, MouseKeyExpectations{ 0, 0, 0, 0, 64}),
std::make_pair(KeymapKey{0, 0, 0, QK_MOUSE_BUTTON_8}, MouseKeyExpectations{ 0, 0, 0, 0, 128}),
std::make_pair(KeymapKey{0, 0, 0, QK_MOUSE_CURSOR_UP}, MouseKeyExpectations{ 0,-8, 0, 0, 0}),
std::make_pair(KeymapKey{0, 0, 0, QK_MOUSE_CURSOR_DOWN}, MouseKeyExpectations{ 0, 8, 0, 0, 0}),
std::make_pair(KeymapKey{0, 0, 0, QK_MOUSE_CURSOR_LEFT}, MouseKeyExpectations{-8, 0, 0, 0, 0}),
std::make_pair(KeymapKey{0, 0, 0, QK_MOUSE_CURSOR_RIGHT}, MouseKeyExpectations{ 8, 0, 0, 0, 0}),
std::make_pair(KeymapKey{0, 0, 0, QK_MOUSE_WHEEL_UP}, MouseKeyExpectations{ 0, 0, 0, 1, 0}),
std::make_pair(KeymapKey{0, 0, 0, QK_MOUSE_WHEEL_DOWN}, MouseKeyExpectations{ 0, 0, 0,-1, 0}),
std::make_pair(KeymapKey{0, 0, 0, QK_MOUSE_WHEEL_LEFT}, MouseKeyExpectations{ 0, 0,-1, 0, 0}),
std::make_pair(KeymapKey{0, 0, 0, QK_MOUSE_WHEEL_RIGHT}, MouseKeyExpectations{ 0, 0, 1, 0, 0})
));
// clang-format on

6
tests/pointing/config.h Normal file
View File

@ -0,0 +1,6 @@
// Copyright 2024 Dasky (@daskygit)
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include "test_common.h"

View File

@ -0,0 +1,9 @@
// Copyright 2024 Dasky (@daskygit)
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include "test_common.h"
#define POINTING_DEVICE_INVERT_X
#define POINTING_DEVICE_ROTATION_90

View File

@ -0,0 +1,2 @@
POINTING_DEVICE_ENABLE = yes
POINTING_DEVICE_DRIVER = custom

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