diff options
Diffstat (limited to 'users/mechmerlin/mechmerlin.c')
-rw-r--r-- | users/mechmerlin/mechmerlin.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/users/mechmerlin/mechmerlin.c b/users/mechmerlin/mechmerlin.c new file mode 100644 index 0000000000..8d6cecd18b --- /dev/null +++ b/users/mechmerlin/mechmerlin.c @@ -0,0 +1,20 @@ +#include "mechmerlin.h" + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + static uint16_t fnx_layer_timer; + + switch (keycode){ + case KC_FNX: + if(record->event.pressed){ + fnx_layer_timer = timer_read(); + layer_on(_FL); + } else { + layer_off(_FL); + if (timer_elapsed(fnx_layer_timer) < 150) { + layer_invert(_AL); + } + } + return false; + } + return true; +}
\ No newline at end of file |