summaryrefslogtreecommitdiff
path: root/keyboards/tmo50/keymaps
diff options
context:
space:
mode:
authorJoe Wasson <joe@talljoe.com>2020-11-06 17:16:22 -0800
committerGitHub <noreply@github.com>2020-11-06 17:16:22 -0800
commit7ce5402417b0332569bf48cf2c51e412cd35a18a (patch)
tree9ec2352ebf316591930cad680dd3a4ba4068abc6 /keyboards/tmo50/keymaps
parentb5ebdf1b3a29119e1a414aaf7e2cf7a583853430 (diff)
Updates to Talljoe's Keymaps (#10115)
* Minor Tweak * Refactor spacebar defines. * Add TMO50 layout * Rename Atreus keymap. * Refactor Atreus for readability. * Eliminate tapdance quote and tweak maltroff. * Factor out tapdance. * Add some fancy combos and keys. * Remove combos for now because they cause pain. * WIP visualizer * Alternate method for reset * WIP2 visualizer * Layer text tweak. * Add made-up layout Nortron as a combination of Norman and Maltron. * Add backspace. * Add Talljoe keymap to Prime E. * Fix double-colon so it doesn't press enter if shift is released early. * Use new make command. * Bring some modern standards into code and add licenses. * Remove QMK_KEYBOARD_CONFIG_H and fixup QMK_KEYBOARD_H. * Move from `biton32` to `get_highest_layer`. * Remove PREVENT_STUCK_MODIFIERS * Update keyboards/thevankeyboards/minivan/keymaps/talljoe-minivan/config.h
Diffstat (limited to 'keyboards/tmo50/keymaps')
-rw-r--r--keyboards/tmo50/keymaps/talljoe/config.h33
-rw-r--r--keyboards/tmo50/keymaps/talljoe/keymap.c44
2 files changed, 77 insertions, 0 deletions
diff --git a/keyboards/tmo50/keymaps/talljoe/config.h b/keyboards/tmo50/keymaps/talljoe/config.h
new file mode 100644
index 0000000000..53d593385f
--- /dev/null
+++ b/keyboards/tmo50/keymaps/talljoe/config.h
@@ -0,0 +1,33 @@
+/* Copyright 2020 Joseph Wasson
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#pragma once
+
+#define SPACE_COUNT 2
+
+#define TEMPLATE_TKL(\
+ KESC, KF01, KF02, KF03, KF04, KF05, KF06, KF07, KF08, KF09, KF10, KF11, KF12, KSCL, KPRS, KADJ, \
+ KGRV, K_1 , K_2 , K_3 , K_4 , K_5 , K_6 , K_7 , K_8 , K_9 , K_0 , KMIN, KEQL, KBLS, KINS, KHOM, KPUP, \
+ KTAB, K_Q , K_W , K_E , K_R , K_T , K_Y , K_U , K_I , K_O , K_P , KLBR, KRBR, KBSP, KDEL, KEND, LPDN, \
+ KCAP, K_A , K_S , K_D , K_F , K_G , K_H , K_J , K_K , K_L , KSMI, KQUO, KENT, \
+ KLSH, K_Z , K_X , K_C , K_V , K_B , K_N , K_M , KCMA, KDOT, KSLS, KRSH, K_UP, \
+ KLCT, KLOS, KLAL, KSP2, KSP3, KSP1, KRAL, KROS, KRCT, KPTT, K_LT, K_DN, K_RT \
+) LAYOUT_all( \
+ KF01, KTAB, K_Q , K_W , K_E , K_R , K_T , K_Y , K_U , K_I , K_O , K_P , KLBR, KRBR, KBSP, \
+ KF02, KCAP, K_A , K_S , K_D , K_F , K_G , K_H , K_J , K_K , K_L , KSMI, KQUO, KENT, \
+ KF03, KLSH, K_Z , K_X , K_C , K_V , K_B , K_N , K_M , KCMA, KDOT, KSLS, KRSH, KADJ, \
+ KF04, KLOS, KLAL, KSP2, KSP1, KRAL, KESC \
+)
diff --git a/keyboards/tmo50/keymaps/talljoe/keymap.c b/keyboards/tmo50/keymaps/talljoe/keymap.c
new file mode 100644
index 0000000000..fa6523992e
--- /dev/null
+++ b/keyboards/tmo50/keymaps/talljoe/keymap.c
@@ -0,0 +1,44 @@
+#include "quantum.h"
+#include "talljoe.h"
+
+bool process_indicator_led_user(uint32_t state){
+ return false;
+}
+
+#define LED_MASK (_BV(PB0) | _BV(PB1) | _BV(PB2) | _BV(PB3))
+#define WHITE (_BV(PB0))
+#define YELLOW (_BV(PB1))
+#define MAGENTA (_BV(PB2))
+#define RED (_BV(PB3))
+
+void matrix_scan_keymap(void) {
+ uint32_t lights = WHITE;
+
+ switch(get_highest_layer(layer_state))
+ {
+ case _NAV:
+ lights |= YELLOW;
+ break;
+ case _NUM:
+ lights |= MAGENTA;
+ break;
+ case _ADJUST:
+ lights |= RED;
+ break;
+ default: {
+ uint8_t default_layer = get_highest_layer(default_layer_state);
+ lights = 0; // no white LED by default.
+ if(default_layer & 1)
+ lights |= YELLOW;
+ if(default_layer & 2)
+ lights |= MAGENTA;
+ if(default_layer & 4)
+ lights |= RED;
+ }
+ }
+
+ uint32_t port = PORTB;
+ port |= LED_MASK;
+ port &= ~lights;
+ PORTB = port;
+}