2017-08-24 04:29:07 +02:00
|
|
|
#include QMK_KEYBOARD_H
|
2016-01-22 08:22:23 +01:00
|
|
|
#include "debug.h"
|
|
|
|
#include "action_layer.h"
|
2022-05-15 13:27:01 +02:00
|
|
|
#include "keymap_german_mac_iso.h"
|
2016-01-22 08:22:23 +01:00
|
|
|
|
2016-04-17 22:19:47 +02:00
|
|
|
#define BASE 0
|
|
|
|
#define SYMB 1
|
|
|
|
#define MDIA 2
|
|
|
|
#define SMLY 3
|
|
|
|
#define NUMB 4
|
|
|
|
#define EGOS 5
|
2016-01-28 14:56:55 +01:00
|
|
|
|
2016-04-17 22:19:47 +02:00
|
|
|
#define M_CTRL_CMDV 0
|
|
|
|
#define M_CTRL_CMDC 1
|
|
|
|
#define M_MEH_SH_ACUT 2
|
|
|
|
#define M_LGUI_SHFT 3
|
|
|
|
#define M_CTL_SFT_HASH 4
|
2021-07-06 01:05:11 +02:00
|
|
|
#define M_DE_CIRC_CTRLCMD 5
|
|
|
|
#define M_DE_PLUS_CTRLALT 6
|
2016-04-17 22:19:47 +02:00
|
|
|
#define SM_SMILE 7
|
|
|
|
#define SM_SMIRK 8
|
|
|
|
#define SM_CRY 9
|
|
|
|
#define SM_SAD 10
|
|
|
|
#define SM_HEART 11
|
|
|
|
#define SM_LAUGH 12
|
|
|
|
#define SM_KISS 13
|
|
|
|
#define SM_FROWN 14
|
|
|
|
#define M_TOGGLE_5 15
|
2016-01-28 14:56:55 +01:00
|
|
|
|
2016-04-17 22:19:47 +02:00
|
|
|
//Layout keymap.c generated with ErgodoxLayoutGenerator V1.0BETA1
|
2016-01-22 08:22:23 +01:00
|
|
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
2017-08-24 04:29:07 +02:00
|
|
|
[BASE]=LAYOUT_ergodox(
|
2016-04-17 22:19:47 +02:00
|
|
|
//left half
|
2021-07-06 01:05:11 +02:00
|
|
|
KC_ESC, DE_1, DE_2, DE_3, DE_4, DE_5, M(M_CTL_SFT_HASH),
|
|
|
|
KC_TAB, DE_Q, DE_W, DE_E, DE_R, DE_T, KC_LGUI,
|
|
|
|
KC_LALT, DE_A, DE_S, DE_D, DE_F, DE_G,
|
|
|
|
KC_LSFT, CTL_T(DE_Y), DE_X, DE_C, DE_V, DE_B, KC_LALT,
|
|
|
|
LT(SYMB,DE_LABK), M(M_DE_CIRC_CTRLCMD), M(M_DE_PLUS_CTRLALT), KC_UP, KC_DOWN,
|
2016-04-17 22:19:47 +02:00
|
|
|
M(M_MEH_SH_ACUT), TG(MDIA),
|
|
|
|
KC_HOME,
|
|
|
|
KC_BSPC, KC_DEL, LT(SMLY,KC_END),
|
|
|
|
//right half
|
2021-07-06 01:05:11 +02:00
|
|
|
M(M_CTL_SFT_HASH), DE_6, DE_7, DE_8, DE_9, DE_0, DE_SS,
|
|
|
|
KC_RGUI, DE_Z, DE_U, DE_I, DE_O, DE_P, DE_UDIA,
|
|
|
|
DE_H, DE_J, DE_K, DE_L, DE_ODIA, ALT_T(DE_ADIA),
|
|
|
|
KC_RALT, DE_N, DE_M, DE_COMM, DE_DOT, CTL_T(DE_MINS), KC_RSFT,
|
|
|
|
KC_LEFT, KC_RIGHT, LGUI(KC_LSFT), LALT(KC_LSFT), LT(SYMB,DE_PLUS),
|
|
|
|
TG(NUMB), ALL_T(DE_ACUT),
|
2016-04-17 22:19:47 +02:00
|
|
|
KC_PGUP,
|
|
|
|
KC_PGDN, KC_ENT, KC_SPC),
|
2017-08-24 04:29:07 +02:00
|
|
|
[SYMB]=LAYOUT_ergodox(
|
2016-04-17 22:19:47 +02:00
|
|
|
//left half
|
|
|
|
KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS,
|
2021-07-06 01:05:11 +02:00
|
|
|
KC_TRNS, DE_LABK, DE_RABK, DE_EXLM, DE_QUES, KC_TRNS, KC_TRNS,
|
|
|
|
KC_TRNS, DE_HASH, DE_DLR, DE_BSLS, DE_SLSH, KC_DOT,
|
|
|
|
KC_TRNS, KC_TRNS, DE_LABK, DE_PERC, DE_PIPE, DE_TILD, KC_TRNS,
|
2016-04-17 22:19:47 +02:00
|
|
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
|
|
|
KC_TRNS, KC_TRNS,
|
|
|
|
KC_TRNS,
|
|
|
|
KC_TRNS, KC_DEL, KC_TRNS,
|
|
|
|
//right half
|
|
|
|
M(M_TOGGLE_5), KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
|
2021-07-06 01:05:11 +02:00
|
|
|
KC_TRNS, LALT(LSFT(KC_7)), LALT(KC_5), LALT(KC_6), DE_LABK, DE_RABK, DE_EXLM,
|
|
|
|
DE_SLSH, DE_LPRN, DE_RPRN, LALT(KC_8), LALT(KC_9), DE_HASH,
|
|
|
|
KC_TRNS, DE_PIPE, DE_TILD, DE_CIRC, KC_UP, DE_MINS, LSFT(KC_4),
|
|
|
|
DE_QUOT, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS,
|
2016-04-17 22:19:47 +02:00
|
|
|
KC_F13, KC_F12,
|
|
|
|
KC_F14,
|
|
|
|
KC_F15, KC_TRNS, KC_TRNS),
|
2017-08-24 04:29:07 +02:00
|
|
|
[MDIA]=LAYOUT_ergodox(
|
2016-04-17 22:19:47 +02:00
|
|
|
//left half
|
|
|
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
|
|
|
KC_TRNS, KC_TRNS, KC_BTN1, KC_MS_U, KC_BTN2, KC_WH_U, KC_TRNS,
|
|
|
|
KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D,
|
|
|
|
KC_TRNS, KC_TRNS, KC_WH_L, KC_WH_D, KC_WH_R, KC_BTN3, KC_TRNS,
|
|
|
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
|
|
|
KC_TRNS, KC_TRNS,
|
|
|
|
KC_TRNS,
|
|
|
|
KC_TRNS, KC_TRNS, KC_TRNS,
|
|
|
|
//right half
|
|
|
|
KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY,
|
|
|
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
|
|
|
KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
|
|
|
KC_TRNS, KC_VOLD, KC_TRNS, KC_MPRV, KC_MNXT, KC_UP, KC_TRNS,
|
|
|
|
KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT,
|
|
|
|
KC_TRNS, KC_TRNS,
|
|
|
|
KC_TRNS,
|
|
|
|
KC_TRNS, KC_TRNS, KC_WBAK),
|
2017-08-24 04:29:07 +02:00
|
|
|
[SMLY]=LAYOUT_ergodox(
|
2016-04-17 22:19:47 +02:00
|
|
|
//left half
|
|
|
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
|
|
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
|
|
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
|
|
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
|
|
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
|
|
|
KC_TRNS, KC_TRNS,
|
|
|
|
KC_TRNS,
|
|
|
|
KC_TRNS, KC_TRNS, KC_TRNS,
|
|
|
|
//right half
|
|
|
|
M(SM_SMILE), M(SM_SMIRK), M(SM_LAUGH), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
|
|
|
KC_TRNS, M(SM_FROWN), M(SM_SAD), M(SM_CRY), KC_TRNS, KC_TRNS, KC_TRNS,
|
|
|
|
M(SM_HEART), M(SM_KISS), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
|
|
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
|
|
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
|
|
|
KC_TRNS, KC_TRNS,
|
|
|
|
KC_TRNS,
|
|
|
|
KC_TRNS, KC_TRNS, KC_TRNS),
|
2017-08-24 04:29:07 +02:00
|
|
|
[NUMB]=LAYOUT_ergodox(
|
2016-04-17 22:19:47 +02:00
|
|
|
//left half
|
|
|
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
|
|
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS,
|
|
|
|
KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS,
|
|
|
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
|
|
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
|
|
|
KC_TRNS, KC_TRNS,
|
|
|
|
KC_TRNS,
|
|
|
|
KC_TRNS, KC_TRNS, KC_TRNS,
|
|
|
|
//right half
|
|
|
|
KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
|
|
|
|
KC_TRNS, KC_UP, KC_7, KC_8, KC_9, LSFT(KC_RBRC), KC_F12,
|
2021-07-06 01:05:11 +02:00
|
|
|
KC_DOWN, KC_4, KC_5, KC_6, KC_RBRC, DE_MINS,
|
2016-04-17 22:19:47 +02:00
|
|
|
KC_TRNS, LSFT(KC_6), KC_1, KC_2, KC_3, LSFT(KC_7), KC_TRNS,
|
2021-07-06 01:05:11 +02:00
|
|
|
KC_0, KC_DOT, KC_COMM, DE_EQL, KC_TRNS,
|
2016-04-17 22:19:47 +02:00
|
|
|
KC_TRNS, KC_TRNS,
|
|
|
|
KC_TRNS,
|
|
|
|
KC_TRNS, KC_TRNS, KC_TRNS),
|
2017-08-24 04:29:07 +02:00
|
|
|
[EGOS]=LAYOUT_ergodox(
|
2016-04-17 22:19:47 +02:00
|
|
|
//left half
|
|
|
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
|
|
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
|
|
|
KC_LSFT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
|
|
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
|
|
|
KC_LCTL, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
|
|
|
KC_F1, KC_F2,
|
|
|
|
KC_F3,
|
|
|
|
KC_SPC, KC_LCTL, KC_F4,
|
|
|
|
//right half
|
|
|
|
M(M_TOGGLE_5), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
|
|
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
|
|
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
|
|
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
|
|
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
|
|
|
KC_TRNS, KC_TRNS,
|
|
|
|
KC_TRNS,
|
|
|
|
KC_TRNS, KC_TRNS, KC_TRNS),
|
2016-01-22 08:22:23 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
|
|
|
{
|
2016-04-17 22:19:47 +02:00
|
|
|
static uint16_t start;
|
|
|
|
switch(id) {
|
|
|
|
case M_TOGGLE_5:
|
|
|
|
//Macro: M_TOGGLE_5//-----------------------
|
|
|
|
if (record->event.pressed){
|
|
|
|
layer_state ^= (1<<5);
|
|
|
|
layer_state &= (1<<5);
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
case M_CTRL_CMDC:
|
|
|
|
//Macro: M_CTRL_CMDC//-----------------------
|
|
|
|
if (record->event.pressed) {
|
2016-01-22 08:22:23 +01:00
|
|
|
start = timer_read();
|
|
|
|
return MACRO(D(LCTRL),END);
|
|
|
|
} else {
|
2016-04-17 22:19:47 +02:00
|
|
|
if (timer_elapsed(start) >150) {
|
2016-01-22 08:22:23 +01:00
|
|
|
return MACRO(U(LCTRL),END);
|
|
|
|
} else {
|
|
|
|
return MACRO(U(LCTRL),D(LGUI),T(C),U(LGUI),END);
|
|
|
|
}
|
|
|
|
}
|
2016-04-17 22:19:47 +02:00
|
|
|
|
|
|
|
break;
|
2021-07-06 01:05:11 +02:00
|
|
|
case M_DE_PLUS_CTRLALT:
|
|
|
|
//Macro: M_DE_PLUS_CTRLALT//-----------------------
|
2016-04-17 22:19:47 +02:00
|
|
|
if (record->event.pressed) {
|
2016-01-22 08:22:23 +01:00
|
|
|
start = timer_read();
|
2016-04-17 22:19:47 +02:00
|
|
|
return MACRO(D(LCTRL),D(LALT),END);
|
2016-01-22 08:22:23 +01:00
|
|
|
} else {
|
2016-04-17 22:19:47 +02:00
|
|
|
if (timer_elapsed(start) >150) {
|
|
|
|
return MACRO(U(LCTRL),U(LALT),END);
|
2016-01-22 08:22:23 +01:00
|
|
|
} else {
|
2016-04-17 22:19:47 +02:00
|
|
|
return MACRO(U(LCTRL),U(LALT),T(RBRC),END);
|
2016-01-22 08:22:23 +01:00
|
|
|
}
|
|
|
|
}
|
2016-04-17 22:19:47 +02:00
|
|
|
|
|
|
|
break;
|
|
|
|
case SM_KISS:
|
|
|
|
//Macro: SM_KISS//-----------------------
|
|
|
|
if (record->event.pressed) {
|
|
|
|
return MACRO(D(LSFT),T(DOT),U(LSFT),T(SLSH),D(LSFT),T(RBRC),U(LSFT),END);
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
case SM_FROWN:
|
|
|
|
//Macro: SM_FROWN//-----------------------
|
|
|
|
if (record->event.pressed) {
|
|
|
|
return MACRO(D(LSFT),T(DOT),U(LSFT),T(SLSH),D(LALT),T(8),U(LALT),END);
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
case SM_CRY:
|
|
|
|
//Macro: SM_CRY//-----------------------
|
|
|
|
if (record->event.pressed) {
|
|
|
|
return MACRO(D(LSFT),T(COMM),U(LSFT),T(SLSH),D(LSFT),T(8),U(LSFT),END);
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
case SM_SMILE:
|
|
|
|
//Macro: SM_SMILE//-----------------------
|
|
|
|
if (record->event.pressed) {
|
|
|
|
return MACRO(D(LSFT),T(DOT),U(LSFT),T(SLSH),D(LSFT),T(9),U(LSFT),END);
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
case SM_SMIRK:
|
|
|
|
//Macro: SM_SMIRK//-----------------------
|
|
|
|
if (record->event.pressed) {
|
|
|
|
return MACRO(D(LSFT),T(COMM),U(LSFT),T(SLSH),D(LSFT),T(9),U(LSFT),END);
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
case M_LGUI_SHFT:
|
|
|
|
//Macro: M_LGUI_SHFT//-----------------------
|
|
|
|
if (record->event.pressed){
|
2016-04-02 15:14:14 +02:00
|
|
|
return MACRO(D(LGUI),D(LSFT),END);
|
|
|
|
}else{
|
|
|
|
return MACRO(U(LGUI),U(LSFT),END);
|
|
|
|
}
|
2016-04-17 22:19:47 +02:00
|
|
|
|
|
|
|
break;
|
|
|
|
case SM_HEART:
|
|
|
|
//Macro: SM_HEART//-----------------------
|
|
|
|
if (record->event.pressed) {
|
|
|
|
return MACRO(T(GRV),T(3),END);
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
case SM_LAUGH:
|
|
|
|
//Macro: SM_LAUGH//-----------------------
|
|
|
|
if (record->event.pressed) {
|
|
|
|
return MACRO(D(LSFT),T(DOT),U(LSFT),T(SLSH),D(LSFT),T(D),U(LSFT),END);
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
case M_CTL_SFT_HASH:
|
|
|
|
//Macro: M_CTL_SFT_HASH//-----------------------
|
|
|
|
if (record->event.pressed) {
|
|
|
|
start = timer_read();
|
|
|
|
return MACRO(D(LCTRL),D(LSFT),END);
|
2016-03-29 13:02:14 +02:00
|
|
|
} else {
|
2016-04-17 22:19:47 +02:00
|
|
|
if (timer_elapsed(start) >150) {
|
2016-03-29 13:02:14 +02:00
|
|
|
return MACRO(U(LCTRL),U(LSFT),END);
|
|
|
|
} else {
|
|
|
|
return MACRO(U(LCTRL),U(LSFT),T(BSLS),END);
|
|
|
|
}
|
|
|
|
}
|
2016-04-17 22:19:47 +02:00
|
|
|
|
|
|
|
break;
|
|
|
|
case SM_SAD:
|
|
|
|
//Macro: SM_SAD//-----------------------
|
|
|
|
if (record->event.pressed) {
|
|
|
|
return MACRO(D(LSFT),T(DOT),U(LSFT),T(SLSH),D(LSFT),T(8),U(LSFT),END);
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
2021-07-06 01:05:11 +02:00
|
|
|
case M_DE_CIRC_CTRLCMD:
|
|
|
|
//Macro: M_DE_CIRC_CTRLCMD//-----------------------
|
2016-04-17 22:19:47 +02:00
|
|
|
if (record->event.pressed) {
|
2016-01-28 15:58:19 +01:00
|
|
|
start = timer_read();
|
|
|
|
return MACRO(D(LCTRL),D(LGUI),END);
|
|
|
|
} else {
|
2016-04-17 22:19:47 +02:00
|
|
|
if (timer_elapsed(start) >150) {
|
2016-01-28 15:58:19 +01:00
|
|
|
return MACRO(U(LCTRL),U(LGUI),END);
|
|
|
|
} else {
|
2016-04-17 22:19:47 +02:00
|
|
|
return MACRO(U(LCTRL),U(LGUI),T(NUBS),END);
|
2016-01-28 15:58:19 +01:00
|
|
|
}
|
|
|
|
}
|
2016-04-17 22:19:47 +02:00
|
|
|
|
|
|
|
break;
|
|
|
|
case M_CTRL_CMDV:
|
|
|
|
//Macro: M_CTRL_CMDV//-----------------------
|
|
|
|
if (record->event.pressed) {
|
2016-01-28 15:58:19 +01:00
|
|
|
start = timer_read();
|
2016-04-17 22:19:47 +02:00
|
|
|
return MACRO(D(LCTRL),END);
|
2016-01-28 15:58:19 +01:00
|
|
|
} else {
|
2016-04-17 22:19:47 +02:00
|
|
|
if (timer_elapsed(start) >150) {
|
|
|
|
return MACRO(U(LCTRL),END);
|
2016-01-28 15:58:19 +01:00
|
|
|
} else {
|
2016-04-17 22:19:47 +02:00
|
|
|
return MACRO(U(LCTRL),D(LGUI),T(V),U(LGUI),END);
|
2016-01-28 15:58:19 +01:00
|
|
|
}
|
|
|
|
}
|
2016-01-28 14:56:55 +01:00
|
|
|
|
2016-04-17 22:19:47 +02:00
|
|
|
break;
|
|
|
|
case M_MEH_SH_ACUT:
|
|
|
|
//Macro: M_MEH_SH_ACUT//-----------------------
|
|
|
|
if (record->event.pressed) {
|
|
|
|
start = timer_read();
|
|
|
|
return MACRO(D(LCTRL),D(LSFT),D(LALT),END);
|
|
|
|
} else {
|
|
|
|
if (timer_elapsed(start) >150) {
|
|
|
|
return MACRO(U(LCTRL),U(LSFT),U(LALT),END);
|
|
|
|
} else {
|
|
|
|
return MACRO(U(LCTRL),U(LALT),T(EQL),U(LSFT),END);
|
|
|
|
}
|
2016-01-28 14:56:55 +01:00
|
|
|
}
|
2016-04-17 22:19:47 +02:00
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
return MACRO_NONE;
|
2016-01-22 08:22:23 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
// Runs just one time when the keyboard initializes.
|
2016-03-10 17:28:34 +01:00
|
|
|
void matrix_init_user(void) {
|
2016-01-22 08:22:23 +01:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
// Runs constantly in the background, in a loop.
|
2016-03-10 17:28:34 +01:00
|
|
|
void matrix_scan_user(void) {
|
2016-01-22 08:22:23 +01:00
|
|
|
|
2016-04-17 22:19:47 +02:00
|
|
|
uint8_t layer = biton32(layer_state);
|
2016-01-22 08:22:23 +01:00
|
|
|
|
2016-04-17 22:19:47 +02:00
|
|
|
ergodox_board_led_off();
|
|
|
|
ergodox_right_led_1_off();
|
|
|
|
ergodox_right_led_2_off();
|
|
|
|
ergodox_right_led_3_off();
|
|
|
|
switch (layer) {
|
|
|
|
|
|
|
|
case SYMB:
|
|
|
|
ergodox_right_led_1_on();
|
|
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
case MDIA:
|
|
|
|
|
|
|
|
ergodox_right_led_2_on();
|
|
|
|
|
|
|
|
break;
|
|
|
|
case SMLY:
|
|
|
|
|
|
|
|
|
|
|
|
ergodox_right_led_3_on();
|
|
|
|
break;
|
|
|
|
case NUMB:
|
|
|
|
ergodox_right_led_1_on();
|
|
|
|
|
|
|
|
ergodox_right_led_3_on();
|
|
|
|
break;
|
|
|
|
case EGOS:
|
|
|
|
ergodox_right_led_1_on();
|
|
|
|
ergodox_right_led_2_on();
|
|
|
|
ergodox_right_led_3_on();
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
// none
|
|
|
|
break;
|
|
|
|
}
|
2016-01-22 08:22:23 +01:00
|
|
|
|
|
|
|
};
|
2016-04-17 22:19:47 +02:00
|
|
|
|