From 55843480fffddebf15b3557fb11dca6206ab7b7b Mon Sep 17 00:00:00 2001 From: Zach White Date: Mon, 28 Dec 2020 20:06:07 -0800 Subject: Fix compile issues from the error page (#11314) * fix abacus so it works with configurator * create the keymap path if it doesn't exist * bpiphany/unloved_bastard: remove the nested macros, move default keymap to json * readd the unloved_bastard default keymap * fix clueboard/card * fixup handwired/2x5keypad * fixup hub16 * matrix/noah: remove the broken matrix print code to fix compilation * reinstate matrix_print with the right include * Revert "create the keymap path if it doesn't exist" This reverts commit af732776a539e8c6e2edf2e54f4d7f5ffa65b3a2. --- keyboards/abacus/keymaps/default/keymap.c | 148 ------------------- keyboards/abacus/keymaps/default/keymap.json | 10 ++ keyboards/abacus/keymaps/default/readme.md | 4 - keyboards/abacus/keymaps/unicodemap/keymap.c | 148 +++++++++++++++++++ keyboards/abacus/keymaps/unicodemap/readme.md | 4 + keyboards/abacus/keymaps/unicodemap/rules.mk | 1 + keyboards/abacus/rules.mk | 1 - .../unloved_bastard/keymaps/default/config.h | 19 --- .../unloved_bastard/keymaps/default/keymap.c | 42 ------ .../unloved_bastard/keymaps/default/keymap.json | 1 + .../unloved_bastard/keymaps/default/readme.md | 1 - .../bpiphany/unloved_bastard/unloved_bastard.h | 40 +++-- keyboards/clueboard/card/config.h | 4 + .../handwired/2x5keypad/keymaps/default/keymap.c | 164 --------------------- .../2x5keypad/keymaps/default/keymap.json | 1 + .../2x5keypad/keymaps/default_tapdance/keymap.c | 164 +++++++++++++++++++++ .../2x5keypad/keymaps/default_tapdance/rules.mk | 2 + keyboards/handwired/2x5keypad/rules.mk | 2 - keyboards/hub16/keymaps/default/keymap.c | 115 --------------- keyboards/hub16/keymaps/default/keymap.json | 1 + keyboards/hub16/keymaps/default_tap_dance/keymap.c | 115 +++++++++++++++ keyboards/hub16/keymaps/default_tap_dance/rules.mk | 1 + keyboards/hub16/rules.mk | 1 - keyboards/matrix/noah/matrix.c | 1 + 24 files changed, 477 insertions(+), 513 deletions(-) delete mode 100644 keyboards/abacus/keymaps/default/keymap.c create mode 100644 keyboards/abacus/keymaps/default/keymap.json delete mode 100644 keyboards/abacus/keymaps/default/readme.md create mode 100644 keyboards/abacus/keymaps/unicodemap/keymap.c create mode 100644 keyboards/abacus/keymaps/unicodemap/readme.md create mode 100644 keyboards/abacus/keymaps/unicodemap/rules.mk delete mode 100644 keyboards/bpiphany/unloved_bastard/keymaps/default/config.h delete mode 100644 keyboards/bpiphany/unloved_bastard/keymaps/default/keymap.c create mode 100644 keyboards/bpiphany/unloved_bastard/keymaps/default/keymap.json delete mode 100644 keyboards/bpiphany/unloved_bastard/keymaps/default/readme.md delete mode 100644 keyboards/handwired/2x5keypad/keymaps/default/keymap.c create mode 100644 keyboards/handwired/2x5keypad/keymaps/default/keymap.json create mode 100644 keyboards/handwired/2x5keypad/keymaps/default_tapdance/keymap.c create mode 100644 keyboards/handwired/2x5keypad/keymaps/default_tapdance/rules.mk delete mode 100755 keyboards/hub16/keymaps/default/keymap.c create mode 100644 keyboards/hub16/keymaps/default/keymap.json create mode 100755 keyboards/hub16/keymaps/default_tap_dance/keymap.c create mode 100644 keyboards/hub16/keymaps/default_tap_dance/rules.mk diff --git a/keyboards/abacus/keymaps/default/keymap.c b/keyboards/abacus/keymaps/default/keymap.c deleted file mode 100644 index c1d5bd8827..0000000000 --- a/keyboards/abacus/keymaps/default/keymap.c +++ /dev/null @@ -1,148 +0,0 @@ -/* Copyright 2020 nickolaij - * - * 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 . - */ -#include QMK_KEYBOARD_H - -// wait DELAY ms before unregistering media keys -#define MEDIA_KEY_DELAY 10 - -// Defines names for use in layer keycodes and the keymap -enum layer_names { - _BASE, - _UPPER, - _LOWER -}; - -// Defines the keycodes used by our macros in process_record_user -enum custom_keycodes { - NICKURL = SAFE_RANGE, - ALTTAB -}; - -enum unicode_names { - LOVEEYES, - THINK, - UPSIDEDOWN, - NOMOUTH, - PARTY, - HEART, - EGGPLANT, - PEACH, - EMOJI100, - EMOJIB -}; - -const uint32_t PROGMEM unicode_map[] = { - [LOVEEYES] = 0x1f60d, - [THINK] = 0x1f914, - [UPSIDEDOWN] = 0x1f643, - [NOMOUTH] = 0x1f636, - [PARTY] = 0x1f973, - [HEART] = 0x1f495, - [EMOJI100] = 0x1f4af, - [PEACH] = 0x1f351, - [EGGPLANT] = 0x1f346, - [EMOJIB] = 0x1f171 -}; - - - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Base */ - [_BASE] = LAYOUT( - KC_ESCAPE, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPACE, - KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCOLON, KC_BSLASH, - KC_LSHIFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_UP, KC_DELETE, - KC_LCTRL, KC_LGUI, MO(_UPPER), KC_SPACE, KC_ENTER, MO(_LOWER), KC_LEFT, KC_DOWN, KC_RIGHT - ), - [_UPPER] = LAYOUT( - KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, - ALTTAB, _______, _______, _______, _______, _______, _______, _______, KC_LBRACKET, KC_RBRACKET, KC_QUOTE, KC_SLASH, - _______, _______, _______, _______, _______, _______, _______, _______, KC_MINUS, KC_EQUAL, _______, _______, - KC_LALT, _______, _______, _______, _______, _______, KC_HOME, _______, KC_END - ), - [_LOWER] = LAYOUT( - NICKURL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, - _______, KC_F11, KC_F12, RGB_MODE_PLAIN, RGB_MODE_BREATHE, RGB_MODE_RAINBOW, RGB_MODE_SWIRL, RGB_MODE_SNAKE, RGB_MODE_KNIGHT, RGB_MODE_GRADIENT, XXXXXXX, RGB_TOG, - _______, X(LOVEEYES), X(THINK), X(UPSIDEDOWN), X(NOMOUTH), X(PARTY), X(PEACH), X(HEART), X(EGGPLANT), X(EMOJI100), X(EMOJIB), RGB_HUI, - KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______ - ) - - -}; - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case NICKURL: - if (record->event.pressed) { - SEND_STRING("https://www.github.com/nickolaij"); - } else { - tap_code(KC_ENTER); - } - return true; - break; - - case ALTTAB: - if (record->event.pressed) { - tap_code16(A(KC_TAB)); - } - return true; - break; - - default: - return true; - - } -} - - -void dip_switch_update_user(uint8_t index, bool active) { - switch (index) { - case 0: - if(active) { - switch(get_highest_layer(layer_state)) { - case _BASE: - tap_code16(LCTL(KC_F)); - break; - case _UPPER: - tap_code(KC_MUTE); - break; - case _LOWER: - tap_code(KC_MEDIA_PLAY_PAUSE); - break; - } - } - } -} - - -void matrix_init_user(void) { - set_unicode_input_mode(UC_WINC); -} - -void encoder_update_user(uint8_t index, bool clockwise) { - - switch(get_highest_layer(layer_state)) { - case _BASE: - clockwise ? tap_code(KC_PGDN) : tap_code(KC_PGUP); - break; - case _UPPER: - clockwise ? tap_code(KC_VOLU) : tap_code(KC_VOLD); - break; - case _LOWER: - clockwise ? tap_code(KC_MEDIA_NEXT_TRACK) : tap_code(KC_MEDIA_PREV_TRACK); - break; - } -} diff --git a/keyboards/abacus/keymaps/default/keymap.json b/keyboards/abacus/keymaps/default/keymap.json new file mode 100644 index 0000000000..506fd7ea67 --- /dev/null +++ b/keyboards/abacus/keymaps/default/keymap.json @@ -0,0 +1,10 @@ +{ + "keyboard": "abacus", + "keymap": "default", + "layout": "LAYOUT", + "layers": [ + ["KC_ESCAPE", "KC_Q", "KC_W", "KC_E", "KC_R", "KC_T", "KC_Y", "KC_U", "KC_I", "KC_O", "KC_P", "KC_BSPACE", "KC_TAB", "KC_A", "KC_S", "KC_D", "KC_F", "KC_G", "KC_H", "KC_J", "KC_K", "KC_L", "KC_SCOLON", "KC_BSLASH", "KC_LSHIFT", "KC_Z", "KC_X", "KC_C", "KC_V", "KC_B", "KC_N", "KC_M", "KC_COMMA", "KC_DOT", "KC_UP", "KC_DELETE", "KC_LCTRL", "KC_LGUI", "MO(1)", "KC_SPACE", "KC_ENTER", "MO(2)", "KC_LEFT", "KC_DOWN", "KC_RIGHT"], + ["KC_GRAVE", "KC_1", "KC_2", "KC_3", "KC_4", "KC_5", "KC_6", "KC_7", "KC_8", "KC_9", "KC_0", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_LBRACKET", "KC_RBRACKET", "KC_QUOTE", "KC_SLASH", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_MINUS", "KC_EQUAL", "KC_TRNS", "KC_TRNS", "KC_LALT", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_HOME", "KC_TRNS", "KC_END"], + ["KC_GRV", "KC_F1", "KC_F2", "KC_F3", "KC_F4", "KC_F5", "KC_F6", "KC_F7", "KC_F8", "KC_F9", "KC_F10", "KC_TRNS", "KC_TRNS", "KC_F11", "KC_F12", "RGB_MODE_PLAIN", "RGB_MODE_BREATHE", "RGB_MODE_RAINBOW", "RGB_MODE_SWIRL", "RGB_MODE_SNAKE", "RGB_MODE_KNIGHT", "RGB_MODE_GRADIENT", "KC_NO", "RGB_TOG", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "RGB_HUI", "KC_CAPS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS"] + ] +} diff --git a/keyboards/abacus/keymaps/default/readme.md b/keyboards/abacus/keymaps/default/readme.md deleted file mode 100644 index 0c6098f0e9..0000000000 --- a/keyboards/abacus/keymaps/default/readme.md +++ /dev/null @@ -1,4 +0,0 @@ -# The default keymap for Abacus - -This is made based on my first few days of playing with it and honing in on what feels right. -I've repurposed the DIP switch function for the encoder switches and added some functionality for multiple layers also effecting the encoders output. diff --git a/keyboards/abacus/keymaps/unicodemap/keymap.c b/keyboards/abacus/keymaps/unicodemap/keymap.c new file mode 100644 index 0000000000..c1d5bd8827 --- /dev/null +++ b/keyboards/abacus/keymaps/unicodemap/keymap.c @@ -0,0 +1,148 @@ +/* Copyright 2020 nickolaij + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// wait DELAY ms before unregistering media keys +#define MEDIA_KEY_DELAY 10 + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _BASE, + _UPPER, + _LOWER +}; + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + NICKURL = SAFE_RANGE, + ALTTAB +}; + +enum unicode_names { + LOVEEYES, + THINK, + UPSIDEDOWN, + NOMOUTH, + PARTY, + HEART, + EGGPLANT, + PEACH, + EMOJI100, + EMOJIB +}; + +const uint32_t PROGMEM unicode_map[] = { + [LOVEEYES] = 0x1f60d, + [THINK] = 0x1f914, + [UPSIDEDOWN] = 0x1f643, + [NOMOUTH] = 0x1f636, + [PARTY] = 0x1f973, + [HEART] = 0x1f495, + [EMOJI100] = 0x1f4af, + [PEACH] = 0x1f351, + [EGGPLANT] = 0x1f346, + [EMOJIB] = 0x1f171 +}; + + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base */ + [_BASE] = LAYOUT( + KC_ESCAPE, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPACE, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCOLON, KC_BSLASH, + KC_LSHIFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_UP, KC_DELETE, + KC_LCTRL, KC_LGUI, MO(_UPPER), KC_SPACE, KC_ENTER, MO(_LOWER), KC_LEFT, KC_DOWN, KC_RIGHT + ), + [_UPPER] = LAYOUT( + KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + ALTTAB, _______, _______, _______, _______, _______, _______, _______, KC_LBRACKET, KC_RBRACKET, KC_QUOTE, KC_SLASH, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MINUS, KC_EQUAL, _______, _______, + KC_LALT, _______, _______, _______, _______, _______, KC_HOME, _______, KC_END + ), + [_LOWER] = LAYOUT( + NICKURL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, + _______, KC_F11, KC_F12, RGB_MODE_PLAIN, RGB_MODE_BREATHE, RGB_MODE_RAINBOW, RGB_MODE_SWIRL, RGB_MODE_SNAKE, RGB_MODE_KNIGHT, RGB_MODE_GRADIENT, XXXXXXX, RGB_TOG, + _______, X(LOVEEYES), X(THINK), X(UPSIDEDOWN), X(NOMOUTH), X(PARTY), X(PEACH), X(HEART), X(EGGPLANT), X(EMOJI100), X(EMOJIB), RGB_HUI, + KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______ + ) + + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case NICKURL: + if (record->event.pressed) { + SEND_STRING("https://www.github.com/nickolaij"); + } else { + tap_code(KC_ENTER); + } + return true; + break; + + case ALTTAB: + if (record->event.pressed) { + tap_code16(A(KC_TAB)); + } + return true; + break; + + default: + return true; + + } +} + + +void dip_switch_update_user(uint8_t index, bool active) { + switch (index) { + case 0: + if(active) { + switch(get_highest_layer(layer_state)) { + case _BASE: + tap_code16(LCTL(KC_F)); + break; + case _UPPER: + tap_code(KC_MUTE); + break; + case _LOWER: + tap_code(KC_MEDIA_PLAY_PAUSE); + break; + } + } + } +} + + +void matrix_init_user(void) { + set_unicode_input_mode(UC_WINC); +} + +void encoder_update_user(uint8_t index, bool clockwise) { + + switch(get_highest_layer(layer_state)) { + case _BASE: + clockwise ? tap_code(KC_PGDN) : tap_code(KC_PGUP); + break; + case _UPPER: + clockwise ? tap_code(KC_VOLU) : tap_code(KC_VOLD); + break; + case _LOWER: + clockwise ? tap_code(KC_MEDIA_NEXT_TRACK) : tap_code(KC_MEDIA_PREV_TRACK); + break; + } +} diff --git a/keyboards/abacus/keymaps/unicodemap/readme.md b/keyboards/abacus/keymaps/unicodemap/readme.md new file mode 100644 index 0000000000..0c6098f0e9 --- /dev/null +++ b/keyboards/abacus/keymaps/unicodemap/readme.md @@ -0,0 +1,4 @@ +# The default keymap for Abacus + +This is made based on my first few days of playing with it and honing in on what feels right. +I've repurposed the DIP switch function for the encoder switches and added some functionality for multiple layers also effecting the encoders output. diff --git a/keyboards/abacus/keymaps/unicodemap/rules.mk b/keyboards/abacus/keymaps/unicodemap/rules.mk new file mode 100644 index 0000000000..502b2def76 --- /dev/null +++ b/keyboards/abacus/keymaps/unicodemap/rules.mk @@ -0,0 +1 @@ +UNICODEMAP_ENABLE = yes diff --git a/keyboards/abacus/rules.mk b/keyboards/abacus/rules.mk index 8d6add27d1..11d4f99535 100644 --- a/keyboards/abacus/rules.mk +++ b/keyboards/abacus/rules.mk @@ -29,7 +29,6 @@ MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -UNICODEMAP_ENABLE = yes ENCODER_ENABLE = yes DIP_SWITCH_ENABLE = yes LTO_ENABLE = yes diff --git a/keyboards/bpiphany/unloved_bastard/keymaps/default/config.h b/keyboards/bpiphany/unloved_bastard/keymaps/default/config.h deleted file mode 100644 index ed56340c39..0000000000 --- a/keyboards/bpiphany/unloved_bastard/keymaps/default/config.h +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright 2018 Alexander Fougner - * - * 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 . - */ - -#pragma once - -// place overrides here diff --git a/keyboards/bpiphany/unloved_bastard/keymaps/default/keymap.c b/keyboards/bpiphany/unloved_bastard/keymaps/default/keymap.c deleted file mode 100644 index 3c23088357..0000000000 --- a/keyboards/bpiphany/unloved_bastard/keymaps/default/keymap.c +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright 2018 Alexander Fougner - * - * 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 . - */ -#include QMK_KEYBOARD_H - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[0] = LAYOUT(\ - 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_PAUS, \ - 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_NUBS,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, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ) -}; - -void matrix_init_user(void) { - -} - -void matrix_scan_user(void) { - -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; -} - -void led_set_user(uint8_t usb_led) { - -} diff --git a/keyboards/bpiphany/unloved_bastard/keymaps/default/keymap.json b/keyboards/bpiphany/unloved_bastard/keymaps/default/keymap.json new file mode 100644 index 0000000000..6f9332c9a4 --- /dev/null +++ b/keyboards/bpiphany/unloved_bastard/keymaps/default/keymap.json @@ -0,0 +1 @@ +{"keyboard": "bpiphany/unloved_bastard", "keymap": "default", "layout": "LAYOUT", "layers": [["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_PAUS", "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_NUBS", "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", "KC_APP", "KC_RCTL", "KC_LEFT", "KC_DOWN", "KC_RGHT"]]} diff --git a/keyboards/bpiphany/unloved_bastard/keymaps/default/readme.md b/keyboards/bpiphany/unloved_bastard/keymaps/default/readme.md deleted file mode 100644 index a2b5f1192f..0000000000 --- a/keyboards/bpiphany/unloved_bastard/keymaps/default/readme.md +++ /dev/null @@ -1 +0,0 @@ -# The default keymap for unloved_bastard diff --git a/keyboards/bpiphany/unloved_bastard/unloved_bastard.h b/keyboards/bpiphany/unloved_bastard/unloved_bastard.h index 0223e7233d..d444fd0d8a 100644 --- a/keyboards/bpiphany/unloved_bastard/unloved_bastard.h +++ b/keyboards/bpiphany/unloved_bastard/unloved_bastard.h @@ -47,14 +47,18 @@ KB2, KG1, KH1, KI1, KJ1, KJ0, KK0, KK1, KL1, KM1, KF0, KB3, KC6, \ KP4, KN2, KN6, KQ6, KN0, KN3, KM0, KP1, KC0, KQ0, KR0 \ ) \ -LAYOUT_all( \ - KG6, KH4, KI4, KI2, KI6, KP5, KL6, KM2, KM4, KO4, KO5, KO6, KO0, KN5, KN7, KP7, \ - KG4, KG5, KH5, KI5, KJ5, KJ4, KK4, KK5, KL5, KM5, KF5, KF4, KL4, KO2, KR4, KC4, KE4, \ - KG2, KG7, KH7, KI7, KJ7, KJ2, KK2, KK7, KL7, KM7, KF7, KF2, KL2, KO3, KQ4, KC5, KE5, \ - KH2, KG3, KH3, KI3, KJ3, KJ6, KK6, KK3, KL3, KM3, KF3, KF6, KO1, \ - KB2,KC_NO,KG1, KH1, KI1, KJ1, KJ0, KK0, KK1, KL1, KM1, KF0, KB3, KC6, \ - KP4, KN2, KN6, KQ6, KN0, KN3, KM0, KP1, KC0, KQ0, KR0 \ -) +{ \ +/* Columns and rows need to be swapped in the below definition */ \ +/* A B C D E F G H I J K L M N O P Q R */ \ +/* 0 */ { KC_NO, KC_NO, KC0, KC_NO, KC_NO, KF0, KC_NO, KC_NO, KC_NO, KJ0, KK0, KC_NO, KM0, KN0, KO0, KC_NO, KQ0, KR0 }, \ +/* 1 */ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KG1, KH1, KI1, KJ1, KK1, KL1, KM1, KC_NO, KO1, KP1, KC_NO, KC_NO }, \ +/* 2 */ { KC_NO, KB2, KC_NO, KC_NO, KC_NO, KF2, KG2, KH2, KI2, KJ2, KK2, KL2, KM2, KN2, KO2, KC_NO, KC_NO, KC_NO }, \ +/* 3 */ { KC_NO, KB3, KC_NO, KC_NO, KC_NO, KF3, KG3, KH3, KI3, KJ3, KK3, KL3, KM3, KN3, KO3, KC_NO, KC_NO, KC_NO }, \ +/* 4 */ { KC_NO, KC_NO, KC4, KC_NO, KE4, KF4, KG4, KH4, KI4, KJ4, KK4, KL4, KM4, KC_NO, KO4, KP4, KQ4, KR4 }, \ +/* 5 */ { KC_NO, KC_NO, KC5, KC_NO, KE5, KF5, KG5, KH5, KI5, KJ5, KK5, KL5, KM5, KN5, KO5, KP5, KC_NO, KC_NO }, \ +/* 6 */ { KC_NO, KC_NO, KC6, KC_NO, KC_NO, KF6, KG6, KC_NO, KI6, KJ6, KK6, KL6, KC_NO,KN6, KO6, KC_NO, KQ6, KC_NO }, \ +/* 7 */ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KF7, KG7, KH7, KI7, KJ7, KK7, KL7, KM7, KN7, KC_NO, KP7, KC_NO, KC_NO } \ +} #define LAYOUT_tkl_iso( \ KG6, KH4, KI4, KI2, KI6, KP5, KL6, KM2, KM4, KO4, KO5, KO6, KO0, KN5, KN7, KP7, \ @@ -64,14 +68,18 @@ LAYOUT_all( \ KB2, KH6, KG1, KH1, KI1, KJ1, KJ0, KK0, KK1, KL1, KM1, KF0, KB3, KC6, \ KP4, KN2, KN6, KQ6, KN0, KN3, KM0, KP1, KC0, KQ0, KR0 \ ) \ -LAYOUT_all( \ - KG6, KH4, KI4, KI2, KI6, KP5, KL6, KM2, KM4, KO4, KO5, KO6, KO0, KN5, KN7, KP7, \ - KG4, KG5, KH5, KI5, KJ5, KJ4, KK4, KK5, KL5, KM5, KF5, KF4, KL4, KO2, KR4, KC4, KE4, \ - KG2, KG7, KH7, KI7, KJ7, KJ2, KK2, KK7, KL7, KM7, KF7, KF2, KL2, KO3, KQ4, KC5, KE5, \ - KH2, KG3, KH3, KI3, KJ3, KJ6, KK6, KK3, KL3, KM3, KF3, KF6, KO1, \ - KB2, KH6, KG1, KH1, KI1, KJ1, KJ0, KK0, KK1, KL1, KM1, KF0, KB3, KC6, \ - KP4, KN2, KN6, KQ6, KN0, KN3, KM0, KP1, KC0, KQ0, KR0 \ -) +{ \ +/* Columns and rows need to be swapped in the below definition */ \ +/* A B C D E F G H I J K L M N O P Q R */ \ +/* 0 */ { KC_NO, KC_NO, KC0, KC_NO, KC_NO, KF0, KC_NO, KC_NO, KC_NO, KJ0, KK0, KC_NO, KM0, KN0, KO0, KC_NO, KQ0, KR0 }, \ +/* 1 */ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KG1, KH1, KI1, KJ1, KK1, KL1, KM1, KC_NO, KO1, KP1, KC_NO, KC_NO }, \ +/* 2 */ { KC_NO, KB2, KC_NO, KC_NO, KC_NO, KF2, KG2, KH2, KI2, KJ2, KK2, KL2, KM2, KN2, KO2, KC_NO, KC_NO, KC_NO }, \ +/* 3 */ { KC_NO, KB3, KC_NO, KC_NO, KC_NO, KF3, KG3, KH3, KI3, KJ3, KK3, KL3, KM3, KN3, KO3, KC_NO, KC_NO, KC_NO }, \ +/* 4 */ { KC_NO, KC_NO, KC4, KC_NO, KE4, KF4, KG4, KH4, KI4, KJ4, KK4, KL4, KM4, KC_NO, KO4, KP4, KQ4, KR4 }, \ +/* 5 */ { KC_NO, KC_NO, KC5, KC_NO, KE5, KF5, KG5, KH5, KI5, KJ5, KK5, KL5, KM5, KN5, KO5, KP5, KC_NO, KC_NO }, \ +/* 6 */ { KC_NO, KC_NO, KC6, KC_NO, KC_NO, KF6, KG6, KH6, KI6, KJ6, KK6, KL6, KC_NO,KN6, KO6, KC_NO, KQ6, KC_NO }, \ +/* 7 */ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KF7, KG7, KH7, KI7, KJ7, KK7, KL7, KM7, KN7, KC_NO, KP7, KC_NO, KC_NO } \ +} #define LAYOUT LAYOUT_all diff --git a/keyboards/clueboard/card/config.h b/keyboards/clueboard/card/config.h index 9bf07f578b..b69ae640ed 100644 --- a/keyboards/clueboard/card/config.h +++ b/keyboards/clueboard/card/config.h @@ -149,3 +149,7 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION + + +// Enable audio +#define C6_AUDIO diff --git a/keyboards/handwired/2x5keypad/keymaps/default/keymap.c b/keyboards/handwired/2x5keypad/keymaps/default/keymap.c deleted file mode 100644 index 23614a9b78..0000000000 --- a/keyboards/handwired/2x5keypad/keymaps/default/keymap.c +++ /dev/null @@ -1,164 +0,0 @@ -#include QMK_KEYBOARD_H - -#define WIN_TAB LGUI(KC_TAB) -#define WIN_LOCK LGUI(KC_L) - -enum layers { - NORMAL_LAYER = 0, - MEDIA_LAYER, - TBD_LAYER2, - FRENCH_LAYER -}; - - -/* Enum for the tap dancing keys */ -enum tap_codes { - A_Q, E_Q, E_U, E_E, - A_Y, I_I, O_C, U_U -}; - -#define FR_A_GRAVE "00E0" -#define FR_A_HAT "00E2" - -#define FR_C_CIRCUM "00E7" - -#define FR_E_AIGU "00E9" -#define FR_E_GRAVE "00E8" -#define FR_E_HAT "00EA" -#define FR_E_UMLAUT "00EB" - -#define FR_I_HAT "00EE" -#define FR_I_UMLAUT "00EF" - -#define FR_O_HAT "00F4" - -#define FR_U_GRAVE "00F9" -#define FR_U_HAT "00FB" -#define FR_U_UMLAUT "00FC" - -#define FR_Y_UMLAUT "00FF" - -#define FR_L_QUOTE "00AB" -#define FR_R_QUOTE "00BB" - -void send_french_unicode_char(uint8_t count, char *once, char *twice) -{ - if (count <= 1) - send_unicode_hex_string(once); - else - send_unicode_hex_string(twice); -} - -void dance_a_q(qk_tap_dance_state_t *state, void *user_data) -{ - send_french_unicode_char(state->count, FR_A_GRAVE, FR_L_QUOTE); -} - -void dance_e_q(qk_tap_dance_state_t *state, void *user_data) -{ - send_french_unicode_char(state->count, FR_E_AIGU, FR_R_QUOTE); -} - -void dance_e_u(qk_tap_dance_state_t *state, void *user_data) -{ - send_french_unicode_char(state->count, FR_E_GRAVE, FR_U_GRAVE); -} - -void dance_e_e(qk_tap_dance_state_t *state, void *user_data) -{ - send_french_unicode_char(state->count, FR_E_HAT, FR_E_UMLAUT); -} - -void dance_a_y(qk_tap_dance_state_t *state, void *user_data) -{ - send_french_unicode_char(state->count, FR_A_HAT, FR_Y_UMLAUT); -} - -void dance_i_i(qk_tap_dance_state_t *state, void *user_data) -{ - send_french_unicode_char(state->count, FR_I_HAT, FR_I_UMLAUT); -} - -void dance_o_c(qk_tap_dance_state_t *state, void *user_data) -{ - send_french_unicode_char(state->count, FR_O_HAT, FR_C_CIRCUM); -} - -void dance_u_u(qk_tap_dance_state_t *state, void *user_data) -{ - send_french_unicode_char(state->count, FR_U_HAT, FR_U_UMLAUT); -} - -/* Define the tap dance actions for the french characters */ -qk_tap_dance_action_t tap_dance_actions[] = { - [A_Q] = ACTION_TAP_DANCE_FN(dance_a_q), - [E_Q] = ACTION_TAP_DANCE_FN(dance_e_q), - [E_U] = ACTION_TAP_DANCE_FN(dance_e_u), - [E_E] = ACTION_TAP_DANCE_FN(dance_e_e), - - [A_Y] = ACTION_TAP_DANCE_FN(dance_a_y), - [I_I] = ACTION_TAP_DANCE_FN(dance_i_i), - [O_C] = ACTION_TAP_DANCE_FN(dance_o_c), - [U_U] = ACTION_TAP_DANCE_FN(dance_u_u) -}; - - - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - [NORMAL_LAYER] = LAYOUT(TO(1), WIN_TAB, KC_HOME, KC_UP, KC_END, - WIN_LOCK, KC_MUTE, KC_LEFT, KC_DOWN, KC_RGHT), - - [MEDIA_LAYER] = LAYOUT(TO(2), KC_CALC, KC_MPRV, KC_MNXT, KC_VOLU, - KC_TRNS, KC_TRNS, KC_MSTP, KC_MPLY, KC_VOLD), - - [TBD_LAYER2] = LAYOUT(TO(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - - [FRENCH_LAYER] = LAYOUT(TO(0), TD(A_Q), TD(E_Q), TD(E_U), TD(E_E), - KC_TRNS, TD(A_Y), TD(I_I), TD(O_C), TD(U_U)) -}; - - -/* DISABLED -void matrix_init_user(void) { -} - -void matrix_scan_user(void) { -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; -} -*/ - - -void matrix_init_user(void) -{ - set_unicode_input_mode(UC_WINC); /* See https://jayliu50.github.io/qmk-cheatsheet/ */ -} - - -layer_state_t layer_state_set_user(layer_state_t state) -{ - turn_off_leds(); - - switch (get_highest_layer(state)) - { - case NORMAL_LAYER: - break; - - case MEDIA_LAYER: - turn_on_led(RED_LED); - break; - - case TBD_LAYER2: - turn_on_led(BLUE_LED); - break; - - case FRENCH_LAYER: - turn_on_led(GREEN_LED); - break; - } - return state; -} diff --git a/keyboards/handwired/2x5keypad/keymaps/default/keymap.json b/keyboards/handwired/2x5keypad/keymaps/default/keymap.json new file mode 100644 index 0000000000..d8c9f792a6 --- /dev/null +++ b/keyboards/handwired/2x5keypad/keymaps/default/keymap.json @@ -0,0 +1 @@ +{"version":1,"notes":"","documentation":"\"This file is a QMK Configurator export. You can import this at . It can also be used directly with QMK's source code.\n\nTo setup your QMK environment check out the tutorial: \n\nYou can convert this file to a keymap.c using this command: `qmk json2c {keymap}`\n\nYou can compile this keymap using this command: `qmk compile {keymap}`\"\n","keyboard":"handwired/2x5keypad","keymap":"default","layout":"LAYOUT","layers":[["KC_1","KC_2","KC_3","KC_4","KC_5","KC_Q","KC_W","KC_E","KC_R","KC_T"]],"author":""} diff --git a/keyboards/handwired/2x5keypad/keymaps/default_tapdance/keymap.c b/keyboards/handwired/2x5keypad/keymaps/default_tapdance/keymap.c new file mode 100644 index 0000000000..23614a9b78 --- /dev/null +++ b/keyboards/handwired/2x5keypad/keymaps/default_tapdance/keymap.c @@ -0,0 +1,164 @@ +#include QMK_KEYBOARD_H + +#define WIN_TAB LGUI(KC_TAB) +#define WIN_LOCK LGUI(KC_L) + +enum layers { + NORMAL_LAYER = 0, + MEDIA_LAYER, + TBD_LAYER2, + FRENCH_LAYER +}; + + +/* Enum for the tap dancing keys */ +enum tap_codes { + A_Q, E_Q, E_U, E_E, + A_Y, I_I, O_C, U_U +}; + +#define FR_A_GRAVE "00E0" +#define FR_A_HAT "00E2" + +#define FR_C_CIRCUM "00E7" + +#define FR_E_AIGU "00E9" +#define FR_E_GRAVE "00E8" +#define FR_E_HAT "00EA" +#define FR_E_UMLAUT "00EB" + +#define FR_I_HAT "00EE" +#define FR_I_UMLAUT "00EF" + +#define FR_O_HAT "00F4" + +#define FR_U_GRAVE "00F9" +#define FR_U_HAT "00FB" +#define FR_U_UMLAUT "00FC" + +#define FR_Y_UMLAUT "00FF" + +#define FR_L_QUOTE "00AB" +#define FR_R_QUOTE "00BB" + +void send_french_unicode_char(uint8_t count, char *once, char *twice) +{ + if (count <= 1) + send_unicode_hex_string(once); + else + send_unicode_hex_string(twice); +} + +void dance_a_q(qk_tap_dance_state_t *state, void *user_data) +{ + send_french_unicode_char(state->count, FR_A_GRAVE, FR_L_QUOTE); +} + +void dance_e_q(qk_tap_dance_state_t *state, void *user_data) +{ + send_french_unicode_char(state->count, FR_E_AIGU, FR_R_QUOTE); +} + +void dance_e_u(qk_tap_dance_state_t *state, void *user_data) +{ + send_french_unicode_char(state->count, FR_E_GRAVE, FR_U_GRAVE); +} + +void dance_e_e(qk_tap_dance_state_t *state, void *user_data) +{ + send_french_unicode_char(state->count, FR_E_HAT, FR_E_UMLAUT); +} + +void dance_a_y(qk_tap_dance_state_t *state, void *user_data) +{ + send_french_unicode_char(state->count, FR_A_HAT, FR_Y_UMLAUT); +} + +void dance_i_i(qk_tap_dance_state_t *state, void *user_data) +{ + send_french_unicode_char(state->count, FR_I_HAT, FR_I_UMLAUT); +} + +void dance_o_c(qk_tap_dance_state_t *state, void *user_data) +{ + send_french_unicode_char(state->count, FR_O_HAT, FR_C_CIRCUM); +} + +void dance_u_u(qk_tap_dance_state_t *state, void *user_data) +{ + send_french_unicode_char(state->count, FR_U_HAT, FR_U_UMLAUT); +} + +/* Define the tap dance actions for the french characters */ +qk_tap_dance_action_t tap_dance_actions[] = { + [A_Q] = ACTION_TAP_DANCE_FN(dance_a_q), + [E_Q] = ACTION_TAP_DANCE_FN(dance_e_q), + [E_U] = ACTION_TAP_DANCE_FN(dance_e_u), + [E_E] = ACTION_TAP_DANCE_FN(dance_e_e), + + [A_Y] = ACTION_TAP_DANCE_FN(dance_a_y), + [I_I] = ACTION_TAP_DANCE_FN(dance_i_i), + [O_C] = ACTION_TAP_DANCE_FN(dance_o_c), + [U_U] = ACTION_TAP_DANCE_FN(dance_u_u) +}; + + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [NORMAL_LAYER] = LAYOUT(TO(1), WIN_TAB, KC_HOME, KC_UP, KC_END, + WIN_LOCK, KC_MUTE, KC_LEFT, KC_DOWN, KC_RGHT), + + [MEDIA_LAYER] = LAYOUT(TO(2), KC_CALC, KC_MPRV, KC_MNXT, KC_VOLU, + KC_TRNS, KC_TRNS, KC_MSTP, KC_MPLY, KC_VOLD), + + [TBD_LAYER2] = LAYOUT(TO(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + [FRENCH_LAYER] = LAYOUT(TO(0), TD(A_Q), TD(E_Q), TD(E_U), TD(E_E), + KC_TRNS, TD(A_Y), TD(I_I), TD(O_C), TD(U_U)) +}; + + +/* DISABLED +void matrix_init_user(void) { +} + +void matrix_scan_user(void) { +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} +*/ + + +void matrix_init_user(void) +{ + set_unicode_input_mode(UC_WINC); /* See https://jayliu50.github.io/qmk-cheatsheet/ */ +} + + +layer_state_t layer_state_set_user(layer_state_t state) +{ + turn_off_leds(); + + switch (get_highest_layer(state)) + { + case NORMAL_LAYER: + break; + + case MEDIA_LAYER: + turn_on_led(RED_LED); + break; + + case TBD_LAYER2: + turn_on_led(BLUE_LED); + break; + + case FRENCH_LAYER: + turn_on_led(GREEN_LED); + break; + } + return state; +} diff --git a/keyboards/handwired/2x5keypad/keymaps/default_tapdance/rules.mk b/keyboards/handwired/2x5keypad/keymaps/default_tapdance/rules.mk new file mode 100644 index 0000000000..705db8e333 --- /dev/null +++ b/keyboards/handwired/2x5keypad/keymaps/default_tapdance/rules.mk @@ -0,0 +1,2 @@ +UNICODE_ENABLE = yes +TAP_DANCE_ENABLE = yes diff --git a/keyboards/handwired/2x5keypad/rules.mk b/keyboards/handwired/2x5keypad/rules.mk index e62a0f24a8..997c9c0e98 100644 --- a/keyboards/handwired/2x5keypad/rules.mk +++ b/keyboards/handwired/2x5keypad/rules.mk @@ -23,5 +23,3 @@ NKRO_ENABLE = yes # USB Nkey Rollover - RGBLIGHT_ENABLE = no SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -UNICODE_ENABLE = yes -TAP_DANCE_ENABLE = yes diff --git a/keyboards/hub16/keymaps/default/keymap.c b/keyboards/hub16/keymaps/default/keymap.c deleted file mode 100755 index d3cad67ae1..0000000000 --- a/keyboards/hub16/keymaps/default/keymap.c +++ /dev/null @@ -1,115 +0,0 @@ -/* Copyright 2019 Josh Johnson - * - * 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 . - */ -#include QMK_KEYBOARD_H - -// Function key we are 'wrapping' usual key presses in -#define KC_WRAP KC_F24 - -// Keyboard Layers -enum keyboard_layers{ - _BASE = 0, - _CTRL -}; - -// Tap Dance Declarations -void td_ctrl (qk_tap_dance_state_t *state, void *user_data); - -enum tap_dance { CTRL = 0, BASE = 1 }; - -qk_tap_dance_action_t tap_dance_actions[] = { - // Tap once for standard key on base layer, twice to toggle to control layer - [CTRL] = ACTION_TAP_DANCE_FN(td_ctrl), - [BASE] = ACTION_TAP_DANCE_LAYER_MOVE(_______, _BASE)}; - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_BASE] = LAYOUT( /* Base */ - KC_S, KC_V, - KC_A, KC_B, KC_C, KC_D, - KC_E, KC_F, KC_G, KC_H, - KC_I, KC_J, KC_K, KC_L, - KC_M, KC_N, KC_O, TD(CTRL) - ), - - [_CTRL] = LAYOUT( /* Control */ - KC_NO, KC_NO, - _______, RGB_MOD, RGB_RMOD, RGB_TOG, - RGB_VAD, RGB_VAI, RGB_HUD, RGB_HUI, - RGB_SAD, RGB_SAI, _______, _______, - _______, _______, RESET, TD(BASE) - ), -}; - -// Keyboard is setup to 'wrap' the pressed key with an unused Fxx key, -// allowing for easy differentiation from a real keyboard. -void encoder_update_user(uint8_t index, bool clockwise) { - if (index == 0) { /* Left Encoder */ - if (clockwise) { - register_code(KC_WRAP); - tap_code(KC_R); - unregister_code(KC_WRAP); - } else { - register_code(KC_WRAP); - tap_code(KC_Q); - unregister_code(KC_WRAP); - } - } else if (index == 1) { /* Right Encoder */ - if (clockwise) { - register_code(KC_WRAP); - tap_code(KC_U); - unregister_code(KC_WRAP); - } else { - register_code(KC_WRAP); - tap_code(KC_T); - unregister_code(KC_WRAP); - } - } -} - -// Below stolen from TaranVH (https://github.com/TaranVH/2nd-keyboard/blob/master/HASU_USB/F24/keymap.c) -// Shoutout to drashna on the QMK discord for basically writing this for me.... :P -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - static uint8_t f24_tracker; - switch (keycode) { - case KC_A ... KC_F23: - case KC_EXECUTE ... KC_EXSEL: - if (record->event.pressed) { - register_code(KC_WRAP); - f24_tracker++; - register_code(keycode); - } else { - unregister_code(keycode); - f24_tracker--; - if (!f24_tracker) { - unregister_code(KC_WRAP); - } - } - return false; - break; - } - return true; -} - -// Below works around TD() not running key press through process_record_user. -// Fixes bug of CTRL layer move key not being wrapped in by modifier on single tap -void td_ctrl (qk_tap_dance_state_t *state, void *user_data) { - if (state->count == 1) { - register_code(KC_WRAP); - tap_code(KC_P); - unregister_code(KC_WRAP); - } else if (state->count == 2) { - layer_move(_CTRL); - } -} \ No newline at end of file diff --git a/keyboards/hub16/keymaps/default/keymap.json b/keyboards/hub16/keymaps/default/keymap.json new file mode 100644 index 0000000000..6f4814eac8 --- /dev/null +++ b/keyboards/hub16/keymaps/default/keymap.json @@ -0,0 +1 @@ +{"version":1,"notes":"","documentation":"\"This file is a QMK Configurator export. You can import this at . It can also be used directly with QMK's source code.\n\nTo setup your QMK environment check out the tutorial: \n\nYou can convert this file to a keymap.c using this command: `qmk json2c {keymap}`\n\nYou can compile this keymap using this command: `qmk compile {keymap}`\"\n","keyboard":"hub16","keymap":"default","layout":"LAYOUT","layers":[["KC_NLCK","KC_PSLS","KC_P7","KC_P8","KC_P9","KC_PPLS","KC_P4","KC_P5","KC_P6","KC_PCMM","KC_P1","KC_P2","KC_P3","KC_PEQL","KC_P0","KC_P0","KC_PDOT","KC_PENT"]],"author":""} diff --git a/keyboards/hub16/keymaps/default_tap_dance/keymap.c b/keyboards/hub16/keymaps/default_tap_dance/keymap.c new file mode 100755 index 0000000000..d3cad67ae1 --- /dev/null +++ b/keyboards/hub16/keymaps/default_tap_dance/keymap.c @@ -0,0 +1,115 @@ +/* Copyright 2019 Josh Johnson + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Function key we are 'wrapping' usual key presses in +#define KC_WRAP KC_F24 + +// Keyboard Layers +enum keyboard_layers{ + _BASE = 0, + _CTRL +}; + +// Tap Dance Declarations +void td_ctrl (qk_tap_dance_state_t *state, void *user_data); + +enum tap_dance { CTRL = 0, BASE = 1 }; + +qk_tap_dance_action_t tap_dance_actions[] = { + // Tap once for standard key on base layer, twice to toggle to control layer + [CTRL] = ACTION_TAP_DANCE_FN(td_ctrl), + [BASE] = ACTION_TAP_DANCE_LAYER_MOVE(_______, _BASE)}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT( /* Base */ + KC_S, KC_V, + KC_A, KC_B, KC_C, KC_D, + KC_E, KC_F, KC_G, KC_H, + KC_I, KC_J, KC_K, KC_L, + KC_M, KC_N, KC_O, TD(CTRL) + ), + + [_CTRL] = LAYOUT( /* Control */ + KC_NO, KC_NO, + _______, RGB_MOD, RGB_RMOD, RGB_TOG, + RGB_VAD, RGB_VAI, RGB_HUD, RGB_HUI, + RGB_SAD, RGB_SAI, _______, _______, + _______, _______, RESET, TD(BASE) + ), +}; + +// Keyboard is setup to 'wrap' the pressed key with an unused Fxx key, +// allowing for easy differentiation from a real keyboard. +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { /* Left Encoder */ + if (clockwise) { + register_code(KC_WRAP); + tap_code(KC_R); + unregister_code(KC_WRAP); + } else { + register_code(KC_WRAP); + tap_code(KC_Q); + unregister_code(KC_WRAP); + } + } else if (index == 1) { /* Right Encoder */ + if (clockwise) { + register_code(KC_WRAP); + tap_code(KC_U); + unregister_code(KC_WRAP); + } else { + register_code(KC_WRAP); + tap_code(KC_T); + unregister_code(KC_WRAP); + } + } +} + +// Below stolen from TaranVH (https://github.com/TaranVH/2nd-keyboard/blob/master/HASU_USB/F24/keymap.c) +// Shoutout to drashna on the QMK discord for basically writing this for me.... :P +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + static uint8_t f24_tracker; + switch (keycode) { + case KC_A ... KC_F23: + case KC_EXECUTE ... KC_EXSEL: + if (record->event.pressed) { + register_code(KC_WRAP); + f24_tracker++; + register_code(keycode); + } else { + unregister_code(keycode); + f24_tracker--; + if (!f24_tracker) { + unregister_code(KC_WRAP); + } + } + return false; + break; + } + return true; +} + +// Below works around TD() not running key press through process_record_user. +// Fixes bug of CTRL layer move key not being wrapped in by modifier on single tap +void td_ctrl (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + register_code(KC_WRAP); + tap_code(KC_P); + unregister_code(KC_WRAP); + } else if (state->count == 2) { + layer_move(_CTRL); + } +} \ No newline at end of file diff --git a/keyboards/hub16/keymaps/default_tap_dance/rules.mk b/keyboards/hub16/keymaps/default_tap_dance/rules.mk new file mode 100644 index 0000000000..25ec20cc46 --- /dev/null +++ b/keyboards/hub16/keymaps/default_tap_dance/rules.mk @@ -0,0 +1 @@ +TAP_DANCE_ENABLE = yes # Support for tap dancing diff --git a/keyboards/hub16/rules.mk b/keyboards/hub16/rules.mk index b050dcf421..5409bb7f95 100755 --- a/keyboards/hub16/rules.mk +++ b/keyboards/hub16/rules.mk @@ -32,6 +32,5 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches ENCODER_ENABLE = yes # Rotary Encoder support -TAP_DANCE_ENABLE = yes # Support for tap dancing SRC = matrix.c diff --git a/keyboards/matrix/noah/matrix.c b/keyboards/matrix/noah/matrix.c index 2115204369..94a27b181f 100644 --- a/keyboards/matrix/noah/matrix.c +++ b/keyboards/matrix/noah/matrix.c @@ -3,6 +3,7 @@ */ #include +#include #include #include #include -- cgit v1.2.1