Keymap: Merlin Learns to QMK (#3820)
* Fix up my keymaps to use more QMK features * update 60_ansi readme * add the start of my userspace * begin to use my new userspace * use more of my userspace * spread userspace love to my clueboard * spread userspace love to 75 layout * add a fairly vanilla readme * put the FNX into a userspace incase I ever want to use it for something else * respond to drashna's code review comments
This commit is contained in:
parent
acc06a0848
commit
fb79015049
13 changed files with 68 additions and 63 deletions
20
users/mechmerlin/mechmerlin.c
Normal file
20
users/mechmerlin/mechmerlin.c
Normal file
|
@ -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;
|
||||
}
|
17
users/mechmerlin/mechmerlin.h
Normal file
17
users/mechmerlin/mechmerlin.h
Normal file
|
@ -0,0 +1,17 @@
|
|||
#pragma once
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
enum userspace_layers {
|
||||
_BL = 0, // Base Layer
|
||||
_FL, // Function Layer
|
||||
_AL // Arrow Layer
|
||||
};
|
||||
|
||||
// Enum of custom keycodes defined in process_record_user
|
||||
enum keycodes {
|
||||
KC_FNX, // Hold for FN layer, tap to toggle ARROWS layer.
|
||||
};
|
||||
|
||||
// Custom #defined keycodes
|
||||
#define KC_CTCP MT(KC_LCTL, KC_CAPS)
|
3
users/mechmerlin/readme.md
Normal file
3
users/mechmerlin/readme.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
# MechMerlin's Userspace
|
||||
|
||||
This is a collection of my most commonly used QMK functions
|
1
users/mechmerlin/rules.mk
Normal file
1
users/mechmerlin/rules.mk
Normal file
|
@ -0,0 +1 @@
|
|||
SRC += mechmerlin.c
|
Loading…
Add table
Add a link
Reference in a new issue