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.mkmaster
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 QMK_KEYBOARD_H
|
||||||
#include "action_layer.h"
|
|
||||||
#include "eeconfig.h"
|
|
||||||
|
|
||||||
extern keymap_config_t keymap_config;
|
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] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
[_NP] = /* Numpad */
|
[_NP] = LAYOUT_numpad_4x4( /* Numpad */
|
||||||
KEYMAP(KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_PLUS, \
|
KC_P7, KC_P8, KC_P9, KC_PPLS, \
|
||||||
KC_KP_4, KC_KP_5, KC_KP_6, \
|
KC_P4, KC_P5, KC_P6, \
|
||||||
KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_ENTER, \
|
KC_P1, KC_P2, KC_P3, KC_PENT, \
|
||||||
KC_KP_0, KC_KP_DOT),
|
KC_P0, KC_PDOT \
|
||||||
|
),
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint16_t PROGMEM fn_actions[] = {
|
const uint16_t PROGMEM fn_actions[] = {
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
#include "roadkit.h"
|
#include QMK_KEYBOARD_H
|
||||||
#include "action_layer.h"
|
|
||||||
#include "eeconfig.h"
|
|
||||||
|
|
||||||
extern keymap_config_t keymap_config;
|
extern keymap_config_t keymap_config;
|
||||||
|
|
||||||
|
@ -47,31 +45,36 @@ enum roadkit_keycodes {
|
||||||
#define XXXXXXX KC_NO
|
#define XXXXXXX KC_NO
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
[_NUMPAD] = /* Numpad */
|
[_NUMPAD] = LAYOUT_numpad_4x4( /* Numpad */
|
||||||
KEYMAP(KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_PLUS, \
|
KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_PLUS, \
|
||||||
KC_KP_4, KC_KP_5, KC_KP_6, \
|
KC_KP_4, KC_KP_5, KC_KP_6, \
|
||||||
KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_ENTER, \
|
KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_ENTER, \
|
||||||
LT(_ADJUST, KC_KP_0), KC_KP_DOT),
|
LT(_ADJUST, KC_KP_0), KC_KP_DOT \
|
||||||
[_FPH] = /* Quiet T9 */
|
),
|
||||||
KEYMAP(FPH_7, FPH_8, FPH_9, KC_KP_PLUS, \
|
[_FPH] = LAYOUT_numpad_4x4( /* Quiet T9 */
|
||||||
FPH_4, FPH_5, FPH_6, \
|
FPH_7, FPH_8, FPH_9, KC_KP_PLUS, \
|
||||||
FPH_1, FPH_2, FPH_3, SFT_T(KC_KP_ENTER), \
|
FPH_4, FPH_5, FPH_6, \
|
||||||
LT(_ADJUST, KC_SPACE), KC_KP_DOT),
|
FPH_1, FPH_2, FPH_3, SFT_T(KC_KP_ENTER), \
|
||||||
[_FPHNOISY] = /* Noisy T9 */
|
LT(_ADJUST, KC_SPACE), KC_KP_DOT \
|
||||||
KEYMAP(FPH_7, FPH_8, FPH_9, KC_KP_PLUS, \
|
),
|
||||||
FPH_4, FPH_5, FPH_6, \
|
[_FPHNOISY] = LAYOUT_numpad_4x4( /* Noisy T9 */
|
||||||
FPH_1, FPH_2, FPH_3, SFT_T(KC_KP_ENTER), \
|
FPH_7, FPH_8, FPH_9, KC_KP_PLUS, \
|
||||||
LT(_ADJUST, KC_SPACE), KC_KP_DOT),
|
FPH_4, FPH_5, FPH_6, \
|
||||||
[_ADJUST] = /* Adjustments */
|
FPH_1, FPH_2, FPH_3, SFT_T(KC_KP_ENTER), \
|
||||||
KEYMAP(KC_NUMLOCK, TG(_FPHNOISY), TG(_FPH), TG(_NUMPAD), \
|
LT(_ADJUST, KC_SPACE), KC_KP_DOT \
|
||||||
KC_BSPC, BACKLIT, KC_DEL, \
|
),
|
||||||
MACSLEEP, _______, _______, _______, \
|
[_ADJUST] = LAYOUT_numpad_4x4( /* Adjustments */
|
||||||
_______, MO(_DYN)),
|
KC_NUMLOCK, TG(_FPHNOISY), TG(_FPH), TG(_NUMPAD), \
|
||||||
[_DYN] = /* DYNAMIC MACRO */
|
KC_BSPC, BACKLIT, KC_DEL, \
|
||||||
KEYMAP(DYN_REC_START1, DYN_REC_START2, _______, DYN_REC_STOP, \
|
MACSLEEP, _______, _______, _______, \
|
||||||
_______, _______, _______, \
|
_______, MO(_DYN) \
|
||||||
DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, _______, _______, \
|
),
|
||||||
_______, _______),
|
[_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[] = {
|
const uint16_t PROGMEM fn_actions[] = {
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
#include "roadkit.h"
|
#include QMK_KEYBOARD_H
|
||||||
#include "action_layer.h"
|
|
||||||
#include "eeconfig.h"
|
|
||||||
|
|
||||||
extern keymap_config_t keymap_config;
|
extern keymap_config_t keymap_config;
|
||||||
|
|
||||||
|
@ -22,57 +20,60 @@ enum custom_keycodes {
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
/* Numpad
|
/* Numpad
|
||||||
* ,-----------------------.
|
* ,-----------------------.
|
||||||
* | 7 | 8 | 9 |Bksp |
|
* | 7 | 8 | 9 |Bksp |
|
||||||
* |-----`-----`-----`-----|
|
* |-----`-----`-----`-----|
|
||||||
* | 4 | 5 | 6 | Tab |
|
* | 4 | 5 | 6 | Tab |
|
||||||
* |-----`-----`-----`-----|
|
* |-----`-----`-----`-----|
|
||||||
* | 1 | 2 | 3 |Enter|
|
* | 1 | 2 | 3 |Enter|
|
||||||
* |-----`-----`-----`-----|
|
* |-----`-----`-----`-----|
|
||||||
* | 0 |Space| . | / |
|
* | 0 |Space| . | / |
|
||||||
* `-----`-----`-----`-----'
|
* `-----`-----`-----`-----'
|
||||||
* | L1 | L2 | | | Layer hold
|
* | L1 | L2 | | | Layer hold
|
||||||
*/
|
*/
|
||||||
[_NP] = /* Numpad */
|
[_NP] = LAYOUT_ortho_4x4( /* Numpad */
|
||||||
LAYOUT_ortho_4x4(KC_P7, KC_P8, KC_P9, KC_BSPC, \
|
KC_P7, KC_P8, KC_P9, KC_BSPC, \
|
||||||
KC_P4, KC_P5, KC_P6, KC_TAB, \
|
KC_P4, KC_P5, KC_P6, KC_TAB, \
|
||||||
KC_P1, KC_P2, KC_P3, KC_PENT, \
|
KC_P1, KC_P2, KC_P3, KC_PENT, \
|
||||||
LT(1, KC_P0), LT(2, KC_SPC), KC_PDOT, KC_PSLS),
|
LT(1, KC_P0), LT(2, KC_SPC), KC_PDOT, KC_PSLS
|
||||||
|
),
|
||||||
|
|
||||||
/* L1
|
/* L1
|
||||||
* ,-----------------------.
|
* ,-----------------------.
|
||||||
* |Reset| | | Del |
|
* |Reset| | | Del |
|
||||||
* |-----`-----`-----`-----|
|
* |-----`-----`-----`-----|
|
||||||
* | Left| Down| Up |Right|
|
* | Left| Down| Up |Right|
|
||||||
* |-----`-----`-----`-----|
|
* |-----`-----`-----`-----|
|
||||||
* | 192.| 255 | | |
|
* | 192.| 255 | | |
|
||||||
* |-----`-----`-----`-----|
|
* |-----`-----`-----`-----|
|
||||||
* |_____| LED | . | |
|
* |_____| LED | . | |
|
||||||
* `-----`-----`-----`-----'
|
* `-----`-----`-----`-----'
|
||||||
*/
|
*/
|
||||||
[_L1] = /* LAYER 1 */
|
[_L1] = LAYOUT_ortho_4x4( /* LAYER 1 */
|
||||||
LAYOUT_ortho_4x4(RESET, XXXXXXX, XXXXXXX, KC_DEL, \
|
RESET, XXXXXXX, XXXXXXX, KC_DEL, \
|
||||||
KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, \
|
KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, \
|
||||||
STR192, STR255, XXXXXXX, XXXXXXX, \
|
STR192, STR255, XXXXXXX, XXXXXXX, \
|
||||||
_______, BL_STEP, _______, XXXXXXX),
|
_______, BL_STEP, _______, XXXXXXX
|
||||||
|
),
|
||||||
/* L2
|
|
||||||
* ,-----------------------.
|
/* L2
|
||||||
* | | | str | str |
|
* ,-----------------------.
|
||||||
* |-----`-----`-----`-----|
|
* | | | str | str |
|
||||||
* | | | | |
|
* |-----`-----`-----`-----|
|
||||||
* |-----`-----`-----`-----|
|
* | | | | |
|
||||||
* | | | | |
|
* |-----`-----`-----`-----|
|
||||||
* |-----`-----`-----`-----|
|
* | | | | |
|
||||||
* | |_____| | |
|
* |-----`-----`-----`-----|
|
||||||
* `-----`-----`-----`-----'
|
* | |_____| | |
|
||||||
*/
|
* `-----`-----`-----`-----'
|
||||||
[_L2] = /* LAYER 2 */
|
*/
|
||||||
LAYOUT_ortho_4x4(XXXXXXX, XXXXXXX, ADMIN, SMSPC1, \
|
[_L2] = LAYOUT_ortho_4x4( /* LAYER 2 */
|
||||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
|
XXXXXXX, XXXXXXX, ADMIN, SMSPC1, \
|
||||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
|
||||||
XXXXXXX, _______, XXXXXXX, XXXXXXX)
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
|
||||||
|
XXXXXXX, _______, XXXXXXX, XXXXXXX
|
||||||
|
)
|
||||||
};
|
};
|
||||||
|
|
||||||
void persistent_default_layer_set(uint16_t default_layer) {
|
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) {
|
switch (keycode) {
|
||||||
case ADMIN:
|
case ADMIN:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
SEND_STRING("Administrator");
|
SEND_STRING("Administrator");
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
break;
|
break;
|
||||||
case SMSPC1:
|
case SMSPC1:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
SEND_STRING("Simspace1!");
|
SEND_STRING("Simspace1!");
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
break;
|
break;
|
||||||
case STR192:
|
case STR192:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
SEND_STRING("192.168.");
|
SEND_STRING("192.168.");
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
break;
|
break;
|
||||||
case STR255:
|
case STR255:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
SEND_STRING("255");
|
SEND_STRING("255");
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
#include "roadkit.h"
|
#include QMK_KEYBOARD_H
|
||||||
#include "action_layer.h"
|
|
||||||
#include "eeconfig.h"
|
|
||||||
|
|
||||||
extern keymap_config_t keymap_config;
|
extern keymap_config_t keymap_config;
|
||||||
|
|
||||||
|
@ -46,31 +44,36 @@ enum minivan_keycodes {
|
||||||
|
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
[_NUMPAD] = /* Numpad */
|
[_NUMPAD] = LAYOUT_numpad_4x4( /* Numpad */
|
||||||
KEYMAP(KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_PLUS, \
|
KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_PLUS, \
|
||||||
KC_KP_4, KC_KP_5, KC_KP_6, \
|
KC_KP_4, KC_KP_5, KC_KP_6, \
|
||||||
KC_KP_1, KC_KP_2, KC_KP_3, NAVIGATION, \
|
KC_KP_1, KC_KP_2, KC_KP_3, NAVIGATION, \
|
||||||
EXCEL, KC_KP_DOT),
|
EXCEL, KC_KP_DOT
|
||||||
[_EXCEL] = /* Excel related */
|
),
|
||||||
KEYMAP(KC_KP_SLASH, KC_KP_ASTERISK, KC_MINS, KC_TAB, \
|
[_EXCEL] = LAYOUT_numpad_4x4( /* Excel related */
|
||||||
KC_QUOT, KC_KP_EQUAL, PARENS , \
|
KC_KP_SLASH, KC_KP_ASTERISK, KC_MINS, KC_TAB, \
|
||||||
KC_DQT, BRACKETS, BRACES, _______, \
|
KC_QUOT, KC_KP_EQUAL, PARENS, \
|
||||||
_______, MO(_DYN)),
|
KC_DQT, BRACKETS, BRACES, _______, \
|
||||||
[_NAVIGATION] = /* Navigation */
|
_______, MO(_DYN)
|
||||||
KEYMAP(KC_HOME, _______, KC_PGUP, KC_TAB, \
|
),
|
||||||
KC_END, KC_UP, KC_PGDN, \
|
[_NAVIGATION] = LAYOUT_numpad_4x4( /* Navigation */
|
||||||
KC_LEFT, KC_DOWN, KC_RIGHT, _______, \
|
KC_HOME, _______, KC_PGUP, KC_TAB, \
|
||||||
_______, MO(_DYN)),
|
KC_END, KC_UP, KC_PGDN, \
|
||||||
[_ADJUST] = /* Adjustments */
|
KC_LEFT, KC_DOWN, KC_RIGHT, _______, \
|
||||||
KEYMAP(KC_NUMLOCK, MACSLEEP, BACKLIT, _______, \
|
_______, MO(_DYN)
|
||||||
KC_BSPC, _______, KC_DEL, \
|
),
|
||||||
EXCEL_LOCK, NUMPAD_LOCK, NAVIGATION_LOCK, _______, \
|
[_ADJUST] = LAYOUT_numpad_4x4( /* Adjustments */
|
||||||
_______, _______),
|
KC_NUMLOCK, MACSLEEP, BACKLIT, _______, \
|
||||||
[_DYN] = /* DYNAMIC MACRO */
|
KC_BSPC, _______, KC_DEL, \
|
||||||
KEYMAP(DYN_REC_START1, DYN_REC_START2, _______, _______, \
|
EXCEL_LOCK, NUMPAD_LOCK, NAVIGATION_LOCK, _______, \
|
||||||
_______, _______, _______, \
|
_______, _______
|
||||||
DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, _______, _______, \
|
),
|
||||||
_______, _______),
|
[_DYN] = LAYOUT_numpad_4x4( /* DYNAMIC MACRO */
|
||||||
|
DYN_REC_START1, DYN_REC_START2, _______, _______, \
|
||||||
|
_______, _______, _______, \
|
||||||
|
DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, _______, _______, \
|
||||||
|
_______, _______
|
||||||
|
),
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint16_t PROGMEM fn_actions[] = {
|
const uint16_t PROGMEM fn_actions[] = {
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
#include "roadkit.h"
|
#include QMK_KEYBOARD_H
|
||||||
#include "action_layer.h"
|
|
||||||
#include "eeconfig.h"
|
|
||||||
|
|
||||||
extern keymap_config_t keymap_config;
|
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] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
[_NP] = /* Numpad */
|
[_NP] = LAYOUT_ortho_4x4( /* Numpad */
|
||||||
LAYOUT_ortho_4x4(KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_PLUS, \
|
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_4, KC_KP_5, KC_KP_6, KC_KP_MINUS, \
|
||||||
KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_ENTER, \
|
KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_ENTER, \
|
||||||
KC_KP_0, KC_KP_DOT, TG(_L1), KC_BSPC),
|
KC_KP_0, KC_KP_DOT, TG(_L1), KC_BSPC
|
||||||
[_L1] = /* LAYER 1 */
|
),
|
||||||
LAYOUT_ortho_4x4(KC_NUMLOCK, KC_TRNS, KC_TRNS, KC_VOLU, \
|
[_L1] = LAYOUT_ortho_4x4( /* LAYER 1 */
|
||||||
KC_TRNS, KC_UP, KC_TRNS, KC_VOLD, \
|
KC_NUMLOCK, _______, _______, KC_VOLU, \
|
||||||
KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, \
|
_______, KC_UP, _______, KC_VOLD, \
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)
|
KC_LEFT, KC_DOWN, KC_RIGHT, _______, \
|
||||||
|
_______, _______, _______, _______
|
||||||
|
)
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint16_t PROGMEM fn_actions[] = {
|
const uint16_t PROGMEM fn_actions[] = {
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
#include "roadkit.h"
|
#include QMK_KEYBOARD_H
|
||||||
#include "action_layer.h"
|
|
||||||
#include "eeconfig.h"
|
|
||||||
|
|
||||||
extern keymap_config_t keymap_config;
|
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] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
/* Numberpad
|
/* Numberpad
|
||||||
* ,-----------------------.
|
* ,-----------------------.
|
||||||
* | 7 | 8 | 9 | / |
|
* | 7 | 8 | 9 | / |
|
||||||
* |-----`-----`-----`-----|
|
* |-----`-----`-----`-----|
|
||||||
* | 4 | 5 | 6 | * |
|
* | 4 | 5 | 6 | * |
|
||||||
* |-----`-----`-----`-----|
|
* |-----`-----`-----`-----|
|
||||||
* | 1 | 2 | 3 | - |
|
* | 1 | 2 | 3 | - |
|
||||||
* |-----`-----`-----`-----|
|
* |-----`-----`-----`-----|
|
||||||
* | 0 | . | + | = |
|
* | 0 | . | + | = |
|
||||||
* `-----`-----`-----`-----'
|
* `-----`-----`-----`-----'
|
||||||
* Tapdances:
|
* Tapdances:
|
||||||
* | L3 | L2 | L1 | NP |
|
* | L3 | L2 | L1 | NP |
|
||||||
* `-----`-----`-----`-----'
|
* `-----`-----`-----`-----'
|
||||||
*/
|
*/
|
||||||
[_NP] = /* Numpad */
|
[_NP] = LAYOUT_ortho_4x4( /* Numpad */
|
||||||
LAYOUT_ortho_4x4(KC_7, KC_8, KC_9, KC_SLASH, \
|
KC_7, KC_8, KC_9, KC_SLASH, \
|
||||||
KC_4, KC_5, KC_6, KC_KP_ASTERISK, \
|
KC_4, KC_5, KC_6, KC_KP_ASTERISK, \
|
||||||
KC_1, KC_2, KC_3, KC_MINUS, \
|
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)),
|
TD(TD_0_L3), TD(TD_DOT_L2), TD(TD_KP_PLUS_L1), TD(TD_EQUAL_NP)
|
||||||
|
),
|
||||||
|
|
||||||
/* L1
|
/* L1
|
||||||
* ,-----------------------.
|
* ,-----------------------.
|
||||||
* | Esc |Bksp |Home |PgUp |
|
* | Esc |Bksp |Home |PgUp |
|
||||||
* |-----`-----`-----`-----|
|
* |-----`-----`-----`-----|
|
||||||
* | Tab | Up | End |PgDn |
|
* | Tab | Up | End |PgDn |
|
||||||
* |-----`-----`-----`-----|
|
* |-----`-----`-----`-----|
|
||||||
* |Left |Down |Right|Enter|
|
* |Left |Down |Right|Enter|
|
||||||
* |-----`-----`-----`-----|
|
* |-----`-----`-----`-----|
|
||||||
* | 0 | . | + | = |
|
* | 0 | . | + | = |
|
||||||
* `-----`-----`-----`-----'
|
* `-----`-----`-----`-----'
|
||||||
*/
|
*/
|
||||||
[_L1] = /* LAYER 1 */
|
[_L1] = LAYOUT_ortho_4x4( /* LAYER 1 */
|
||||||
LAYOUT_ortho_4x4(KC_ESCAPE, KC_BSPACE, KC_HOME, KC_PGUP, \
|
KC_ESCAPE, KC_BSPACE, KC_HOME, KC_PGUP, \
|
||||||
KC_TAB, KC_UP, KC_END, KC_PGDOWN, \
|
KC_TAB, KC_UP, KC_END, KC_PGDOWN, \
|
||||||
KC_LEFT, KC_DOWN, KC_RIGHT, KC_KP_ENTER, \
|
KC_LEFT, KC_DOWN, KC_RIGHT, KC_KP_ENTER, \
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
_______, _______, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
/* L2
|
/* L2
|
||||||
* ,-----------------------.
|
* ,-----------------------.
|
||||||
* |Sleep|LClik|RClik|VolUp|
|
* |Sleep|LClik|RClik|VolUp|
|
||||||
* |-----`-----`-----`-----|
|
* |-----`-----`-----`-----|
|
||||||
* |AltF4| F11 |WinTb|VolDn|
|
* |AltF4| F11 |WinTb|VolDn|
|
||||||
* |-----`-----`-----`-----|
|
* |-----`-----`-----`-----|
|
||||||
* |PrvTk|Play |NxtTk|Mute |
|
* |PrvTk|Play |NxtTk|Mute |
|
||||||
* |-----`-----`-----`-----|
|
* |-----`-----`-----`-----|
|
||||||
* | 0 | . | + | = |
|
* | 0 | . | + | = |
|
||||||
* `-----`-----`-----`-----'
|
* `-----`-----`-----`-----'
|
||||||
*/
|
*/
|
||||||
[_L2] = /* LAYER 2 */
|
[_L2] = LAYOUT_ortho_4x4( /* LAYER 2 */
|
||||||
LAYOUT_ortho_4x4(KC_SYSTEM_SLEEP, KC_MS_BTN1, KC_MS_BTN2, KC_AUDIO_VOL_UP, \
|
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, \
|
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_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
|
||||||
/* L3 needs cut, copy, paste, undo, again (redo), find, calc, www back, www forward, F5
|
* ,-----------------------.
|
||||||
* ,-----------------------.
|
* |WBack|WHome|WFor | F5 |
|
||||||
* |WBack|WHome|WFor | F5 |
|
* |-----`-----`-----`-----|
|
||||||
* |-----`-----`-----`-----|
|
* |Calc |Undo |Redo |WSrch|
|
||||||
* |Calc |Undo |Redo |WSrch|
|
* |-----`-----`-----`-----|
|
||||||
* |-----`-----`-----`-----|
|
* | Cut |Copy |Paste|Find |
|
||||||
* | Cut |Copy |Paste|Find |
|
* |-----`-----`-----`-----|
|
||||||
* |-----`-----`-----`-----|
|
* | 0 | . | + | = |
|
||||||
* | 0 | . | + | = |
|
* `-----`-----`-----`-----'
|
||||||
* `-----`-----`-----`-----'
|
*/
|
||||||
*/
|
[_L3] = LAYOUT_ortho_4x4( /* LAYER 3 */
|
||||||
[_L3] = /* LAYER 3 */
|
KC_SYSTEM_SLEEP, KC_MS_BTN1, KC_MS_BTN2, KC_AUDIO_VOL_UP, \
|
||||||
LAYOUT_ortho_4x4(KC_WWW_BACK, KC_WWW_HOME, KC_WWW_FORWARD, KC_F5, \
|
LALT(KC_F4), KC_F11, LGUI(KC_TAB), KC_AUDIO_VOL_DOWN, \
|
||||||
KC_CALCULATOR, LCTL(KC_Z), LCTL(KC_Y), KC_WWW_SEARCH, \
|
KC_MEDIA_PREV_TRACK, KC_MEDIA_PLAY_PAUSE, KC_MEDIA_NEXT_TRACK, KC_AUDIO_MUTE, \
|
||||||
LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), LCTL(KC_F), \
|
_______, _______, _______, _______
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
),
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint16_t PROGMEM fn_actions[] = {
|
const uint16_t PROGMEM fn_actions[] = {
|
||||||
|
@ -214,29 +215,28 @@ void persistent_default_layer_set(uint16_t default_layer) {
|
||||||
default_layer_set(default_layer);
|
default_layer_set(default_layer);
|
||||||
}
|
}
|
||||||
|
|
||||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
const macro_t * action_get_macro(keyrecord_t * record, uint8_t id, uint8_t opt) {
|
||||||
{
|
switch (id) {
|
||||||
switch(id) {
|
case _L3:
|
||||||
case _L3:
|
if (record->event.pressed) {
|
||||||
if (record->event.pressed) {
|
persistent_default_layer_set(1UL<<_L3);
|
||||||
persistent_default_layer_set(1UL<<_L3);
|
}
|
||||||
}
|
break;
|
||||||
break;
|
case _L2:
|
||||||
case _L2:
|
if (record->event.pressed) {
|
||||||
if (record->event.pressed) {
|
persistent_default_layer_set(1UL<<_L2);
|
||||||
persistent_default_layer_set(1UL<<_L2);
|
}
|
||||||
}
|
break;
|
||||||
break;
|
case _L1:
|
||||||
case _L1:
|
if (record->event.pressed) {
|
||||||
if (record->event.pressed) {
|
persistent_default_layer_set(1UL<<_L1);
|
||||||
persistent_default_layer_set(1UL<<_L1);
|
}
|
||||||
}
|
break;
|
||||||
break;
|
case _NP:
|
||||||
case _NP:
|
if (record->event.pressed) {
|
||||||
if (record->event.pressed) {
|
persistent_default_layer_set(1UL<<_NP);
|
||||||
persistent_default_layer_set(1UL<<_NP);
|
}
|
||||||
}
|
break;
|
||||||
break;
|
}
|
||||||
}
|
return MACRO_NONE;
|
||||||
return MACRO_NONE;
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
#include "quantum.h"
|
#include "quantum.h"
|
||||||
|
|
||||||
// This is a shortcut to help you visually see your layout.
|
// This is a shortcut to help you visually see your layout.
|
||||||
#define KEYMAP( \
|
#define LAYOUT_numpad_4x4( \
|
||||||
K00, K01, K02, K03, \
|
K00, K01, K02, K03, \
|
||||||
K10, K11, K12, \
|
K10, K11, K12, \
|
||||||
K20, K21, K22, K23, \
|
K20, K21, K22, K23, \
|
||||||
|
|
|
@ -68,4 +68,4 @@ UNICODE_ENABLE = no # Unicode
|
||||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
AUDIO_ENABLE = no # Audio output on port C6
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
|
|
||||||
LAYOUTS = ortho_4x4
|
LAYOUTS = numpad_4x4 ortho_4x4
|
||||||
|
|
Loading…
Reference in New Issue