summaryrefslogtreecommitdiff
path: root/users/mechmerlin
diff options
context:
space:
mode:
Diffstat (limited to 'users/mechmerlin')
-rw-r--r--users/mechmerlin/mechmerlin.c20
-rw-r--r--users/mechmerlin/mechmerlin.h17
-rw-r--r--users/mechmerlin/readme.md3
-rw-r--r--users/mechmerlin/rules.mk1
4 files changed, 41 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
diff --git a/users/mechmerlin/mechmerlin.h b/users/mechmerlin/mechmerlin.h
new file mode 100644
index 0000000000..c140ac70c9
--- /dev/null
+++ b/users/mechmerlin/mechmerlin.h
@@ -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)
diff --git a/users/mechmerlin/readme.md b/users/mechmerlin/readme.md
new file mode 100644
index 0000000000..6a76dd2a9d
--- /dev/null
+++ b/users/mechmerlin/readme.md
@@ -0,0 +1,3 @@
+# MechMerlin's Userspace
+
+This is a collection of my most commonly used QMK functions
diff --git a/users/mechmerlin/rules.mk b/users/mechmerlin/rules.mk
new file mode 100644
index 0000000000..70c20ec71e
--- /dev/null
+++ b/users/mechmerlin/rules.mk
@@ -0,0 +1 @@
+SRC += mechmerlin.c \ No newline at end of file