mirror of
https://github.com/qmk/qmk_firmware.git
synced 2024-11-28 14:10:13 +00:00
Compare commits
35 Commits
1fc9916eaa
...
23f90a632d
Author | SHA1 | Date | |
---|---|---|---|
|
23f90a632d | ||
|
859dab864a | ||
|
1f7d10902a | ||
|
d189de24a0 | ||
|
e4e015c0c8 | ||
|
4a5bae51cd | ||
|
fee56db8a1 | ||
|
078ecc9079 | ||
|
22bd29e683 | ||
|
aa2092a06b | ||
|
57bcc8cbaf | ||
|
7847adcdf3 | ||
|
3456f0b6a6 | ||
|
ea2d6c6bb1 | ||
|
dc95e78fac | ||
|
cbcbfbb6a0 | ||
|
bba99473c3 | ||
|
d9ae8048d9 | ||
|
2c3af2bfa8 | ||
|
4d46e95ea8 | ||
|
397e8d4583 | ||
|
21756ada63 | ||
|
5917a1dcd5 | ||
|
0f4fe7e1f9 | ||
|
0cd53997ea | ||
|
9f4be17fbc | ||
|
263b514ab4 | ||
|
a368efc4d7 | ||
|
1bd68df217 | ||
|
357494852a | ||
|
8ee730992d | ||
|
1a0d8c459d | ||
|
4be3846269 | ||
|
298f360eb1 | ||
|
f78412d841 |
@ -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 \
|
||||||
|
@ -28,6 +28,9 @@ QUANTUM_SRC += \
|
|||||||
$(QUANTUM_DIR)/sync_timer.c \
|
$(QUANTUM_DIR)/sync_timer.c \
|
||||||
$(QUANTUM_DIR)/logging/debug.c \
|
$(QUANTUM_DIR)/logging/debug.c \
|
||||||
$(QUANTUM_DIR)/logging/sendchar.c \
|
$(QUANTUM_DIR)/logging/sendchar.c \
|
||||||
|
$(QUANTUM_DIR)/process_keycode/process_default_layer.c \
|
||||||
|
|
||||||
|
include $(QUANTUM_DIR)/nvm/rules.mk
|
||||||
|
|
||||||
VPATH += $(QUANTUM_DIR)/logging
|
VPATH += $(QUANTUM_DIR)/logging
|
||||||
# Fall back to lib/printf if there is no platform provided print
|
# Fall back to lib/printf if there is no platform provided print
|
||||||
|
@ -60,6 +60,7 @@ define HANDLE_GENERIC_FEATURE
|
|||||||
SRC += $$(wildcard $$(QUANTUM_DIR)/process_keycode/process_$2.c)
|
SRC += $$(wildcard $$(QUANTUM_DIR)/process_keycode/process_$2.c)
|
||||||
SRC += $$(wildcard $$(QUANTUM_DIR)/$2/$2.c)
|
SRC += $$(wildcard $$(QUANTUM_DIR)/$2/$2.c)
|
||||||
SRC += $$(wildcard $$(QUANTUM_DIR)/$2.c)
|
SRC += $$(wildcard $$(QUANTUM_DIR)/$2.c)
|
||||||
|
SRC += $$(wildcard $$(QUANTUM_DIR)/nvm/$$(NVM_DRIVER_LOWER)/nvm_$2.c)
|
||||||
VPATH += $$(wildcard $$(QUANTUM_DIR)/$2/)
|
VPATH += $$(wildcard $$(QUANTUM_DIR)/$2/)
|
||||||
OPT_DEFS += -D$1_ENABLE
|
OPT_DEFS += -D$1_ENABLE
|
||||||
endef
|
endef
|
||||||
|
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"ranges": {
|
||||||
|
"0x52E0/0x001F": {
|
||||||
|
"define": "QK_PERSISTENT_DEF_LAYER"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -8,7 +8,8 @@ For a detailed explanation of how the layer stack works, checkout [Keymap Overvi
|
|||||||
|
|
||||||
These functions allow you to activate layers in various ways. Note that layers are not generally independent layouts -- multiple layers can be activated at once, and it's typical for layers to use `KC_TRNS` to allow keypresses to pass through to lower layers. When using momentary layer switching with MO(), LM(), TT(), or LT(), make sure to leave the key on the above layers transparent or it may not work as intended.
|
These functions allow you to activate layers in various ways. Note that layers are not generally independent layouts -- multiple layers can be activated at once, and it's typical for layers to use `KC_TRNS` to allow keypresses to pass through to lower layers. When using momentary layer switching with MO(), LM(), TT(), or LT(), make sure to leave the key on the above layers transparent or it may not work as intended.
|
||||||
|
|
||||||
* `DF(layer)` - switches the default layer. The default layer is the always-active base layer that other layers stack on top of. See below for more about the default layer. This might be used to switch from QWERTY to Dvorak layout. (Note that this is a temporary switch that only persists until the keyboard loses power. To modify the default layer in a persistent way requires deeper customization, such as calling the `set_single_persistent_default_layer` function inside of [process_record_user](custom_quantum_functions#programming-the-behavior-of-any-keycode).)
|
* `DF(layer)` - switches the default layer. The default layer is the always-active base layer that other layers stack on top of. See below for more about the default layer. This might be used to switch from QWERTY to Dvorak layout. Note that this is a temporary switch that only persists until the keyboard loses power.
|
||||||
|
* `PDF(layer)` - sets a persistent default layer. This switch, which will last through a power loss, might be used to switch from QWERTY to Dvorak layout and only switch again when you want to.
|
||||||
* `MO(layer)` - momentarily activates *layer*. As soon as you let go of the key, the layer is deactivated.
|
* `MO(layer)` - momentarily activates *layer*. As soon as you let go of the key, the layer is deactivated.
|
||||||
* `LM(layer, mod)` - Momentarily activates *layer* (like `MO`), but with modifier(s) *mod* active. Only supports layers 0-15. The modifiers this keycode accept are prefixed with `MOD_`, not `KC_`. These modifiers can be combined using bitwise OR, e.g. `LM(_RAISE, MOD_LCTL | MOD_LALT)`.
|
* `LM(layer, mod)` - Momentarily activates *layer* (like `MO`), but with modifier(s) *mod* active. Only supports layers 0-15. The modifiers this keycode accept are prefixed with `MOD_`, not `KC_`. These modifiers can be combined using bitwise OR, e.g. `LM(_RAISE, MOD_LCTL | MOD_LALT)`.
|
||||||
* `LT(layer, kc)` - momentarily activates *layer* when held, and sends *kc* when tapped. Only supports layers 0-15.
|
* `LT(layer, kc)` - momentarily activates *layer* when held, and sends *kc* when tapped. Only supports layers 0-15.
|
||||||
|
@ -401,7 +401,8 @@ See also: [Layer Switching](feature_layers#switching-and-toggling-layers)
|
|||||||
|
|
||||||
|Key |Description |
|
|Key |Description |
|
||||||
|----------------|----------------------------------------------------------------------------------|
|
|----------------|----------------------------------------------------------------------------------|
|
||||||
|`DF(layer)` |Set the base (default) layer |
|
|`DF(layer)` |Set the base (default) layer until the keyboard loses power |
|
||||||
|
|`PDF(layer)` |Set the base (default) layer in EEPROM |
|
||||||
|`MO(layer)` |Momentarily turn on `layer` when pressed (requires `KC_TRNS` on destination layer)|
|
|`MO(layer)` |Momentarily turn on `layer` when pressed (requires `KC_TRNS` on destination layer)|
|
||||||
|`OSL(layer)` |Momentarily activates `layer` until a key is pressed. See [One Shot Keys](one_shot_keys) for details. |
|
|`OSL(layer)` |Momentarily activates `layer` until a key is pressed. See [One Shot Keys](one_shot_keys) for details. |
|
||||||
|`LM(layer, mod)`|Momentarily turn on `layer` (like MO) with `mod` active as well. Where `mod` is a mods_bit. Mods can be viewed [here](mod_tap). Example Implementation: `LM(LAYER_1, MOD_LALT)`|
|
|`LM(layer, mod)`|Momentarily turn on `layer` (like MO) with `mod` active as well. Where `mod` is a mods_bit. Mods can be viewed [here](mod_tap). Example Implementation: `LM(LAYER_1, MOD_LALT)`|
|
||||||
|
@ -20,6 +20,6 @@
|
|||||||
The size of the transient EEPROM buffer size.
|
The size of the transient EEPROM buffer size.
|
||||||
*/
|
*/
|
||||||
#ifndef TRANSIENT_EEPROM_SIZE
|
#ifndef TRANSIENT_EEPROM_SIZE
|
||||||
# include "eeconfig.h"
|
# include "nvm_eeprom_eeconfig_internal.h"
|
||||||
# define TRANSIENT_EEPROM_SIZE (((EECONFIG_SIZE + 3) / 4) * 4) // based off eeconfig's current usage, aligned to 4-byte sizes, to deal with LTO
|
# define TRANSIENT_EEPROM_SIZE (((EECONFIG_SIZE + 3) / 4) * 4) // based off eeconfig's current usage, aligned to 4-byte sizes, to deal with LTO
|
||||||
#endif
|
#endif
|
||||||
|
@ -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
|
||||||
|
@ -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;
|
|
||||||
}
|
|
||||||
|
@ -164,7 +164,7 @@ bool process_record_kb(uint16_t keycode, keyrecord_t* record) {
|
|||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
set_single_persistent_default_layer(MAC_B);
|
set_single_persistent_default_layer(MAC_B);
|
||||||
keymap_config.no_gui = 0;
|
keymap_config.no_gui = 0;
|
||||||
eeconfig_update_keymap(keymap_config.raw);
|
eeconfig_update_keymap(&keymap_config);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
case QK_RGB_MATRIX_TOGGLE:
|
case QK_RGB_MATRIX_TOGGLE:
|
||||||
|
@ -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);
|
||||||
|
@ -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;
|
|
||||||
};
|
|
||||||
|
@ -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;
|
|
||||||
};
|
|
||||||
|
@ -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;
|
|
||||||
};
|
|
||||||
|
@ -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;
|
|
||||||
};
|
|
||||||
|
@ -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;
|
|
||||||
};
|
|
||||||
|
@ -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;
|
|
||||||
};
|
|
||||||
|
@ -53,10 +53,26 @@ void board_init(void) {
|
|||||||
SYSCFG->CFGR1 &= ~(SYSCFG_CFGR1_SPI2_DMA_RMP);
|
SYSCFG->CFGR1 &= ~(SYSCFG_CFGR1_SPI2_DMA_RMP);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint32_t read_custom_config(void *data, uint32_t offset, uint32_t length) {
|
||||||
|
#ifdef VIA_ENABLE
|
||||||
|
return via_read_custom_config(data, offset, length);
|
||||||
|
#else
|
||||||
|
return eeconfig_read_kb_datablock(data, offset, length);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32_t write_custom_config(const void *data, uint32_t offset, uint32_t length) {
|
||||||
|
#ifdef VIA_ENABLE
|
||||||
|
return via_update_custom_config(data, offset, length);
|
||||||
|
#else
|
||||||
|
return eeconfig_update_kb_datablock(data, offset, length);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
void keyboard_post_init_kb(void) {
|
void keyboard_post_init_kb(void) {
|
||||||
/*
|
/*
|
||||||
This is a workaround to some really weird behavior
|
This is a workaround to some really weird behavior
|
||||||
Without this code, the OLED will turn on, but not when you initially plug the keyboard in.
|
Without this code, the OLED will turn on, but not when you initially plug the keyboard in.
|
||||||
You have to manually trigger a user reset to get the OLED to initialize properly
|
You have to manually trigger a user reset to get the OLED to initialize properly
|
||||||
I'm not sure what the root cause is at this time, but this workaround fixes it.
|
I'm not sure what the root cause is at this time, but this workaround fixes it.
|
||||||
*/
|
*/
|
||||||
@ -74,11 +90,11 @@ void keyboard_post_init_kb(void) {
|
|||||||
void custom_set_value(uint8_t *data) {
|
void custom_set_value(uint8_t *data) {
|
||||||
uint8_t *value_id = &(data[0]);
|
uint8_t *value_id = &(data[0]);
|
||||||
uint8_t *value_data = &(data[1]);
|
uint8_t *value_data = &(data[1]);
|
||||||
|
|
||||||
switch ( *value_id ) {
|
switch ( *value_id ) {
|
||||||
case id_oled_default_mode:
|
case id_oled_default_mode:
|
||||||
{
|
{
|
||||||
eeprom_update_byte((uint8_t*)EEPROM_DEFAULT_OLED, value_data[0]);
|
write_custom_config(&value_data[0], EEPROM_DEFAULT_OLED_OFFSET, 1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case id_oled_mode:
|
case id_oled_mode:
|
||||||
@ -92,7 +108,7 @@ void custom_set_value(uint8_t *data) {
|
|||||||
uint8_t index = value_data[0];
|
uint8_t index = value_data[0];
|
||||||
uint8_t enable = value_data[1];
|
uint8_t enable = value_data[1];
|
||||||
enabled_encoder_modes = (enabled_encoder_modes & ~(1<<index)) | (enable<<index);
|
enabled_encoder_modes = (enabled_encoder_modes & ~(1<<index)) | (enable<<index);
|
||||||
eeprom_update_byte((uint8_t*)EEPROM_ENABLED_ENCODER_MODES, enabled_encoder_modes);
|
write_custom_config(&enabled_encoder_modes, EEPROM_ENABLED_ENCODER_MODES_OFFSET, 1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case id_encoder_custom:
|
case id_encoder_custom:
|
||||||
@ -109,11 +125,12 @@ void custom_set_value(uint8_t *data) {
|
|||||||
void custom_get_value(uint8_t *data) {
|
void custom_get_value(uint8_t *data) {
|
||||||
uint8_t *value_id = &(data[0]);
|
uint8_t *value_id = &(data[0]);
|
||||||
uint8_t *value_data = &(data[1]);
|
uint8_t *value_data = &(data[1]);
|
||||||
|
|
||||||
switch ( *value_id ) {
|
switch ( *value_id ) {
|
||||||
case id_oled_default_mode:
|
case id_oled_default_mode:
|
||||||
{
|
{
|
||||||
uint8_t default_oled = eeprom_read_byte((uint8_t*)EEPROM_DEFAULT_OLED);
|
uint8_t default_oled;
|
||||||
|
read_custom_config(&default_oled, EEPROM_DEFAULT_OLED_OFFSET, 1);
|
||||||
value_data[0] = default_oled;
|
value_data[0] = default_oled;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -179,7 +196,6 @@ void via_custom_value_command_kb(uint8_t *data, uint8_t length) {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
void read_host_led_state(void) {
|
void read_host_led_state(void) {
|
||||||
led_t led_state = host_keyboard_led_state();
|
led_t led_state = host_keyboard_led_state();
|
||||||
if (led_state.num_lock) {
|
if (led_state.num_lock) {
|
||||||
@ -290,25 +306,25 @@ bool encoder_update_kb(uint8_t index, bool clockwise) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void custom_config_reset(void){
|
void custom_config_reset(void){
|
||||||
void *p = (void*)(VIA_EEPROM_CUSTOM_CONFIG_ADDR);
|
for(int i = 0; i < VIA_EEPROM_CUSTOM_CONFIG_SIZE; ++i) {
|
||||||
void *end = (void*)(VIA_EEPROM_CUSTOM_CONFIG_ADDR+VIA_EEPROM_CUSTOM_CONFIG_SIZE);
|
uint8_t dummy = 0;
|
||||||
while ( p != end ) {
|
write_custom_config(&dummy, i, 1);
|
||||||
eeprom_update_byte(p, 0);
|
|
||||||
++p;
|
|
||||||
}
|
}
|
||||||
eeprom_update_byte((uint8_t*)EEPROM_ENABLED_ENCODER_MODES, 0x1F);
|
|
||||||
|
uint8_t encoder_modes = 0x1F;
|
||||||
|
write_custom_config(&encoder_modes, EEPROM_ENABLED_ENCODER_MODES_OFFSET, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void custom_config_load(void){
|
void custom_config_load(void){
|
||||||
#ifdef DYNAMIC_KEYMAP_ENABLE
|
#ifdef DYNAMIC_KEYMAP_ENABLE
|
||||||
oled_mode = eeprom_read_byte((uint8_t*)EEPROM_DEFAULT_OLED);
|
read_custom_config(&oled_mode, EEPROM_DEFAULT_OLED_OFFSET, 1);
|
||||||
enabled_encoder_modes = eeprom_read_byte((uint8_t*)EEPROM_ENABLED_ENCODER_MODES);
|
read_custom_config(&enabled_encoder_modes, EEPROM_ENABLED_ENCODER_MODES_OFFSET, 1);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// Called from via_init() if VIA_ENABLE
|
// Called from via_init() if VIA_ENABLE
|
||||||
// Called from matrix_init_kb() if not VIA_ENABLE
|
// Called from matrix_init_kb() if not VIA_ENABLE
|
||||||
void via_init_kb(void)
|
void satisfaction_core_init(void)
|
||||||
{
|
{
|
||||||
// This checks both an EEPROM reset (from bootmagic lite, keycodes)
|
// This checks both an EEPROM reset (from bootmagic lite, keycodes)
|
||||||
// and also firmware build date (from via_eeprom_is_valid())
|
// and also firmware build date (from via_eeprom_is_valid())
|
||||||
@ -326,8 +342,7 @@ void via_init_kb(void)
|
|||||||
void matrix_init_kb(void)
|
void matrix_init_kb(void)
|
||||||
{
|
{
|
||||||
#ifndef VIA_ENABLE
|
#ifndef VIA_ENABLE
|
||||||
via_init_kb();
|
satisfaction_core_init();
|
||||||
via_eeprom_set_valid(true);
|
|
||||||
#endif // VIA_ENABLE
|
#endif // VIA_ENABLE
|
||||||
|
|
||||||
rtcGetTime(&RTCD1, &last_timespec);
|
rtcGetTime(&RTCD1, &last_timespec);
|
||||||
@ -335,6 +350,11 @@ void matrix_init_kb(void)
|
|||||||
oled_request_wakeup();
|
oled_request_wakeup();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef VIA_ENABLE
|
||||||
|
void via_init_kb(void) {
|
||||||
|
satisfaction_core_init();
|
||||||
|
}
|
||||||
|
#endif // VIA_ENABLE
|
||||||
|
|
||||||
void housekeeping_task_kb(void) {
|
void housekeeping_task_kb(void) {
|
||||||
rtcGetTime(&RTCD1, &last_timespec);
|
rtcGetTime(&RTCD1, &last_timespec);
|
||||||
@ -345,52 +365,3 @@ void housekeeping_task_kb(void) {
|
|||||||
oled_request_repaint();
|
oled_request_repaint();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
|
||||||
// In the case of VIA being disabled, we still need to check if
|
|
||||||
// keyboard level EEPROM memory is valid before loading.
|
|
||||||
// Thus these are copies of the same functions in VIA, since
|
|
||||||
// the backlight settings reuse VIA's EEPROM magic/version,
|
|
||||||
// and the ones in via.c won't be compiled in.
|
|
||||||
//
|
|
||||||
// Yes, this is sub-optimal, and is only here for completeness
|
|
||||||
// (i.e. catering to the 1% of people that want wilba.tech LED bling
|
|
||||||
// AND want persistent settings BUT DON'T want to use dynamic keymaps/VIA).
|
|
||||||
//
|
|
||||||
#ifndef VIA_ENABLE
|
|
||||||
|
|
||||||
bool via_eeprom_is_valid(void)
|
|
||||||
{
|
|
||||||
char *p = QMK_BUILDDATE; // e.g. "2019-11-05-11:29:54"
|
|
||||||
uint8_t magic0 = ( ( p[2] & 0x0F ) << 4 ) | ( p[3] & 0x0F );
|
|
||||||
uint8_t magic1 = ( ( p[5] & 0x0F ) << 4 ) | ( p[6] & 0x0F );
|
|
||||||
uint8_t magic2 = ( ( p[8] & 0x0F ) << 4 ) | ( p[9] & 0x0F );
|
|
||||||
|
|
||||||
return (eeprom_read_byte( (void*)VIA_EEPROM_MAGIC_ADDR+0 ) == magic0 &&
|
|
||||||
eeprom_read_byte( (void*)VIA_EEPROM_MAGIC_ADDR+1 ) == magic1 &&
|
|
||||||
eeprom_read_byte( (void*)VIA_EEPROM_MAGIC_ADDR+2 ) == magic2 );
|
|
||||||
}
|
|
||||||
|
|
||||||
// Sets VIA/keyboard level usage of EEPROM to valid/invalid
|
|
||||||
// Keyboard level code (eg. via_init_kb()) should not call this
|
|
||||||
void via_eeprom_set_valid(bool valid)
|
|
||||||
{
|
|
||||||
char *p = QMK_BUILDDATE; // e.g. "2019-11-05-11:29:54"
|
|
||||||
uint8_t magic0 = ( ( p[2] & 0x0F ) << 4 ) | ( p[3] & 0x0F );
|
|
||||||
uint8_t magic1 = ( ( p[5] & 0x0F ) << 4 ) | ( p[6] & 0x0F );
|
|
||||||
uint8_t magic2 = ( ( p[8] & 0x0F ) << 4 ) | ( p[9] & 0x0F );
|
|
||||||
|
|
||||||
eeprom_update_byte( (void*)VIA_EEPROM_MAGIC_ADDR+0, valid ? magic0 : 0xFF);
|
|
||||||
eeprom_update_byte( (void*)VIA_EEPROM_MAGIC_ADDR+1, valid ? magic1 : 0xFF);
|
|
||||||
eeprom_update_byte( (void*)VIA_EEPROM_MAGIC_ADDR+2, valid ? magic2 : 0xFF);
|
|
||||||
}
|
|
||||||
|
|
||||||
void via_eeprom_reset(void)
|
|
||||||
{
|
|
||||||
// Set the VIA specific EEPROM state as invalid.
|
|
||||||
via_eeprom_set_valid(false);
|
|
||||||
// Set the TMK/QMK EEPROM state as invalid.
|
|
||||||
eeconfig_disable();
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif // VIA_ENABLE
|
|
||||||
|
@ -6,12 +6,14 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
||||||
|
#include <hal.h>
|
||||||
|
|
||||||
#include "via.h" // only for EEPROM address
|
#include "via.h" // only for EEPROM address
|
||||||
#include "satisfaction_keycodes.h"
|
#include "satisfaction_keycodes.h"
|
||||||
|
|
||||||
#define EEPROM_ENABLED_ENCODER_MODES (VIA_EEPROM_CUSTOM_CONFIG_ADDR)
|
#define EEPROM_ENABLED_ENCODER_MODES_OFFSET 0
|
||||||
#define EEPROM_DEFAULT_OLED (VIA_EEPROM_CUSTOM_CONFIG_ADDR+1)
|
#define EEPROM_DEFAULT_OLED_OFFSET 1
|
||||||
#define EEPROM_CUSTOM_ENCODER (VIA_EEPROM_CUSTOM_CONFIG_ADDR+2)
|
#define EEPROM_CUSTOM_ENCODER_OFFSET 2
|
||||||
|
|
||||||
enum s75_keyboard_value_id {
|
enum s75_keyboard_value_id {
|
||||||
id_encoder_modes = 1,
|
id_encoder_modes = 1,
|
||||||
@ -94,3 +96,6 @@ void oled_request_repaint(void);
|
|||||||
bool oled_task_needs_to_repaint(void);
|
bool oled_task_needs_to_repaint(void);
|
||||||
|
|
||||||
void custom_config_load(void);
|
void custom_config_load(void);
|
||||||
|
|
||||||
|
uint32_t read_custom_config(void *data, uint32_t offset, uint32_t length);
|
||||||
|
uint32_t write_custom_config(const void *data, uint32_t offset, uint32_t length);
|
||||||
|
@ -215,10 +215,13 @@ uint16_t handle_encoder_press(void){
|
|||||||
|
|
||||||
uint16_t retrieve_custom_encoder_config(uint8_t encoder_idx, uint8_t behavior){
|
uint16_t retrieve_custom_encoder_config(uint8_t encoder_idx, uint8_t behavior){
|
||||||
#ifdef DYNAMIC_KEYMAP_ENABLE
|
#ifdef DYNAMIC_KEYMAP_ENABLE
|
||||||
void* addr = (void*)(EEPROM_CUSTOM_ENCODER + (encoder_idx * 6) + (behavior * 2));
|
uint32_t offset = EEPROM_CUSTOM_ENCODER_OFFSET + (encoder_idx * 6) + (behavior * 2);
|
||||||
//big endian
|
//big endian
|
||||||
uint16_t keycode = eeprom_read_byte(addr) << 8;
|
uint8_t hi, lo;
|
||||||
keycode |= eeprom_read_byte(addr + 1);
|
read_custom_config(&hi, offset+0, 1);
|
||||||
|
read_custom_config(&lo, offset+1, 1);
|
||||||
|
uint16_t keycode = hi << 8;
|
||||||
|
keycode |= lo;
|
||||||
return keycode;
|
return keycode;
|
||||||
#else
|
#else
|
||||||
return 0;
|
return 0;
|
||||||
@ -227,8 +230,10 @@ uint16_t retrieve_custom_encoder_config(uint8_t encoder_idx, uint8_t behavior){
|
|||||||
|
|
||||||
void set_custom_encoder_config(uint8_t encoder_idx, uint8_t behavior, uint16_t new_code){
|
void set_custom_encoder_config(uint8_t encoder_idx, uint8_t behavior, uint16_t new_code){
|
||||||
#ifdef DYNAMIC_KEYMAP_ENABLE
|
#ifdef DYNAMIC_KEYMAP_ENABLE
|
||||||
void* addr = (void*)(EEPROM_CUSTOM_ENCODER + (encoder_idx * 6) + (behavior * 2));
|
uint32_t offset = EEPROM_CUSTOM_ENCODER_OFFSET + (encoder_idx * 6) + (behavior * 2);
|
||||||
eeprom_update_byte(addr, (uint8_t)(new_code >> 8));
|
uint8_t hi = new_code >> 8;
|
||||||
eeprom_update_byte(addr + 1, (uint8_t)(new_code & 0xFF));
|
uint8_t lo = new_code & 0xFF;
|
||||||
|
write_custom_config(&hi, offset+0, 1);
|
||||||
|
write_custom_config(&lo, offset+1, 1);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,6 @@
|
|||||||
#include "matrix.h"
|
#include "matrix.h"
|
||||||
#include "led.h"
|
#include "led.h"
|
||||||
#include "host.h"
|
#include "host.h"
|
||||||
#include "oled_driver.h"
|
|
||||||
#include "progmem.h"
|
#include "progmem.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
@ -16,6 +15,7 @@ void draw_default(void);
|
|||||||
void draw_clock(void);
|
void draw_clock(void);
|
||||||
|
|
||||||
#ifdef OLED_ENABLE
|
#ifdef OLED_ENABLE
|
||||||
|
#include "oled_driver.h"
|
||||||
|
|
||||||
oled_rotation_t oled_init_kb(oled_rotation_t rotation) { return OLED_ROTATION_0; }
|
oled_rotation_t oled_init_kb(oled_rotation_t rotation) { return OLED_ROTATION_0; }
|
||||||
|
|
||||||
|
@ -42,4 +42,7 @@
|
|||||||
// 6 for 3x custom encoder settings, left, right, and press (18 bytes)
|
// 6 for 3x custom encoder settings, left, right, and press (18 bytes)
|
||||||
#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 20
|
#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 20
|
||||||
|
|
||||||
|
// And if VIA isn't enabled, fall back to using standard QMK for configuration
|
||||||
|
#ifndef VIA_ENABLE
|
||||||
|
#define EECONFIG_KB_DATA_SIZE VIA_EEPROM_CUSTOM_CONFIG_SIZE
|
||||||
|
#endif
|
||||||
|
@ -40,5 +40,10 @@
|
|||||||
// 6 for 3x custom encoder settings, left, right, and press (18 bytes)
|
// 6 for 3x custom encoder settings, left, right, and press (18 bytes)
|
||||||
#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 20
|
#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 20
|
||||||
|
|
||||||
|
// And if VIA isn't enabled, fall back to using standard QMK for configuration
|
||||||
|
#ifndef VIA_ENABLE
|
||||||
|
#define EECONFIG_KB_DATA_SIZE VIA_EEPROM_CUSTOM_CONFIG_SIZE
|
||||||
|
#endif
|
||||||
|
|
||||||
// VIA lighting is handled by the keyboard-level code
|
// VIA lighting is handled by the keyboard-level code
|
||||||
#define VIA_CUSTOM_LIGHTING_ENABLE
|
#define VIA_CUSTOM_LIGHTING_ENABLE
|
||||||
|
@ -36,7 +36,7 @@ void eeconfig_init_kb(void) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Write default value to EEPROM now
|
// Write default value to EEPROM now
|
||||||
eeconfig_update_kb_datablock(&eeprom_ec_config);
|
eeconfig_update_kb_datablock(&eeprom_ec_config, 0, EECONFIG_KB_DATA_SIZE);
|
||||||
|
|
||||||
eeconfig_init_user();
|
eeconfig_init_user();
|
||||||
}
|
}
|
||||||
@ -44,7 +44,7 @@ void eeconfig_init_kb(void) {
|
|||||||
// On Keyboard startup
|
// On Keyboard startup
|
||||||
void keyboard_post_init_kb(void) {
|
void keyboard_post_init_kb(void) {
|
||||||
// Read custom menu variables from memory
|
// Read custom menu variables from memory
|
||||||
eeconfig_read_kb_datablock(&eeprom_ec_config);
|
eeconfig_read_kb_datablock(&eeprom_ec_config, 0, EECONFIG_KB_DATA_SIZE);
|
||||||
|
|
||||||
// Set runtime values to EEPROM values
|
// Set runtime values to EEPROM values
|
||||||
ec_config.actuation_mode = eeprom_ec_config.actuation_mode;
|
ec_config.actuation_mode = eeprom_ec_config.actuation_mode;
|
||||||
|
@ -73,7 +73,7 @@ void via_config_set_value(uint8_t *data) {
|
|||||||
uprintf("# Actuation Mode: Rapid Trigger #\n");
|
uprintf("# Actuation Mode: Rapid Trigger #\n");
|
||||||
uprintf("#################################\n");
|
uprintf("#################################\n");
|
||||||
}
|
}
|
||||||
EEPROM_KB_PARTIAL_UPDATE(eeprom_ec_config, actuation_mode);
|
eeconfig_update_kb_datablock_field(eeprom_ec_config, actuation_mode);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case id_mode_0_actuation_threshold: {
|
case id_mode_0_actuation_threshold: {
|
||||||
@ -293,7 +293,7 @@ void ec_save_threshold_data(uint8_t option) {
|
|||||||
ec_rescale_values(3);
|
ec_rescale_values(3);
|
||||||
ec_rescale_values(4);
|
ec_rescale_values(4);
|
||||||
}
|
}
|
||||||
eeconfig_update_kb_datablock(&eeprom_ec_config);
|
eeconfig_update_kb_datablock(&eeprom_ec_config, 0, EECONFIG_KB_DATA_SIZE);
|
||||||
uprintf("####################################\n");
|
uprintf("####################################\n");
|
||||||
uprintf("# New thresholds applied and saved #\n");
|
uprintf("# New thresholds applied and saved #\n");
|
||||||
uprintf("####################################\n");
|
uprintf("####################################\n");
|
||||||
@ -321,7 +321,7 @@ void ec_save_bottoming_reading(void) {
|
|||||||
ec_rescale_values(2);
|
ec_rescale_values(2);
|
||||||
ec_rescale_values(3);
|
ec_rescale_values(3);
|
||||||
ec_rescale_values(4);
|
ec_rescale_values(4);
|
||||||
eeconfig_update_kb_datablock(&eeprom_ec_config);
|
eeconfig_update_kb_datablock(&eeprom_ec_config, 0, EECONFIG_KB_DATA_SIZE);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Show the calibration data
|
// Show the calibration data
|
||||||
|
@ -44,7 +44,7 @@ void eeconfig_init_kb(void) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Write default value to EEPROM now
|
// Write default value to EEPROM now
|
||||||
eeconfig_update_kb_datablock(&eeprom_ec_config);
|
eeconfig_update_kb_datablock(&eeprom_ec_config, 0, EECONFIG_KB_DATA_SIZE);
|
||||||
|
|
||||||
eeconfig_init_user();
|
eeconfig_init_user();
|
||||||
}
|
}
|
||||||
@ -52,7 +52,7 @@ void eeconfig_init_kb(void) {
|
|||||||
// On Keyboard startup
|
// On Keyboard startup
|
||||||
void keyboard_post_init_kb(void) {
|
void keyboard_post_init_kb(void) {
|
||||||
// Read custom menu variables from memory
|
// Read custom menu variables from memory
|
||||||
eeconfig_read_kb_datablock(&eeprom_ec_config);
|
eeconfig_read_kb_datablock(&eeprom_ec_config, 0, EECONFIG_KB_DATA_SIZE);
|
||||||
|
|
||||||
// Set runtime values to EEPROM values
|
// Set runtime values to EEPROM values
|
||||||
ec_config.actuation_mode = eeprom_ec_config.actuation_mode;
|
ec_config.actuation_mode = eeprom_ec_config.actuation_mode;
|
||||||
|
@ -44,7 +44,7 @@ void eeconfig_init_kb(void) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Write default value to EEPROM now
|
// Write default value to EEPROM now
|
||||||
eeconfig_update_kb_datablock(&eeprom_ec_config);
|
eeconfig_update_kb_datablock(&eeprom_ec_config, 0, EECONFIG_KB_DATA_SIZE);
|
||||||
|
|
||||||
eeconfig_init_user();
|
eeconfig_init_user();
|
||||||
}
|
}
|
||||||
@ -52,7 +52,7 @@ void eeconfig_init_kb(void) {
|
|||||||
// On Keyboard startup
|
// On Keyboard startup
|
||||||
void keyboard_post_init_kb(void) {
|
void keyboard_post_init_kb(void) {
|
||||||
// Read custom menu variables from memory
|
// Read custom menu variables from memory
|
||||||
eeconfig_read_kb_datablock(&eeprom_ec_config);
|
eeconfig_read_kb_datablock(&eeprom_ec_config, 0, EECONFIG_KB_DATA_SIZE);
|
||||||
|
|
||||||
// Set runtime values to EEPROM values
|
// Set runtime values to EEPROM values
|
||||||
ec_config.actuation_mode = eeprom_ec_config.actuation_mode;
|
ec_config.actuation_mode = eeprom_ec_config.actuation_mode;
|
||||||
|
@ -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);
|
||||||
@ -240,9 +222,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||||||
if (!eeconfig_is_enabled()) {
|
if (!eeconfig_is_enabled()) {
|
||||||
eeconfig_init();
|
eeconfig_init();
|
||||||
}
|
}
|
||||||
keymap_config.raw = eeconfig_read_keymap();
|
eeconfig_read_keymap(&keymap_config);
|
||||||
keymap_config.nkro = 1;
|
keymap_config.nkro = 1;
|
||||||
eeconfig_update_keymap(keymap_config.raw);
|
eeconfig_update_keymap(&keymap_config);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
break;
|
break;
|
||||||
|
@ -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;
|
|
||||||
}
|
|
||||||
|
@ -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);
|
||||||
@ -329,9 +311,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||||||
if (!eeconfig_is_enabled()) {
|
if (!eeconfig_is_enabled()) {
|
||||||
eeconfig_init();
|
eeconfig_init();
|
||||||
}
|
}
|
||||||
keymap_config.raw = eeconfig_read_keymap();
|
eeconfig_read_keymap(&keymap_config);
|
||||||
keymap_config.nkro = 1;
|
keymap_config.nkro = 1;
|
||||||
eeconfig_update_keymap(keymap_config.raw);
|
eeconfig_update_keymap(&keymap_config);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
break;
|
break;
|
||||||
|
@ -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);
|
||||||
|
@ -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;
|
|
||||||
}
|
|
||||||
|
@ -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);
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
@ -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;
|
||||||
};
|
};
|
||||||
|
@ -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);
|
||||||
|
@ -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;
|
||||||
};
|
};
|
||||||
|
@ -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);
|
||||||
@ -199,9 +182,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||||||
if (!eeconfig_is_enabled()) {
|
if (!eeconfig_is_enabled()) {
|
||||||
eeconfig_init();
|
eeconfig_init();
|
||||||
}
|
}
|
||||||
keymap_config.raw = eeconfig_read_keymap();
|
eeconfig_read_keymap(&keymap_config);
|
||||||
keymap_config.nkro = 1;
|
keymap_config.nkro = 1;
|
||||||
eeconfig_update_keymap(keymap_config.raw);
|
eeconfig_update_keymap(&keymap_config);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
break;
|
break;
|
||||||
|
@ -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;
|
||||||
};
|
};
|
||||||
|
@ -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;
|
||||||
};
|
};
|
||||||
|
@ -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);
|
||||||
|
@ -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);
|
||||||
|
@ -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);
|
||||||
|
@ -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;
|
|
||||||
}
|
|
||||||
|
@ -32,7 +32,7 @@ void set_mac_mode_kb(bool macmode) {
|
|||||||
* https://github.com/qmk/qmk_firmware/blob/fb4a6ad30ea7a648acd59793ed4a30c3a8d8dc32/quantum/process_keycode/process_magic.c#L80-L81
|
* https://github.com/qmk/qmk_firmware/blob/fb4a6ad30ea7a648acd59793ed4a30c3a8d8dc32/quantum/process_keycode/process_magic.c#L80-L81
|
||||||
*/
|
*/
|
||||||
keymap_config.swap_lalt_lgui = keymap_config.swap_ralt_rgui = !macmode;
|
keymap_config.swap_lalt_lgui = keymap_config.swap_ralt_rgui = !macmode;
|
||||||
eeconfig_update_keymap(keymap_config.raw);
|
eeconfig_update_keymap(&keymap_config);
|
||||||
}
|
}
|
||||||
|
|
||||||
void matrix_init_kb(void) {
|
void matrix_init_kb(void) {
|
||||||
|
@ -27,7 +27,7 @@ void set_mac_mode(bool macmode) {
|
|||||||
* https://github.com/qmk/qmk_firmware/blob/fb4a6ad30ea7a648acd59793ed4a30c3a8d8dc32/quantum/process_keycode/process_magic.c#L80-L81
|
* https://github.com/qmk/qmk_firmware/blob/fb4a6ad30ea7a648acd59793ed4a30c3a8d8dc32/quantum/process_keycode/process_magic.c#L80-L81
|
||||||
*/
|
*/
|
||||||
keymap_config.swap_lalt_lgui = keymap_config.swap_ralt_rgui = !macmode;
|
keymap_config.swap_lalt_lgui = keymap_config.swap_ralt_rgui = !macmode;
|
||||||
eeconfig_update_keymap(keymap_config.raw);
|
eeconfig_update_keymap(&keymap_config);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DIP_SWITCH_ENABLE
|
#ifdef DIP_SWITCH_ENABLE
|
||||||
|
@ -27,7 +27,7 @@ void set_mac_mode(bool macmode) {
|
|||||||
* https://github.com/qmk/qmk_firmware/blob/fb4a6ad30ea7a648acd59793ed4a30c3a8d8dc32/quantum/process_keycode/process_magic.c#L80-L81
|
* https://github.com/qmk/qmk_firmware/blob/fb4a6ad30ea7a648acd59793ed4a30c3a8d8dc32/quantum/process_keycode/process_magic.c#L80-L81
|
||||||
*/
|
*/
|
||||||
keymap_config.swap_lalt_lgui = keymap_config.swap_ralt_rgui = !macmode;
|
keymap_config.swap_lalt_lgui = keymap_config.swap_ralt_rgui = !macmode;
|
||||||
eeconfig_update_keymap(keymap_config.raw);
|
eeconfig_update_keymap(&keymap_config);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DIP_SWITCH_ENABLE
|
#ifdef DIP_SWITCH_ENABLE
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <lib/lib8tion/lib8tion.h>
|
#include <lib/lib8tion/lib8tion.h>
|
||||||
|
#include "eeconfig.h"
|
||||||
|
|
||||||
#define LED_TRAIL 10
|
#define LED_TRAIL 10
|
||||||
|
|
||||||
@ -105,7 +106,7 @@ static void swirl_set_color(hsv_t hsv) {
|
|||||||
traverse_matrix();
|
traverse_matrix();
|
||||||
|
|
||||||
if (!(top <= bottom && left <= right)) {
|
if (!(top <= bottom && left <= right)) {
|
||||||
eeprom_read_block(&rgb_matrix_config, EECONFIG_RGB_MATRIX, sizeof(rgb_matrix_config));
|
eeconfig_read_rgb_matrix(&rgb_matrix_config);
|
||||||
rgb_matrix_mode_noeeprom(rgb_matrix_config.mode);
|
rgb_matrix_mode_noeeprom(rgb_matrix_config.mode);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -317,7 +317,7 @@ bool dip_switch_update_kb(uint8_t index, bool active) {
|
|||||||
}
|
}
|
||||||
if(active){
|
if(active){
|
||||||
keymap_config.no_gui = 0;
|
keymap_config.no_gui = 0;
|
||||||
eeconfig_update_keymap(keymap_config.raw);
|
eeconfig_update_keymap(&keymap_config);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -472,9 +472,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||||||
if (!eeconfig_is_enabled()) {
|
if (!eeconfig_is_enabled()) {
|
||||||
eeconfig_init();
|
eeconfig_init();
|
||||||
}
|
}
|
||||||
keymap_config.raw = eeconfig_read_keymap();
|
eeconfig_read_keymap(&keymap_config);
|
||||||
keymap_config.nkro = 1;
|
keymap_config.nkro = 1;
|
||||||
eeconfig_update_keymap(keymap_config.raw);
|
eeconfig_update_keymap(&keymap_config);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
case EXT_PLV:
|
case EXT_PLV:
|
||||||
|
@ -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;
|
|
||||||
}
|
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
@ -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);
|
||||||
|
@ -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);
|
||||||
|
@ -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);
|
||||||
|
@ -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;
|
|
||||||
};
|
|
||||||
|
@ -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);
|
||||||
|
@ -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));
|
||||||
|
@ -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));
|
||||||
|
@ -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));
|
||||||
|
@ -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));
|
||||||
|
@ -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;
|
|
||||||
}
|
|
||||||
|
@ -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;
|
|
||||||
};
|
|
||||||
|
@ -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;
|
|
||||||
}
|
|
||||||
|
@ -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);
|
||||||
|
@ -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);
|
||||||
|
@ -190,7 +190,7 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
|||||||
set_single_persistent_default_layer(MAC_B);
|
set_single_persistent_default_layer(MAC_B);
|
||||||
layer_state_set(1<<MAC_B);
|
layer_state_set(1<<MAC_B);
|
||||||
keymap_config.no_gui = 0;
|
keymap_config.no_gui = 0;
|
||||||
eeconfig_update_keymap(keymap_config.raw);
|
eeconfig_update_keymap(&keymap_config);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
case QK_RGB_MATRIX_TOGGLE:
|
case QK_RGB_MATRIX_TOGGLE:
|
||||||
|
@ -163,7 +163,7 @@ bool process_record_kb(uint16_t keycode, keyrecord_t* record) {
|
|||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
set_single_persistent_default_layer(MAC_B);
|
set_single_persistent_default_layer(MAC_B);
|
||||||
keymap_config.no_gui = 0;
|
keymap_config.no_gui = 0;
|
||||||
eeconfig_update_keymap(keymap_config.raw);
|
eeconfig_update_keymap(&keymap_config);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
case GU_TOGG:
|
case GU_TOGG:
|
||||||
|
@ -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;
|
|
||||||
}
|
|
||||||
|
@ -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;
|
|
||||||
}
|
|
||||||
|
@ -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) {
|
||||||
|
@ -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) {
|
||||||
|
@ -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;
|
|
||||||
}
|
|
||||||
|
@ -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);
|
||||||
|
@ -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);
|
||||||
|
@ -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);
|
||||||
|
@ -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);
|
||||||
|
@ -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);
|
||||||
|
@ -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);
|
||||||
|
@ -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);
|
||||||
|
@ -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);
|
||||||
|
@ -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);
|
||||||
|
@ -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);
|
||||||
|
@ -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);
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#include "omnikeyish.h"
|
#include "omnikeyish.h"
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include "eeprom.h"
|
||||||
|
|
||||||
dynamic_macro_t dynamic_macros[DYNAMIC_MACRO_COUNT];
|
dynamic_macro_t dynamic_macros[DYNAMIC_MACRO_COUNT];
|
||||||
|
|
||||||
|
@ -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);
|
||||||
|
@ -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;
|
|
||||||
}
|
|
||||||
|
@ -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) {
|
||||||
|
@ -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);
|
||||||
@ -233,9 +215,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||||||
if (!eeconfig_is_enabled()) {
|
if (!eeconfig_is_enabled()) {
|
||||||
eeconfig_init();
|
eeconfig_init();
|
||||||
}
|
}
|
||||||
keymap_config.raw = eeconfig_read_keymap();
|
eeconfig_read_keymap(&keymap_config);
|
||||||
keymap_config.nkro = 1;
|
keymap_config.nkro = 1;
|
||||||
eeconfig_update_keymap(keymap_config.raw);
|
eeconfig_update_keymap(&keymap_config);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
break;
|
break;
|
||||||
|
@ -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);
|
||||||
@ -270,9 +255,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||||||
if (!eeconfig_is_enabled()) {
|
if (!eeconfig_is_enabled()) {
|
||||||
eeconfig_init();
|
eeconfig_init();
|
||||||
}
|
}
|
||||||
keymap_config.raw = eeconfig_read_keymap();
|
eeconfig_read_keymap(&keymap_config);
|
||||||
keymap_config.nkro = 1;
|
keymap_config.nkro = 1;
|
||||||
eeconfig_update_keymap(keymap_config.raw);
|
eeconfig_update_keymap(&keymap_config);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
break;
|
break;
|
||||||
|
@ -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);
|
||||||
|
@ -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
|
||||||
|
@ -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);
|
||||||
|
@ -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);
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
#include "keycode_lookup.h"
|
#include "keycode_lookup.h"
|
||||||
#include "quantum_keycodes.h"
|
#include "quantum_keycodes.h"
|
||||||
#include "keymap_us.h"
|
#include "keymap_us.h"
|
||||||
|
@ -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,39 +182,14 @@ void matrix_scan_user(void) {
|
|||||||
case _ADJUST:
|
case _ADJUST:
|
||||||
set_led_magenta;
|
set_led_magenta;
|
||||||
break;
|
break;
|
||||||
|
case _COLEMAK:
|
||||||
|
set_led_white;
|
||||||
|
break;
|
||||||
|
case _DVORAK:
|
||||||
|
set_led_yellow;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
switch (default_layer) {
|
set_led_green;
|
||||||
case _COLEMAK:
|
|
||||||
set_led_white;
|
|
||||||
break;
|
|
||||||
case _DVORAK:
|
|
||||||
set_led_yellow;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user