Moved key_timer out of function.

example_keyboards
Ole Anders 8 years ago
parent 48dfc77718
commit c72ca58528

@ -1,10 +1,11 @@
#include "satan.h" #include "satan.h"
static uint16_t key_timer;
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// general keydefs // general keydefs
#define norm 0 // Default layer #define norm 0 // Default layer
#define elev 1 // Layer directional keys #define elev 1 // Layer directional keys
#define supr 2 // F-keys and mediakeys #define supr 2 // F-keys and mediakeys
#define spac 3 #define spac 3 //
#define FNO1 4 // #define FNO1 4 //
#define FNO2 5 // #define FNO2 5 //
#define FNO3 6 // #define FNO3 6 //
@ -143,7 +144,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
}; };
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function
static uint16_t key_timer;
bool checkTime(){ bool checkTime(){
return (timer_elapsed(key_timer) < 150) ? true : false; return (timer_elapsed(key_timer) < 150) ? true : false;
} }

Loading…
Cancel
Save