Roadkit refactor and Configurator support (#3303)

* Matrix refactor: rename KEYMAP to LAYOUT_numpad_4x4

* Keymap refactor: QMK_KEYBOARD_H, matrix renames, readability

* Configurator support

* Add numpad_4x4 LAYOUT to rules.mk
pull/3312/head
noroadsleft 6 years ago committed by Drashna Jaelre
parent d5def73f6e
commit 3204dec096

@ -0,0 +1,15 @@
{
"keyboard_name": "Roadkit",
"url": "",
"maintainer": "qmk",
"width": 4,
"height": 4,
"layouts": {
"LAYOUT_numpad_4x4": {
"layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0, "h":2}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2, "h":2}, {"x":0, "y":3, "w":2}, {"x":2, "y":3}]
},
"LAYOUT_ortho_4x4": {
"layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}]
}
}
}

@ -1,6 +1,4 @@
#include "roadkit.h"
#include "action_layer.h"
#include "eeconfig.h"
#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
@ -20,11 +18,12 @@ extern keymap_config_t keymap_config;
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_NP] = /* Numpad */
KEYMAP(KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_PLUS, \
KC_KP_4, KC_KP_5, KC_KP_6, \
KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_ENTER, \
KC_KP_0, KC_KP_DOT),
[_NP] = LAYOUT_numpad_4x4( /* Numpad */
KC_P7, KC_P8, KC_P9, KC_PPLS, \
KC_P4, KC_P5, KC_P6, \
KC_P1, KC_P2, KC_P3, KC_PENT, \
KC_P0, KC_PDOT \
),
};
const uint16_t PROGMEM fn_actions[] = {

@ -1,6 +1,4 @@
#include "roadkit.h"
#include "action_layer.h"
#include "eeconfig.h"
#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
@ -47,31 +45,36 @@ enum roadkit_keycodes {
#define XXXXXXX KC_NO
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_NUMPAD] = /* Numpad */
KEYMAP(KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_PLUS, \
KC_KP_4, KC_KP_5, KC_KP_6, \
KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_ENTER, \
LT(_ADJUST, KC_KP_0), KC_KP_DOT),
[_FPH] = /* Quiet T9 */
KEYMAP(FPH_7, FPH_8, FPH_9, KC_KP_PLUS, \
FPH_4, FPH_5, FPH_6, \
FPH_1, FPH_2, FPH_3, SFT_T(KC_KP_ENTER), \
LT(_ADJUST, KC_SPACE), KC_KP_DOT),
[_FPHNOISY] = /* Noisy T9 */
KEYMAP(FPH_7, FPH_8, FPH_9, KC_KP_PLUS, \
FPH_4, FPH_5, FPH_6, \
FPH_1, FPH_2, FPH_3, SFT_T(KC_KP_ENTER), \
LT(_ADJUST, KC_SPACE), KC_KP_DOT),
[_ADJUST] = /* Adjustments */
KEYMAP(KC_NUMLOCK, TG(_FPHNOISY), TG(_FPH), TG(_NUMPAD), \
KC_BSPC, BACKLIT, KC_DEL, \
MACSLEEP, _______, _______, _______, \
_______, MO(_DYN)),
[_DYN] = /* DYNAMIC MACRO */
KEYMAP(DYN_REC_START1, DYN_REC_START2, _______, DYN_REC_STOP, \
_______, _______, _______, \
DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, _______, _______, \
_______, _______),
[_NUMPAD] = LAYOUT_numpad_4x4( /* Numpad */
KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_PLUS, \
KC_KP_4, KC_KP_5, KC_KP_6, \
KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_ENTER, \
LT(_ADJUST, KC_KP_0), KC_KP_DOT \
),
[_FPH] = LAYOUT_numpad_4x4( /* Quiet T9 */
FPH_7, FPH_8, FPH_9, KC_KP_PLUS, \
FPH_4, FPH_5, FPH_6, \
FPH_1, FPH_2, FPH_3, SFT_T(KC_KP_ENTER), \
LT(_ADJUST, KC_SPACE), KC_KP_DOT \
),
[_FPHNOISY] = LAYOUT_numpad_4x4( /* Noisy T9 */
FPH_7, FPH_8, FPH_9, KC_KP_PLUS, \
FPH_4, FPH_5, FPH_6, \
FPH_1, FPH_2, FPH_3, SFT_T(KC_KP_ENTER), \
LT(_ADJUST, KC_SPACE), KC_KP_DOT \
),
[_ADJUST] = LAYOUT_numpad_4x4( /* Adjustments */
KC_NUMLOCK, TG(_FPHNOISY), TG(_FPH), TG(_NUMPAD), \
KC_BSPC, BACKLIT, KC_DEL, \
MACSLEEP, _______, _______, _______, \
_______, MO(_DYN) \
),
[_DYN] = LAYOUT_numpad_4x4( /* DYNAMIC MACRO */
DYN_REC_START1, DYN_REC_START2, _______, DYN_REC_STOP, \
_______, _______, _______, \
DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, _______, _______, \
_______, _______ \
),
};
const uint16_t PROGMEM fn_actions[] = {

@ -1,6 +1,4 @@
#include "roadkit.h"
#include "action_layer.h"
#include "eeconfig.h"
#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
@ -22,57 +20,60 @@ enum custom_keycodes {
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Numpad
* ,-----------------------.
* | 7 | 8 | 9 |Bksp |
* |-----`-----`-----`-----|
* | 4 | 5 | 6 | Tab |
* |-----`-----`-----`-----|
* | 1 | 2 | 3 |Enter|
* |-----`-----`-----`-----|
* | 0 |Space| . | / |
* `-----`-----`-----`-----'
* | L1 | L2 | | | Layer hold
*/
[_NP] = /* Numpad */
LAYOUT_ortho_4x4(KC_P7, KC_P8, KC_P9, KC_BSPC, \
KC_P4, KC_P5, KC_P6, KC_TAB, \
KC_P1, KC_P2, KC_P3, KC_PENT, \
LT(1, KC_P0), LT(2, KC_SPC), KC_PDOT, KC_PSLS),
/* Numpad
* ,-----------------------.
* | 7 | 8 | 9 |Bksp |
* |-----`-----`-----`-----|
* | 4 | 5 | 6 | Tab |
* |-----`-----`-----`-----|
* | 1 | 2 | 3 |Enter|
* |-----`-----`-----`-----|
* | 0 |Space| . | / |
* `-----`-----`-----`-----'
* | L1 | L2 | | | Layer hold
*/
[_NP] = LAYOUT_ortho_4x4( /* Numpad */
KC_P7, KC_P8, KC_P9, KC_BSPC, \
KC_P4, KC_P5, KC_P6, KC_TAB, \
KC_P1, KC_P2, KC_P3, KC_PENT, \
LT(1, KC_P0), LT(2, KC_SPC), KC_PDOT, KC_PSLS
),
/* L1
* ,-----------------------.
* |Reset| | | Del |
* |-----`-----`-----`-----|
* | Left| Down| Up |Right|
* |-----`-----`-----`-----|
* | 192.| 255 | | |
* |-----`-----`-----`-----|
* |_____| LED | . | |
* `-----`-----`-----`-----'
*/
[_L1] = /* LAYER 1 */
LAYOUT_ortho_4x4(RESET, XXXXXXX, XXXXXXX, KC_DEL, \
KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, \
STR192, STR255, XXXXXXX, XXXXXXX, \
_______, BL_STEP, _______, XXXXXXX),
/* L2
* ,-----------------------.
* | | | str | str |
* |-----`-----`-----`-----|
* | | | | |
* |-----`-----`-----`-----|
* | | | | |
* |-----`-----`-----`-----|
* | |_____| | |
* `-----`-----`-----`-----'
*/
[_L2] = /* LAYER 2 */
LAYOUT_ortho_4x4(XXXXXXX, XXXXXXX, ADMIN, SMSPC1, \
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
XXXXXXX, _______, XXXXXXX, XXXXXXX)
/* L1
* ,-----------------------.
* |Reset| | | Del |
* |-----`-----`-----`-----|
* | Left| Down| Up |Right|
* |-----`-----`-----`-----|
* | 192.| 255 | | |
* |-----`-----`-----`-----|
* |_____| LED | . | |
* `-----`-----`-----`-----'
*/
[_L1] = LAYOUT_ortho_4x4( /* LAYER 1 */
RESET, XXXXXXX, XXXXXXX, KC_DEL, \
KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, \
STR192, STR255, XXXXXXX, XXXXXXX, \
_______, BL_STEP, _______, XXXXXXX
),
/* L2
* ,-----------------------.
* | | | str | str |
* |-----`-----`-----`-----|
* | | | | |
* |-----`-----`-----`-----|
* | | | | |
* |-----`-----`-----`-----|
* | |_____| | |
* `-----`-----`-----`-----'
*/
[_L2] = LAYOUT_ortho_4x4( /* LAYER 2 */
XXXXXXX, XXXXXXX, ADMIN, SMSPC1, \
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
XXXXXXX, _______, XXXXXXX, XXXXXXX
)
};
void persistent_default_layer_set(uint16_t default_layer) {
@ -84,25 +85,25 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case ADMIN:
if (record->event.pressed) {
SEND_STRING("Administrator");
SEND_STRING("Administrator");
}
return false;
break;
case SMSPC1:
if (record->event.pressed) {
SEND_STRING("Simspace1!");
SEND_STRING("Simspace1!");
}
return false;
break;
case STR192:
if (record->event.pressed) {
SEND_STRING("192.168.");
SEND_STRING("192.168.");
}
return false;
break;
case STR255:
if (record->event.pressed) {
SEND_STRING("255");
SEND_STRING("255");
}
return false;
break;

@ -1,6 +1,4 @@
#include "roadkit.h"
#include "action_layer.h"
#include "eeconfig.h"
#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
@ -46,31 +44,36 @@ enum minivan_keycodes {
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_NUMPAD] = /* Numpad */
KEYMAP(KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_PLUS, \
KC_KP_4, KC_KP_5, KC_KP_6, \
KC_KP_1, KC_KP_2, KC_KP_3, NAVIGATION, \
EXCEL, KC_KP_DOT),
[_EXCEL] = /* Excel related */
KEYMAP(KC_KP_SLASH, KC_KP_ASTERISK, KC_MINS, KC_TAB, \
KC_QUOT, KC_KP_EQUAL, PARENS , \
KC_DQT, BRACKETS, BRACES, _______, \
_______, MO(_DYN)),
[_NAVIGATION] = /* Navigation */
KEYMAP(KC_HOME, _______, KC_PGUP, KC_TAB, \
KC_END, KC_UP, KC_PGDN, \
KC_LEFT, KC_DOWN, KC_RIGHT, _______, \
_______, MO(_DYN)),
[_ADJUST] = /* Adjustments */
KEYMAP(KC_NUMLOCK, MACSLEEP, BACKLIT, _______, \
KC_BSPC, _______, KC_DEL, \
EXCEL_LOCK, NUMPAD_LOCK, NAVIGATION_LOCK, _______, \
_______, _______),
[_DYN] = /* DYNAMIC MACRO */
KEYMAP(DYN_REC_START1, DYN_REC_START2, _______, _______, \
_______, _______, _______, \
DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, _______, _______, \
_______, _______),
[_NUMPAD] = LAYOUT_numpad_4x4( /* Numpad */
KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_PLUS, \
KC_KP_4, KC_KP_5, KC_KP_6, \
KC_KP_1, KC_KP_2, KC_KP_3, NAVIGATION, \
EXCEL, KC_KP_DOT
),
[_EXCEL] = LAYOUT_numpad_4x4( /* Excel related */
KC_KP_SLASH, KC_KP_ASTERISK, KC_MINS, KC_TAB, \
KC_QUOT, KC_KP_EQUAL, PARENS, \
KC_DQT, BRACKETS, BRACES, _______, \
_______, MO(_DYN)
),
[_NAVIGATION] = LAYOUT_numpad_4x4( /* Navigation */
KC_HOME, _______, KC_PGUP, KC_TAB, \
KC_END, KC_UP, KC_PGDN, \
KC_LEFT, KC_DOWN, KC_RIGHT, _______, \
_______, MO(_DYN)
),
[_ADJUST] = LAYOUT_numpad_4x4( /* Adjustments */
KC_NUMLOCK, MACSLEEP, BACKLIT, _______, \
KC_BSPC, _______, KC_DEL, \
EXCEL_LOCK, NUMPAD_LOCK, NAVIGATION_LOCK, _______, \
_______, _______
),
[_DYN] = LAYOUT_numpad_4x4( /* DYNAMIC MACRO */
DYN_REC_START1, DYN_REC_START2, _______, _______, \
_______, _______, _______, \
DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, _______, _______, \
_______, _______
),
};
const uint16_t PROGMEM fn_actions[] = {

@ -1,6 +1,4 @@
#include "roadkit.h"
#include "action_layer.h"
#include "eeconfig.h"
#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
@ -22,16 +20,18 @@ extern keymap_config_t keymap_config;
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_NP] = /* Numpad */
LAYOUT_ortho_4x4(KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_PLUS, \
KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_MINUS, \
KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_ENTER, \
KC_KP_0, KC_KP_DOT, TG(_L1), KC_BSPC),
[_L1] = /* LAYER 1 */
LAYOUT_ortho_4x4(KC_NUMLOCK, KC_TRNS, KC_TRNS, KC_VOLU, \
KC_TRNS, KC_UP, KC_TRNS, KC_VOLD, \
KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, \
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)
[_NP] = LAYOUT_ortho_4x4( /* Numpad */
KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_PLUS, \
KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_MINUS, \
KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_ENTER, \
KC_KP_0, KC_KP_DOT, TG(_L1), KC_BSPC
),
[_L1] = LAYOUT_ortho_4x4( /* LAYER 1 */
KC_NUMLOCK, _______, _______, KC_VOLU, \
_______, KC_UP, _______, KC_VOLD, \
KC_LEFT, KC_DOWN, KC_RIGHT, _______, \
_______, _______, _______, _______
)
};
const uint16_t PROGMEM fn_actions[] = {

@ -1,6 +1,4 @@
#include "roadkit.h"
#include "action_layer.h"
#include "eeconfig.h"
#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
@ -132,77 +130,80 @@ qk_tap_dance_action_t tap_dance_actions[] = {
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Numberpad
* ,-----------------------.
* | 7 | 8 | 9 | / |
* |-----`-----`-----`-----|
* | 4 | 5 | 6 | * |
* |-----`-----`-----`-----|
* | 1 | 2 | 3 | - |
* |-----`-----`-----`-----|
* | 0 | . | + | = |
* `-----`-----`-----`-----'
* Tapdances:
* | L3 | L2 | L1 | NP |
* `-----`-----`-----`-----'
*/
[_NP] = /* Numpad */
LAYOUT_ortho_4x4(KC_7, KC_8, KC_9, KC_SLASH, \
KC_4, KC_5, KC_6, KC_KP_ASTERISK, \
KC_1, KC_2, KC_3, KC_MINUS, \
TD(TD_0_L3), TD(TD_DOT_L2), TD(TD_KP_PLUS_L1), TD(TD_EQUAL_NP)),
/* L1
* ,-----------------------.
* | Esc |Bksp |Home |PgUp |
* |-----`-----`-----`-----|
* | Tab | Up | End |PgDn |
* |-----`-----`-----`-----|
* |Left |Down |Right|Enter|
* |-----`-----`-----`-----|
* | 0 | . | + | = |
* `-----`-----`-----`-----'
*/
[_L1] = /* LAYER 1 */
LAYOUT_ortho_4x4(KC_ESCAPE, KC_BSPACE, KC_HOME, KC_PGUP, \
KC_TAB, KC_UP, KC_END, KC_PGDOWN, \
KC_LEFT, KC_DOWN, KC_RIGHT, KC_KP_ENTER, \
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
/* L2
* ,-----------------------.
* |Sleep|LClik|RClik|VolUp|
* |-----`-----`-----`-----|
* |AltF4| F11 |WinTb|VolDn|
* |-----`-----`-----`-----|
* |PrvTk|Play |NxtTk|Mute |
* |-----`-----`-----`-----|
* | 0 | . | + | = |
* `-----`-----`-----`-----'
*/
[_L2] = /* LAYER 2 */
LAYOUT_ortho_4x4(KC_SYSTEM_SLEEP, KC_MS_BTN1, KC_MS_BTN2, KC_AUDIO_VOL_UP, \
LALT(KC_F4), KC_F11, LGUI(KC_TAB), KC_AUDIO_VOL_DOWN, \
KC_MEDIA_PREV_TRACK, KC_MEDIA_PLAY_PAUSE, KC_MEDIA_NEXT_TRACK, KC_AUDIO_MUTE, \
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
/* L3 needs cut, copy, paste, undo, again (redo), find, calc, www back, www forward, F5
* ,-----------------------.
* |WBack|WHome|WFor | F5 |
* |-----`-----`-----`-----|
* |Calc |Undo |Redo |WSrch|
* |-----`-----`-----`-----|
* | Cut |Copy |Paste|Find |
* |-----`-----`-----`-----|
* | 0 | . | + | = |
* `-----`-----`-----`-----'
*/
[_L3] = /* LAYER 3 */
LAYOUT_ortho_4x4(KC_WWW_BACK, KC_WWW_HOME, KC_WWW_FORWARD, KC_F5, \
KC_CALCULATOR, LCTL(KC_Z), LCTL(KC_Y), KC_WWW_SEARCH, \
LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), LCTL(KC_F), \
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
/* Numberpad
* ,-----------------------.
* | 7 | 8 | 9 | / |
* |-----`-----`-----`-----|
* | 4 | 5 | 6 | * |
* |-----`-----`-----`-----|
* | 1 | 2 | 3 | - |
* |-----`-----`-----`-----|
* | 0 | . | + | = |
* `-----`-----`-----`-----'
* Tapdances:
* | L3 | L2 | L1 | NP |
* `-----`-----`-----`-----'
*/
[_NP] = LAYOUT_ortho_4x4( /* Numpad */
KC_7, KC_8, KC_9, KC_SLASH, \
KC_4, KC_5, KC_6, KC_KP_ASTERISK, \
KC_1, KC_2, KC_3, KC_MINUS, \
TD(TD_0_L3), TD(TD_DOT_L2), TD(TD_KP_PLUS_L1), TD(TD_EQUAL_NP)
),
/* L1
* ,-----------------------.
* | Esc |Bksp |Home |PgUp |
* |-----`-----`-----`-----|
* | Tab | Up | End |PgDn |
* |-----`-----`-----`-----|
* |Left |Down |Right|Enter|
* |-----`-----`-----`-----|
* | 0 | . | + | = |
* `-----`-----`-----`-----'
*/
[_L1] = LAYOUT_ortho_4x4( /* LAYER 1 */
KC_ESCAPE, KC_BSPACE, KC_HOME, KC_PGUP, \
KC_TAB, KC_UP, KC_END, KC_PGDOWN, \
KC_LEFT, KC_DOWN, KC_RIGHT, KC_KP_ENTER, \
_______, _______, _______, _______
),
/* L2
* ,-----------------------.
* |Sleep|LClik|RClik|VolUp|
* |-----`-----`-----`-----|
* |AltF4| F11 |WinTb|VolDn|
* |-----`-----`-----`-----|
* |PrvTk|Play |NxtTk|Mute |
* |-----`-----`-----`-----|
* | 0 | . | + | = |
* `-----`-----`-----`-----'
*/
[_L2] = LAYOUT_ortho_4x4( /* LAYER 2 */
KC_SYSTEM_SLEEP, KC_MS_BTN1, KC_MS_BTN2, KC_AUDIO_VOL_UP, \
LALT(KC_F4), KC_F11, LGUI(KC_TAB), KC_AUDIO_VOL_DOWN, \
KC_MEDIA_PREV_TRACK, KC_MEDIA_PLAY_PAUSE, KC_MEDIA_NEXT_TRACK, KC_AUDIO_MUTE, \
_______, _______, _______, _______
),
/* L3 needs cut, copy, paste, undo, again (redo), find, calc, www back, www forward, F5
* ,-----------------------.
* |WBack|WHome|WFor | F5 |
* |-----`-----`-----`-----|
* |Calc |Undo |Redo |WSrch|
* |-----`-----`-----`-----|
* | Cut |Copy |Paste|Find |
* |-----`-----`-----`-----|
* | 0 | . | + | = |
* `-----`-----`-----`-----'
*/
[_L3] = LAYOUT_ortho_4x4( /* LAYER 3 */
KC_SYSTEM_SLEEP, KC_MS_BTN1, KC_MS_BTN2, KC_AUDIO_VOL_UP, \
LALT(KC_F4), KC_F11, LGUI(KC_TAB), KC_AUDIO_VOL_DOWN, \
KC_MEDIA_PREV_TRACK, KC_MEDIA_PLAY_PAUSE, KC_MEDIA_NEXT_TRACK, KC_AUDIO_MUTE, \
_______, _______, _______, _______
),
};
const uint16_t PROGMEM fn_actions[] = {
@ -214,29 +215,28 @@ 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 _L3:
if (record->event.pressed) {
persistent_default_layer_set(1UL<<_L3);
}
break;
case _L2:
if (record->event.pressed) {
persistent_default_layer_set(1UL<<_L2);
}
break;
case _L1:
if (record->event.pressed) {
persistent_default_layer_set(1UL<<_L1);
}
break;
case _NP:
if (record->event.pressed) {
persistent_default_layer_set(1UL<<_NP);
}
break;
}
return MACRO_NONE;
const macro_t * action_get_macro(keyrecord_t * record, uint8_t id, uint8_t opt) {
switch (id) {
case _L3:
if (record->event.pressed) {
persistent_default_layer_set(1UL<<_L3);
}
break;
case _L2:
if (record->event.pressed) {
persistent_default_layer_set(1UL<<_L2);
}
break;
case _L1:
if (record->event.pressed) {
persistent_default_layer_set(1UL<<_L1);
}
break;
case _NP:
if (record->event.pressed) {
persistent_default_layer_set(1UL<<_NP);
}
break;
}
return MACRO_NONE;
};

@ -4,7 +4,7 @@
#include "quantum.h"
// This is a shortcut to help you visually see your layout.
#define KEYMAP( \
#define LAYOUT_numpad_4x4( \
K00, K01, K02, K03, \
K10, K11, K12, \
K20, K21, K22, K23, \

@ -68,4 +68,4 @@ UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
AUDIO_ENABLE = no # Audio output on port C6
LAYOUTS = ortho_4x4
LAYOUTS = numpad_4x4 ortho_4x4

Loading…
Cancel
Save