summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--keyboards/ergodox/keymaps/belak/LICENSE21
-rw-r--r--keyboards/ergodox/keymaps/belak/Makefile6
-rw-r--r--keyboards/ergodox/keymaps/belak/README.md79
-rw-r--r--keyboards/ergodox/keymaps/belak/keymap.c367
-rw-r--r--keyboards/ergodox/keymaps/belak/visualizer.c49
-rw-r--r--keyboards/kmac/keymaps/default/Makefile8
-rw-r--r--keyboards/kmac/keymaps/default/keymap.c78
-rw-r--r--keyboards/kmac/keymaps/default/readme.md2
-rw-r--r--keyboards/kmac/keymaps/winkeyless/Makefile8
-rw-r--r--keyboards/kmac/keymaps/winkeyless/keymap.c78
-rw-r--r--keyboards/kmac/keymaps/winkeyless/readme.md2
-rw-r--r--keyboards/kmac/kmac.c26
-rw-r--r--keyboards/kmac/matrix.c2
-rw-r--r--keyboards/kmac/rules.mk4
-rw-r--r--keyboards/tv44/keymaps/belak/Makefile12
-rw-r--r--keyboards/tv44/keymaps/belak/keymap.c105
-rw-r--r--keyboards/tv44/keymaps/belak/readme.md6
-rw-r--r--keyboards/tv44/keymaps/default/keymap.c78
-rw-r--r--keyboards/tv44/keymaps/jeebak/config.h21
-rw-r--r--keyboards/tv44/keymaps/jeebak/keymap.c18
-rw-r--r--keyboards/tv44/keymaps/smt/config.h36
-rw-r--r--keyboards/tv44/keymaps/smt/keymap.c12
-rw-r--r--keyboards/tv44/keymaps/smt/readme.md6
-rw-r--r--keyboards/tv44/keymaps/tong92/keymap.c62
-rw-r--r--keyboards/tv44/keymaps/xyverz/keymap.c72
-rw-r--r--keyboards/tv44/tv44.h53
-rw-r--r--quantum/quantum.c8
-rw-r--r--quantum/quantum_keycodes.h3
28 files changed, 935 insertions, 287 deletions
diff --git a/keyboards/ergodox/keymaps/belak/LICENSE b/keyboards/ergodox/keymaps/belak/LICENSE
new file mode 100644
index 0000000000..b462ba30e5
--- /dev/null
+++ b/keyboards/ergodox/keymaps/belak/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2016 Kaleb Elwert
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/keyboards/ergodox/keymaps/belak/Makefile b/keyboards/ergodox/keymaps/belak/Makefile
new file mode 100644
index 0000000000..8a6beea591
--- /dev/null
+++ b/keyboards/ergodox/keymaps/belak/Makefile
@@ -0,0 +1,6 @@
+TAP_DANCE_ENABLE=yes
+UNICODE_ENABLE=yes
+
+ifndef QUANTUM_DIR
+ include ../../../../Makefile
+endif
diff --git a/keyboards/ergodox/keymaps/belak/README.md b/keyboards/ergodox/keymaps/belak/README.md
new file mode 100644
index 0000000000..30484e6e20
--- /dev/null
+++ b/keyboards/ergodox/keymaps/belak/README.md
@@ -0,0 +1,79 @@
+# Belak's Ergodox Layout
+
+This has been based off of [emacs\_osx\_dk](https://github.com/jackhumbert/qmk_firmware/tree/master/keyboards/ergodox/keymaps/emacs_osx_dk)
+from the main qmk repo. However, I've taken some of the ideas for the thumbs
+from [dvorak\_emacs](https://github.com/jackhumbert/qmk_firmware/tree/master/keyboards/ergodox/keymaps/dvorak_emacs)
+and tweaked it a bit based on the keycaps I have.
+
+This keyboard is intended for use in emacs (one of the main reasons for easy
+access to modifiers) but it could be useful in other instances as well.
+
+The main repo is used as a testbed, so sometimes the layout may be in a strange
+state. The qmk version should be relatively stable.
+
+## Instructions
+
+This is currently being used on a regular ergodox, but it should work fine on
+the infinity as well. Though, you may have to modify the commands to build and
+flash the firmware to match the separate halves as defined in the infinity
+documentation.
+
+If you are using this keymap in the qmk repo, you should be able to just run
+`make ergodox-belak-teensy`. If you're using this externally (I sometimes make
+changes before syncing them to qmk), use the following instructions:
+
+1. Clone the main qmk repo
+2. Clone this to `$QMK/keyboards/ergodox/keymaps/belak-external`
+3. Run `make ergodox-belak-external-teensy` from the root of the qmk repo.
+
+## Changelog
+
+Fifth Revision
+
+* Change layer keys to tap-dance keys which cycle through additional layers
+* Add a few emoji keys (in preparation for an emoji layer)
+
+Fourth Revision
+
+* Remove media layer
+* Add a layer which swaps control and gui on the thumb keys.
+* Add some basic code to save settings to the eeprom
+* Save the state of the keys swapped in the thumb in the eeprom
+
+Third Revision
+
+* Add numpad layer and remove numpad from symbols layer
+* Disable media layer
+* Add arrow keys on ijkl to the symbols layer
+* Replace ALT on held enter and held delete with GUI (for better OSX
+ compatibility, as there's already an ALT key relatively close)
+* Replace keys above enter and delete with temporary layer switch buttons not
+ matching the other layer switch for that hand.
+* Reindent and space out most of the layer definitions
+
+Second Revision
+
+* Clean up definitions to make differences between layers easier to see
+* Remove old LCD code
+* Add new LCD code based on fredizzimo's branch
+
+First Revision
+
+* Reverse grave and escape
+
+Initial Version
+
+* Copy from emacs\_osx\_dk
+* "Fix" right alt
+* Change thumb keys to match default layout (backspace, delete, enter, space)
+* Add modifiers to thumb keys (ctrl to backspace and space, alt to delete and
+ enter)
+* Replace the RAlt below the brackets with LGui and RGui
+* Remove LCtrl and RCtrl from the keys above shift
+* Add browser forward, and move browser back
+* "Fix" the order of volume keys
+
+## Repository
+
+The original code for this is kept at https://github.com/belak/ergodox-layout and
+is synced to qmk every few main revisions.
diff --git a/keyboards/ergodox/keymaps/belak/keymap.c b/keyboards/ergodox/keymaps/belak/keymap.c
new file mode 100644
index 0000000000..d10567a783
--- /dev/null
+++ b/keyboards/ergodox/keymaps/belak/keymap.c
@@ -0,0 +1,367 @@
+#include "ergodox.h"
+#include "debug.h"
+#include "action_layer.h"
+#include "eeconfig.h"
+
+#define LAYER_ON(pos) ((layer_state) & (1<<(pos)))
+#define _______ KC_TRNS
+
+#define EECONFIG_BELAK_MAGIC (uint16_t)0xBE42
+
+// NOTE: This is just a number that's a bit beyond the end of what's already
+// defined. As there is no other define we can base this on, it may need to be
+// changed in the future. The initial value here is used as a placeholder with a
+// magic word, similar to the normal eeconfig. Note that all the storage being
+// used needs to fit inside the 32 bytes of the Ergodox Infinity.
+#define EECONFIG_BELAK (uint16_t *)16
+
+// The correct way to do this would be how the normal eeconfig handles it and
+// use a bitfield. However, the eeprom has a ton of space which isn't being
+// used so I don't really care and have a separate byte for every setting.
+#define EECONFIG_BELAK_SWAP_GUI_CTRL (uint8_t *)18
+
+static uint8_t swap_gui_ctrl = 0;
+static uint8_t td_led_override = 0;
+
+enum belak_keycodes {
+ // Function codes
+ BEL_F0 = SAFE_RANGE,
+ BEL_F1,
+
+ E_SHRUG,
+ E_TFLIP,
+ E_TSET,
+};
+
+inline void tap(uint16_t keycode) {
+ register_code(keycode);
+ unregister_code(keycode);
+};
+
+// TODO: Add LED support to the tap dance by using the advanced macro
+#define LTOGGLE TD(TD_LAYER_TOGGLE)
+
+#define BASE 0 // default layer
+#define SYMB 1 // symbols
+#define NUMP 2 // numpad
+#define SWPH 3 // swap gui/ctrl on the hands
+
+enum belak_td {
+ TD_LAYER_TOGGLE = 0,
+};
+
+void belak_td_each(qk_tap_dance_state_t *state, void *user_data);
+void belak_td_finished(qk_tap_dance_state_t *state, void *user_data);
+void belak_td_reset(qk_tap_dance_state_t *state, void *user_data);
+
+qk_tap_dance_action_t tap_dance_actions[] = {
+ [TD_LAYER_TOGGLE] = ACTION_TAP_DANCE_FN_ADVANCED(belak_td_each, belak_td_finished, belak_td_reset),
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+/* Keymap 0: Basic layer
+ *
+ * ,--------------------------------------------------. ,--------------------------------------------------.
+ * | Esc | 1 | 2 | 3 | 4 | 5 | L1 | | L2 | 6 | 7 | 8 | 9 | 0 | = |
+ * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
+ * | Tab | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | - |
+ * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
+ * | \ | A | S | D | F | G |------| |------| H | J | K | L | ; | ' |
+ * |--------+------+------+------+------+------| LGui | | RGui |------+------+------+------+------+--------|
+ * | LShift | Z | X | C | V | B | | | | N | M | , | . | / | RShift |
+ * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
+ * |Layers| LCtrl| Left | Right| LAlt | | RAlt | Up | Down | RCtrl|Layers|
+ * `----------------------------------' `----------------------------------'
+ * ,-------------. ,--------------.
+ * | ~L2 | Ins | | Grv | ~L1 |
+ * ,-------|------|------| |------+-------+-------.
+ * | Back | | Home | | PgUp | | |
+ * | Space | Del |------| |------| Enter | Space |
+ * | | | End | | PgDn | | |
+ * `---------------------' `----------------------'
+ */
+ [BASE] = KEYMAP( // layer 0 : default
+ // left hand
+ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, TG(SYMB),
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC,
+ CTL_T(KC_BSLS), KC_A, KC_S, KC_D, KC_F, KC_G,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LGUI,
+ LTOGGLE, KC_LCTRL, KC_LEFT,KC_RGHT,KC_LALT,
+ MO(NUMP),KC_INS,
+ KC_HOME,
+ CTL_T(KC_BSPC),GUI_T(KC_DEL),KC_END,
+ // right hand
+ TG(NUMP), KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL,
+ KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS,
+ KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
+ KC_RGUI, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT,
+ KC_RALT,KC_UP, KC_DOWN,KC_RCTRL, LTOGGLE,
+ KC_GRV, MO(SYMB),
+ KC_PGUP,
+ KC_PGDN, GUI_T(KC_ENT), CTL_T(KC_SPC)
+ ),
+/* Keymap 1: Symbol Layer
+ *
+ * ,--------------------------------------------------. ,--------------------------------------------------.
+ * | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 |
+ * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
+ * | | ! | @ | { | } | | | | | | Up | | Up | | | F12 |
+ * |--------+------+------+------+------+------| TFLIP| | TSET |------+------+------+------+------+--------|
+ * | | # | $ | ( | ) | ` |------| |------| Down | Left | Down | Rght | | |
+ * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
+ * | | % | ^ | [ | ] | ~ | SHRUG| | | & | | | | | |
+ * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
+ * |LClear| | | | | | | | | |LClear|
+ * `----------------------------------' `----------------------------------'
+ * ,-------------. ,-------------.
+ * | TOGL | | | | TOGL |
+ * ,------|------|------| |------+------+------.
+ * | | | | | | | |
+ * | | |------| |------| | |
+ * | | | | | | | |
+ * `--------------------' `--------------------'
+ */
+ [SYMB] = KEYMAP(
+ // left hand
+ _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, E_TFLIP,
+ _______, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, E_TSET,
+ _______, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV,
+ _______, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, E_SHRUG,
+ BEL_F1, _______, _______, _______, _______,
+ BEL_F0, _______,
+ _______,
+ _______, _______, _______,
+ // right hand
+ _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
+ _______, KC_UP, _______, KC_UP, _______, _______, KC_F12,
+ KC_DOWN, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______,
+ _______, KC_AMPR, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, BEL_F1,
+ _______, BEL_F0,
+ _______,
+ _______, _______, _______
+ ),
+/* Keymap 2: Numpad Layer
+ *
+ * ,--------------------------------------------------. ,--------------------------------------------------.
+ * | | | | | | | | | | | | | | | |
+ * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
+ * | | | | | | | | | | | 7 | 8 | 9 | * | |
+ * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
+ * | | | | | | |------| |------| | 4 | 5 | 6 | + | |
+ * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
+ * | | | | | | | | | | | 1 | 2 | 3 | \ | |
+ * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
+ * |LClear| | | | | | 0 | 0 | . | = |LClear|
+ * `----------------------------------' `----------------------------------'
+ * ,-------------. ,-------------.
+ * | TOGL | | | | TOGL |
+ * ,------|------|------| |------+------+------.
+ * | | | | | | | |
+ * | | |------| |------| | |
+ * | | | | | | | |
+ * `--------------------' `--------------------'
+ */
+ [NUMP] = KEYMAP(
+ // left hand
+ _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______,
+ BEL_F1, _______, _______, _______, _______,
+ BEL_F0, _______,
+ _______,
+ _______, _______, _______,
+ // right hand
+ _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, KC_7, KC_8, KC_9, KC_ASTR, _______,
+ _______, KC_4, KC_5, KC_6, KC_PLUS, _______,
+ _______, _______, KC_1, KC_2, KC_3, KC_BSLS, _______,
+ KC_0, KC_0, KC_DOT, KC_EQL, BEL_F1,
+ _______, BEL_F0,
+ _______,
+ _______, _______, _______
+ ),
+/* Keymap 3: Swap control and gui on the thumb */
+ [SWPH] = KEYMAP(
+ // left hand
+ _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______,
+ _______, _______,
+ _______,
+ GUI_T(KC_BSPC), CTL_T(KC_DEL), _______,
+ // right hand
+ _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______,
+ _______, _______,
+ _______,
+ _______, CTL_T(KC_ENT), GUI_T(KC_SPC)
+ ),
+};
+
+// Runs just one time when the keyboard initializes.
+void matrix_init_user(void) {
+ // If our magic word wasn't set properly, we need to zero out the settings.
+ if (eeprom_read_word(EECONFIG_BELAK) != EECONFIG_BELAK_MAGIC) {
+ eeprom_update_word(EECONFIG_BELAK, EECONFIG_BELAK_MAGIC);
+ eeprom_update_byte(EECONFIG_BELAK_SWAP_GUI_CTRL, 0);
+ }
+
+ if (eeprom_read_byte(EECONFIG_BELAK_SWAP_GUI_CTRL)) {
+ layer_on(SWPH);
+ swap_gui_ctrl = 1;
+ }
+};
+
+// Runs constantly in the background, in a loop.
+void matrix_scan_user(void) {
+ ergodox_board_led_off();
+ ergodox_right_led_1_off();
+ ergodox_right_led_2_off();
+ ergodox_right_led_3_off();
+
+ switch (td_led_override) {
+ case 1:
+ ergodox_right_led_1_on();
+ break;
+ case 2:
+ ergodox_right_led_2_on();
+ break;
+ default:
+ // Layer 1 and 2 are both overlay layers, so they could both be on. This
+ // means we can't use the lazy check of checking for the first significant
+ // bit.
+ if (LAYER_ON(SYMB)) {
+ ergodox_right_led_1_on();
+ }
+ if (LAYER_ON(NUMP)) {
+ ergodox_right_led_2_on();
+ }
+ }
+};
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case BEL_F0:
+ if(record->event.pressed){
+ swap_gui_ctrl = !swap_gui_ctrl;
+ eeprom_update_byte(EECONFIG_BELAK_SWAP_GUI_CTRL, swap_gui_ctrl);
+
+ if (swap_gui_ctrl) {
+ layer_on(SWPH);
+ } else {
+ layer_off(SWPH);
+ }
+
+ return false;
+ }
+ break;
+ case BEL_F1:
+ if(record->event.pressed){
+ layer_off(SYMB);
+ layer_off(NUMP);
+
+ return false;
+ }
+ break;
+ case E_SHRUG: // ¯\_(ツ)_/¯
+ if (record->event.pressed) {
+ process_unicode((0x00AF|QK_UNICODE), record); // Hand
+ tap(KC_BSLS); // Arm
+ register_code(KC_RSFT);
+ tap(KC_UNDS); // Arm
+ tap(KC_LPRN); // Head
+ unregister_code(KC_RSFT);
+ process_unicode((0x30C4|QK_UNICODE), record); // Face
+ register_code(KC_RSFT);
+ tap(KC_RPRN); // Head
+ tap(KC_UNDS); // Arm
+ unregister_code(KC_RSFT);
+ tap(KC_SLSH); // Arm
+ process_unicode((0x00AF|QK_UNICODE), record); // Hand
+ }
+ return false;
+ break;
+ case E_TFLIP: // (╯°□°)╯ ︵ ┻━┻
+ if (record->event.pressed) {
+ register_code(KC_RSFT);
+ tap(KC_9);
+ unregister_code(KC_RSFT);
+ process_unicode((0x256F|QK_UNICODE), record); // Arm
+ process_unicode((0x00B0|QK_UNICODE), record); // Eye
+ process_unicode((0x25A1|QK_UNICODE), record); // Mouth
+ process_unicode((0x00B0|QK_UNICODE), record); // Eye
+ register_code(KC_RSFT);
+ tap(KC_0);
+ unregister_code(KC_RSFT);
+ process_unicode((0x256F|QK_UNICODE), record); // Arm
+ tap(KC_SPC);
+ process_unicode((0x0361|QK_UNICODE), record); // Flippy
+ tap(KC_SPC);
+ process_unicode((0x253B|QK_UNICODE), record); // Table
+ process_unicode((0x2501|QK_UNICODE), record); // Table
+ process_unicode((0x253B|QK_UNICODE), record); // Table
+ }
+ return false;
+ break;
+ case E_TSET: // ┬──┬ ノ( ゜-゜ノ)
+ if (record->event.pressed) {
+ process_unicode((0x252C|QK_UNICODE), record); // Table
+ process_unicode((0x2500|QK_UNICODE), record); // Table
+ process_unicode((0x2500|QK_UNICODE), record); // Table
+ process_unicode((0x252C|QK_UNICODE), record); // Table
+ tap(KC_SPC);
+ process_unicode((0x30CE|QK_UNICODE), record); // Arm
+ register_code(KC_RSFT);
+ tap(KC_9);
+ unregister_code(KC_RSFT);
+ tap(KC_SPC);
+ process_unicode((0x309C|QK_UNICODE), record); // Eye
+ tap(KC_MINS);
+ process_unicode((0x309C|QK_UNICODE), record); // Eye
+ process_unicode((0x30CE|QK_UNICODE), record); // Arm
+ register_code(KC_RSFT);
+ tap(KC_0);
+ unregister_code(KC_RSFT);
+ }
+ return false;
+ break;
+ }
+
+ return true;
+}
+
+void belak_td_each(qk_tap_dance_state_t *state, void *user_data) {
+ switch (state->count) {
+ case 1:
+ td_led_override = 1;
+ break;
+ case 2:
+ td_led_override = 2;
+ break;
+ default:
+ reset_tap_dance(state);
+ }
+}
+
+void belak_td_finished(qk_tap_dance_state_t *state, void *user_data) {
+ switch (state->count) {
+ case 1:
+ layer_on(SYMB);
+ break;
+ case 2:
+ layer_on(NUMP);
+ break;
+ }
+ td_led_override = 0;
+}
+
+void belak_td_reset(qk_tap_dance_state_t *state, void *user_data) {
+ td_led_override = 0;
+}
diff --git a/keyboards/ergodox/keymaps/belak/visualizer.c b/keyboards/ergodox/keymaps/belak/visualizer.c
new file mode 100644
index 0000000000..b92890a668
--- /dev/null
+++ b/keyboards/ergodox/keymaps/belak/visualizer.c
@@ -0,0 +1,49 @@
+/*
+Copyright 2017 Fred Sundvik
+
+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/>.
+*/
+
+// Currently we are assuming that both the backlight and LCD are enabled
+// But it's entirely possible to write a custom visualizer that use only
+// one of them
+#ifndef LCD_BACKLIGHT_ENABLE
+#error This visualizer needs that LCD backlight is enabled
+#endif
+
+#ifndef LCD_ENABLE
+#error This visualizer needs that LCD is enabled
+#endif
+
+#include "simple_visualizer.h"
+
+static void get_visualizer_layer_and_color(visualizer_state_t* state) {
+ uint8_t saturation = 60;
+ if (state->status.leds & (1u << USB_LED_CAPS_LOCK)) {
+ saturation = 255;
+ }
+
+ if (state->status.layer & 0x4) {
+ state->target_lcd_color = LCD_COLOR(0, saturation, 0xFF);
+ state->layer_text = "Media";
+ }
+ else if (state->status.layer & 0x2) {
+ state->target_lcd_color = LCD_COLOR(168, saturation, 0xFF);
+ state->layer_text = "Symbols";
+ }
+ else {
+ state->target_lcd_color = LCD_COLOR(84, saturation, 0xFF);
+ state->layer_text = "Base";
+ }
+}
diff --git a/keyboards/kmac/keymaps/default/Makefile b/keyboards/kmac/keymaps/default/Makefile
index a8a44889db..8e2d011b34 100644
--- a/keyboards/kmac/keymaps/default/Makefile
+++ b/keyboards/kmac/keymaps/default/Makefile
@@ -15,13 +15,13 @@
# QMK Build Options
-# change to "no" to disable the options, or define them in the Makefile in
+# change to "no" to disable the options, or define them in the Makefile in
# the appropriate keymap folder that will get included automatically
#
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
-CONSOLE_ENABLE = yes # Console for debug(+400)
+CONSOLE_ENABLE = no # Console for debug(+400)
COMMAND_ENABLE = yes # Commands for debug and configuration
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
@@ -29,9 +29,9 @@ MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
AUDIO_ENABLE = no # Audio output on port C6
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
-RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
+RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
ifndef QUANTUM_DIR
- include ../../../../Makefile
+ include ../../../../Makefile
endif
diff --git a/keyboards/kmac/keymaps/default/keymap.c b/keyboards/kmac/keymaps/default/keymap.c
index 3553e84920..f3ac93abf7 100644
--- a/keyboards/kmac/keymaps/default/keymap.c
+++ b/keyboards/kmac/keymaps/default/keymap.c
@@ -26,22 +26,22 @@
#define _FL 1
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [_BL] = KEYMAP(
- KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_BRK, \
- KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, \
- KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, \
- KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \
- KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, \
- KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \
- ),
- [_FL] = KEYMAP(
- BL_STEP, M(0), M(1), M(2), M(3), M(4), M(5), M(6), M(7), M(8), M(9), M(10), M(11), _______, _______, _______, \
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
- ),
+ [_BL] = KEYMAP(
+ KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_BRK, \
+ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, \
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, \
+ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, \
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \
+ ),
+ [_FL] = KEYMAP(
+ BL_STEP, M(0), M(1), M(2), M(3), M(4), M(5), M(6), M(7), M(8), M(9), M(10), M(11), _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
+ ),
};
const uint16_t PROGMEM fn_actions[] = {
@@ -50,32 +50,32 @@ const uint16_t PROGMEM fn_actions[] = {
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
{
- // MACRODOWN only works in this function
- switch(id) {
+ // MACRODOWN only works in this function
+ switch(id) {
case 0:
- if (record->event.pressed) {
- SEND_STRING("The");
- return false;
- }
- break;
+ if (record->event.pressed) {
+ SEND_STRING("The");
+ return false;
+ }
+ break;
case 1:
- if (record->event.pressed) {
- SEND_STRING("Custom");
- return false;
- }
- break;
+ if (record->event.pressed) {
+ SEND_STRING("Custom");
+ return false;
+ }
+ break;
case 2:
- if (record->event.pressed) {
- SEND_STRING("Keyboard");
- return false;
- }
- break;
+ if (record->event.pressed) {
+ SEND_STRING("Keyboard");
+ return false;
+ }
+ break;
case 3:
- if (record->event.pressed) {
- return MACRO( D(LCTL), T(C), U(LCTL), T(RGHT), D(LCTL), T(V), U(LCTL), END );
- }
- break;
- }
+ if (record->event.pressed) {
+ return MACRO( D(LCTL), T(C), U(LCTL), T(RGHT), D(LCTL), T(V), U(LCTL), END );
+ }
+ break;
+ }
return MACRO_NONE;
};
@@ -89,7 +89,7 @@ void matrix_scan_user(void) {
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
- return true;
+ return true;
}
void led_set_user(uint8_t usb_led) {
diff --git a/keyboards/kmac/keymaps/default/readme.md b/keyboards/kmac/keymaps/default/readme.md
index d384e0d6a8..aaa6f9bf25 100644
--- a/keyboards/kmac/keymaps/default/readme.md
+++ b/keyboards/kmac/keymaps/default/readme.md
@@ -6,7 +6,7 @@ See [keymap.c](keymap.c) for details.
## Layers
-The keymap have two layers. To access the functions on the second layer, hold down caps lock and press the corresponding key.
+The keymap have two layers. To access the functions on the second layer, hold down `Fn` and press the corresponding key.
### Layer 1: Default Layer
,---. ,---------------. ,---------------. ,---------------. ,-----------.
diff --git a/keyboards/kmac/keymaps/winkeyless/Makefile b/keyboards/kmac/keymaps/winkeyless/Makefile
index a8a44889db..8e2d011b34 100644
--- a/keyboards/kmac/keymaps/winkeyless/Makefile
+++ b/keyboards/kmac/keymaps/winkeyless/Makefile
@@ -15,13 +15,13 @@
# QMK Build Options
-# change to "no" to disable the options, or define them in the Makefile in
+# change to "no" to disable the options, or define them in the Makefile in
# the appropriate keymap folder that will get included automatically
#
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
-CONSOLE_ENABLE = yes # Console for debug(+400)
+CONSOLE_ENABLE = no # Console for debug(+400)
COMMAND_ENABLE = yes # Commands for debug and configuration
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
@@ -29,9 +29,9 @@ MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
AUDIO_ENABLE = no # Audio output on port C6
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
-RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
+RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
ifndef QUANTUM_DIR
- include ../../../../Makefile
+ include ../../../../Makefile
endif
diff --git a/keyboards/kmac/keymaps/winkeyless/keymap.c b/keyboards/kmac/keymaps/winkeyless/keymap.c
index f986dec273..e3d66ea083 100644
--- a/keyboards/kmac/keymaps/winkeyless/keymap.c
+++ b/keyboards/kmac/keymaps/winkeyless/keymap.c
@@ -26,22 +26,22 @@
#define _FL 1
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [_BL] = KEYMAP_WINKEYLESS(
- KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_BRK, \
- KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, \
- KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, \
- KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \
- KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, \
- KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \
- ),
- [_FL] = KEYMAP_WINKEYLESS(
- BL_STEP, M(0), M(1), M(2), M(3), M(4), M(5), M(6), M(7), M(8), M(9), M(10), M(11), _______, _______, _______, \
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
- ),
+ [_BL] = KEYMAP_WINKEYLESS(
+ KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_BRK, \
+ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, \
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, \
+ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, \
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \
+ ),
+ [_FL] = KEYMAP_WINKEYLESS(
+ BL_STEP, M(0), M(1), M(2), M(3), M(4), M(5), M(6), M(7), M(8), M(9), M(10), M(11), _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
+ ),
};
const uint16_t PROGMEM fn_actions[] = {
@@ -50,32 +50,32 @@ const uint16_t PROGMEM fn_actions[] = {
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
{
- // MACRODOWN only works in this function
- switch(id) {
+ // MACRODOWN only works in this function
+ switch(id) {
case 0:
- if (record->event.pressed) {
- SEND_STRING("The");
- return false;
- }
- break;
+ if (record->event.pressed) {
+ SEND_STRING("The");
+ return false;
+ }
+ break;
case 1:
- if (record->event.pressed) {
- SEND_STRING("Custom");
- return false;
- }
- break;
+ if (record->event.pressed) {
+ SEND_STRING("Custom");
+ return false;
+ }
+ break;
case 2:
- if (record->event.pressed) {
- SEND_STRING("Keyboard");
- return false;
- }
- break;
+ if (record->event.pressed) {
+ SEND_STRING("Keyboard");
+ return false;
+ }
+ break;
case 3:
- if (record->event.pressed) {
- return MACRO( D(LCTL), T(C), U(LCTL), T(RGHT), D(LCTL), T(V), U(LCTL), END );
- }
- break;
- }
+ if (record->event.pressed) {
+ return MACRO( D(LCTL), T(C), U(LCTL), T(RGHT), D(LCTL), T(V), U(LCTL), END );
+ }
+ break;
+ }
return MACRO_NONE;
};
@@ -89,7 +89,7 @@ void matrix_scan_user(void) {
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
- return true;
+ return true;
}
void led_set_user(uint8_t usb_led) {
diff --git a/keyboards/kmac/keymaps/winkeyless/readme.md b/keyboards/kmac/keymaps/winkeyless/readme.md
index b921f7b0f7..9c579e9f53 100644
--- a/keyboards/kmac/keymaps/winkeyless/readme.md
+++ b/keyboards/kmac/keymaps/winkeyless/readme.md
@@ -7,7 +7,7 @@ See [keymap.c](keymap.c) for details.
## Layers
-The keymap have two layers. To access the functions on the second layer, hold down caps lock and press the corresponding key.
+The keymap have two layers. To access the functions on the second layer, hold down `Fn` and press the corresponding key.
### Layer 1: Default Layer
,---. ,---------------. ,---------------. ,---------------. ,-----------.
diff --git a/keyboards/kmac/kmac.c b/keyboards/kmac/kmac.c
index 34647e81ad..6b54294b4b 100644
--- a/keyboards/kmac/kmac.c
+++ b/keyboards/kmac/kmac.c
@@ -16,24 +16,24 @@
#include "kmac.h"
void matrix_init_kb(void) {
- // put your keyboard start-up code here
- // runs once when the firmware starts up
- led_init_ports();
- matrix_init_user();
+ // put your keyboard start-up code here
+ // runs once when the firmware starts up
+ led_init_ports();
+ matrix_init_user();
}
void matrix_scan_kb(void) {
- // put your looping keyboard code here
- // runs every cycle (a lot)
+ // put your looping keyboard code here
+ // runs every cycle (a lot)
- matrix_scan_user();
+ matrix_scan_user();
}
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
- // put your per-action keyboard code here
- // runs for every action, just before processing by the firmware
+ // put your per-action keyboard code here
+ // runs for every action, just before processing by the firmware
- return process_record_user(keycode, record);
+ return process_record_user(keycode, record);
}
void led_init_ports(void) {
@@ -64,12 +64,12 @@ void led_set_kb(uint8_t usb_led) {
PORTE |= (1<<6); // HI
}
- led_set_user(usb_led);
+ led_set_user(usb_led);
}
void backlight_init_ports(void) {
- DDRB |= (1<<1) | (1<<2) | (1<<3) | (1<<4); // OUT
- DDRD |= (1<<7); // OUT
+ DDRB |= (1<<1) | (1<<2) | (1<<3) | (1<<4); // OUT
+ DDRD |= (1<<7); // OUT
}
/* Backlight pin configuration
diff --git a/keyboards/kmac/matrix.c b/keyboards/kmac/matrix.c
index bab638bdfa..cfafa90e66 100644
--- a/keyboards/kmac/matrix.c
+++ b/keyboards/kmac/matrix.c
@@ -103,7 +103,7 @@ bool matrix_is_on(uint8_t row, uint8_t col)
inline
matrix_row_t matrix_get_row(uint8_t row)
{
- return matrix[row];
+ return matrix[row];
}
void matrix_print(void)
diff --git a/keyboards/kmac/rules.mk b/keyboards/kmac/rules.mk
index 54c9aa2563..2305de4121 100644
--- a/keyboards/kmac/rules.mk
+++ b/keyboards/kmac/rules.mk
@@ -57,14 +57,14 @@ OPT_DEFS += -DBOOTLOADER_SIZE=4096
BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
-CONSOLE_ENABLE ?= yes # Console for debug(+400)
+CONSOLE_ENABLE ?= no # Console for debug(+400)
COMMAND_ENABLE ?= yes # Commands for debug and configuration
CUSTOM_MATRIX ?= yes # Custom matrix file
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
NKRO_ENABLE ?= yes # USB Nkey Rollover
-BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality
+BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality
MIDI_ENABLE ?= no # MIDI support (+2400 to 4200, depending on config)
UNICODE_ENABLE ?= no # Unicode
BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
diff --git a/keyboards/tv44/keymaps/belak/Makefile b/keyboards/tv44/keymaps/belak/Makefile
new file mode 100644
index 0000000000..6112411240
--- /dev/null
+++ b/keyboards/tv44/keymaps/belak/Makefile
@@ -0,0 +1,12 @@
+#BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = no # Mouse keys(+4700)
+#EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+#CONSOLE_ENABLE = yes # Console for debug(+400)
+#DEBUG_ENABLE = yes
+#COMMAND_ENABLE = yes # Commands for debug and configuration
+NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+TAP_DANCE_ENABLE = yes
+
+ifndef QUANTUM_DIR
+ include ../../../../Makefile
+endif
diff --git a/keyboards/tv44/keymaps/belak/keymap.c b/keyboards/tv44/keymaps/belak/keymap.c
new file mode 100644
index 0000000000..703a1c2dd3
--- /dev/null
+++ b/keyboards/tv44/keymaps/belak/keymap.c
@@ -0,0 +1,105 @@
+#include "tv44.h"
+#include "action_layer.h"
+#include "debug.h"
+#include "eeconfig.h"
+
+// Layer names. We stick to 3 letters if possible so MO(NAME) fits in 7
+// characters and doesn't mess with the grid.
+#define _QW 0
+#define _L1 1
+#define _L2 2
+#define _L3 3
+
+// Curly braces have their own keys. These are defined so they don't mess up the
+// grid in layer 2.
+#define L_CURBR LSFT(KC_LBRC)
+#define R_CURBR LSFT(KC_RBRC)
+
+#define L1_TAB LT(_L1, KC_TAB)
+#define L2_ESC LT(_L2, KC_ESC)
+#define L2_SLSH LT(_L2, KC_SLSH)
+#define L3_QUOT LT(_L3, KC_QUOT)
+
+// Tap dance magic
+#define TD_LGUI TD(BE_TD_GUI)
+#define TD_LCTL TD(BE_TD_CTL)
+#define TD_LALT TD(BE_TD_ALT)
+
+enum belak_td {
+ BE_TD_GUI = 0,
+ BE_TD_CTL,
+ BE_TD_ALT,
+};
+
+void mod_tap_fn(qk_tap_dance_state_t *state, void *user_data);
+void mod_reset_fn(qk_tap_dance_state_t *state, void *user_data);
+
+qk_tap_dance_action_t tap_dance_actions[] = {
+ [BE_TD_GUI] = ACTION_TAP_DANCE_FN_ADVANCED(mod_tap_fn, NULL, mod_reset_fn),
+ [BE_TD_CTL] = ACTION_TAP_DANCE_FN_ADVANCED(mod_tap_fn, NULL, mod_reset_fn),
+ [BE_TD_ALT] = ACTION_TAP_DANCE_FN_ADVANCED(mod_tap_fn, NULL, mod_reset_fn),
+};
+
+uint16_t tap_dance_keys[] = {
+ [BE_TD_GUI] = KC_LGUI,
+ [BE_TD_CTL] = KC_LCTL,
+ [BE_TD_ALT] = KC_LALT,
+};
+
+// Fillers to make layering more clear
+#define _______ KC_TRNS
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [_QW] = KEYMAP_ARROW_COMMAND( /* Qwerty */
+ L2_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
+ L1_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, L3_QUOT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, L2_SLSH,
+ TD_LCTL, MO(_L3), TD_LALT, TD_LGUI, KC_ENT, KC_SPC, MO(_L1), KC_LEFT, KC_DOWN, KC_RGHT
+ ),
+ [_L1] = KEYMAP_ARROW_COMMAND( /* LAYER 1 */
+ KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL,
+ _______, KC_BSLS, KC_QUOT, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_DOWN, KC_UP, KC_LEFT, KC_RGHT, _______,
+ _______, KC_ESC, _______, KC_PSCR, _______, _______, _______, KC_MSTP, KC_MPLY, KC_MPRV, KC_MNXT, KC_RSFT,
+ _______, KC_LGUI, _______, _______, _______, _______, _______, _______, _______, _______
+ ),
+ [_L2] = KEYMAP_ARROW_COMMAND( /* LAYER 2 */
+ _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______,
+ KC_ESC, KC_PIPE, KC_DQUO, KC_UNDS, KC_PLUS, L_CURBR, R_CURBR, KC_4, KC_5, KC_6, KC_VOLU, KC_ENT,
+ _______, _______, _______, _______, _______, _______, KC_0, KC_1, KC_2, KC_3, KC_VOLD, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ ),
+ [_L3] = KEYMAP_ARROW_COMMAND( /* LAYER 3 */
+ _______, _______, _______, _______, _______, _______, _______, KC_F1, KC_F2, KC_F3, KC_F4, _______,
+ KC_ESC, _______, _______, _______, _______, _______, _______, KC_F5, KC_F6, KC_F7, KC_F8, _______,
+ _______, _______, _______, _______, _______, _______, _______, KC_F9, KC_F10, KC_F11, KC_F12, _______,
+ _______, KC_LGUI, _______, _______, _______, _______, _______, _______, _______, _______
+ )
+};
+
+const uint16_t PROGMEM fn_actions[] = {};
+
+// Tap dance functions
+void mod_tap_fn(qk_tap_dance_state_t *state, void *user_data) {
+ switch (state->count) {
+ case 1:
+ register_mods(MOD_BIT(tap_dance_keys[state->keycode - QK_TAP_DANCE]));
+ send_keyboard_report();
+ break;
+ case 2:
+ layer_on(_L2);
+ break;
+ case 3:
+ layer_off(_L2);
+ layer_on(_L1);
+ break;
+ default:
+ reset_tap_dance(state);
+ }
+}
+
+void mod_reset_fn(qk_tap_dance_state_t *state, void *user_data) {
+ layer_off(_L1);
+ layer_off(_L2);
+ unregister_mods(MOD_BIT(tap_dance_keys[state->keycode - QK_TAP_DANCE]));
+ send_keyboard_report();
+}
diff --git a/keyboards/tv44/keymaps/belak/readme.md b/keyboards/tv44/keymaps/belak/readme.md
new file mode 100644
index 0000000000..f990c578a1
--- /dev/null
+++ b/keyboards/tv44/keymaps/belak/readme.md
@@ -0,0 +1,6 @@
+# Belak's TV44 (TV46?) layout
+
+This layout is roughly based on the low-rider arrow-southpaw layout from [the
+configurator](http://minivan.config.thevankeyboards.com) with a number of
+changes to make it easier to use and add in missing keys (like adding / and '
+to the main layer)
diff --git a/keyboards/tv44/keymaps/default/keymap.c b/keyboards/tv44/keymaps/default/keymap.c
index b4a32d6f6e..6979ac3064 100644
--- a/keyboards/tv44/keymaps/default/keymap.c
+++ b/keyboards/tv44/keymaps/default/keymap.c
@@ -21,48 +21,52 @@ extern keymap_config_t keymap_config;
#define DVORAK M(_DV)
#define COLEMAK M(_CM)
+// Curly braces have their own keys. These are defined to make them not mess up
+// the grid in layer 2.
+#define L_CURBR LSFT(KC_LBRC)
+#define R_CURBR LSFT(KC_RBRC)
+
// Fillers to make layering more clear
#define _______ KC_TRNS
-#define XXXXXXX KC_NO
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [_QW] = { /* Qwerty */
- {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC },
- {MO(_L1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, MO(_L1) },
- {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MO(_L2) },
- {KC_LCTL, MO(_L2), KC_LGUI, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, KC_SPC, KC_RALT, KC_ESC, XXXXXXX, TG(_L3) }
- },
- [_DV] = { /* Dvorak */
- {KC_TAB, KC_SLSH, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC },
- {MO(_L1), KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, MO(_L1) },
- {KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, MO(_L2) },
- {KC_LCTL, MO(_L2), KC_LGUI, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, KC_SPC, KC_RALT, KC_ESC, XXXXXXX, TG(_L3) }
- },
- [_CM] = { /* Colemak */
- {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC },
- {MO(_L1), KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, MO(_L1) },
- {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, MO(_L2) },
- {KC_LCTL, MO(_L2), KC_LGUI, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, KC_SPC, KC_RALT, KC_ESC, XXXXXXX, TG(_L3) }
- },
- [_L1] = { /* LAYER 1 */
- {KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL },
- {_______, KC_BSLS, KC_QUOT, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_DOWN, KC_UP, KC_LEFT, KC_RGHT, _______ },
- {_______, KC_ESC, _______, KC_PSCR, _______, _______, _______, KC_MSTP, KC_MPLY, KC_MPRV, KC_MNXT, KC_RSFT },
- {_______, KC_LGUI, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, XXXXXXX, _______ }
- },
- [_L2] = { /* LAYER 2 */
- {_______, QWERTY, DVORAK, COLEMAK, _______, _______, _______, KC_7, KC_8, KC_9, KC_0, _______ },
- {KC_ESC, KC_PIPE, KC_DQUO, KC_UNDS, KC_PLUS, LSFT(KC_LBRC), LSFT(KC_RBRC), KC_4, KC_5, KC_6, KC_VOLU, KC_ENT },
- {_______, _______, _______, _______, _______, _______, KC_0, KC_1, KC_2, KC_3, KC_VOLD, _______ },
- {_______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, XXXXXXX, _______ }
- },
- [_L3] = { /* LAYER 3 */
- {_______, _______, _______, _______, _______, _______, _______, KC_F1, KC_F2, KC_F3, KC_F4, _______ },
- {KC_ESC, _______, _______, _______, _______, _______, _______, KC_F5, KC_F6, KC_F7, KC_F8, _______ },
- {KC_LSFT, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_F9, KC_F10, KC_F11, KC_F12, _______ },
- {_______, KC_LSFT, KC_B, KC_SPC, XXXXXXX, XXXXXXX, XXXXXXX, KC_C, _______, _______, XXXXXXX, _______ }
- }
+ [_QW] = KEYMAP( /* Qwerty */
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
+ MO(_L1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, MO(_L1),
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MO(_L2),
+ KC_LCTL, MO(_L2), KC_LGUI, KC_ENT, KC_SPC, KC_RALT, KC_ESC, TG(_L3)
+ ),
+ [_DV] = KEYMAP( /* Dvorak */
+ KC_TAB, KC_SLSH, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC,
+ MO(_L1), KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, MO(_L1),
+ KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, MO(_L2),
+ KC_LCTL, MO(_L2), KC_LGUI, KC_ENT, KC_SPC, KC_RALT, KC_ESC, TG(_L3)
+ ),
+ [_CM] = KEYMAP( /* Colemak */
+ KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC,
+ MO(_L1), KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, MO(_L1),
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, MO(_L2),
+ KC_LCTL, MO(_L2), KC_LGUI, KC_ENT, KC_SPC, KC_RALT, KC_ESC, TG(_L3)
+ ),
+ [_L1] = KEYMAP( /* LAYER 1 */
+ KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL,
+ _______, KC_BSLS, KC_QUOT, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_DOWN, KC_UP, KC_LEFT, KC_RGHT, _______,
+ _______, KC_ESC, _______, KC_PSCR, _______, _______, _______, KC_MSTP, KC_MPLY, KC_MPRV, KC_MNXT, KC_RSFT,
+ _______, KC_LGUI, _______, _______, _______, _______, _______, _______
+ ),
+ [_L2] = KEYMAP( /* LAYER 2 */
+ _______, QWERTY, DVORAK, COLEMAK, _______, _______, _______, KC_7, KC_8, KC_9, KC_0, _______,
+ KC_ESC, KC_PIPE, KC_DQUO, KC_UNDS, KC_PLUS, L_CURBR, R_CURBR, KC_4, KC_5, KC_6, KC_VOLU, KC_ENT,
+ _______, _______, _______, _______, _______, _______, KC_0, KC_1, KC_2, KC_3, KC_VOLD, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______
+ ),
+ [_L3] = KEYMAP( /* LAYER 3 */
+ _______, _______, _______, _______, _______, _______, _______, KC_F1, KC_F2, KC_F3, KC_F4, _______,
+ KC_ESC, _______, _______, _______, _______, _______, _______, KC_F5, KC_F6, KC_F7, KC_F8, _______,
+ KC_LSFT, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_F9, KC_F10, KC_F11, KC_F12, _______,
+ _______, KC_LSFT, KC_B, KC_SPC, KC_C, _______, _______, _______
+ )
};
const uint16_t PROGMEM fn_actions[] = {
diff --git a/keyboards/tv44/keymaps/jeebak/config.h b/keyboards/tv44/keymaps/jeebak/config.h
deleted file mode 100644
index a59ef2b70a..0000000000
--- a/keyboards/tv44/keymaps/jeebak/config.h
+++ /dev/null
@@ -1,21 +0,0 @@
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-#include "../../config.h"
-
-/**
- *TV44 keymap definition macro
- */
-#define KEYMAP_TV44( \
- K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12, \
- K13, K14, K15, K16, K17, K18, K19, K20, K21, K22, K23, K24, \
- K25, K26, K27, K28, K29, K30, K31, K32, K33, K34, K35, K36, \
- K37, K38, K39, K40, K41, K42, K43, K44 \
-) { \
- { K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12, }, \
- { K13, K14, K15, K16, K17, K18, K19, K20, K21, K22, K23, K24, }, \
- { K25, K26, K27, K28, K29, K30, K31, K32, K33, K34, K35, K36, }, \
- { K37, K38, K39, K40, KC_NO, KC_NO, KC_NO, K41, K42, K43, KC_NO, K44 } \
-}
-
-#endif
diff --git a/keyboards/tv44/keymaps/jeebak/keymap.c b/keyboards/tv44/keymaps/jeebak/keymap.c
index 0d0c07164a..6cfa695ce8 100644
--- a/keyboards/tv44/keymaps/jeebak/keymap.c
+++ b/keyboards/tv44/keymaps/jeebak/keymap.c
@@ -91,7 +91,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Alt | GUI | Lower | TC/Space | TC/Space | Raise | Vol+ | Play |
* `--------+---------+---------+------^^^-------+-----^^^--------+---------+---------+---------'
*/
-[_QWERTY] = KEYMAP_TV44(
+[_QWERTY] = KEYMAP(
/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------.*/
HPR_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC ,
/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`-----------------|*/
@@ -113,7 +113,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Alt | GUI | Lower | TC/Space | TC/Space | Raise | Vol+ | Play |
* `--------+---------+---------+------^^^-------+-----^^^--------+---------+---------+---------'
*/
-[_COLEMAK] = KEYMAP_TV44(
+[_COLEMAK] = KEYMAP(
/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------.*/
HPR_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC ,
/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`-----------------|*/
@@ -135,7 +135,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Alt | GUI | Lower | TC/Space | TC/Space | Raise | Vol+ | Play |
* `--------+---------+---------+------^^^-------+-----^^^--------+---------+---------+---------'
*/
-[_DVORAK] = KEYMAP_TV44(
+[_DVORAK] = KEYMAP(
/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------.*/
HPR_TAB,KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC ,
/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`-----------------|*/
@@ -157,7 +157,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Brite | | | | | | Vol- | Mute |
* `--------+---------+---------+------^^^-------+-----^^^--------+---------+---------+---------'
*/
-[_LOWER] = KEYMAP_TV44(
+[_LOWER] = KEYMAP(
/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------.*/
KC_TILD,KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC ,
/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`-----------------|*/
@@ -179,7 +179,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Brite | | | | | | Vol- | Mute |
* `--------+---------+---------+------^^^-------+-----^^^--------+---------+---------+---------'
*/
-[_RAISE] = KEYMAP_TV44(
+[_RAISE] = KEYMAP(
/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------.*/
KC_0 , KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC ,
/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`-----------------|*/
@@ -205,7 +205,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* seem to work on Mac. Presumably they'll work under Windows.
*/
-[_TOUCHCURSOR] = KEYMAP_TV44(
+[_TOUCHCURSOR] = KEYMAP(
/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------.*/
ALT_TAB,CMD_TAB, CTL_TAB, KC_LGUI, KC_LSFT, KC_TILD, KC_INS, KC_HOME, KC_UP, KC_END, KC_BSPC, _______ ,
/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`-----------------|*/
@@ -228,7 +228,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `--------+---------+---------+------^^^-------+-----^^^--------+---------+---------+---------'
*/
-[_MOUSECURSOR] = KEYMAP_TV44(
+[_MOUSECURSOR] = KEYMAP(
/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------.*/
_______,_______, KC_ACL0, _______, _______, _______, _______, KC_WH_L, KC_MS_U, KC_WH_R, KC_BTN2, _______ ,
/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`-----------------|*/
@@ -251,7 +251,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `--------+---------+---------+------^^^-------+-----^^^--------+---------+---------+---------'
*/
-[_PLOVER] = KEYMAP_TV44(
+[_PLOVER] = KEYMAP(
/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------.*/
KC_1 , KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 ,
/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`-----------------|*/
@@ -273,7 +273,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | Reset |
* `--------+---------+---------+------^^^-------+-----^^^--------+---------+---------+---------'
*/
-[_ADJUST] = KEYMAP_TV44(
+[_ADJUST] = KEYMAP(
/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------.*/
_______,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL ,
/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`-----------------|*/
diff --git a/keyboards/tv44/keymaps/smt/config.h b/keyboards/tv44/keymaps/smt/config.h
deleted file mode 100644
index f8f0a5078c..0000000000
--- a/keyboards/tv44/keymaps/smt/config.h
+++ /dev/null
@@ -1,36 +0,0 @@
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-#include "../../config.h"
-
-/**
- *TV44 keymap definition macro
- */
-#define KEYMAP_TV44( \
- K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12, \
- K13, K14, K15, K16, K17, K18, K19, K20, K21, K22, K23, K24, \
- K25, K26, K27, K28, K29, K30, K31, K32, K33, K34, K35, K36, \
- K37, K38, K39, K40, K41, K42, K43, K44 \
-) { \
- { K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12, }, \
- { K13, K14, K15, K16, K17, K18, K19, K20, K21, K22, K23, K24, }, \
- { K25, K26, K27, K28, K29, K30, K31, K32, K33, K34, K35, K36, }, \
- { K37, K38, K39, K40, KC_NO, KC_NO, KC_NO, K41, K42, K43, KC_NO, K44 } \
-}
-
-/**
- *TV45 keymap definition macro (arrows layout)
- */
-#define KEYMAP_TV45( \
- K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12, \
- K13, K14, K15, K16, K17, K18, K19, K20, K21, K22, K23, K24, \
- K25, K26, K27, K28, K29, K30, K31, K32, K33, K34, K35, K36, \
- K37, K38, K39, K40, K41, K42, K43, K44, K45 \
-) { \
- { K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12, }, \
- { K13, K14, K15, K16, K17, K18, K19, K20, K21, K22, K23, K24, }, \
- { K25, K26, K27, K28, K29, K30, K31, K32, K33, K34, K35, K36, }, \
- { K37, K38, K39, K40, KC_NO, KC_NO, KC_NO, K41, K42, K43, K44, K45 } \
-}
-
-#endif
diff --git a/keyboards/tv44/keymaps/smt/keymap.c b/keyboards/tv44/keymaps/smt/keymap.c
index dfd6244668..0540ad97e9 100644
--- a/keyboards/tv44/keymaps/smt/keymap.c
+++ b/keyboards/tv44/keymaps/smt/keymap.c
@@ -49,7 +49,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Alt/` | GUI | Lower | Space | Space | Raise | GUI | Alt | Ctrl |
* `-------+---------+--------+-----^^^------+-----^^^------+---------+------+------+-------'
*/
-[_QWERTY] = KEYMAP_TV45(
+[_QWERTY] = KEYMAP_ARROW(
/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------.*/
HPR_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC ,
/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`-----------------|*/
@@ -71,7 +71,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Alt/` | GUI | Lower | Space | Space | Raise | GUI | Alt | Ctrl |
* `-------+---------+--------+-----^^^------+-----^^^------+---------+------+------+-------'
*/
-[_COLEMAK] = KEYMAP_TV45(
+[_COLEMAK] = KEYMAP_ARROW(
/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------.*/
HPR_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC ,
/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`-----------------|*/
@@ -93,7 +93,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Alt/` | GUI | Lower | Space | Space | Raise | GUI | Alt | Ctrl |
* `-------+---------+--------+-----^^^------+-----^^^------+---------+------+------+-------'
*/
-[_DVORAK] = KEYMAP_TV45(
+[_DVORAK] = KEYMAP_ARROW(
/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------.*/
HPR_TAB,KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC ,
/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`-----------------|*/
@@ -115,7 +115,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Brite | | | Home | End | | Left | Down | Right |
* `-------+---------+--------+-----^^^------+-----^^^------+---------+------+------+-------'
*/
-[_LOWER] = KEYMAP_TV45(
+[_LOWER] = KEYMAP_ARROW(
/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------.*/
ALL_T(KC_0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL ,
/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`-----------------|*/
@@ -137,7 +137,7 @@ ALT_T(BACKLIT), _______ , _______ , KC_HOME , KC_END , _____
* | Brite | | | Play | Next | | Mute | Vol- | Vol+ |
* `-------+---------+--------+-----^^^------+-----^^^------+---------+------+------+-------'
*/
-[_RAISE] = KEYMAP_TV45(
+[_RAISE] = KEYMAP_ARROW(
/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------.*/
ALL_T(KC_TILD),KC_EXLM,KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL ,
/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`-----------------|*/
@@ -159,7 +159,7 @@ ALT_T(BACKLIT), _______ , _______ , KC_MPLY , KC_MNXT , _____
* | | | | | | | | | |
* `-------+---------+--------+-----^^^------+-----^^^------+---------+------+------+-------'
*/
-[_ADJUST] = KEYMAP_TV45(
+[_ADJUST] = KEYMAP_ARROW(
/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------.*/
_______, RESET , _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET ,
/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`-----------------|*/
diff --git a/keyboards/tv44/keymaps/smt/readme.md b/keyboards/tv44/keymaps/smt/readme.md
index 87bfbb04b3..059fd1bbde 100644
--- a/keyboards/tv44/keymaps/smt/readme.md
+++ b/keyboards/tv44/keymaps/smt/readme.md
@@ -4,7 +4,7 @@ This keymap is based on a combination of my Planck keymap and [jeebak's TV44 lay
I had been using something close to the default Minivan layout, but after spending a bit of time with the Planck and Preonic, I decided it would be better for me to try to standardize to some degree, where possible.
-Also, it's worth noting that my Minivan is one with the "arrows" layout, which has a 45th key, so I had to define a new KEYMAP_TV45 macro in config.h. In spite of this, the 45-key Minivan is still technically considered a "TV44" as far as I know.
+Also, it's worth noting that my Minivan is one with the "arrows" layout, which has a 45th key. In spite of this, the 45-key Minivan is still technically considered a "TV44" as far as I know.
![smt's TV44 keymap](https://i.imgur.com/Y4n6eHj.png)
@@ -21,9 +21,9 @@ Also, it's worth noting that my Minivan is one with the "arrows" layout, which h
This key modifies with "Hyper" (see [Brett Terpstra's post](http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/) on this) when held, and outputs the code for Tab when tapped. On the Mac, I use KeyboardMaestro to remap my hyper-keys to do a lot of crazy things.
3. **Ctrl/Escape**
-
+
I set up another mod-tap, this time for the Escape key that would act as a Control modifier when held.
-
+
4. **Alt/Backtick**
I don't currently have LEDs on most of my keyboards, and I certainly don't want LED controls on the base layer of a 40%.
diff --git a/keyboards/tv44/keymaps/tong92/keymap.c b/keyboards/tv44/keymaps/tong92/keymap.c
index 4a16b3554f..aba007c4d0 100644
--- a/keyboards/tv44/keymaps/tong92/keymap.c
+++ b/keyboards/tv44/keymaps/tong92/keymap.c
@@ -31,12 +31,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | Ftn1 | GUI | Alt | Space/LOWER | Space/RAISE | ' | [ | ] | Alt |
* `--------------------------------------------------------------------------'
*/
-[0] = {
-{KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
-{KC_LCTL,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_ENT},
-{KC_LSFT,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT,KC_SLSH,KC_RSFT },
-{FTN ,KC_LGUI,KC_LALT,LOWER,XXXXXXX,XXXXXXX,XXXXXXX,RAISE,KC_QUOT,KC_LBRC,KC_RBRC,KC_RALT}
-},
+[0] = KEYMAP_ARROW(
+KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
+KC_LCTL,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_ENT,
+KC_LSFT,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_RSFT,
+FTN, KC_LGUI,KC_LALT, LOWER, RAISE, KC_QUOT,KC_LBRC,KC_RBRC,KC_RALT
+),
/* LOWER
* ,--------------------------------------------------------------------------.
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | |
@@ -48,12 +48,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | END | LEFT| Down|RIGHT|
* `--------------------------------------------------------------------------'
*/
-[1] = {
-{KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______},
-{_______,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS,KC_PLUS,KC_LBRC,KC_RBRC,KC_BSLS },
-{_______,KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX,KC_HOME,KC_PGUP,KC_UP ,KC_PGDN },
-{XXXXXXX,_______,_______,_______,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,KC_END, KC_LEFT,KC_DOWN,KC_RIGHT}
-},
+[1] = KEYMAP_ARROW(
+KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______,
+_______,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS,KC_PLUS,KC_LBRC,KC_RBRC,KC_BSLS,
+_______,KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX,KC_HOME,KC_PGUP,KC_UP ,KC_PGDN,
+XXXXXXX,_______,_______, _______,XXXXXXX, KC_END, KC_LEFT,KC_DOWN,KC_RIGHT
+),
/* RAISE
* ,--------------------------------------------------------------------------.
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | |
@@ -65,12 +65,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | END | LEFT| Down|RIGHT|
* `--------------------------------------------------------------------------'
*/
-[2] ={
-{KC_TILD,KC_EXLM,KC_AT, KC_HASH,KC_DLR, KC_PERC,KC_CIRC,KC_AMPR,KC_ASTR,KC_LPRN,KC_RPRN,_______ },
-{_______,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS,KC_EQL, KC_LCBR,KC_RCBR,KC_PIPE },
-{_______,KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______,KC_HOME,KC_PGUP,KC_UP ,KC_PGDN },
-{XXXXXXX,_______,_______,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,_______,KC_END, KC_LEFT,KC_DOWN,KC_RIGHT}
-},
+[2] = KEYMAP_ARROW(
+KC_TILD,KC_EXLM,KC_AT, KC_HASH,KC_DLR, KC_PERC,KC_CIRC,KC_AMPR,KC_ASTR,KC_LPRN,KC_RPRN,_______,
+_______,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS,KC_EQL, KC_LCBR,KC_RCBR,KC_PIPE,
+_______,KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______,KC_HOME,KC_PGUP,KC_UP ,KC_PGDN,
+XXXXXXX,_______,_______, _______,_______, KC_END, KC_LEFT,KC_DOWN,KC_RIGHT
+),
/* FTN
* ,--------------------------------------------------------------------------.
* | ESC |WinOf|WinUp| | |Sh+Ca| | PgUp| UP | PgDo|PrtSc| DELET |
@@ -82,12 +82,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | DeskL | DeskR| Task Manager| DeskX | MOUSE| | | LED |
* `--------------------------------------------------------------------------'
*/
-[4] = {
-{KC_ESC ,LALT(KC_F4) ,LGUI(KC_UP) ,XXXXXXX ,XXXXXXX ,S(KC_CAPS) ,XXXXXXX,KC_PGUP,KC_UP,KC_PGDN,KC_PSCR,KC_DELT},
-{_______,LGUI(KC_LEFT) ,LGUI(KC_DOWN) ,LGUI(KC_RIGHT) ,XXXXXXX ,LALT(KC_CAPS),KC_CAPS,KC_LEFT,KC_DOWN,KC_RIGHT,XXXXXXX,XXXXXXX},
-{_______,LGUI(LSFT(KC_LEFT)),LGUI(LSFT(KC_RIGHT)),XXXXXXX ,XXXXXXX ,LCTL(KC_CAPS),KC_SLCK,KC_HOME,XXXXXXX,KC_END,XXXXXXX,KC_RCTL},
-{_______,LGUI(LCTL(KC_LEFT)),LGUI(LCTL(KC_RIGHT)),LCTL(LALT(KC_DELT)),XXXXXXX,XXXXXXX,XXXXXXX,LGUI(LCTL(KC_F4)),MOUSE,XXXXXXX,XXXXXXX,M(0)}
-},
+[4] = KEYMAP_ARROW(
+KC_ESC ,LALT(KC_F4) ,LGUI(KC_UP) ,XXXXXXX ,XXXXXXX,S(KC_CAPS) ,XXXXXXX ,KC_PGUP,KC_UP ,KC_PGDN ,KC_PSCR,KC_DELT,
+_______,LGUI(KC_LEFT) ,LGUI(KC_DOWN) ,LGUI(KC_RIGHT),XXXXXXX,LALT(KC_CAPS) ,KC_CAPS ,KC_LEFT,KC_DOWN,KC_RIGHT,XXXXXXX,XXXXXXX,
+_______,LGUI(LSFT(KC_LEFT)),LGUI(LSFT(KC_RIGHT)),XXXXXXX ,XXXXXXX,LCTL(KC_CAPS) ,KC_SLCK ,KC_HOME,XXXXXXX,KC_END ,XXXXXXX,KC_RCTL,
+_______,LGUI(LCTL(KC_LEFT)),LGUI(LCTL(KC_RIGHT)), LCTL(LALT(KC_DELT)),LGUI(LCTL(KC_F4)), MOUSE ,XXXXXXX ,XXXXXXX,M(0)
+),
/* MOUSE
* ,--------------------------------------------------------------------------.
* | | | |Mo_Up| | | |M_WhL|M_WhU|M_WhR| | RESET |
@@ -99,12 +99,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | GO_DEFAULT | GO_DEFAULT | | | | |
* `--------------------------------------------------------------------------'
*/
-[10] ={
-{XXXXXXX,XXXXXXX,XXXXXXX,KC_MS_U,XXXXXXX,XXXXXXX,XXXXXXX,KC_WH_L,KC_WH_U,KC_WH_R,XXXXXXX,RESET},
-{XXXXXXX,XXXXXXX,KC_MS_L,KC_MS_D,KC_MS_R,XXXXXXX,XXXXXXX,KC_BTN1,KC_WH_D,KC_BTN2,XXXXXXX,XXXXXXX},
-{XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,KC_ACL0,KC_ACL1,KC_ACL2,XXXXXXX,XXXXXXX},
-{XXXXXXX,XXXXXXX,XXXXXXX,GO_DEFT,XXXXXXX,XXXXXXX,XXXXXXX,GO_DEFT,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX}
-}
+[10] = KEYMAP_ARROW(
+XXXXXXX,XXXXXXX,XXXXXXX,KC_MS_U,XXXXXXX,XXXXXXX,XXXXXXX,KC_WH_L,KC_WH_U,KC_WH_R,XXXXXXX,RESET,
+XXXXXXX,XXXXXXX,KC_MS_L,KC_MS_D,KC_MS_R,XXXXXXX,XXXXXXX,KC_BTN1,KC_WH_D,KC_BTN2,XXXXXXX,XXXXXXX,
+XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,KC_ACL0,KC_ACL1,KC_ACL2,XXXXXXX,XXXXXXX,
+XXXXXXX,XXXXXXX,XXXXXXX, GO_DEFT,GO_DEFT, XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX
+)
};
const uint16_t PROGMEM fn_actions[] = {
@@ -135,4 +135,4 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
break;
}
return MACRO_NONE;
-}; \ No newline at end of file
+};
diff --git a/keyboards/tv44/keymaps/xyverz/keymap.c b/keyboards/tv44/keymaps/xyverz/keymap.c
index d710d80240..e3028019a0 100644
--- a/keyboards/tv44/keymaps/xyverz/keymap.c
+++ b/keyboards/tv44/keymaps/xyverz/keymap.c
@@ -28,47 +28,47 @@ enum planck_keycodes {
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [_DVORAK] = { /* 0: Dvorak */
- {KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH},
- {KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS},
- {KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT},
- {KC_LCTL, KC_LALT, LOWER, KC_BSPC, XXXXXXX, XXXXXXX, XXXXXXX, KC_SPC, RAISE, KC_LGUI, XXXXXXX, KC_ENT }
- },
+ [_DVORAK] = KEYMAP( /* 0: Dvorak */
+ KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH,
+ KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS,
+ KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT,
+ KC_LCTL, KC_LALT, LOWER, KC_BSPC, KC_SPC, RAISE, KC_LGUI, KC_ENT
+ ),
- [_QWERTY] = { /* 1: Qwerty */
- {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
- {KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
- {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT},
- {KC_LCTL, KC_LALT, LOWER, KC_BSPC, XXXXXXX, XXXXXXX, XXXXXXX, KC_SPC, RAISE, KC_LGUI, XXXXXXX, KC_ENT }
- },
+ [_QWERTY] = KEYMAP( /* 1: Qwerty */
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
+ KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
+ KC_LCTL, KC_LALT, LOWER, KC_BSPC, KC_SPC, RAISE, KC_LGUI, KC_ENT
+ ),
- [_COLEMAK] = { /* 2: Colemak */
- {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC},
- {KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT},
- {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT},
- {KC_LCTL, KC_LALT, LOWER, KC_BSPC, XXXXXXX, XXXXXXX, XXXXXXX, KC_SPC, RAISE, KC_LGUI, XXXXXXX, KC_ENT }
- },
+ [_COLEMAK] = KEYMAP( /* 2: Colemak */
+ KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC,
+ KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
+ KC_LCTL, KC_LALT, LOWER, KC_BSPC, KC_SPC, RAISE, KC_LGUI, KC_ENT
+ ),
- [_LOWER] = {/* 1: FN 1 */
- {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PIPE},
- {_______, _______, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE},
- {KC_CAPS, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______},
- {KC_LEFT, KC_RGHT, _______, KC_DEL, XXXXXXX, XXXXXXX, XXXXXXX, KC_INS, _______, KC_UP, XXXXXXX, KC_DOWN}
- },
+ [_LOWER] = KEYMAP( /* 1: FN 1 */
+ KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PIPE,
+ _______, _______, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
+ KC_CAPS, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______,
+ KC_LEFT, KC_RGHT, _______, KC_DEL, KC_INS, _______, KC_UP, KC_DOWN
+ ),
- [_RAISE] = { /* 2: FN 2 */
- {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS},
- {_______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS},
- {KC_CAPS, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______},
- {KC_LEFT, KC_RGHT, _______, KC_DEL, XXXXXXX, XXXXXXX, XXXXXXX, KC_INS, _______, KC_UP, XXXXXXX, KC_DOWN}
- },
+ [_RAISE] = KEYMAP( /* 2: FN 2 */
+ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS,
+ _______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
+ KC_CAPS, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______,
+ KC_LEFT, KC_RGHT, _______, KC_DEL, KC_INS, _______, KC_UP, KC_DOWN
+ ),
- [_ADJUST] = {
- {KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12 },
- {_______, RESET, _______, _______, _______, _______, _______, QWERTY, COLEMAK, DVORAK, _______, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
- {KC_HOME, KC_END, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, KC_PGUP, XXXXXXX, KC_PGDN}
- }
+ [_ADJUST] = KEYMAP(
+ KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12,
+ _______, RESET, _______, _______, _______, _______, _______, QWERTY, COLEMAK, DVORAK, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ KC_HOME, KC_END, _______, _______, _______, _______, KC_PGUP, KC_PGDN
+ )
};
void persistent_default_layer_set(uint16_t default_layer) {
diff --git a/keyboards/tv44/tv44.h b/keyboards/tv44/tv44.h
index 65c0b45939..bd6fb90b01 100644
--- a/keyboards/tv44/tv44.h
+++ b/keyboards/tv44/tv44.h
@@ -4,19 +4,64 @@
#include "quantum.h"
// This a shortcut to help you visually see your layout.
-// The following is an example using the Planck MIT layout
-// The first section contains all of the arguements
-// The second converts the arguments into a two-dimensional array
+// There are a number of variations depending on the layout of your bottom row.
+// The arrow variant adds an additional key on the bottom-right, while the
+// command variant adds an additional key on the bottom-left. arrow-command is a
+// combination of both of those, having an additional key on both sides.
+//
+// Please note that the numbering of the macro arguments are based on the
+// numbers of the keys on the PCB.
+
#define KEYMAP( \
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, \
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, \
- K30, K31, K32, K33, K37, K38, K39, K3A, K3B \
+ K30, K31, K32, K33, K37, K38, K39, K3B \
+) \
+{ \
+ { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B }, \
+ { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B }, \
+ { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B }, \
+ { K30, K31, K32, K33, KC_NO, KC_NO, KC_NO, K37, K38, K39, KC_NO, K3B } \
+}
+
+#define KEYMAP_ARROW( \
+ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, \
+ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \
+ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, \
+ K30, K31, K32, K33, K37, K38, K39, K3A, K3B \
) \
{ \
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B }, \
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B }, \
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B }, \
{ K30, K31, K32, K33, KC_NO, KC_NO, KC_NO, K37, K38, K39, K3A, K3B } \
+}
+
+#define KEYMAP_COMMAND( \
+ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, \
+ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \
+ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, \
+ K30, K31, K34, K32, K33, K37, K38, K39, K3B \
+) \
+{ \
+ { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B }, \
+ { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B }, \
+ { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B }, \
+ { K30, K31, K32, K33, K34, KC_NO, KC_NO, K37, K38, K39, KC_NO, K3B } \
+}
+
+#define KEYMAP_ARROW_COMMAND( \
+ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, \
+ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \
+ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, \
+ K30, K31, K34, K32, K33, K37, K38, K39, K3A, K3B \
+) \
+{ \
+ { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B }, \
+ { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B }, \
+ { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B }, \
+ { K30, K31, K32, K33, K34, KC_NO, KC_NO, K37, K38, K39, K3A, K3B } \
+}
#endif
diff --git a/quantum/quantum.c b/quantum/quantum.c
index 4f4cee4e9b..f5fb1e35c8 100644
--- a/quantum/quantum.c
+++ b/quantum/quantum.c
@@ -437,6 +437,14 @@ bool process_record_quantum(keyrecord_t *record) {
return false;
// break;
}
+ case GRAVE_ESC: {
+ void (*method)(uint8_t) = (record->event.pressed) ? &add_key : &del_key;
+ uint8_t shifted = get_mods() & ((MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)
+ |MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)));
+
+ method(shifted ? KC_GRAVE : KC_ESCAPE);
+ send_keyboard_report();
+ }
default: {
shift_interrupted[0] = true;
shift_interrupted[1] = true;
diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h
index 7354ae0da1..c34ecafa51 100644
--- a/quantum/quantum_keycodes.h
+++ b/quantum/quantum_keycodes.h
@@ -104,6 +104,7 @@ enum quantum_keycodes {
MAGIC_UNHOST_NKRO,
MAGIC_UNSWAP_ALT_GUI,
MAGIC_TOGGLE_NKRO,
+ GRAVE_ESC,
// Leader key
#ifndef DISABLE_LEADER
@@ -514,6 +515,8 @@ enum quantum_keycodes {
#define MACROTAP(kc) (kc | QK_MACRO | FUNC_TAP<<8)
#define MACRODOWN(...) (record->event.pressed ? MACRO(__VA_ARGS__) : MACRO_NONE)
+#define KC_GESC GRAVE_ESC
+
// L-ayer, T-ap - 256 keycode max, 16 layer max
#define LT(layer, kc) (kc | QK_LAYER_TAP | ((layer & 0xF) << 8))