[Keymap] Move common code and configuration to userspace for dshields keymaps. (#6537)

This commit is contained in:
Daniel Shields 2019-09-21 19:04:27 +01:00 committed by Drashna Jaelre
parent 75c9747787
commit 63a0b1241d
9 changed files with 79 additions and 111 deletions

View file

@ -1,4 +1,5 @@
#include QMK_KEYBOARD_H
#include "dshields.h"
enum { DEF, FUN };
enum { DYNAMIC_MACRO_RANGE = SAFE_RANGE };
@ -30,30 +31,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
uint32_t layer_state_set_user(uint32_t state) {
switch (biton32(state)) {
case DEF:
set_all_leds_to(0,0,0);
break;
case FUN:
// TODO light the fn keys
// set_led_to(?, 0, 128, 0);
// set_led_to(?, 0, 128, 0);
break;
}
return state;
}
/*
void matrix_init_user(void) {
eeconfig_init();
};
*/
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if (!process_record_dynamic_macro(keycode, record)) {
return false;
}
return true;
}