Popravki, dinamicni makroji
parent
ede2653b5e
commit
08d25b0a01
|
@ -6,12 +6,16 @@
|
||||||
#define BASE 0 // default layer
|
#define BASE 0 // default layer
|
||||||
#define SYMB 1 // symbols
|
#define SYMB 1 // symbols
|
||||||
#define MDIA 2 // media keys
|
#define MDIA 2 // media keys
|
||||||
|
#define TKTK 3 // Tehnoklistir layer
|
||||||
|
|
||||||
enum custom_keycodes {
|
enum custom_keycodes {
|
||||||
PLACEHOLDER = SAFE_RANGE, // ensure these codes start after the highest keycode defined in Quantum
|
PLACEHOLDER = SAFE_RANGE, // ensure these codes start after the highest keycode defined in Quantum
|
||||||
VRSN,
|
VRSN,
|
||||||
|
DYNAMIC_MACRO_RANGE
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#include "dynamic_macro.h"
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
/* Keymap 0: Basic layer
|
/* Keymap 0: Basic layer
|
||||||
*
|
*
|
||||||
|
@ -36,8 +40,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
*/
|
*/
|
||||||
[BASE] = LAYOUT_dactyl( // layer 0 : default
|
[BASE] = LAYOUT_dactyl( // layer 0 : default
|
||||||
// left hand
|
// left hand
|
||||||
KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5,
|
KC_DELT, KC_1, KC_2, KC_3, KC_4, KC_5,
|
||||||
KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T,
|
LT(TKTK,KC_EQL), KC_Q, KC_W, KC_E, KC_R, KC_T,
|
||||||
KC_LSPO, KC_A, KC_S, KC_D, KC_F, KC_G,
|
KC_LSPO, KC_A, KC_S, KC_D, KC_F, KC_G,
|
||||||
LT(SYMB,KC_GRV), CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B,
|
LT(SYMB,KC_GRV), CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B,
|
||||||
LALT(KC_LSFT), KC_INS, KC_SPC,KC_BSPC,
|
LALT(KC_LSFT), KC_INS, KC_SPC,KC_BSPC,
|
||||||
|
@ -45,7 +49,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
KC_END, KC_HOME,
|
KC_END, KC_HOME,
|
||||||
// right hand
|
// right hand
|
||||||
KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
|
KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
|
||||||
KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
|
KC_Y, KC_U, KC_I, KC_O, KC_P,LT(TKTK,KC_BSLS),
|
||||||
KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN), KC_RSPC,
|
KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN), KC_RSPC,
|
||||||
KC_N, KC_M, KC_COMM, KC_DOT, CTL_T(KC_SLSH),LT(SYMB,KC_QUOT),
|
KC_N, KC_M, KC_COMM, KC_DOT, CTL_T(KC_SLSH),LT(SYMB,KC_QUOT),
|
||||||
KC_TAB, KC_ENT, KC_LBRC, KC_RBRC,
|
KC_TAB, KC_ENT, KC_LBRC, KC_RBRC,
|
||||||
|
@ -131,6 +135,24 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
KC_TRNS, KC_MUTE,
|
KC_TRNS, KC_MUTE,
|
||||||
KC_TRNS, KC_TRNS
|
KC_TRNS, KC_TRNS
|
||||||
),
|
),
|
||||||
|
// TK LAYER
|
||||||
|
[TKTK] = LAYOUT_dactyl(
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
RESET, KC_TRNS, KC_WH_U, KC_MS_U, KC_WH_D, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, DYN_MACRO_PLAY1, DYN_REC_START1,
|
||||||
|
KC_MPLY, DYN_REC_STOP,
|
||||||
|
KC_MPRV, KC_MNXT,
|
||||||
|
// right hand
|
||||||
|
RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY,
|
||||||
|
KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_TRNS, KC_MPLY,
|
||||||
|
KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS,
|
||||||
|
DYN_REC_START2, DYN_MACRO_PLAY2, KC_VOLD, KC_VOLU,
|
||||||
|
DYN_REC_STOP, KC_MUTE,
|
||||||
|
KC_TRNS, KC_TRNS
|
||||||
|
),
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint16_t PROGMEM fn_actions[] = {
|
const uint16_t PROGMEM fn_actions[] = {
|
||||||
|
@ -156,6 +178,10 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||||
};
|
};
|
||||||
|
|
||||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
if (!process_record_dynamic_macro(keycode, record)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
switch (keycode) {
|
switch (keycode) {
|
||||||
case VRSN:
|
case VRSN:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
|
|
Loading…
Reference in New Issue