aboutsummaryrefslogtreecommitdiffstats
path: root/keyboards/thevankeyboards
diff options
context:
space:
mode:
authorfauxpark <fauxpark@gmail.com>2019-07-16 16:04:02 +1000
committerskullydazed <skullydazed@users.noreply.github.com>2019-07-15 23:04:02 -0700
commitf14629ed1cd7c7ec9089604d64f29a99981558e8 (patch)
treea3691f4f3cb0c941694c16a3a94f73befb6ef6ec /keyboards/thevankeyboards
parent2a231457bd494079c36cf3e07c9b887016adb491 (diff)
downloadfirmware-f14629ed1cd7c7ec9089604d64f29a99981558e8.tar.gz
firmware-f14629ed1cd7c7ec9089604d64f29a99981558e8.tar.bz2
firmware-f14629ed1cd7c7ec9089604d64f29a99981558e8.zip
Remove/migrate action_get_macro()s from default keymaps (#5625)
* Remove/migrate action_get_macro()s from default keymaps * Leave these breaks alone
Diffstat (limited to 'keyboards/thevankeyboards')
-rw-r--r--keyboards/thevankeyboards/minivan/keymaps/default/keymap.c32
-rw-r--r--keyboards/thevankeyboards/roadkit/keymaps/default/keymap.c18
2 files changed, 27 insertions, 23 deletions
diff --git a/keyboards/thevankeyboards/minivan/keymaps/default/keymap.c b/keyboards/thevankeyboards/minivan/keymaps/default/keymap.c
index bc6c213f0..ac19f8ccd 100644
--- a/keyboards/thevankeyboards/minivan/keymaps/default/keymap.c
+++ b/keyboards/thevankeyboards/minivan/keymaps/default/keymap.c
@@ -14,16 +14,17 @@ extern keymap_config_t keymap_config;
#define _L2 4
#define _L3 5
-// Macro name shortcuts
-#define QWERTY M(_QW)
-#define DVORAK M(_DV)
-#define COLEMAK M(_CM)
-
// Curly braces have their own keys. These are defined to make them not mess up
// the grid in layer 2.
#define L_CURBR LSFT(KC_LBRC)
#define R_CURBR LSFT(KC_RBRC)
+enum custom_keycodes {
+ DVORAK = SAFE_RANGE,
+ QWERTY,
+ COLEMAK
+};
+
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QW] = LAYOUT( /* Qwerty */
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
@@ -68,24 +69,25 @@ void persistent_default_layer_set(uint16_t default_layer) {
default_layer_set(default_layer);
}
-const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
-{
- switch(id) {
- case _DV:
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch(keycode) {
+ case DVORAK:
if (record->event.pressed) {
persistent_default_layer_set(1UL<<_DV);
}
- break;
- case _QW:
+ return false;
+ case QWERTY:
if (record->event.pressed) {
persistent_default_layer_set(1UL<<_QW);
}
- break;
- case _CM:
+ return false;
+ case COLEMAK:
if (record->event.pressed) {
persistent_default_layer_set(1UL<<_CM);
}
- break;
+ return false;
+ default:
+ return true;
}
- return MACRO_NONE;
+ return true;
};
diff --git a/keyboards/thevankeyboards/roadkit/keymaps/default/keymap.c b/keyboards/thevankeyboards/roadkit/keymaps/default/keymap.c
index 7aa7bcafb..af1a94cc2 100644
--- a/keyboards/thevankeyboards/roadkit/keymaps/default/keymap.c
+++ b/keyboards/thevankeyboards/roadkit/keymaps/default/keymap.c
@@ -9,8 +9,9 @@ extern keymap_config_t keymap_config;
#define _NP 0
-// Macro name shortcuts
-#define NUMPAD M(_NP)
+enum custom_keycodes {
+ NUMPAD = SAFE_RANGE
+};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_NP] = LAYOUT_numpad_4x4( /* Numpad */
@@ -26,14 +27,15 @@ void persistent_default_layer_set(uint16_t default_layer) {
default_layer_set(default_layer);
}
-const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
-{
- switch(id) {
- case _NP:
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch(keycode) {
+ case NUMPAD:
if (record->event.pressed) {
persistent_default_layer_set(1UL<<_NP);
}
- break;
+ return false;
+ default:
+ return true;
}
- return MACRO_NONE;
+ return true;
};