summary refs log tree commit diff
path: root/users/billypython/billypython.c
diff options
context:
space:
mode:
authorDanilo Vulicevic <danilo.vulicevic@yahoo.com>2019-02-14 21:09:27 +0100
committerDrashna Jaelre <drashna@live.com>2019-02-14 12:09:27 -0800
commit1e6797b4e7d888f0c0449e3cd577dc83eb4c4525 (patch)
tree054868cb8b176df99abdb91b3893e241727eaaf5 /users/billypython/billypython.c
parentce465c084bfdfb3dbd24414397b2542176da423d (diff)
[Keymap] Add my personal userspace and update my keymaps (#5128)
* Add billypython userspace and dz60 keymap

* Disable Bootmagic in dz60:billypython keymap

* Update whitefox:billypython keymap with userspace changes

Also remove numpad layer
Diffstat (limited to 'users/billypython/billypython.c')
-rw-r--r--users/billypython/billypython.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/users/billypython/billypython.c b/users/billypython/billypython.c
new file mode 100644
index 0000000000..7bdfe33a43
--- /dev/null
+++ b/users/billypython/billypython.c
@@ -0,0 +1,32 @@
+#include "billypython.h"
+
+__attribute__((weak))
+bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
+  return true;
+}
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+  if (!process_record_keymap(keycode, record)) {
+    return false;
+  }
+
+  switch (keycode) {
+  case CLEAR:
+    if (record->event.pressed) {
+      SEND_STRING(SS_LCTRL("a") SS_TAP(X_DELETE));
+    }
+    return false;
+
+  default:
+    return true;
+  }
+}
+
+__attribute__((weak))
+uint32_t layer_state_set_keymap(uint32_t state) {
+  return state;
+}
+
+uint32_t layer_state_set_user(uint32_t state) {
+  return layer_state_set_keymap(state);
+}