diff options
58 files changed, 1862 insertions, 130 deletions
diff --git a/.travis.yml b/.travis.yml index 792f2cd05..18ecde7e3 100644 --- a/.travis.yml +++ b/.travis.yml | |||
| @@ -9,9 +9,6 @@ branches: | |||
| 9 | env: | 9 | env: |
| 10 | global: | 10 | global: |
| 11 | - secure: vBTSL34BDPxDilKUuTXqU4CJ26Pv5hogD2nghatkxSQkI1/jbdnLj/DQdPUrMJFDIY6TK3AltsBx72MaMsLQ1JO/Ou24IeHINHXzUC1FlS9yQa48cpxnhX5kzXNyGs3oa0qaFbvnr7RgYRWtmD52n4bIZuSuW+xpBv05x2OCizdT2ZonH33nATaHGFasxROm4qYZ241VfzcUv766V6RVHgL4x9V08warugs+RENVkfzxxwhk3NmkrISabze0gSVJLHBPHxroZC6EUcf/ocobcuDrCwFqtEt90i7pNIAFUE7gZsN2uE75LmpzAWin21G7lLPcPL2k4FJVd8an1HiP2WmscJU6U89fOfMb2viObnKcCzebozBCmKGtHEuXZo9FcReOx49AnQSpmESJGs+q2dL/FApkTjQiyT4J6O5dJpoww0/r57Wx0cmmqjETKBb5rSgXM51Etk3wO09mvcPHsEwrT7qH8r9XWdyCDoEn7FCLX3/LYnf/D4SmZ633YPl5gv3v9XEwxR5+04akjgnvWDSNIaDbWBdxHNb7l4pMc+WR1bwCyMyA7KXj0RrftEGOrm9ZRLe6BkbT4cycA+j77nbPOMcyZChliV9pPQos+4TOJoTzcK2L8yWVoY409aDNVuAjdP6Yum0R2maBGl/etLmIMpJC35C5/lZ+dUNjJAM= | 11 | - secure: vBTSL34BDPxDilKUuTXqU4CJ26Pv5hogD2nghatkxSQkI1/jbdnLj/DQdPUrMJFDIY6TK3AltsBx72MaMsLQ1JO/Ou24IeHINHXzUC1FlS9yQa48cpxnhX5kzXNyGs3oa0qaFbvnr7RgYRWtmD52n4bIZuSuW+xpBv05x2OCizdT2ZonH33nATaHGFasxROm4qYZ241VfzcUv766V6RVHgL4x9V08warugs+RENVkfzxxwhk3NmkrISabze0gSVJLHBPHxroZC6EUcf/ocobcuDrCwFqtEt90i7pNIAFUE7gZsN2uE75LmpzAWin21G7lLPcPL2k4FJVd8an1HiP2WmscJU6U89fOfMb2viObnKcCzebozBCmKGtHEuXZo9FcReOx49AnQSpmESJGs+q2dL/FApkTjQiyT4J6O5dJpoww0/r57Wx0cmmqjETKBb5rSgXM51Etk3wO09mvcPHsEwrT7qH8r9XWdyCDoEn7FCLX3/LYnf/D4SmZ633YPl5gv3v9XEwxR5+04akjgnvWDSNIaDbWBdxHNb7l4pMc+WR1bwCyMyA7KXj0RrftEGOrm9ZRLe6BkbT4cycA+j77nbPOMcyZChliV9pPQos+4TOJoTzcK2L8yWVoY409aDNVuAjdP6Yum0R2maBGl/etLmIMpJC35C5/lZ+dUNjJAM= |
| 12 | matrix: | ||
| 13 | - TARGET=all-keyboards AUTOGEN=true | ||
| 14 | - TARGET=test AUTOGEN=false | ||
| 15 | before_install: | 12 | before_install: |
| 16 | - wget http://www.atmel.com/images/avr8-gnu-toolchain-3.5.4.1709-linux.any.x86_64.tar.gz | 13 | - wget http://www.atmel.com/images/avr8-gnu-toolchain-3.5.4.1709-linux.any.x86_64.tar.gz |
| 17 | install: | 14 | install: |
| @@ -20,7 +17,8 @@ install: | |||
| 20 | before_script: | 17 | before_script: |
| 21 | - avr-gcc --version | 18 | - avr-gcc --version |
| 22 | script: | 19 | script: |
| 23 | - 'if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then make $TARGET AUTOGEN=$AUTOGEN; fi' | 20 | - make test AUTOGEN=false |
| 21 | - bash util/travis_build.sh | ||
| 24 | addons: | 22 | addons: |
| 25 | apt: | 23 | apt: |
| 26 | packages: | 24 | packages: |
| @@ -31,6 +29,4 @@ addons: | |||
| 31 | - libnewlib-arm-none-eabi | 29 | - libnewlib-arm-none-eabi |
| 32 | - diffutils | 30 | - diffutils |
| 33 | after_success: | 31 | after_success: |
| 34 | if [ "$AUTOGEN" == "true" ]; then | 32 | bash util/travis_compiled_push.sh |
| 35 | bash util/travis_compiled_push.sh; | ||
| 36 | fi | ||
diff --git a/keyboards/ergodox/keymaps/ordinary/keymap.c b/keyboards/ergodox/keymaps/ordinary/keymap.c index 302c41cc8..5c01d9678 100644 --- a/keyboards/ergodox/keymaps/ordinary/keymap.c +++ b/keyboards/ergodox/keymaps/ordinary/keymap.c | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | #include "ergodox.h" | 1 | #include "ergodox.h" |
| 2 | #include "led.h" | 2 | #include "led.h" |
| 3 | #include "mousekey.h" | ||
| 3 | #include "debug.h" | 4 | #include "debug.h" |
| 4 | #include "action_layer.h" | 5 | #include "action_layer.h" |
| 5 | #include "action_util.h" | 6 | #include "action_util.h" |
diff --git a/keyboards/ergodox/keymaps/robot_test_layout/keymap.c b/keyboards/ergodox/keymaps/robot_test_layout/keymap.c index 480be177f..e9e2597d7 100644 --- a/keyboards/ergodox/keymaps/robot_test_layout/keymap.c +++ b/keyboards/ergodox/keymaps/robot_test_layout/keymap.c | |||
| @@ -68,7 +68,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 68 | case RGB_FF0000: | 68 | case RGB_FF0000: |
| 69 | if (record->event.pressed) { | 69 | if (record->event.pressed) { |
| 70 | #ifdef RGBLIGHT_ENABLE | 70 | #ifdef RGBLIGHT_ENABLE |
| 71 | EZ_RGB(0xff0000); | 71 | EZ_RGB(0xff0000UL); |
| 72 | register_code(KC_1); unregister_code(KC_1); | 72 | register_code(KC_1); unregister_code(KC_1); |
| 73 | #endif | 73 | #endif |
| 74 | } | 74 | } |
| @@ -77,7 +77,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 77 | case RGB_00FF00: | 77 | case RGB_00FF00: |
| 78 | if (record->event.pressed) { | 78 | if (record->event.pressed) { |
| 79 | #ifdef RGBLIGHT_ENABLE | 79 | #ifdef RGBLIGHT_ENABLE |
| 80 | EZ_RGB(0x00ff00); | 80 | EZ_RGB(0x00ff00UL); |
| 81 | register_code(KC_2); unregister_code(KC_2); | 81 | register_code(KC_2); unregister_code(KC_2); |
| 82 | #endif | 82 | #endif |
| 83 | } | 83 | } |
| @@ -86,7 +86,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 86 | case RGB_0000FF: | 86 | case RGB_0000FF: |
| 87 | if (record->event.pressed) { | 87 | if (record->event.pressed) { |
| 88 | #ifdef RGBLIGHT_ENABLE | 88 | #ifdef RGBLIGHT_ENABLE |
| 89 | EZ_RGB(0x0000ff); | 89 | EZ_RGB(0x0000ffUL); |
| 90 | register_code(KC_3); unregister_code(KC_3); | 90 | register_code(KC_3); unregister_code(KC_3); |
| 91 | #endif | 91 | #endif |
| 92 | } | 92 | } |
| @@ -95,7 +95,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 95 | case RGB_FFFFFF: | 95 | case RGB_FFFFFF: |
| 96 | if (record->event.pressed) { | 96 | if (record->event.pressed) { |
| 97 | #ifdef RGBLIGHT_ENABLE | 97 | #ifdef RGBLIGHT_ENABLE |
| 98 | EZ_RGB(0xffffff); | 98 | EZ_RGB(0xffffffUL); |
| 99 | register_code(KC_4); unregister_code(KC_4); | 99 | register_code(KC_4); unregister_code(KC_4); |
| 100 | #endif | 100 | #endif |
| 101 | } | 101 | } |
diff --git a/keyboards/handwired/onekey/keymaps/default/keymap.c b/keyboards/handwired/onekey/keymaps/default/keymap.c index 756c4f51e..10c486718 100644 --- a/keyboards/handwired/onekey/keymaps/default/keymap.c +++ b/keyboards/handwired/onekey/keymaps/default/keymap.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | #include "onekey.h" | 1 | #include "onekey.h" |
| 2 | 2 | ||
| 3 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | 3 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |
| 4 | { KC_A } | 4 | {{ KC_A }} |
| 5 | }; | 5 | }; |
diff --git a/keyboards/handwired/reddot/Makefile b/keyboards/handwired/reddot/Makefile new file mode 100755 index 000000000..191c6bb66 --- /dev/null +++ b/keyboards/handwired/reddot/Makefile | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | ifndef MAKEFILE_INCLUDED | ||
| 2 | include ../../../Makefile | ||
| 3 | endif \ No newline at end of file | ||
diff --git a/keyboards/handwired/reddot/config.h b/keyboards/handwired/reddot/config.h new file mode 100755 index 000000000..15f114297 --- /dev/null +++ b/keyboards/handwired/reddot/config.h | |||
| @@ -0,0 +1,162 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2012 Jun Wako <wakojun@gmail.com> | ||
| 3 | |||
| 4 | This program is free software: you can redistribute it and/or modify | ||
| 5 | it under the terms of the GNU General Public License as published by | ||
| 6 | the Free Software Foundation, either version 2 of the License, or | ||
| 7 | (at your option) any later version. | ||
| 8 | |||
| 9 | This program is distributed in the hope that it will be useful, | ||
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | GNU General Public License for more details. | ||
| 13 | |||
| 14 | You should have received a copy of the GNU General Public License | ||
| 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 16 | */ | ||
| 17 | |||
| 18 | #ifndef CONFIG_H | ||
| 19 | #define CONFIG_H | ||
| 20 | |||
| 21 | #include "config_common.h" | ||
| 22 | |||
| 23 | /* USB Device descriptor parameter */ | ||
| 24 | #define VENDOR_ID 0xFEED | ||
| 25 | #define PRODUCT_ID 0x6060 | ||
| 26 | #define DEVICE_VER 0x0001 | ||
| 27 | #define MANUFACTURER upils | ||
| 28 | #define PRODUCT reddot | ||
| 29 | #define DESCRIPTION A custom keyboard | ||
| 30 | |||
| 31 | /* key matrix size */ | ||
| 32 | #define MATRIX_ROWS 5 | ||
| 33 | #define MATRIX_COLS 19 | ||
| 34 | |||
| 35 | /* | ||
| 36 | * Keyboard Matrix Assignments | ||
| 37 | * | ||
| 38 | * Change this to how you wired your keyboard | ||
| 39 | * COLS: AVR pins used for columns, left to right | ||
| 40 | * ROWS: AVR pins used for rows, top to bottom | ||
| 41 | * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) | ||
| 42 | * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) | ||
| 43 | * | ||
| 44 | */ | ||
| 45 | #define MATRIX_ROW_PINS { B0, B1, B2, B3, E6 } | ||
| 46 | #define MATRIX_COL_PINS { B7, D0, D1, D2, D3, C6, C7, D5, D4, D7, B4, B5, B6, F7, F6, F5, F4, F1, F0 } | ||
| 47 | #define UNUSED_PINS | ||
| 48 | |||
| 49 | |||
| 50 | /* COL2ROW or ROW2COL */ | ||
| 51 | #define DIODE_DIRECTION COL2ROW | ||
| 52 | |||
| 53 | // #define BACKLIGHT_PIN B7 | ||
| 54 | // #define BACKLIGHT_BREATHING | ||
| 55 | // #define BACKLIGHT_LEVELS 3 | ||
| 56 | |||
| 57 | |||
| 58 | /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ | ||
| 59 | #define DEBOUNCING_DELAY 5 | ||
| 60 | |||
| 61 | /* define if matrix has ghost (lacks anti-ghosting diodes) */ | ||
| 62 | //#define MATRIX_HAS_GHOST | ||
| 63 | |||
| 64 | |||
| 65 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | ||
| 66 | //#define LOCKING_SUPPORT_ENABLE | ||
| 67 | /* Locking resynchronize hack */ | ||
| 68 | #define LOCKING_RESYNC_ENABLE | ||
| 69 | |||
| 70 | /* | ||
| 71 | * Force NKRO | ||
| 72 | * | ||
| 73 | * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved | ||
| 74 | * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the | ||
| 75 | * makefile for this to work.) | ||
| 76 | * | ||
| 77 | * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) | ||
| 78 | * until the next keyboard reset. | ||
| 79 | * | ||
| 80 | * NKRO may prevent your keystrokes from being detected in the BIOS, but it is | ||
| 81 | * fully operational during normal computer usage. | ||
| 82 | * | ||
| 83 | * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) | ||
| 84 | * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by | ||
| 85 | * bootmagic, NKRO mode will always be enabled until it is toggled again during a | ||
| 86 | * power-up. | ||
| 87 | * | ||
| 88 | */ | ||
| 89 | //#define FORCE_NKRO | ||
| 90 | |||
| 91 | /* | ||
| 92 | * Magic Key Options | ||
| 93 | * | ||
| 94 | * Magic keys are hotkey commands that allow control over firmware functions of | ||
| 95 | * the keyboard. They are best used in combination with the HID Listen program, | ||
| 96 | * found here: https://www.pjrc.com/teensy/hid_listen.html | ||
| 97 | * | ||
| 98 | * The options below allow the magic key functionality to be changed. This is | ||
| 99 | * useful if your keyboard/keypad is missing keys and you want magic key support. | ||
| 100 | * | ||
| 101 | */ | ||
| 102 | |||
| 103 | /* key combination for magic key command */ | ||
| 104 | #define IS_COMMAND() ( \ | ||
| 105 | keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ | ||
| 106 | ) | ||
| 107 | |||
| 108 | /* control how magic key switches layers */ | ||
| 109 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true | ||
| 110 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true | ||
| 111 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false | ||
| 112 | |||
| 113 | /* override magic key keymap */ | ||
| 114 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS | ||
| 115 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS | ||
| 116 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM | ||
| 117 | //#define MAGIC_KEY_HELP1 H | ||
| 118 | //#define MAGIC_KEY_HELP2 SLASH | ||
| 119 | //#define MAGIC_KEY_DEBUG D | ||
| 120 | //#define MAGIC_KEY_DEBUG_MATRIX X | ||
| 121 | //#define MAGIC_KEY_DEBUG_KBD K | ||
| 122 | //#define MAGIC_KEY_DEBUG_MOUSE M | ||
| 123 | //#define MAGIC_KEY_VERSION V | ||
| 124 | //#define MAGIC_KEY_STATUS S | ||
| 125 | //#define MAGIC_KEY_CONSOLE C | ||
| 126 | //#define MAGIC_KEY_LAYER0_ALT1 ESC | ||
| 127 | //#define MAGIC_KEY_LAYER0_ALT2 GRAVE | ||
| 128 | //#define MAGIC_KEY_LAYER0 0 | ||
| 129 | //#define MAGIC_KEY_LAYER1 1 | ||
| 130 | //#define MAGIC_KEY_LAYER2 2 | ||
| 131 | //#define MAGIC_KEY_LAYER3 3 | ||
| 132 | //#define MAGIC_KEY_LAYER4 4 | ||
| 133 | //#define MAGIC_KEY_LAYER5 5 | ||
| 134 | //#define MAGIC_KEY_LAYER6 6 | ||
| 135 | //#define MAGIC_KEY_LAYER7 7 | ||
| 136 | //#define MAGIC_KEY_LAYER8 8 | ||
| 137 | //#define MAGIC_KEY_LAYER9 9 | ||
| 138 | //#define MAGIC_KEY_BOOTLOADER PAUSE | ||
| 139 | //#define MAGIC_KEY_LOCK CAPS | ||
| 140 | //#define MAGIC_KEY_EEPROM E | ||
| 141 | //#define MAGIC_KEY_NKRO N | ||
| 142 | //#define MAGIC_KEY_SLEEP_LED Z | ||
| 143 | |||
| 144 | /* | ||
| 145 | * Feature disable options | ||
| 146 | * These options are also useful to firmware size reduction. | ||
| 147 | */ | ||
| 148 | |||
| 149 | /* disable debug print */ | ||
| 150 | //#define NO_DEBUG | ||
| 151 | |||
| 152 | /* disable print */ | ||
| 153 | //#define NO_PRINT | ||
| 154 | |||
| 155 | /* disable action features */ | ||
| 156 | //#define NO_ACTION_LAYER | ||
| 157 | //#define NO_ACTION_TAPPING | ||
| 158 | //#define NO_ACTION_ONESHOT | ||
| 159 | //#define NO_ACTION_MACRO | ||
| 160 | //#define NO_ACTION_FUNCTION | ||
| 161 | |||
| 162 | #endif | ||
diff --git a/keyboards/handwired/reddot/keymaps/default/keymap.c b/keyboards/handwired/reddot/keymaps/default/keymap.c new file mode 100755 index 000000000..44ee2ce51 --- /dev/null +++ b/keyboards/handwired/reddot/keymaps/default/keymap.c | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | #include "reddot.h" | ||
| 2 | #include "../../../../../quantum/keymap_extras/keymap_french.h" | ||
| 3 | |||
| 4 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 5 | |||
| 6 | [0] = KEYMAP( | ||
| 7 | KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TAB, KC_CAPS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_FN0, KC_KP_SLASH, KC_KP_ASTERISK, KC_KP_MINUS,\ | ||
| 8 | KC_LALT, FR_AMP, FR_EACU, FR_QUOT, FR_APOS, FR_LPRN, KC_BSPACE, KC_DELETE, FR_MINS, FR_EGRV, FR_UNDS, FR_CCED, FR_AGRV, FR_RPRN, FR_EQL, KC_INSERT, KC_HOME, KC_PGUP,\ | ||
| 9 | KC_LGUI, FR_A, FR_Z, KC_E, KC_R, KC_T, KC_LSFT, KC_ENT, KC_Y, KC_U, KC_I, KC_O, KC_P, FR_CIRC, FR_DLR, KC_DELETE, KC_END, KC_PGDOWN, KC_KP_PLUS,\ | ||
| 10 | KC_LCTL, FR_Q, KC_S, KC_D, KC_F, KC_G, KC_ENT, KC_H, KC_J, KC_K, KC_L, FR_M, FR_UGRV, FR_ASTR, KC_KP_1, KC_UP, KC_KP_3,\ | ||
| 11 | FR_LESS, FR_W, KC_X, KC_C, KC_V, KC_B, KC_SPACE, KC_SPACE, KC_N, FR_COMM, FR_SCLN, FR_COLN, FR_EXLM, NO_ALGR, KC_LEFT, KC_DOWN, KC_RIGHT, KC_KP_ENTER), | ||
| 12 | |||
| 13 | [1] = KEYMAP( | ||
| 14 | KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TAB, KC_CAPS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_FN0, KC_KP_SLASH, KC_KP_ASTERISK, KC_KP_MINUS,\ | ||
| 15 | KC_LALT, FR_AMP, FR_EACU, FR_QUOT, FR_APOS, FR_LPRN, KC_BSPACE, KC_DELETE, FR_MINS, FR_EGRV, FR_UNDS, FR_CCED, FR_AGRV, FR_RPRN, FR_EQL, KC_7, KC_8, KC_9,\ | ||
| 16 | KC_LGUI, FR_A, FR_Z, KC_E, KC_R, KC_T, KC_LSFT, KC_ENT, KC_Y, KC_U, KC_I, KC_O, KC_P, FR_CIRC, FR_DLR, KC_4, KC_5, KC_6, KC_KP_PLUS,\ | ||
| 17 | KC_LCTL, FR_Q, KC_S, KC_D, KC_F, KC_G, KC_ENT, KC_H, KC_J, KC_K, KC_L, FR_M, FR_UGRV, FR_ASTR, KC_1, KC_2, KC_3,\ | ||
| 18 | FR_LESS, FR_W, KC_X, KC_C, KC_V, KC_B, KC_SPACE, KC_SPACE, KC_N, FR_COMM, FR_SCLN, FR_COLN, FR_EXLM, NO_ALGR, KC_LEFT, KC_DOWN, KC_RIGHT, KC_KP_ENTER), | ||
| 19 | }; | ||
| 20 | |||
| 21 | |||
| 22 | const uint16_t PROGMEM fn_actions[] = { | ||
| 23 | ACTION_LAYER_TOGGLE(1), | ||
| 24 | }; | ||
| 25 | |||
| 26 | const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { | ||
| 27 | return MACRO_NONE; | ||
| 28 | }; | ||
| 29 | |||
diff --git a/keyboards/handwired/reddot/keymaps/default/readme.md b/keyboards/handwired/reddot/keymaps/default/readme.md new file mode 100755 index 000000000..f04833c3e --- /dev/null +++ b/keyboards/handwired/reddot/keymaps/default/readme.md | |||
| @@ -0,0 +1 @@ | |||
| # The default keymap for handwired/reddot | |||
diff --git a/keyboards/handwired/reddot/readme.md b/keyboards/handwired/reddot/readme.md new file mode 100755 index 000000000..11bcba54a --- /dev/null +++ b/keyboards/handwired/reddot/readme.md | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | ## RedDot Specific Info ## | ||
| 2 | |||
| 3 | |||
| 4 | ## Quantum MK Firmware | ||
| 5 | |||
| 6 | For the full Quantum feature list, see [the parent README.md](/README.md). | ||
| 7 | |||
| 8 | ## Building | ||
| 9 | |||
| 10 | Download or clone the whole firmware and navigate to the keyboard/reddot folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file. | ||
| 11 | |||
| 12 | Depending on which keymap you would like to use, you will have to compile slightly differently. | ||
| 13 | |||
| 14 | ### Default | ||
| 15 | To build with the default keymap, simply run `make`. | ||
| 16 | |||
| 17 | ### Other Keymaps | ||
| 18 | Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `<name>.c` and see keymap document (you can find in top README.md) and existent keymap files. | ||
| 19 | |||
| 20 | To build the firmware binary hex file with a keymap just do `make` with `KEYMAP` option like: | ||
| 21 | ``` | ||
| 22 | $ make KEYMAP=[default|jack|<name>] | ||
| 23 | ``` | ||
| 24 | Keymaps follow the format **__\<name\>.c__** and are stored in the `keymaps` folder. | ||
diff --git a/keyboards/handwired/reddot/reddot.c b/keyboards/handwired/reddot/reddot.c new file mode 100755 index 000000000..4e1efc06c --- /dev/null +++ b/keyboards/handwired/reddot/reddot.c | |||
| @@ -0,0 +1,7 @@ | |||
| 1 | #include "reddot.h" | ||
| 2 | |||
| 3 | void matrix_init_kb(void) { | ||
| 4 | |||
| 5 | matrix_init_user(); | ||
| 6 | } | ||
| 7 | |||
diff --git a/keyboards/handwired/reddot/reddot.h b/keyboards/handwired/reddot/reddot.h new file mode 100755 index 000000000..f0c4be557 --- /dev/null +++ b/keyboards/handwired/reddot/reddot.h | |||
| @@ -0,0 +1,20 @@ | |||
| 1 | #ifndef REDDOT_H | ||
| 2 | #define REDDOT_H | ||
| 3 | |||
| 4 | #include "quantum.h" | ||
| 5 | |||
| 6 | #define KEYMAP( \ | ||
| 7 | k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k10, k11, k12, k13, \ | ||
| 8 | k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k30, k31, k32, \ | ||
| 9 | k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k50, k51, k52, k53, \ | ||
| 10 | k60, k61, k62, k63, k64, k65, k66, k68, k69, k6A, k6B, k6C, k6D, k6E, k70, k71, k72, \ | ||
| 11 | k80, k81, k82, k83, k84, k85, k86, k88, k89, k8A, k8B, k8C, k8D, k8E, k90, k91, k92, k93\ | ||
| 12 | ) { \ | ||
| 13 | { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k10, k11, k12, k13 }, \ | ||
| 14 | { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k30, k31, k32, KC_NO }, \ | ||
| 15 | { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k50, k51, k52, k53 }, \ | ||
| 16 | { k60, k61, k62, k63, k64, k65, k66, KC_NO, k68, k69, k6A, k6B, k6C, k6D, k6E, k70, k71, k72, KC_NO }, \ | ||
| 17 | { k80, k81, k82, k83, k84, k85, k86, KC_NO, k88, k89, k8A, k8B, k8C, k8D, k8E, k90, k91, k92, k93 } \ | ||
| 18 | } | ||
| 19 | |||
| 20 | #endif | ||
diff --git a/keyboards/handwired/reddot/rules.mk b/keyboards/handwired/reddot/rules.mk new file mode 100755 index 000000000..9a4409fe6 --- /dev/null +++ b/keyboards/handwired/reddot/rules.mk | |||
| @@ -0,0 +1,88 @@ | |||
| 1 | |||
| 2 | #MCU = at90usb1287 | ||
| 3 | MCU = atmega32u4 | ||
| 4 | |||
| 5 | # Processor frequency. | ||
| 6 | # This will define a symbol, F_CPU, in all source code files equal to the | ||
| 7 | # processor frequency in Hz. You can then use this symbol in your source code to | ||
| 8 | # calculate timings. Do NOT tack on a 'UL' at the end, this will be done | ||
| 9 | # automatically to create a 32-bit value in your source code. | ||
| 10 | # | ||
| 11 | # This will be an integer division of F_USB below, as it is sourced by | ||
| 12 | # F_USB after it has run through any CPU prescalers. Note that this value | ||
| 13 | # does not *change* the processor frequency - it should merely be updated to | ||
| 14 | # reflect the processor speed set externally so that the code can use accurate | ||
| 15 | # software delays. | ||
| 16 | F_CPU = 16000000 | ||
| 17 | |||
| 18 | # for avr upload | ||
| 19 | USB ?= /dev/cu.usbmodem1421 | ||
| 20 | # | ||
| 21 | # LUFA specific | ||
| 22 | # | ||
| 23 | # Target architecture (see library "Board Types" documentation). | ||
| 24 | ARCH = AVR8 | ||
| 25 | |||
| 26 | # Input clock frequency. | ||
| 27 | # This will define a symbol, F_USB, in all source code files equal to the | ||
| 28 | # input clock frequency (before any prescaling is performed) in Hz. This value may | ||
| 29 | # differ from F_CPU if prescaling is used on the latter, and is required as the | ||
| 30 | # raw input clock is fed directly to the PLL sections of the AVR for high speed | ||
| 31 | # clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' | ||
| 32 | # at the end, this will be done automatically to create a 32-bit value in your | ||
| 33 | # source code. | ||
| 34 | # | ||
| 35 | # If no clock division is performed on the input clock inside the AVR (via the | ||
| 36 | # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. | ||
| 37 | F_USB = $(F_CPU) | ||
| 38 | |||
| 39 | |||
| 40 | ifdef TEENSY2 | ||
| 41 | OPT_DEFS += -DATREUS_TEENSY2 | ||
| 42 | ATREUS_UPLOAD_COMMAND = teensy_loader_cli -w -mmcu=$(MCU) $(TARGET).hex | ||
| 43 | else | ||
| 44 | OPT_DEFS += -DATREUS_ASTAR | ||
| 45 | OPT_DEFS += -DCATERINA_BOOTLOADER | ||
| 46 | ATREUS_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \ | ||
| 47 | avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB) | ||
| 48 | endif | ||
| 49 | # Interrupt driven control endpoint task(+60) | ||
| 50 | OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT | ||
| 51 | |||
| 52 | |||
| 53 | # MCU name | ||
| 54 | |||
| 55 | # Boot Section Size in *bytes* | ||
| 56 | # Teensy halfKay 512 | ||
| 57 | # Teensy++ halfKay 1024 | ||
| 58 | # Atmel DFU loader 4096 | ||
| 59 | # LUFA bootloader 4096 | ||
| 60 | # USBaspLoader 2048 | ||
| 61 | OPT_DEFS += -DBOOTLOADER_SIZE=4096 | ||
| 62 | |||
| 63 | |||
| 64 | # Build Options | ||
| 65 | # change yes to no to disable | ||
| 66 | # | ||
| 67 | BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) | ||
| 68 | MOUSEKEY_ENABLE = yes # Mouse keys(+4700) | ||
| 69 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | ||
| 70 | CONSOLE_ENABLE ?= no # Console for debug(+400) | ||
| 71 | COMMAND_ENABLE ?= no # Commands for debug and configuration | ||
| 72 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
| 73 | SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend | ||
| 74 | # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
| 75 | NKRO_ENABLE ?= no # USB Nkey Rollover | ||
| 76 | BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default | ||
| 77 | MIDI_ENABLE ?= no # MIDI controls | ||
| 78 | UNICODE_ENABLE ?= no # Unicode | ||
| 79 | BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID | ||
| 80 | AUDIO_ENABLE ?= no # Audio output on port C6 | ||
| 81 | |||
| 82 | ifndef QUANTUM_DIR | ||
| 83 | include ../../../Makefile | ||
| 84 | endif | ||
| 85 | |||
| 86 | upload: build | ||
| 87 | $(ATREUS_UPLOAD_COMMAND) | ||
| 88 | |||
diff --git a/keyboards/lets_split/config.h b/keyboards/lets_split/config.h index 7df0c5752..008fb0978 100644 --- a/keyboards/lets_split/config.h +++ b/keyboards/lets_split/config.h | |||
| @@ -26,4 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 26 | #ifdef SUBPROJECT_rev2 | 26 | #ifdef SUBPROJECT_rev2 |
| 27 | #include "rev2/config.h" | 27 | #include "rev2/config.h" |
| 28 | #endif | 28 | #endif |
| 29 | #ifdef SUBPROJECT_rev2fliphalf | ||
| 30 | #include "../../rev2fliphalf/config.h" | ||
| 31 | #endif | ||
| 29 | #endif | 32 | #endif |
diff --git a/keyboards/lets_split/keymaps/i2c/config.h b/keyboards/lets_split/keymaps/i2c/config.h index efe8bb0f2..332c990fc 100644 --- a/keyboards/lets_split/keymaps/i2c/config.h +++ b/keyboards/lets_split/keymaps/i2c/config.h | |||
| @@ -24,4 +24,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 24 | #endif | 24 | #endif |
| 25 | #ifdef SUBPROJECT_rev2 | 25 | #ifdef SUBPROJECT_rev2 |
| 26 | #include "../../rev2/config.h" | 26 | #include "../../rev2/config.h" |
| 27 | #endif | ||
| 28 | #ifdef SUBPROJECT_rev2fliphalf | ||
| 29 | #include "../../rev2fliphalf/config.h" | ||
| 27 | #endif \ No newline at end of file | 30 | #endif \ No newline at end of file |
diff --git a/keyboards/lets_split/keymaps/serial/config.h b/keyboards/lets_split/keymaps/serial/config.h index cd766cc4f..0e59b191b 100644 --- a/keyboards/lets_split/keymaps/serial/config.h +++ b/keyboards/lets_split/keymaps/serial/config.h | |||
| @@ -26,4 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 26 | #endif | 26 | #endif |
| 27 | #ifdef SUBPROJECT_rev2 | 27 | #ifdef SUBPROJECT_rev2 |
| 28 | #include "../../rev2/config.h" | 28 | #include "../../rev2/config.h" |
| 29 | #endif | ||
| 30 | #ifdef SUBPROJECT_rev2fliphalf | ||
| 31 | #include "../../rev2fliphalf/config.h" | ||
| 29 | #endif \ No newline at end of file | 32 | #endif \ No newline at end of file |
diff --git a/keyboards/lets_split/lets_split.h b/keyboards/lets_split/lets_split.h index 2cdfb061f..0de308c7a 100644 --- a/keyboards/lets_split/lets_split.h +++ b/keyboards/lets_split/lets_split.h | |||
| @@ -7,6 +7,9 @@ | |||
| 7 | #ifdef SUBPROJECT_rev2 | 7 | #ifdef SUBPROJECT_rev2 |
| 8 | #include "rev2.h" | 8 | #include "rev2.h" |
| 9 | #endif | 9 | #endif |
| 10 | #ifdef SUBPROJECT_rev2fliphalf | ||
| 11 | #include "rev2fliphalf.h" | ||
| 12 | #endif | ||
| 10 | 13 | ||
| 11 | #include "quantum.h" | 14 | #include "quantum.h" |
| 12 | 15 | ||
diff --git a/keyboards/lets_split/rev2/rev2.h b/keyboards/lets_split/rev2/rev2.h index 7c397912f..990976de2 100644 --- a/keyboards/lets_split/rev2/rev2.h +++ b/keyboards/lets_split/rev2/rev2.h | |||
| @@ -9,10 +9,10 @@ | |||
| 9 | //void promicro_bootloader_jmp(bool program); | 9 | //void promicro_bootloader_jmp(bool program); |
| 10 | 10 | ||
| 11 | #define KEYMAP( \ | 11 | #define KEYMAP( \ |
| 12 | k00, k01, k02, k03, k04, k05, k40, k41, k42, k43, k44, k45, \ | 12 | k00, k01, k02, k03, k04, k05, k45, k44, k43, k42, k41, k40, \ |
| 13 | k10, k11, k12, k13, k14, k15, k50, k51, k52, k53, k54, k55, \ | 13 | k10, k11, k12, k13, k14, k15, k55, k54, k53, k52, k51, k50, \ |
| 14 | k20, k21, k22, k23, k24, k25, k60, k61, k62, k63, k64, k65, \ | 14 | k20, k21, k22, k23, k24, k25, k65, k64, k63, k62, k61, k60, \ |
| 15 | k30, k31, k32, k33, k34, k35, k70, k71, k72, k73, k74, k75 \ | 15 | k30, k31, k32, k33, k34, k35, k75, k74, k73, k72, k71, k70 \ |
| 16 | ) \ | 16 | ) \ |
| 17 | { \ | 17 | { \ |
| 18 | { k00, k01, k02, k03, k04, k05 }, \ | 18 | { k00, k01, k02, k03, k04, k05 }, \ |
diff --git a/keyboards/lets_split/rev2fliphalf/Makefile b/keyboards/lets_split/rev2fliphalf/Makefile new file mode 100644 index 000000000..4e2a6f00f --- /dev/null +++ b/keyboards/lets_split/rev2fliphalf/Makefile | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | ifndef MAKEFILE_INCLUDED | ||
| 2 | include ../../Makefile | ||
| 3 | endif \ No newline at end of file | ||
diff --git a/keyboards/lets_split/rev2fliphalf/config.h b/keyboards/lets_split/rev2fliphalf/config.h new file mode 100644 index 000000000..1c45cf136 --- /dev/null +++ b/keyboards/lets_split/rev2fliphalf/config.h | |||
| @@ -0,0 +1,91 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2012 Jun Wako <wakojun@gmail.com> | ||
| 3 | |||
| 4 | This program is free software: you can redistribute it and/or modify | ||
| 5 | it under the terms of the GNU General Public License as published by | ||
| 6 | the Free Software Foundation, either version 2 of the License, or | ||
| 7 | (at your option) any later version. | ||
| 8 | |||
| 9 | This program is distributed in the hope that it will be useful, | ||
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | GNU General Public License for more details. | ||
| 13 | |||
| 14 | You should have received a copy of the GNU General Public License | ||
| 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 16 | */ | ||
| 17 | |||
| 18 | #ifndef CONFIG_H | ||
| 19 | #define CONFIG_H | ||
| 20 | |||
| 21 | #include "config_common.h" | ||
| 22 | |||
| 23 | /* USB Device descriptor parameter */ | ||
| 24 | #define VENDOR_ID 0xFEED | ||
| 25 | #define PRODUCT_ID 0x3060 | ||
| 26 | #define DEVICE_VER 0x0001 | ||
| 27 | #define MANUFACTURER Wootpatoot | ||
| 28 | #define PRODUCT Lets Split v2 | ||
| 29 | #define DESCRIPTION A split keyboard for the cheap makers | ||
| 30 | |||
| 31 | /* key matrix size */ | ||
| 32 | // Rows are doubled-up | ||
| 33 | #define MATRIX_ROWS 8 | ||
| 34 | #define MATRIX_COLS 6 | ||
| 35 | |||
| 36 | // wiring of each half | ||
| 37 | #define MATRIX_ROW_PINS { D7, E6, B4, B5 } | ||
| 38 | //#define MATRIX_COL_PINS { F6, F7, B1, B3, B2, B6 } | ||
| 39 | #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6 } //uncomment this line and comment line above if you need to reverse left-to-right key order | ||
| 40 | |||
| 41 | //#define CATERINA_BOOTLOADER | ||
| 42 | |||
| 43 | /* COL2ROW or ROW2COL */ | ||
| 44 | #define DIODE_DIRECTION COL2ROW | ||
| 45 | |||
| 46 | /* define if matrix has ghost */ | ||
| 47 | //#define MATRIX_HAS_GHOST | ||
| 48 | |||
| 49 | /* number of backlight levels */ | ||
| 50 | // #define BACKLIGHT_LEVELS 3 | ||
| 51 | |||
| 52 | /* Set 0 if debouncing isn't needed */ | ||
| 53 | #define DEBOUNCING_DELAY 5 | ||
| 54 | |||
| 55 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | ||
| 56 | #define LOCKING_SUPPORT_ENABLE | ||
| 57 | /* Locking resynchronize hack */ | ||
| 58 | #define LOCKING_RESYNC_ENABLE | ||
| 59 | |||
| 60 | /* key combination for command */ | ||
| 61 | #define IS_COMMAND() ( \ | ||
| 62 | keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ | ||
| 63 | ) | ||
| 64 | |||
| 65 | /* ws2812 RGB LED */ | ||
| 66 | #define RGB_DI_PIN D3 | ||
| 67 | #define RGBLIGHT_TIMER | ||
| 68 | #define RGBLED_NUM 12 // Number of LEDs | ||
| 69 | #define ws2812_PORTREG PORTD | ||
| 70 | #define ws2812_DDRREG DDRD | ||
| 71 | |||
| 72 | /* | ||
| 73 | * Feature disable options | ||
| 74 | * These options are also useful to firmware size reduction. | ||
| 75 | */ | ||
| 76 | |||
| 77 | /* disable debug print */ | ||
| 78 | // #define NO_DEBUG | ||
| 79 | |||
| 80 | /* disable print */ | ||
| 81 | // #define NO_PRINT | ||
| 82 | |||
| 83 | /* disable action features */ | ||
| 84 | //#define NO_ACTION_LAYER | ||
| 85 | //#define NO_ACTION_TAPPING | ||
| 86 | //#define NO_ACTION_ONESHOT | ||
| 87 | //#define NO_ACTION_MACRO | ||
| 88 | //#define NO_ACTION_FUNCTION | ||
| 89 | |||
| 90 | |||
| 91 | #endif \ No newline at end of file | ||
diff --git a/keyboards/lets_split/rev2fliphalf/rev2fliphalf.c b/keyboards/lets_split/rev2fliphalf/rev2fliphalf.c new file mode 100644 index 000000000..c505d3a6e --- /dev/null +++ b/keyboards/lets_split/rev2fliphalf/rev2fliphalf.c | |||
| @@ -0,0 +1,32 @@ | |||
| 1 | #include "lets_split.h" | ||
| 2 | |||
| 3 | #ifdef AUDIO_ENABLE | ||
| 4 | float tone_startup[][2] = SONG(STARTUP_SOUND); | ||
| 5 | float tone_goodbye[][2] = SONG(GOODBYE_SOUND); | ||
| 6 | #endif | ||
| 7 | |||
| 8 | void matrix_init_kb(void) { | ||
| 9 | |||
| 10 | #ifdef AUDIO_ENABLE | ||
| 11 | _delay_ms(20); // gets rid of tick | ||
| 12 | PLAY_NOTE_ARRAY(tone_startup, false, 0); | ||
| 13 | #endif | ||
| 14 | |||
| 15 | // // green led on | ||
| 16 | // DDRD |= (1<<5); | ||
| 17 | // PORTD &= ~(1<<5); | ||
| 18 | |||
| 19 | // // orange led on | ||
| 20 | // DDRB |= (1<<0); | ||
| 21 | // PORTB &= ~(1<<0); | ||
| 22 | |||
| 23 | matrix_init_user(); | ||
| 24 | }; | ||
| 25 | |||
| 26 | void shutdown_user(void) { | ||
| 27 | #ifdef AUDIO_ENABLE | ||
| 28 | PLAY_NOTE_ARRAY(tone_goodbye, false, 0); | ||
| 29 | _delay_ms(150); | ||
| 30 | stop_all_notes(); | ||
| 31 | #endif | ||
| 32 | } | ||
diff --git a/keyboards/lets_split/rev2fliphalf/rev2fliphalf.h b/keyboards/lets_split/rev2fliphalf/rev2fliphalf.h new file mode 100644 index 000000000..7dc8e5ba8 --- /dev/null +++ b/keyboards/lets_split/rev2fliphalf/rev2fliphalf.h | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | #ifndef REV2FLIPHALF_H | ||
| 2 | #define REV2FLIPHALF_H | ||
| 3 | |||
| 4 | #include "../lets_split.h" | ||
| 5 | |||
| 6 | //void promicro_bootloader_jmp(bool program); | ||
| 7 | #include "quantum.h" | ||
| 8 | |||
| 9 | //void promicro_bootloader_jmp(bool program); | ||
| 10 | |||
| 11 | #define KEYMAP( \ | ||
| 12 | k00, k01, k02, k03, k04, k05, k40, k41, k42, k43, k44, k45, \ | ||
| 13 | k10, k11, k12, k13, k14, k15, k50, k51, k52, k53, k54, k55, \ | ||
| 14 | k20, k21, k22, k23, k24, k25, k60, k61, k62, k63, k64, k65, \ | ||
| 15 | k30, k31, k32, k33, k34, k35, k70, k71, k72, k73, k74, k75 \ | ||
| 16 | ) \ | ||
| 17 | { \ | ||
| 18 | { k00, k01, k02, k03, k04, k05 }, \ | ||
| 19 | { k10, k11, k12, k13, k14, k15 }, \ | ||
| 20 | { k20, k21, k22, k23, k24, k25 }, \ | ||
| 21 | { k30, k31, k32, k33, k34, k35 }, \ | ||
| 22 | { k40, k41, k42, k43, k44, k45 }, \ | ||
| 23 | { k50, k51, k52, k53, k54, k55 }, \ | ||
| 24 | { k60, k61, k62, k63, k64, k65 }, \ | ||
| 25 | { k70, k71, k72, k73, k74, k75 } \ | ||
| 26 | } | ||
| 27 | |||
| 28 | #endif \ No newline at end of file | ||
diff --git a/keyboards/lets_split/rev2fliphalf/rules.mk b/keyboards/lets_split/rev2fliphalf/rules.mk new file mode 100644 index 000000000..80a942d06 --- /dev/null +++ b/keyboards/lets_split/rev2fliphalf/rules.mk | |||
| @@ -0,0 +1,5 @@ | |||
| 1 | BACKLIGHT_ENABLE = no | ||
| 2 | |||
| 3 | ifndef QUANTUM_DIR | ||
| 4 | include ../../../Makefile | ||
| 5 | endif | ||
diff --git a/keyboards/planck/keymaps/callum/keymap.c b/keyboards/planck/keymaps/callum/keymap.c index a1254d975..2acd988ea 100644 --- a/keyboards/planck/keymaps/callum/keymap.c +++ b/keyboards/planck/keymaps/callum/keymap.c | |||
| @@ -12,8 +12,6 @@ extern keymap_config_t keymap_config; | |||
| 12 | #define _SYMB 2 | 12 | #define _SYMB 2 |
| 13 | #define _MOUSE 3 | 13 | #define _MOUSE 3 |
| 14 | #define _FUNC 4 | 14 | #define _FUNC 4 |
| 15 | #define CMDLEFT LGUI(KC_LEFT) | ||
| 16 | #define CMDRGHT LGUI(KC_RGHT) | ||
| 17 | #define ENDASH LALT(KC_MINS) | 15 | #define ENDASH LALT(KC_MINS) |
| 18 | #define POUND LALT(KC_3) | 16 | #define POUND LALT(KC_3) |
| 19 | 17 | ||
| @@ -50,7 +48,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 50 | 48 | ||
| 51 | /* MOVE | 49 | /* MOVE |
| 52 | * ,-----------------------------------------------------------------------------------. | 50 | * ,-----------------------------------------------------------------------------------. |
| 53 | * | Esc | | Cmd-L| Up | Cmd-R| | | Cmd-L| Up | Cmd-R| | Esc | | 51 | * | Esc | | Home | Up | End | | | Home | Up | End | | Esc | |
| 54 | * |------+------+------+------+------+------+------+------+------+------+------+------| | 52 | * |------+------+------+------+------+------+------+------+------+------+------+------| |
| 55 | * | Del | Caps | Left | Down | Right| | | Left | Down | Right| Caps | Del | | 53 | * | Del | Caps | Left | Down | Right| | | Left | Down | Right| Caps | Del | |
| 56 | * |------+------+------+------+------+------+------+------+------+------+------+------| | 54 | * |------+------+------+------+------+------+------+------+------+------+------+------| |
| @@ -60,7 +58,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 60 | * `-----------------------------------------------------------------------------------' | 58 | * `-----------------------------------------------------------------------------------' |
| 61 | */ | 59 | */ |
| 62 | [_MOVE] = { | 60 | [_MOVE] = { |
| 63 | {KC_ESC, XXXXXXX, CMDLEFT, KC_UP, CMDRGHT, XXXXXXX, XXXXXXX, CMDLEFT, KC_UP, CMDRGHT, XXXXXXX, KC_ESC }, | 61 | {KC_ESC, XXXXXXX, KC_HOME, KC_UP, KC_END, XXXXXXX, XXXXXXX, KC_HOME, KC_UP, KC_END, XXXXXXX, KC_ESC }, |
| 64 | {KC_DEL, KC_CAPS, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_CAPS, KC_DEL }, | 62 | {KC_DEL, KC_CAPS, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_CAPS, KC_DEL }, |
| 65 | {_______, XXXXXXX, XXXXXXX, KC_PGUP, KC_PGDN, XXXXXXX, XXXXXXX, KC_PGDN, KC_PGUP, XXXXXXX, XXXXXXX, _______}, | 63 | {_______, XXXXXXX, XXXXXXX, KC_PGUP, KC_PGDN, XXXXXXX, XXXXXXX, KC_PGDN, KC_PGUP, XXXXXXX, XXXXXXX, _______}, |
| 66 | {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} | 64 | {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} |
diff --git a/keyboards/planck/keymaps/callum/readme.md b/keyboards/planck/keymaps/callum/readme.md index f970cd974..71e200b9d 100644 --- a/keyboards/planck/keymaps/callum/readme.md +++ b/keyboards/planck/keymaps/callum/readme.md | |||
| @@ -23,7 +23,7 @@ We have five layers. A `BASE` layer, in colemak; a `MOVE` layer, with an arrow c | |||
| 23 | 23 | ||
| 24 | /* MOVE | 24 | /* MOVE |
| 25 | * ,-----------------------------------------------------------------------------------. | 25 | * ,-----------------------------------------------------------------------------------. |
| 26 | * | Esc | | Cmd-L| Up | Cmd-R| | | Cmd-L| Up | Cmd-R| | Esc | | 26 | * | Esc | | Home | Up | End | | | Home | Up | End | | Esc | |
| 27 | * |------+------+------+------+------+------+------+------+------+------+------+------| | 27 | * |------+------+------+------+------+------+------+------+------+------+------+------| |
| 28 | * | Del | Caps | Left | Down | Right| | | Left | Down | Right| Caps | Del | | 28 | * | Del | Caps | Left | Down | Right| | | Left | Down | Right| Caps | Del | |
| 29 | * |------+------+------+------+------+------+------+------+------+------+------+------| | 29 | * |------+------+------+------+------+------+------+------+------+------+------+------| |
diff --git a/keyboards/planck/keymaps/espynn/Makefile b/keyboards/planck/keymaps/espynn/Makefile new file mode 100644 index 000000000..44a030ba3 --- /dev/null +++ b/keyboards/planck/keymaps/espynn/Makefile | |||
| @@ -0,0 +1,63 @@ | |||
| 1 | #---------------------------------------------------------------------------- | ||
| 2 | # On command line: | ||
| 3 | # | ||
| 4 | # make all = Make software. | ||
| 5 | # | ||
| 6 | # make clean = Clean out built project files. | ||
| 7 | # | ||
| 8 | # make coff = Convert ELF to AVR COFF. | ||
| 9 | # | ||
| 10 | # make extcoff = Convert ELF to AVR Extended COFF. | ||
| 11 | # | ||
| 12 | # make program = Download the hex file to the device. | ||
| 13 | # Please customize your programmer settings(PROGRAM_CMD) | ||
| 14 | # | ||
| 15 | # make teensy = Download the hex file to the device, using teensy_loader_cli. | ||
| 16 | # (must have teensy_loader_cli installed). | ||
| 17 | # | ||
| 18 | # make dfu = Download the hex file to the device, using dfu-programmer (must | ||
| 19 | # have dfu-programmer installed). | ||
| 20 | # | ||
| 21 | # make flip = Download the hex file to the device, using Atmel FLIP (must | ||
| 22 | # have Atmel FLIP installed). | ||
| 23 | # | ||
| 24 | # make dfu-ee = Download the eeprom file to the device, using dfu-programmer | ||
| 25 | # (must have dfu-programmer installed). | ||
| 26 | # | ||
| 27 | # make flip-ee = Download the eeprom file to the device, using Atmel FLIP | ||
| 28 | # (must have Atmel FLIP installed). | ||
| 29 | # | ||
| 30 | # make debug = Start either simulavr or avarice as specified for debugging, | ||
| 31 | # with avr-gdb or avr-insight as the front end for debugging. | ||
| 32 | # | ||
| 33 | # make filename.s = Just compile filename.c into the assembler code only. | ||
| 34 | # | ||
| 35 | # make filename.i = Create a preprocessed source file for use in submitting | ||
| 36 | # bug reports to the GCC project. | ||
| 37 | # | ||
| 38 | # To rebuild project do "make clean" then "make all". | ||
| 39 | #---------------------------------------------------------------------------- | ||
| 40 | |||
| 41 | # Build Options | ||
| 42 | # change to "no" to disable the options, or define them in the makefile.mk in | ||
| 43 | # the appropriate keymap folder that will get included automatically | ||
| 44 | # | ||
| 45 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) | ||
| 46 | MOUSEKEY_ENABLE = yes # Mouse keys(+4700) | ||
| 47 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | ||
| 48 | CONSOLE_ENABLE = no # Console for debug(+400) | ||
| 49 | COMMAND_ENABLE = yes # Commands for debug and configuration | ||
| 50 | NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
| 51 | BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality | ||
| 52 | MIDI_ENABLE = no # MIDI controls | ||
| 53 | AUDIO_ENABLE = no # Audio output on port C6 | ||
| 54 | UNICODE_ENABLE = no # Unicode | ||
| 55 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | ||
| 56 | RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. | ||
| 57 | |||
| 58 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
| 59 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
| 60 | |||
| 61 | ifndef QUANTUM_DIR | ||
| 62 | include ../../../../Makefile | ||
| 63 | endif | ||
diff --git a/keyboards/planck/keymaps/espynn/keyboard-layout.jpg b/keyboards/planck/keymaps/espynn/keyboard-layout.jpg new file mode 100644 index 000000000..55e5396bf --- /dev/null +++ b/keyboards/planck/keymaps/espynn/keyboard-layout.jpg | |||
| Binary files differ | |||
diff --git a/keyboards/planck/keymaps/espynn/keymap.c b/keyboards/planck/keymaps/espynn/keymap.c new file mode 100644 index 000000000..4a3fe32b8 --- /dev/null +++ b/keyboards/planck/keymaps/espynn/keymap.c | |||
| @@ -0,0 +1,151 @@ | |||
| 1 | #include "planck.h" | ||
| 2 | #include "action_layer.h" | ||
| 3 | #include "eeconfig.h" | ||
| 4 | #ifdef BACKLIGHT_ENABLE | ||
| 5 | #include "backlight.h" | ||
| 6 | #endif | ||
| 7 | #define PREVENT_STUCK_MODIFIERS | ||
| 8 | extern keymap_config_t keymap_config; | ||
| 9 | |||
| 10 | // Symbolic names for macro IDs. | ||
| 11 | #define _QWERTY 0 // QUERTY layer | ||
| 12 | #define _LOWER 1 // Lower layer | ||
| 13 | #define _RAISE 2 // Raise layer | ||
| 14 | #define _CUSTOM 3 // Custom layer (LOWER + RAISE) | ||
| 15 | #define _BL 4 // Backlight | ||
| 16 | #define _CUS0 5 // Mobile# | ||
| 17 | #define _CUS1 6 // signature | ||
| 18 | #define _CUS2 7 // macro 2 | ||
| 19 | #define _CUS3 8 // macro 3 | ||
| 20 | #define _CUS4 9 // macro 4 | ||
| 21 | #define _CUS5 10 // email | ||
| 22 | #define _COPY 11 // copy | ||
| 23 | #define _PASTE 12 // paste | ||
| 24 | #define _CUT 13 // cut | ||
| 25 | |||
| 26 | // Macro shortcuts. | ||
| 27 | #define QWERTY M(_LOWER) | ||
| 28 | #define LOWER M(_LOWER) | ||
| 29 | #define RAISE M(_RAISE) | ||
| 30 | #define CUSTOM M(_CUSTOM) | ||
| 31 | #define BL M(_BL) | ||
| 32 | #define CUS0 M(_CUS0) | ||
| 33 | #define CUS1 M(_CUS1) | ||
| 34 | #define CUS2 M(_CUS2) | ||
| 35 | #define CUS3 M(_CUS3) | ||
| 36 | #define CUS4 M(_CUS4) | ||
| 37 | #define CUS5 M(_CUS5) | ||
| 38 | #define COPY M(_COPY) | ||
| 39 | #define PASTE M(_PASTE) | ||
| 40 | #define CUT M(_CUT) | ||
| 41 | |||
| 42 | // Func macro definitions. | ||
| 43 | #define LWR_PGDN FUNC(0) // Tap for PgDn, hold for LOWER | ||
| 44 | #define RSE_PGUP FUNC(1) // Tap for PgUp, hold for RAISE | ||
| 45 | #define CTL_CAPS FUNC(2) // Tap for Caps, hold for Ctrl (DOESN'T SEEM TO WORK) | ||
| 46 | #define SFT_ENT FUNC(3) // Tap for Enter, hold for Shift | ||
| 47 | #define ZM_NRM FUNC(4) // Zoom normal | ||
| 48 | #define ZM_IN FUNC(5) // Zoom out | ||
| 49 | #define ZM_OUT FUNC(6) // Zoom in | ||
| 50 | |||
| 51 | // Enable these functions using FUNC(n) macro. | ||
| 52 | const uint16_t PROGMEM fn_actions[] = { | ||
| 53 | [0] = ACTION_LAYER_TAP_KEY(_LOWER, KC_PGDN), | ||
| 54 | [1] = ACTION_LAYER_TAP_KEY(_RAISE, KC_PGUP), | ||
| 55 | [2] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_CAPS), | ||
| 56 | [3] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_ENT), | ||
| 57 | [4] = ACTION_MODS_KEY(MOD_LCTL, KC_0), | ||
| 58 | [5] = ACTION_MODS_KEY(MOD_LCTL, KC_MINS), | ||
| 59 | [6] = ACTION_MODS_KEY(MOD_LCTL, KC_PLUS), | ||
| 60 | [7] = ACTION_MODS_KEY(MOD_LCTL, KC_UNDS), | ||
| 61 | }; | ||
| 62 | |||
| 63 | // This config can be found at Keyboard layout editor site: http://goo.gl/zjXL2l | ||
| 64 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 65 | [_QWERTY] = { /* QWERTY */ | ||
| 66 | {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, | ||
| 67 | {KC_DEL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT}, | ||
| 68 | {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT}, | ||
| 69 | {KC_LCTL, KC_ESC, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} | ||
| 70 | }, | ||
| 71 | [_LOWER] = { /* LOWER */ | ||
| 72 | {KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL}, | ||
| 73 | {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LPRN, KC_RPRN, KC_LCBR, KC_RCBR, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}, | ||
| 74 | {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_QUOT, KC_DQT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}, | ||
| 75 | {KC_TRNS, ZM_NRM, ZM_IN, ZM_OUT, KC_TRNS, KC_PGDN, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS} | ||
| 76 | }, | ||
| 77 | [_RAISE] = { /* RAISE */ | ||
| 78 | {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12}, | ||
| 79 | {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LCBR, KC_LCBR, KC_BSLS, KC_TRNS}, | ||
| 80 | {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSLS, KC_PIPE, KC_GRV, KC_TILD, KC_LBRC, KC_LBRC, KC_TRNS, KC_TRNS}, | ||
| 81 | {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_PGUP, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} | ||
| 82 | }, | ||
| 83 | [_CUSTOM] = { /* CUSTOM */ | ||
| 84 | {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, CUS4, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}, | ||
| 85 | {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, CUS0, CUS3, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}, | ||
| 86 | {KC_TRNS, KC_TRNS, CUT, COPY, PASTE, CUS1, CUS5, CUS2, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}, | ||
| 87 | {BL, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS} | ||
| 88 | } | ||
| 89 | }; | ||
| 90 | |||
| 91 | // Set a layer persistantly. | ||
| 92 | void persistant_default_layer_set(uint16_t default_layer) { | ||
| 93 | eeconfig_update_default_layer(default_layer); | ||
| 94 | default_layer_set(default_layer); | ||
| 95 | } | ||
| 96 | |||
| 97 | // Macro actions for each corresponding ID. | ||
| 98 | const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) | ||
| 99 | { | ||
| 100 | switch(id) { | ||
| 101 | case _RAISE: // Raised layer. | ||
| 102 | if (record->event.pressed) { | ||
| 103 | layer_on(_RAISE); | ||
| 104 | update_tri_layer(_LOWER, _RAISE, _CUSTOM); | ||
| 105 | } else { | ||
| 106 | layer_off(_RAISE); | ||
| 107 | update_tri_layer(_LOWER, _RAISE, _CUSTOM); | ||
| 108 | } | ||
| 109 | break; | ||
| 110 | case _LOWER: // Lowered layer. | ||
| 111 | if (record->event.pressed) { | ||
| 112 | layer_on(_LOWER); | ||
| 113 | update_tri_layer(_LOWER, _RAISE, _CUSTOM); | ||
| 114 | } else { | ||
| 115 | layer_off(_LOWER); | ||
| 116 | update_tri_layer(_LOWER, _RAISE, _CUSTOM); | ||
| 117 | } | ||
| 118 | break; | ||
| 119 | case _BL: // Backlight | ||
| 120 | if (record->event.pressed) { | ||
| 121 | register_code(KC_RSFT); | ||
| 122 | #ifdef BACKLIGHT_ENABLE | ||
| 123 | backlight_step(); | ||
| 124 | #endif | ||
| 125 | } else { | ||
| 126 | unregister_code(KC_RSFT); | ||
| 127 | } | ||
| 128 | break; | ||
| 129 | case _CUS0: // enter your mobile# here | ||
| 130 | return MACRODOWN(T(9), T(9), T(9), T(MINS),T(9), T(9), T(9), T(MINS),T(9), T(9), T(9), T(9),END); | ||
| 131 | case _CUS1: // signature line for email | ||
| 132 | return MACRODOWN(T(ENT), T(ENT), T(MINS), T(J), T(W), END); | ||
| 133 | case _CUS2: // Custom macro 2 | ||
| 134 | return MACRODOWN( DOWN(KC_LSFT), TYPE(KC_L), UP(KC_LSFT), END ); | ||
| 135 | case _CUS3: // custom macro 3 | ||
| 136 | return MACRODOWN( DOWN(KC_LSFT), TYPE(KC_F), UP(KC_LSFT), END ); | ||
| 137 | case _CUS4: // custom macro 4 | ||
| 138 | return MACRODOWN( DOWN(KC_LSFT), TYPE(KC_I), UP(KC_LSFT), END ); | ||
| 139 | case _CUS5: // Enter your email here | ||
| 140 | return MACRODOWN( TYPE(KC_F), | ||
| 141 | DOWN(KC_LSFT), TYPE(KC_2), UP(KC_LSFT), | ||
| 142 | TYPE(KC_G), TYPE(KC_M), TYPE(KC_A), TYPE(KC_I), TYPE(KC_L), TYPE(KC_DOT), TYPE(KC_C), TYPE(KC_O), TYPE(KC_M), END ); | ||
| 143 | case _CUT: //cut macro | ||
| 144 | return MACRODOWN( DOWN(KC_LCTL), TYPE(KC_X), UP(KC_LCTL), END ); | ||
| 145 | case _COPY: // copy macro | ||
| 146 | return MACRODOWN( DOWN(KC_LCTL), TYPE(KC_C), UP(KC_LCTL), END ); | ||
| 147 | case _PASTE: // paste macro | ||
| 148 | return MACRODOWN( DOWN(KC_LCTL), TYPE(KC_V), UP(KC_LCTL), END ); | ||
| 149 | }; | ||
| 150 | return MACRO_NONE; | ||
| 151 | } \ No newline at end of file | ||
diff --git a/keyboards/planck/keymaps/espynn/layout.json b/keyboards/planck/keymaps/espynn/layout.json new file mode 100644 index 000000000..38ccc3452 --- /dev/null +++ b/keyboards/planck/keymaps/espynn/layout.json | |||
| @@ -0,0 +1,271 @@ | |||
| 1 | [ | ||
| 2 | { | ||
| 3 | "backcolor": "#858585", | ||
| 4 | "name": "Planck 40%", | ||
| 5 | "author": "James Folkert", | ||
| 6 | "background": { | ||
| 7 | "name": "Aluminium brushed", | ||
| 8 | "style": "background-image: url('/bg/metal/aluminum_texture1642.jpg');" | ||
| 9 | }, | ||
| 10 | "switchMount": "cherry", | ||
| 11 | "switchBrand": "cherry", | ||
| 12 | "switchType": "MX1A-A1xx", | ||
| 13 | "pcb": true, | ||
| 14 | "plate": true | ||
| 15 | }, | ||
| 16 | [ | ||
| 17 | { | ||
| 18 | "fa": [ | ||
| 19 | 2, | ||
| 20 | 2, | ||
| 21 | 0, | ||
| 22 | 2 | ||
| 23 | ] | ||
| 24 | }, | ||
| 25 | "F1\n1\n\n!\n\n\n\n\n\n<i class='kb kb-Tab-2'></i>", | ||
| 26 | "F2\n2\n\n@\n\n\n\n\n\nQ", | ||
| 27 | "F3\n3\n\n#\n\n\n\n\n\nW", | ||
| 28 | "F4\n4\n\n$\n\n\n\n\n\nE", | ||
| 29 | "F5\n5\n\n%\n\n\n\n\n\nR", | ||
| 30 | "F6\n6\n\n^\n\n\n\n\n\nT", | ||
| 31 | "F7\n6\n\n&\n\n\n\n\n\nY", | ||
| 32 | "F8\n8\n\n*\nMacro4\n\n\n\n\nU", | ||
| 33 | "F9\n9\n\n(\n\n\n\n\n\nI", | ||
| 34 | { | ||
| 35 | "fa": [ | ||
| 36 | 0, | ||
| 37 | 0, | ||
| 38 | 0, | ||
| 39 | 2 | ||
| 40 | ] | ||
| 41 | }, | ||
| 42 | "F10\n0\n\n)\n\n\n\n\n\nO", | ||
| 43 | { | ||
| 44 | "fa": [ | ||
| 45 | 2, | ||
| 46 | 2, | ||
| 47 | 0, | ||
| 48 | 2 | ||
| 49 | ] | ||
| 50 | }, | ||
| 51 | "F11\n-\n\n_\n\n\n\n\n\nP", | ||
| 52 | "F12\n=\n\n+\n\n\n\n\n\n<i class='kb kb-Unicode-BackSpace-DeleteLeft-Big'></i>" | ||
| 53 | ], | ||
| 54 | [ | ||
| 55 | { | ||
| 56 | "a": 7, | ||
| 57 | "f": 3 | ||
| 58 | }, | ||
| 59 | "<i class='mss mss-Unicode-DeleteRight-Big-2'></i>", | ||
| 60 | { | ||
| 61 | "f": 3 | ||
| 62 | }, | ||
| 63 | "A", | ||
| 64 | { | ||
| 65 | "f": 3 | ||
| 66 | }, | ||
| 67 | "S", | ||
| 68 | { | ||
| 69 | "f": 3 | ||
| 70 | }, | ||
| 71 | "D", | ||
| 72 | { | ||
| 73 | "t": "#ff0000", | ||
| 74 | "a": 4, | ||
| 75 | "f": 3 | ||
| 76 | }, | ||
| 77 | "\n(\n\n\n\n\n\n\n\nF", | ||
| 78 | { | ||
| 79 | "t": "#000000", | ||
| 80 | "f": 3 | ||
| 81 | }, | ||
| 82 | "\n)\n\n\n\n\n\n\n\nG", | ||
| 83 | { | ||
| 84 | "f": 3 | ||
| 85 | }, | ||
| 86 | "\n{\n\n\nMacro0\n\n\n\n\nH", | ||
| 87 | { | ||
| 88 | "t": "#ff0000", | ||
| 89 | "f": 3 | ||
| 90 | }, | ||
| 91 | "\n}\n\n\nMacro3\n\n\n\n\nJ", | ||
| 92 | { | ||
| 93 | "t": "#000000", | ||
| 94 | "f": 3 | ||
| 95 | }, | ||
| 96 | "{\n\n\n\n\n\n\n\n\nK", | ||
| 97 | { | ||
| 98 | "f": 3 | ||
| 99 | }, | ||
| 100 | "{\n\n\n\n\n\n\n\n\nL", | ||
| 101 | { | ||
| 102 | "fa": [ | ||
| 103 | 2, | ||
| 104 | 2, | ||
| 105 | 2, | ||
| 106 | 2, | ||
| 107 | 0, | ||
| 108 | 0, | ||
| 109 | 0, | ||
| 110 | 2 | ||
| 111 | ] | ||
| 112 | }, | ||
| 113 | "\\\n\n|\n\n\n\n\n:\n\n;", | ||
| 114 | { | ||
| 115 | "a": 7, | ||
| 116 | "fa": [ | ||
| 117 | 9 | ||
| 118 | ] | ||
| 119 | }, | ||
| 120 | "<i class='mss mss-Unicode-Enter-3'></i>" | ||
| 121 | ], | ||
| 122 | [ | ||
| 123 | { | ||
| 124 | "f": 3 | ||
| 125 | }, | ||
| 126 | "Shift", | ||
| 127 | { | ||
| 128 | "f": 3 | ||
| 129 | }, | ||
| 130 | "Z", | ||
| 131 | { | ||
| 132 | "f": 3 | ||
| 133 | }, | ||
| 134 | "X\n\n\n\nCut", | ||
| 135 | { | ||
| 136 | "f": 3 | ||
| 137 | }, | ||
| 138 | "C\n\n\n\nCopy", | ||
| 139 | { | ||
| 140 | "a": 4, | ||
| 141 | "fa": [ | ||
| 142 | 2, | ||
| 143 | 2, | ||
| 144 | 2, | ||
| 145 | 2 | ||
| 146 | ] | ||
| 147 | }, | ||
| 148 | "\\\n[\n|\n{\nPaste\n\n\n\n\nV", | ||
| 149 | "|\n]\n\n}\nMacro1\n\n\n\n\nB", | ||
| 150 | "`\n'\n~\n\"\nMacro5\n\n\n\n\nN", | ||
| 151 | "~\n\"\n\n\nMacro2\n\n\n\n\nM", | ||
| 152 | { | ||
| 153 | "fa": [ | ||
| 154 | 2, | ||
| 155 | 2, | ||
| 156 | 2, | ||
| 157 | 2, | ||
| 158 | 0, | ||
| 159 | 0, | ||
| 160 | 0, | ||
| 161 | 1 | ||
| 162 | ] | ||
| 163 | }, | ||
| 164 | "[\n\n{\n\n\n\n\n<\n\n,", | ||
| 165 | "[\n\n{\n\n\n\n\n\n\n.", | ||
| 166 | { | ||
| 167 | "a": 6 | ||
| 168 | }, | ||
| 169 | "\n\n?\n\n\n\n\n\n/", | ||
| 170 | { | ||
| 171 | "a": 4, | ||
| 172 | "fa": [ | ||
| 173 | 2, | ||
| 174 | 2, | ||
| 175 | 2, | ||
| 176 | 0, | ||
| 177 | 0, | ||
| 178 | 0, | ||
| 179 | 0, | ||
| 180 | 1, | ||
| 181 | 9, | ||
| 182 | 0 | ||
| 183 | ] | ||
| 184 | }, | ||
| 185 | "\n\n\n<i class='kb kb-Arrows-Bottom-4'></i>Shift\n\n\n\n\n<i class='mss mss-Unicode-Enter-3'></i>\n\n<i class='kb kb-Arrows-Bottom-4'></i>Shift" | ||
| 186 | ], | ||
| 187 | [ | ||
| 188 | { | ||
| 189 | "a": 7, | ||
| 190 | "f": 3 | ||
| 191 | }, | ||
| 192 | "Ctrl\n\n\n\nBLight", | ||
| 193 | { | ||
| 194 | "a": 4, | ||
| 195 | "fa": [ | ||
| 196 | 2, | ||
| 197 | 1, | ||
| 198 | 2, | ||
| 199 | 0, | ||
| 200 | 0, | ||
| 201 | 0, | ||
| 202 | 0, | ||
| 203 | 1, | ||
| 204 | 9, | ||
| 205 | 9 | ||
| 206 | ] | ||
| 207 | }, | ||
| 208 | "\nZNorm\n\n\nRESET\n\n\n\n\n<i class='mss mss-Unicode-Escape-3'></i>", | ||
| 209 | { | ||
| 210 | "fa": [ | ||
| 211 | 2, | ||
| 212 | 1, | ||
| 213 | 2, | ||
| 214 | 0, | ||
| 215 | 0, | ||
| 216 | 0, | ||
| 217 | 0, | ||
| 218 | 1, | ||
| 219 | 9, | ||
| 220 | 6 | ||
| 221 | ] | ||
| 222 | }, | ||
| 223 | "\nZIn\n\n\n\n\n\n\n\n<i class='kb kb-logo-windows-8'></i>", | ||
| 224 | { | ||
| 225 | "fa": [ | ||
| 226 | 2, | ||
| 227 | 1, | ||
| 228 | 2, | ||
| 229 | 0, | ||
| 230 | 0, | ||
| 231 | 0, | ||
| 232 | 0, | ||
| 233 | 1, | ||
| 234 | 9, | ||
| 235 | 9 | ||
| 236 | ] | ||
| 237 | }, | ||
| 238 | "\nZOut\n\n\n\n\n\n\n\n<i class='kb kb-Unicode-Alternate-1'></i>", | ||
| 239 | { | ||
| 240 | "a": 7, | ||
| 241 | "fa": [ | ||
| 242 | 9 | ||
| 243 | ] | ||
| 244 | }, | ||
| 245 | "⇓", | ||
| 246 | { | ||
| 247 | "a": 4, | ||
| 248 | "fa": [ | ||
| 249 | 9, | ||
| 250 | 5, | ||
| 251 | 5 | ||
| 252 | ], | ||
| 253 | "w": 2 | ||
| 254 | }, | ||
| 255 | "\n<i class='kb kb-Unicode-Page-Down-3'></i>\n<i class='kb kb-Unicode-Page-Up-3'></i>", | ||
| 256 | { | ||
| 257 | "a": 7 | ||
| 258 | }, | ||
| 259 | "⇑", | ||
| 260 | { | ||
| 261 | "a": 4, | ||
| 262 | "fa": [ | ||
| 263 | 2 | ||
| 264 | ] | ||
| 265 | }, | ||
| 266 | "<i class='kb kb-Multimedia-FastForward-End'></i>\n\n\n\n\n\n\n\n\n←", | ||
| 267 | "<i class='kb kb-Multimedia-Volume-Down-1'></i>\n\n\n\n\n\n\n\n\n↓", | ||
| 268 | "<i class='kb kb-Multimedia-Volume-Up-1'></i>\n\n\n\n\n\n\n\n\n↑", | ||
| 269 | "<i class='kb kb-Multimedia-Play-Pause'></i>\n\n\n\n\n\n\n\n\n→" | ||
| 270 | ] | ||
| 271 | ] \ No newline at end of file | ||
diff --git a/keyboards/planck/keymaps/espynn/readme.md b/keyboards/planck/keymaps/espynn/readme.md new file mode 100644 index 000000000..8882f4601 --- /dev/null +++ b/keyboards/planck/keymaps/espynn/readme.md | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | # Espynn's keymap for Planck Ortholinear 40% Mechanical Keyboard | ||
| 2 | Created by James Folkert: https://twitter.com/trekloFsemaJ | ||
| 3 | Added several custom functions to the keymap from the "ab" map. Special thanks to "mollat" for demonstration of macros in their keymap.c | ||
| 4 | |||
| 5 | |||
| 6 |  | ||
| 7 | |||
| 8 | |||
| 9 | * Online keyboard layout editor: http://www.keyboard-layout-editor.com/ | ||
| 10 | * [JSON of raw layout] (layout.json "JSON of raw layout") | ||
| 11 | |||
| 12 | # Notes | ||
| 13 | * Simultaneous RAISE+LOWER enters CUSTOM layer. Several custom keymaps are here | ||
| 14 | * I disregarded the advice of Jack and used macros for passwords. I accept my fate. These have been abstracted to macros 2, 3, and 4 | ||
| 15 | * add your mobile and email to the keymap before make | ||
| 16 | * RAISE and LOWER also acts as PgUp and PgDn when tapped. | ||
| 17 | * [CapsLock] also acts as [Ctrl] key when you press and hold. It is convenient for GNU Emacs users. (not sure if this works) | ||
| 18 | * Bracket/ paran/ brace keys are placed in the center of the keyboard for programmer's convenience. \ No newline at end of file | ||
diff --git a/keyboards/planck/keymaps/luke/Makefile b/keyboards/planck/keymaps/luke/Makefile new file mode 100644 index 000000000..847686873 --- /dev/null +++ b/keyboards/planck/keymaps/luke/Makefile | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | |||
| 2 | |||
| 3 | # Build Options | ||
| 4 | # change to "no" to disable the options, or define them in the Makefile in | ||
| 5 | # the appropriate keymap folder that will get included automatically | ||
| 6 | # | ||
| 7 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) | ||
| 8 | MOUSEKEY_ENABLE = yes # Mouse keys(+4700) | ||
| 9 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | ||
| 10 | CONSOLE_ENABLE = no # Console for debug(+400) | ||
| 11 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
| 12 | NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
| 13 | BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality | ||
| 14 | MIDI_ENABLE = no # MIDI controls | ||
| 15 | AUDIO_ENABLE = no # Audio output on port C6 | ||
| 16 | UNICODE_ENABLE = yes # Unicode | ||
| 17 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | ||
| 18 | RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. | ||
| 19 | |||
| 20 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
| 21 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
| 22 | |||
| 23 | ifndef QUANTUM_DIR | ||
| 24 | include ../../../../Makefile | ||
| 25 | endif | ||
diff --git a/keyboards/planck/keymaps/luke/keymap.c b/keyboards/planck/keymaps/luke/keymap.c new file mode 100644 index 000000000..26dcb451b --- /dev/null +++ b/keyboards/planck/keymaps/luke/keymap.c | |||
| @@ -0,0 +1,355 @@ | |||
| 1 | /* | ||
| 2 | * A keyboard layout for the gridded planck. | ||
| 3 | * | ||
| 4 | * Copyright (C) 2017 Luke Silva | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or | ||
| 7 | * modify it under the terms of the GNU General Public License | ||
| 8 | * as published by the Free Software Foundation; either version 2 | ||
| 9 | * of the License, or (at your option) any later version. | ||
| 10 | * | ||
| 11 | * This program is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | * GNU General Public License for more details. | ||
| 15 | * | ||
| 16 | * You should have received a copy of the GNU General Public License | ||
| 17 | * along with this program; if not, write to the Free Software | ||
| 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
| 19 | * | ||
| 20 | * ,-----------------------------------------------------------------------------------. | ||
| 21 | * | | | | | | | | | | | | | | ||
| 22 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 23 | * | | | | | | | | | | | | | | ||
| 24 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 25 | * | | | | | | | | | | | | | | ||
| 26 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 27 | * | | | | | | | | | | | | | | ||
| 28 | * `-----------------------------------------------------------------------------------' | ||
| 29 | * | ||
| 30 | * This layout uses colemak by default, and is designed for programming, with easy access to symbols | ||
| 31 | * through either double purpose modifiers or colemak style rolling for commonly used symbol clusters | ||
| 32 | * Eg: compare colemak 'this' to '(){\n}' on the symbol layer. | ||
| 33 | * | ||
| 34 | * The layout also supports a range of multilingual characters, covering those | ||
| 35 | * needed for French, German, Swedish and likely some other European Languages. | ||
| 36 | * In the future full support for Colemak's multilingual deadkeys may be introduced. | ||
| 37 | * | ||
| 38 | * The multilingual characters are inputted through QMK's unicode engine, using | ||
| 39 | * the Linux input method by default, however this can be changed at runtime. | ||
| 40 | * | ||
| 41 | */ | ||
| 42 | |||
| 43 | |||
| 44 | #include "planck.h" | ||
| 45 | |||
| 46 | #define _______ KC_TRNS | ||
| 47 | #define XXXXXXX KC_NO | ||
| 48 | |||
| 49 | |||
| 50 | // Layers | ||
| 51 | #define _COLEMAK 0 | ||
| 52 | #define _QWERTY 1 | ||
| 53 | #define _SYM 2 | ||
| 54 | #define _NUM 3 | ||
| 55 | #define _GR 4 | ||
| 56 | #define _GR_S 5 | ||
| 57 | #define _ADJ 6 | ||
| 58 | #define _NAV 7 | ||
| 59 | #define _PLOVER 8 | ||
| 60 | |||
| 61 | // Macro ID numbers | ||
| 62 | #define M_ALT_HASH 1 | ||
| 63 | #define M_GR_DASH 2 | ||
| 64 | #define M_SYM_LPRN 3 | ||
| 65 | #define M_NAV_UNDS 4 | ||
| 66 | #define M_NUM_RPRN 5 | ||
| 67 | #define M_CTRL_DLR 6 | ||
| 68 | #define M_LCBR_ENT 7 | ||
| 69 | #define M_PLOVER 8 | ||
| 70 | #define M_EXT_PLV 9 | ||
| 71 | #define M_WINDOWS 10 | ||
| 72 | #define M_LINUX 11 | ||
| 73 | #define M_OSX 12 | ||
| 74 | #define M_FUNCTION 13 | ||
| 75 | #define M_THEN 14 | ||
| 76 | #define M_CATCH 15 | ||
| 77 | |||
| 78 | // Macro keys | ||
| 79 | #define ALT_HASH MACROTAP(M_ALT_HASH) // tap for #, hold for Alt | ||
| 80 | #define GR_DASH MACROTAP(M_GR_DASH) // tap for -, hold for GR layer a-class-name | ||
| 81 | #define SYM_LPRN MACROTAP(M_SYM_LPRN) // tap for (, hold for symbols layer if() | ||
| 82 | #define NAV_UNDS MACROTAP(M_NAV_UNDS) // tap for _, hold for navigation layer snake_case_variable | ||
| 83 | #define NUM_RPRN MACROTAP(M_NUM_RPRN) // tap for ), hold for numbers layer else if() | ||
| 84 | #define CTRL_DLR MACROTAP(M_CTRL_DLR) // tap for $, hold for ctrl $php_is_really_weird | ||
| 85 | #define LCBR_ENT M(M_LCBR_ENT) // {\n easier code formatting | ||
| 86 | #define PLOVER M(M_PLOVER) // PHROPB (plover) or ERFVIK(qwerty) starts plover | ||
| 87 | #define EXT_PLV M(M_EXT_PLV) // PHRO*F (plover) or ERFVYU(qwerty) stops plover | ||
| 88 | #define WINDOWS M(M_WINDOWS) // Sets Unicode handler to windows | ||
| 89 | #define LINUX M(M_LINUX) // Sets Unicode handler to linux | ||
| 90 | #define OSX M(M_OSX) // Sets Unicode handler to OSX | ||
| 91 | #define FUNCTION M(M_FUNCTION) | ||
| 92 | #define THEN M(M_THEN) | ||
| 93 | #define CATCH M(M_CATCH) | ||
| 94 | |||
| 95 | |||
| 96 | // Renames of QMK keys... (would have otherwise been a macro) | ||
| 97 | #define QWERTY DF(_QWERTY) | ||
| 98 | #define COLEMAK DF(_COLEMAK) | ||
| 99 | |||
| 100 | |||
| 101 | |||
| 102 | |||
| 103 | |||
| 104 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 105 | |||
| 106 | /* Colemak | ||
| 107 | * ,-----------------------------------------------------------------------------------. | ||
| 108 | * | Tab | Q | W | F | P | G | J | L | U | Y | ;: | Bksp | | ||
| 109 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 110 | * | Bksp | A | R | S | T | D | H | N | E | I | O | '" | | ||
| 111 | * |------+------+------+------+------+------+------+------+------+------+------+------`---. | ||
| 112 | * |Shift=| Z | X | C | V | B | K | M | ,< | .> | /? |Shift/Ent | | ||
| 113 | * |------+------+------+------+------+------+------+------+------+------+------+----------| | ||
| 114 | * |CtCaps|GUIF4 | Alt# | Gr- | Sym( | Nav_ |Space | Num) |Ctrl$ | F11 | F12 |Nav toggle| | ||
| 115 | * `---------------------------------------------------------------------------------------' | ||
| 116 | */ | ||
| 117 | |||
| 118 | [_COLEMAK] = { | ||
| 119 | {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC}, | ||
| 120 | {KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT}, | ||
| 121 | {SFT_T(KC_EQL), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT) }, | ||
| 122 | {CTL_T(KC_CAPS), KC_LGUI, ALT_HASH, GR_DASH, SYM_LPRN, NAV_UNDS, KC_SPC, NUM_RPRN, CTRL_DLR, KC_F11, KC_F12, TG(_NAV)} | ||
| 123 | }, | ||
| 124 | |||
| 125 | |||
| 126 | |||
| 127 | /* QWERTY | ||
| 128 | * ,-----------------------------------------------------------------------------------. | ||
| 129 | * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | | ||
| 130 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 131 | * | Bksp | A | S | D | F | G | H | J | K | L | ;: | '" | | ||
| 132 | * |------+------+------+------+------+------+------+------+------+------+------+------`---. | ||
| 133 | * |Shift=| Z | X | C | V | B | N | M | ,< | .> | /? |Shift/Ent | | ||
| 134 | * |------+------+------+------+------+------+------+------+------+------+------+----------| | ||
| 135 | * |CtCaps|GUIF4 | Alt# | Gr- | Sym( | Nav_ |Space | Num) |Ctrl$ | F11 | F12 |Nav toggle| | ||
| 136 | * `---------------------------------------------------------------------------------------' | ||
| 137 | */ | ||
| 138 | |||
| 139 | [_QWERTY] = { | ||
| 140 | {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, | ||
| 141 | {KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, | ||
| 142 | {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT) }, | ||
| 143 | {CTL_T(KC_CAPS), KC_LGUI, KC_LALT, GR_DASH, SYM_LPRN,KC_SPC, KC_SPC, NUM_RPRN, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT} | ||
| 144 | }, | ||
| 145 | |||
| 146 | |||
| 147 | /* Symbols | ||
| 148 | * ,-----------------------------------------------------------------------------------. | ||
| 149 | * | Tab | ` | @ | / | * | ^ | % | : | + | - | Del | Bksp | | ||
| 150 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 151 | * | | [ | ; | } | ( | " | ' | ) | {\n | ! | ] | \ | | ||
| 152 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 153 | * |Shift | . | { | < | > | ~ | X2 | = | & | | | ? |Enter | | ||
| 154 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 155 | * | | | | | Sym | _ |Space | NUM | X2 | | | | | ||
| 156 | * `-----------------------------------------------------------------------------------' | ||
| 157 | */ | ||
| 158 | |||
| 159 | [_SYM] = { | ||
| 160 | {KC_TAB, KC_GRV, KC_AT, KC_SLSH, KC_ASTR, KC_CIRC, KC_PERC, KC_COLN, KC_PLUS, KC_MINS, KC_DEL, KC_BSPC}, | ||
| 161 | {FUNCTION,KC_LBRC, KC_SCLN, KC_RCBR, KC_LPRN, KC_DQT, KC_QUOT, KC_RPRN, LCBR_ENT,KC_EXLM, KC_RBRC, KC_BSLS}, | ||
| 162 | {KC_LSFT, KC_DOT, KC_LCBR, KC_LABK, KC_RABK, KC_TILD, _______, KC_EQL, KC_AMPR, KC_PIPE, KC_QUES, KC_ENT }, | ||
| 163 | {THEN, CATCH, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, _______} | ||
| 164 | }, | ||
| 165 | |||
| 166 | |||
| 167 | /* Numbers | ||
| 168 | * ,-----------------------------------------------------------------------------------. | ||
| 169 | * | Tab | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | | ||
| 170 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 171 | * | Bksp | x | D | E | F | + | - | 4 | 5 | 6 | 0 |Enter | | ||
| 172 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 173 | * |Shift | ( | A | B | C | * | / | 1 | 2 | 3 | ) |Enter | | ||
| 174 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 175 | * | | | | GR | SYM | _ |Space | NUM | 0 | . | f | | | ||
| 176 | * `-----------------------------------------------------------------------------------' | ||
| 177 | */ | ||
| 178 | |||
| 179 | [_NUM] = { | ||
| 180 | {KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC}, | ||
| 181 | {KC_BSPC, KC_X, S(KC_D), S(KC_E), S(KC_F), KC_PLUS, KC_MINS, KC_4, KC_5, KC_6, KC_0, KC_ENT }, | ||
| 182 | {KC_LSFT, KC_LPRN, S(KC_A), S(KC_B), S(KC_C), KC_ASTR, KC_SLSH, KC_1, KC_2, KC_3, KC_RPRN, KC_ENT }, | ||
| 183 | {_______, _______, _______, _______, _______, _______, _______, _______, KC_0, KC_DOT, KC_F, _______} | ||
| 184 | }, | ||
| 185 | |||
| 186 | |||
| 187 | /* Gr layer / international keys | ||
| 188 | * ,-----------------------------------------------------------------------------------. | ||
| 189 | * | | ä | å | | ¢£ | €¥ | | ë | ê | ü | ù | | | ||
| 190 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 191 | * | | â | à | ß | | | | è | é | ï | ö | | | ||
| 192 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 193 | * | | æ | ô | ç | œ | | | û | « | » | î | | | ||
| 194 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 195 | * | | | | | | | | | | | | | | ||
| 196 | * `-----------------------------------------------------------------------------------' | ||
| 197 | */ | ||
| 198 | |||
| 199 | [_GR] = { | ||
| 200 | {_______, UC(0xE4),UC(0xE5), _______,UC(0xA2), UC(0x20AC),_______,UC(0xEB),UC(0xEA),UC(0xFC),UC(0xF9), _______}, | ||
| 201 | {_______, UC(0xE2),UC(0xE0),UC(0xDF), _______, _______, _______,UC(0xE8),UC(0xE9),UC(0xEF),UC(0xF6), _______}, | ||
| 202 | {MO(_GR_S),UC(0xE6),UC(0xF4),UC(0xE7),UC(0x153),_______, _______,UC(0xFB),UC(0xAB),UC(0xBB),UC(0xEE), MO(_GR_S)}, | ||
| 203 | {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} | ||
| 204 | }, | ||
| 205 | |||
| 206 | // Shifted layer of the above | ||
| 207 | [_GR_S] = { | ||
| 208 | {_______, UC(0xC4),UC(0xC5), _______, UC(0xA3), UC(0xA5),_______, UC(0xCB),UC(0xCA),UC(0xDC),UC(0xD9),_______}, | ||
| 209 | {_______, UC(0xC2),UC(0xC0), UC(0xDF),_______, _______, _______, UC(0xC8),UC(0xC9),UC(0xCF),UC(0xD6),_______}, | ||
| 210 | {MO(_GR_S),UC(0xC6),UC(0xD4), UC(0xC7),UC(0x152),_______, _______, UC(0xDB),UC(0xAB),UC(0xBB),UC(0xCE),MO(_GR_S)}, | ||
| 211 | {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} | ||
| 212 | }, | ||
| 213 | |||
| 214 | |||
| 215 | /* Adjust Layer (Gr + Num) | ||
| 216 | * ,-----------------------------------------------------------------------------------. | ||
| 217 | * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | | ||
| 218 | * |------+-------------+------+------+------+------+------+------+------+------+------| | ||
| 219 | * | | |Prntscr| ESC |VOLUP | PLAY | PREV |QWERTY|COLEMAK|PLOVER| | | | ||
| 220 | * |------+-------------+------+------+------+------+------+------+------+------+------| | ||
| 221 | * | | |BACKLIT| INS |VOLDWN| MUTE | NEXT | WIND |LINUX | OSX | | | | ||
| 222 | * |------+-------------+------+------+------+------+------+------+------+------+------| | ||
| 223 | * | | | | | | | | | | | | | | ||
| 224 | * `-----------------------------------------------------------------------------------' | ||
| 225 | */ | ||
| 226 | |||
| 227 | [_ADJ] = { | ||
| 228 | {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12 }, | ||
| 229 | {XXXXXXX, XXXXXXX, KC_PSCR, KC_ESC, KC_VOLU, KC_MPLY, KC_MPRV, QWERTY, COLEMAK, PLOVER, XXXXXXX, XXXXXXX}, | ||
| 230 | {XXXXXXX, XXXXXXX, BL_STEP, KC_INS, KC_VOLD, KC_MUTE, KC_MNXT, WINDOWS, LINUX, OSX, XXXXXXX, XXXXXXX}, | ||
| 231 | {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} | ||
| 232 | }, | ||
| 233 | |||
| 234 | |||
| 235 | /* Navigation | ||
| 236 | * ,-----------------------------------------------------------------------------------. | ||
| 237 | * | | | BTN3 | BTN2 | BTN1 | | ACL0 | HOME | PGDN | PGUP | END | Bksp | | ||
| 238 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 239 | * | |MSLEFT| MSDN | MSUP |MSRGHT| | ACL1 | LEFT | DOWN | UP | RGHT |Enter | | ||
| 240 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 241 | * | |WHLEFT| WHDN | WHUP |WHRGHT| | ACL2 |C-LEFT|C-PGDN|C-PGUP|C-RGHT|Enter | | ||
| 242 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 243 | * | | | | | | _ |Space | ACL0 | ACL1 | ACL2 | |TGLNAV| | ||
| 244 | * `-----------------------------------------------------------------------------------' | ||
| 245 | */ | ||
| 246 | |||
| 247 | [_NAV] = { | ||
| 248 | {XXXXXXX, XXXXXXX, KC_BTN3, KC_BTN2, KC_BTN1, XXXXXXX, KC_ACL0, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_BSPC}, | ||
| 249 | {XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, XXXXXXX, KC_ACL1, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,KC_ENT }, | ||
| 250 | {XXXXXXX, KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R, XXXXXXX, KC_ACL2, LCTL(KC_LEFT), LCTL(KC_PGDN), LCTL(KC_PGUP), LCTL(KC_RIGHT), KC_ENT }, | ||
| 251 | {_______, _______, _______, _______, _______, _______, _______, KC_ACL0, KC_ACL1, KC_ACL2, _______, _______} | ||
| 252 | }, | ||
| 253 | |||
| 254 | /* Plover Layer | ||
| 255 | * ,-----------------------------------------------------------------------------------. | ||
| 256 | * | | S | T | P | H | * | * | F | P | L | T | D | | ||
| 257 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 258 | * |TogOut| S | K | W | R | * | * | R | B | G | S | Z | | ||
| 259 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 260 | * | # | # | # | # | # | # | # | # | # | # | # | # | | ||
| 261 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 262 | * | Exit | | | # | A | O | E | U | | | | | | ||
| 263 | * `-----------------------------------------------------------------------------------' | ||
| 264 | */ | ||
| 265 | |||
| 266 | [_PLOVER] = { | ||
| 267 | {XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC}, | ||
| 268 | {XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, | ||
| 269 | {KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 }, | ||
| 270 | {EXT_PLV, XXXXXXX, XXXXXXX, KC_1, KC_C, KC_V, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX} | ||
| 271 | } | ||
| 272 | |||
| 273 | |||
| 274 | }; | ||
| 275 | |||
| 276 | const uint16_t PROGMEM fn_actions[] = { | ||
| 277 | }; | ||
| 278 | |||
| 279 | |||
| 280 | void matrix_init_user(){ | ||
| 281 | set_unicode_input_mode(UC_LNX); | ||
| 282 | } | ||
| 283 | |||
| 284 | |||
| 285 | const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) | ||
| 286 | { | ||
| 287 | switch(id) { | ||
| 288 | case M_ALT_HASH: | ||
| 289 | return MACRO_TAP_SHFT_KEY_HOLD_MOD(record, 3, LALT); | ||
| 290 | case M_GR_DASH: | ||
| 291 | { | ||
| 292 | const macro_t* macro = MACRO_TAP_HOLD_LAYER(record, MACRO(T(MINS)), _GR); | ||
| 293 | update_tri_layer(_NUM, _GR, _ADJ); | ||
| 294 | return macro; | ||
| 295 | } | ||
| 296 | case M_SYM_LPRN: | ||
| 297 | return MACRO_TAP_SHFT_KEY_HOLD_LAYER(record, 9, _SYM); | ||
| 298 | case M_NAV_UNDS: | ||
| 299 | return MACRO_TAP_SHFT_KEY_HOLD_LAYER(record, MINS, _NAV); | ||
| 300 | case M_NUM_RPRN: | ||
| 301 | { | ||
| 302 | const macro_t* macro = MACRO_TAP_SHFT_KEY_HOLD_LAYER(record, 0, _NUM); | ||
| 303 | update_tri_layer(_NUM, _GR, _ADJ); | ||
| 304 | return macro; | ||
| 305 | } | ||
| 306 | case M_CTRL_DLR: | ||
| 307 | return MACRO_TAP_SHFT_KEY_HOLD_MOD(record, 4, LCTL); | ||
| 308 | case M_LCBR_ENT: | ||
| 309 | return MACRODOWN(I(10), D(LSFT), T(LBRC), U(LSFT), T(ENT), END); | ||
| 310 | case M_PLOVER: | ||
| 311 | if (record->event.pressed) { | ||
| 312 | layer_and(0); | ||
| 313 | layer_on(_PLOVER); | ||
| 314 | default_layer_set(_PLOVER); | ||
| 315 | |||
| 316 | // Starts plover | ||
| 317 | return MACRO(I(10), D(E), D(R), D(F), D(V), D(I), D(K), U(E), U(R), U(F), U(V), U(I), U(K), END); | ||
| 318 | } | ||
| 319 | break; | ||
| 320 | case M_EXT_PLV: | ||
| 321 | if (!record->event.pressed) { | ||
| 322 | layer_off(_PLOVER); | ||
| 323 | default_layer_set(_COLEMAK); | ||
| 324 | |||
| 325 | //Pauses plover | ||
| 326 | return MACRO(I(10), D(E), D(R), D(F), D(V), D(Y), D(U), U(E), U(R), U(F), U(V), U(Y), U(U), END); | ||
| 327 | } | ||
| 328 | break; | ||
| 329 | case M_WINDOWS: | ||
| 330 | set_unicode_input_mode(UC_WIN); | ||
| 331 | break; | ||
| 332 | case M_LINUX: | ||
| 333 | set_unicode_input_mode(UC_LNX); | ||
| 334 | break; | ||
| 335 | case M_OSX: | ||
| 336 | set_unicode_input_mode(UC_OSX); | ||
| 337 | break; | ||
| 338 | case M_FUNCTION: | ||
| 339 | if (record->event.pressed) { | ||
| 340 | SEND_STRING("function"); | ||
| 341 | } | ||
| 342 | break; | ||
| 343 | case M_THEN: | ||
| 344 | if (record->event.pressed) { | ||
| 345 | SEND_STRING("then"); | ||
| 346 | } | ||
| 347 | break; | ||
| 348 | case M_CATCH: | ||
| 349 | if (record->event.pressed) { | ||
| 350 | SEND_STRING("catch"); | ||
| 351 | } | ||
| 352 | break; | ||
| 353 | } | ||
| 354 | return MACRO_NONE; | ||
| 355 | }; | ||
diff --git a/keyboards/planck/keymaps/luke/readme.md b/keyboards/planck/keymaps/luke/readme.md new file mode 100644 index 000000000..3a4824b5b --- /dev/null +++ b/keyboards/planck/keymaps/luke/readme.md | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | # A more basic Planck Layout for copying | ||
| 2 | |||
diff --git a/keyboards/planck/keymaps/yale/Makefile b/keyboards/planck/keymaps/yale/Makefile new file mode 100644 index 000000000..581e08cd0 --- /dev/null +++ b/keyboards/planck/keymaps/yale/Makefile | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | |||
| 2 | |||
| 3 | # Build Options | ||
| 4 | # change to "no" to disable the options, or define them in the Makefile in | ||
| 5 | # the appropriate keymap folder that will get included automatically | ||
| 6 | # | ||
| 7 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) | ||
| 8 | MOUSEKEY_ENABLE = yes # Mouse keys(+4700) | ||
| 9 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | ||
| 10 | CONSOLE_ENABLE = no # Console for debug(+400) | ||
| 11 | COMMAND_ENABLE = yes # Commands for debug and configuration | ||
| 12 | NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
| 13 | BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality | ||
| 14 | MIDI_ENABLE = no # MIDI controls | ||
| 15 | AUDIO_ENABLE = yes # Audio output on port C6 | ||
| 16 | UNICODE_ENABLE = no # Unicode | ||
| 17 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | ||
| 18 | RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. | ||
| 19 | |||
| 20 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
| 21 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
| 22 | |||
| 23 | ifndef QUANTUM_DIR | ||
| 24 | include ../../../../Makefile | ||
| 25 | endif \ No newline at end of file | ||
diff --git a/keyboards/planck/keymaps/yale/config.h b/keyboards/planck/keymaps/yale/config.h new file mode 100644 index 000000000..8a916bbd0 --- /dev/null +++ b/keyboards/planck/keymaps/yale/config.h | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | #ifndef CONFIG_USER_H | ||
| 2 | #define CONFIG_USER_H | ||
| 3 | |||
| 4 | #include "../../config.h" | ||
| 5 | |||
| 6 | #define PREVENT_STUCK_MODIFIERS | ||
| 7 | |||
| 8 | #endif | ||
| 9 | |||
| 10 | |||
| 11 | |||
diff --git a/keyboards/planck/keymaps/yale/keymap.c b/keyboards/planck/keymaps/yale/keymap.c new file mode 100644 index 000000000..f2280778a --- /dev/null +++ b/keyboards/planck/keymaps/yale/keymap.c | |||
| @@ -0,0 +1,108 @@ | |||
| 1 | // This is the canonical layout file for the Quantum project. If you want to add another keyboard, | ||
| 2 | // this is the style you want to emulate. | ||
| 3 | // | ||
| 4 | |||
| 5 | #include "planck.h" | ||
| 6 | #ifdef BACKLIGHT_ENABLE | ||
| 7 | #include "backlight.h" | ||
| 8 | #endif | ||
| 9 | |||
| 10 | // Each layer gets a name for readability, which is then used in the keymap matrix below. | ||
| 11 | // The underscores don't mean anything - you can have a layer called STUFF or any other name. | ||
| 12 | // Layer names don't all need to be of the same length, obviously, and you can also skip them | ||
| 13 | // entirely and just use numbers. | ||
| 14 | #define _QWERTY 0 | ||
| 15 | #define _NUM 5 | ||
| 16 | #define _FUNC 6 | ||
| 17 | #define _NAV 7 | ||
| 18 | |||
| 19 | // Fillers to make layering more clear | ||
| 20 | #define _______ KC_TRNS | ||
| 21 | #define XXXXXXX KC_NO | ||
| 22 | |||
| 23 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 24 | |||
| 25 | /* _QWERTY | ||
| 26 | * ,-----------------------------------------------------------------------------------. | ||
| 27 | * | Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp | | ||
| 28 | * |------+------+------+------+------+-------------+------+------+------+------+------| | ||
| 29 | * |Ctrl/Tab| A | S | D | F | G | H | J | K | L | ; | " | | ||
| 30 | * |------+------+------+------+------+------|------+------+------+------+------+------| | ||
| 31 | * | Shift| Z | X | C | V | B | N | M | , | . | / |Shift | | ||
| 32 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 33 | * | Ctrl | Alt | GUI | GUI | Num | Space | FN | GUI | Alt | Ctrl | Enter| | ||
| 34 | * `-----------------------------------------------------------------------------------' | ||
| 35 | */ | ||
| 36 | [_QWERTY] = { | ||
| 37 | {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, | ||
| 38 | {CTL_T(KC_TAB), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, | ||
| 39 | {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT}, | ||
| 40 | {KC_LCTL, KC_LALT, KC_LGUI, KC_LGUI, MO(_NUM), KC_SPC, KC_SPC, MO(_FUNC), KC_RGUI, KC_RALT, KC_RCTL, KC_ENT} | ||
| 41 | }, | ||
| 42 | |||
| 43 | /* _NUM | ||
| 44 | * ,-----------------------------------------------------------------------------------. | ||
| 45 | * | ___ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | ____ | | ||
| 46 | * |------+------+------+------+------+-------------+------+------+------+------+------| | ||
| 47 | * | Ctrl | ` | [ | { | ( | / | \ | ) | } | ] | - | = | | ||
| 48 | * |------+------+------+------+------+------|------+------+------+------+------+------| | ||
| 49 | * | ____ | ! | @ | # | $ | % | ^ | & | * | _ | + | ____ | | ||
| 50 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 51 | * | ____ | ___ | ___ | ___ | XXXX | ______ | ____ | ____ | ____ | __ | ____ | | ||
| 52 | * `-----------------------------------------------------------------------------------' | ||
| 53 | */ | ||
| 54 | [_NUM] = { | ||
| 55 | {_______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______}, | ||
| 56 | {KC_LCTL, KC_GRV, KC_LBRC, KC_LCBR, KC_LPRN, KC_SLSH, KC_BSLS, KC_RPRN, KC_RCBR, KC_RBRC, KC_MINS, KC_EQL}, | ||
| 57 | {_______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_UNDS, KC_PLUS, _______}, | ||
| 58 | {_______, _______, _______, _______, _______, _______, _______, MO(_NAV), _______, _______, _______, _______} | ||
| 59 | }, | ||
| 60 | |||
| 61 | /* _FUNC | ||
| 62 | * ,-----------------------------------------------------------------------------------. | ||
| 63 | * | ____ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | ____ | | ||
| 64 | * |------+------+------+------+------+-------------+------+------+------+------+------| | ||
| 65 | * | ____ |Shift | Ctrl | Alt | GUI | ____ | Left | Down | Up |Right | Del | ____ | | ||
| 66 | * |------+------+------+------+------+------|------+------+------+------+------+------| | ||
| 67 | * | ____ |Light | ____ | Vol- | Prev | Play | Mute | Next | Vol+ | ____ | ____ | ____ | | ||
| 68 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 69 | * | ____ | ____ | ____ | ____ | ____ | _____ | XXXX | ____ | ____ | ____ | ____ | | ||
| 70 | * `-----------------------------------------------------------------------------------' | ||
| 71 | */ | ||
| 72 | [_FUNC] = { | ||
| 73 | {_______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______}, | ||
| 74 | {_______, KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_DEL, _______}, | ||
| 75 | {_______, M(0), _______, KC_VOLD, KC_MPRV, KC_MPLY, KC_MUTE, KC_MNXT, KC_VOLU, _______, _______, _______}, | ||
| 76 | {_______, _______, _______, _______, MO(_NAV), _______, _______, _______, _______, _______, _______, _______} | ||
| 77 | }, | ||
| 78 | |||
| 79 | [_NAV] = { | ||
| 80 | {KC_MS_ACCEL2, KC_FN1, KC_FN2, KC_FN3, KC_FN4, XXXXXXX, XXXXXXX, KC_WH_D, KC_WH_U, XXXXXXX, XXXXXXX, XXXXXXX}, | ||
| 81 | {KC_MS_ACCEL1, KC_MS_BTN4, KC_MS_BTN3, KC_MS_BTN2, KC_MS_BTN1, XXXXXXX, KC_MS_LEFT, KC_MS_DOWN, KC_MS_UP, KC_MS_RIGHT, XXXXXXX, XXXXXXX}, | ||
| 82 | {KC_MS_ACCEL0, KC_FN9, KC_FN10, KC_FN11, KC_FN12, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}, | ||
| 83 | {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX} | ||
| 84 | }, | ||
| 85 | |||
| 86 | }; | ||
| 87 | |||
| 88 | const uint16_t PROGMEM fn_actions[] = { | ||
| 89 | |||
| 90 | }; | ||
| 91 | |||
| 92 | const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) | ||
| 93 | { | ||
| 94 | // MACRODOWN only works in this function | ||
| 95 | switch(id) { | ||
| 96 | case 0: | ||
| 97 | if (record->event.pressed) { | ||
| 98 | register_code(KC_RSFT); | ||
| 99 | #ifdef BACKLIGHT_ENABLE | ||
| 100 | backlight_step(); | ||
| 101 | #endif | ||
| 102 | } else { | ||
| 103 | unregister_code(KC_RSFT); | ||
| 104 | } | ||
| 105 | break; | ||
| 106 | } | ||
| 107 | return MACRO_NONE; | ||
| 108 | }; | ||
diff --git a/keyboards/planck/keymaps/yale/yale_layout_picture.jpg b/keyboards/planck/keymaps/yale/yale_layout_picture.jpg new file mode 100644 index 000000000..ab9c6b4eb --- /dev/null +++ b/keyboards/planck/keymaps/yale/yale_layout_picture.jpg | |||
| Binary files differ | |||
diff --git a/quantum/config_common.h b/quantum/config_common.h index 4bdb2065d..28f68b9c7 100644 --- a/quantum/config_common.h +++ b/quantum/config_common.h | |||
| @@ -2,8 +2,10 @@ | |||
| 2 | #define CONFIG_DEFINITIONS_H | 2 | #define CONFIG_DEFINITIONS_H |
| 3 | 3 | ||
| 4 | /* diode directions */ | 4 | /* diode directions */ |
| 5 | #define COL2ROW 0 | 5 | #define COL2ROW 0 |
| 6 | #define ROW2COL 1 | 6 | #define ROW2COL 1 |
| 7 | #define CUSTOM_MATRIX 2 /* Disables built-in matrix scanning code */ | ||
| 8 | |||
| 7 | /* I/O pins */ | 9 | /* I/O pins */ |
| 8 | #ifndef F0 | 10 | #ifndef F0 |
| 9 | #define B0 0x30 | 11 | #define B0 0x30 |
diff --git a/quantum/keymap_common.c b/quantum/keymap_common.c index eced3d2bb..5190f24e8 100644 --- a/quantum/keymap_common.c +++ b/quantum/keymap_common.c | |||
| @@ -80,7 +80,10 @@ action_t action_for_key(uint8_t layer, keypos_t key) | |||
| 80 | action.code = keymap_function_id_to_action( (int)keycode & 0xFFF ); | 80 | action.code = keymap_function_id_to_action( (int)keycode & 0xFFF ); |
| 81 | break; | 81 | break; |
| 82 | case QK_MACRO ... QK_MACRO_MAX: | 82 | case QK_MACRO ... QK_MACRO_MAX: |
| 83 | action.code = ACTION_MACRO(keycode & 0xFF); | 83 | if (keycode & 0x800) // tap macros have upper bit set |
| 84 | action.code = ACTION_MACRO_TAP(keycode & 0xFF); | ||
| 85 | else | ||
| 86 | action.code = ACTION_MACRO(keycode & 0xFF); | ||
| 84 | break; | 87 | break; |
| 85 | case QK_LAYER_TAP ... QK_LAYER_TAP_MAX: | 88 | case QK_LAYER_TAP ... QK_LAYER_TAP_MAX: |
| 86 | action.code = ACTION_LAYER_TAP_KEY((keycode >> 0x8) & 0xF, keycode & 0xFF); | 89 | action.code = ACTION_LAYER_TAP_KEY((keycode >> 0x8) & 0xF, keycode & 0xFF); |
diff --git a/quantum/light_ws2812.c b/quantum/light_ws2812.c index a883b1388..55bdd9cd8 100755 --- a/quantum/light_ws2812.c +++ b/quantum/light_ws2812.c | |||
| @@ -70,7 +70,7 @@ void I2C_WriteBit(unsigned char c) | |||
| 70 | 70 | ||
| 71 | // Inits bitbanging port, must be called before using the functions below | 71 | // Inits bitbanging port, must be called before using the functions below |
| 72 | // | 72 | // |
| 73 | void I2C_Init() | 73 | void I2C_Init(void) |
| 74 | { | 74 | { |
| 75 | I2C_PORT &= ~ ((1 << I2C_DAT) | (1 << I2C_CLK)); | 75 | I2C_PORT &= ~ ((1 << I2C_DAT) | (1 << I2C_CLK)); |
| 76 | 76 | ||
| @@ -82,7 +82,7 @@ void I2C_Init() | |||
| 82 | 82 | ||
| 83 | // Send a START Condition | 83 | // Send a START Condition |
| 84 | // | 84 | // |
| 85 | void I2C_Start() | 85 | void I2C_Start(void) |
| 86 | { | 86 | { |
| 87 | // set both to high at the same time | 87 | // set both to high at the same time |
| 88 | I2C_DDR &= ~ ((1 << I2C_DAT) | (1 << I2C_CLK)); | 88 | I2C_DDR &= ~ ((1 << I2C_DAT) | (1 << I2C_CLK)); |
| @@ -97,7 +97,7 @@ void I2C_Start() | |||
| 97 | 97 | ||
| 98 | // Send a STOP Condition | 98 | // Send a STOP Condition |
| 99 | // | 99 | // |
| 100 | void I2C_Stop() | 100 | void I2C_Stop(void) |
| 101 | { | 101 | { |
| 102 | I2C_CLOCK_HI(); | 102 | I2C_CLOCK_HI(); |
| 103 | _delay_us(I2C_DELAY); | 103 | _delay_us(I2C_DELAY); |
diff --git a/quantum/matrix.c b/quantum/matrix.c index 07eb87bc3..ac523482a 100644 --- a/quantum/matrix.c +++ b/quantum/matrix.c | |||
| @@ -60,13 +60,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 60 | extern const matrix_row_t matrix_mask[]; | 60 | extern const matrix_row_t matrix_mask[]; |
| 61 | #endif | 61 | #endif |
| 62 | 62 | ||
| 63 | #if (DIODE_DIRECTION == ROW2COL) || (DIODE_DIRECTION == COL2ROW) | ||
| 63 | static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; | 64 | static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; |
| 64 | static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; | 65 | static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; |
| 66 | #endif | ||
| 65 | 67 | ||
| 66 | /* matrix state(1:on, 0:off) */ | 68 | /* matrix state(1:on, 0:off) */ |
| 67 | static matrix_row_t matrix[MATRIX_ROWS]; | 69 | static matrix_row_t matrix[MATRIX_ROWS]; |
| 68 | 70 | ||
| 69 | static matrix_row_t matrix_raw[MATRIX_ROWS]; | ||
| 70 | static matrix_row_t matrix_debouncing[MATRIX_ROWS]; | 71 | static matrix_row_t matrix_debouncing[MATRIX_ROWS]; |
| 71 | 72 | ||
| 72 | 73 | ||
| @@ -76,7 +77,7 @@ static matrix_row_t matrix_debouncing[MATRIX_ROWS]; | |||
| 76 | static void unselect_rows(void); | 77 | static void unselect_rows(void); |
| 77 | static void select_row(uint8_t row); | 78 | static void select_row(uint8_t row); |
| 78 | static void unselect_row(uint8_t row); | 79 | static void unselect_row(uint8_t row); |
| 79 | #else // ROW2COL | 80 | #elif (DIODE_DIRECTION == ROW2COL) |
| 80 | static void init_rows(void); | 81 | static void init_rows(void); |
| 81 | static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col); | 82 | static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col); |
| 82 | static void unselect_cols(void); | 83 | static void unselect_cols(void); |
| @@ -133,7 +134,7 @@ uint8_t matrix_cols(void) { | |||
| 133 | // /* PORTxn */ | 134 | // /* PORTxn */ |
| 134 | // _SFR_IO8((col_pins[c] >> 4) + 2) |= _BV(col_pins[c] & 0xF); | 135 | // _SFR_IO8((col_pins[c] >> 4) + 2) |= _BV(col_pins[c] & 0xF); |
| 135 | // } | 136 | // } |
| 136 | // #else | 137 | // #elif (DIODE_DIRECTION == ROW2COL) |
| 137 | // for (int8_t c = MATRIX_COLS - 1; c >= 0; --c) { | 138 | // for (int8_t c = MATRIX_COLS - 1; c >= 0; --c) { |
| 138 | // /* DDRxn */ | 139 | // /* DDRxn */ |
| 139 | // _SFR_IO8((col_pins[c] >> 4) + 1) |= _BV(col_pins[c] & 0xF); | 140 | // _SFR_IO8((col_pins[c] >> 4) + 1) |= _BV(col_pins[c] & 0xF); |
| @@ -158,7 +159,7 @@ void matrix_init(void) { | |||
| 158 | #if (DIODE_DIRECTION == COL2ROW) | 159 | #if (DIODE_DIRECTION == COL2ROW) |
| 159 | unselect_rows(); | 160 | unselect_rows(); |
| 160 | init_cols(); | 161 | init_cols(); |
| 161 | #else // ROW2COL | 162 | #elif (DIODE_DIRECTION == ROW2COL) |
| 162 | unselect_cols(); | 163 | unselect_cols(); |
| 163 | init_rows(); | 164 | init_rows(); |
| 164 | #endif | 165 | #endif |
| @@ -166,7 +167,6 @@ void matrix_init(void) { | |||
| 166 | // initialize matrix state: all keys off | 167 | // initialize matrix state: all keys off |
| 167 | for (uint8_t i=0; i < MATRIX_ROWS; i++) { | 168 | for (uint8_t i=0; i < MATRIX_ROWS; i++) { |
| 168 | matrix[i] = 0; | 169 | matrix[i] = 0; |
| 169 | matrix_raw[i] = 0; | ||
| 170 | matrix_debouncing[i] = 0; | 170 | matrix_debouncing[i] = 0; |
| 171 | } | 171 | } |
| 172 | 172 | ||
| @@ -194,7 +194,7 @@ uint8_t matrix_scan(void) | |||
| 194 | 194 | ||
| 195 | } | 195 | } |
| 196 | 196 | ||
| 197 | #else // ROW2COL | 197 | #elif (DIODE_DIRECTION == ROW2COL) |
| 198 | 198 | ||
| 199 | // Set col, read rows | 199 | // Set col, read rows |
| 200 | for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) { | 200 | for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) { |
| @@ -336,7 +336,7 @@ static void unselect_rows(void) | |||
| 336 | } | 336 | } |
| 337 | } | 337 | } |
| 338 | 338 | ||
| 339 | #else // ROW2COL | 339 | #elif (DIODE_DIRECTION == ROW2COL) |
| 340 | 340 | ||
| 341 | static void init_rows(void) | 341 | static void init_rows(void) |
| 342 | { | 342 | { |
diff --git a/quantum/quantum.c b/quantum/quantum.c index b83ae433e..d3905decf 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c | |||
| @@ -1,4 +1,7 @@ | |||
| 1 | #include "quantum.h" | 1 | #include "quantum.h" |
| 2 | #ifdef PROTOCOL_LUFA | ||
| 3 | #include "outputselect.h" | ||
| 4 | #endif | ||
| 2 | 5 | ||
| 3 | #ifndef TAPPING_TERM | 6 | #ifndef TAPPING_TERM |
| 4 | #define TAPPING_TERM 200 | 7 | #define TAPPING_TERM 200 |
| @@ -243,6 +246,36 @@ bool process_record_quantum(keyrecord_t *record) { | |||
| 243 | return false; | 246 | return false; |
| 244 | break; | 247 | break; |
| 245 | #endif | 248 | #endif |
| 249 | #ifdef PROTOCOL_LUFA | ||
| 250 | case OUT_AUTO: | ||
| 251 | if (record->event.pressed) { | ||
| 252 | set_output(OUTPUT_AUTO); | ||
| 253 | } | ||
| 254 | return false; | ||
| 255 | break; | ||
| 256 | case OUT_USB: | ||
| 257 | if (record->event.pressed) { | ||
| 258 | set_output(OUTPUT_USB); | ||
| 259 | } | ||
| 260 | return false; | ||
| 261 | break; | ||
| 262 | #ifdef BLUETOOTH_ENABLE | ||
| 263 | case OUT_BT: | ||
| 264 | if (record->event.pressed) { | ||
| 265 | set_output(OUTPUT_BLUETOOTH); | ||
| 266 | } | ||
| 267 | return false; | ||
| 268 | break; | ||
| 269 | #endif | ||
| 270 | #ifdef ADAFRUIT_BLE_ENABLE | ||
| 271 | case OUT_BLE: | ||
| 272 | if (record->event.pressed) { | ||
| 273 | set_output(OUTPUT_ADAFRUIT_BLE); | ||
| 274 | } | ||
| 275 | return false; | ||
| 276 | break; | ||
| 277 | #endif | ||
| 278 | #endif | ||
| 246 | case MAGIC_SWAP_CONTROL_CAPSLOCK ... MAGIC_TOGGLE_NKRO: | 279 | case MAGIC_SWAP_CONTROL_CAPSLOCK ... MAGIC_TOGGLE_NKRO: |
| 247 | if (record->event.pressed) { | 280 | if (record->event.pressed) { |
| 248 | // MAGIC actions (BOOTMAGIC without the boot) | 281 | // MAGIC actions (BOOTMAGIC without the boot) |
diff --git a/quantum/quantum.h b/quantum/quantum.h index 8614c053a..18f072189 100644 --- a/quantum/quantum.h +++ b/quantum/quantum.h | |||
| @@ -15,7 +15,6 @@ | |||
| 15 | #ifdef RGBLIGHT_ENABLE | 15 | #ifdef RGBLIGHT_ENABLE |
| 16 | #include "rgblight.h" | 16 | #include "rgblight.h" |
| 17 | #endif | 17 | #endif |
| 18 | |||
| 19 | #include "action_layer.h" | 18 | #include "action_layer.h" |
| 20 | #include "eeconfig.h" | 19 | #include "eeconfig.h" |
| 21 | #include <stddef.h> | 20 | #include <stddef.h> |
diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index 91324be35..8a78a58c9 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h | |||
| @@ -141,6 +141,16 @@ enum quantum_keycodes { | |||
| 141 | PRINT_ON, | 141 | PRINT_ON, |
| 142 | PRINT_OFF, | 142 | PRINT_OFF, |
| 143 | 143 | ||
| 144 | // output selection | ||
| 145 | OUT_AUTO, | ||
| 146 | OUT_USB, | ||
| 147 | #ifdef BLUETOOTH_ENABLE | ||
| 148 | OUT_BT, | ||
| 149 | #endif | ||
| 150 | #ifdef ADAFRUIT_BLE_ENABLE | ||
| 151 | OUT_BLE, | ||
| 152 | #endif | ||
| 153 | |||
| 144 | // always leave at the end | 154 | // always leave at the end |
| 145 | SAFE_RANGE | 155 | SAFE_RANGE |
| 146 | }; | 156 | }; |
| @@ -246,8 +256,10 @@ enum quantum_keycodes { | |||
| 246 | 256 | ||
| 247 | #define M(kc) (kc | QK_MACRO) | 257 | #define M(kc) (kc | QK_MACRO) |
| 248 | 258 | ||
| 259 | #define MACROTAP(kc) (kc | QK_MACRO | FUNC_TAP<<8) | ||
| 249 | #define MACRODOWN(...) (record->event.pressed ? MACRO(__VA_ARGS__) : MACRO_NONE) | 260 | #define MACRODOWN(...) (record->event.pressed ? MACRO(__VA_ARGS__) : MACRO_NONE) |
| 250 | 261 | ||
| 262 | |||
| 251 | // L-ayer, T-ap - 256 keycode max, 16 layer max | 263 | // L-ayer, T-ap - 256 keycode max, 16 layer max |
| 252 | #define LT(layer, kc) (kc | QK_LAYER_TAP | ((layer & 0xF) << 8)) | 264 | #define LT(layer, kc) (kc | QK_LAYER_TAP | ((layer & 0xF) << 8)) |
| 253 | 265 | ||
diff --git a/quantum/rgblight.c b/quantum/rgblight.c index 52a09817a..dd1b91c63 100644 --- a/quantum/rgblight.c +++ b/quantum/rgblight.c | |||
| @@ -66,6 +66,8 @@ __attribute__ ((weak)) | |||
| 66 | const uint8_t RGBLED_SNAKE_INTERVALS[] PROGMEM = {100, 50, 20}; | 66 | const uint8_t RGBLED_SNAKE_INTERVALS[] PROGMEM = {100, 50, 20}; |
| 67 | __attribute__ ((weak)) | 67 | __attribute__ ((weak)) |
| 68 | const uint8_t RGBLED_KNIGHT_INTERVALS[] PROGMEM = {100, 50, 20}; | 68 | const uint8_t RGBLED_KNIGHT_INTERVALS[] PROGMEM = {100, 50, 20}; |
| 69 | __attribute__ ((weak)) | ||
| 70 | const uint16_t RGBLED_GRADIENT_RANGES[] PROGMEM = {360, 240, 180, 120, 90}; | ||
| 69 | 71 | ||
| 70 | rgblight_config_t rgblight_config; | 72 | rgblight_config_t rgblight_config; |
| 71 | rgblight_config_t inmem_config; | 73 | rgblight_config_t inmem_config; |
| @@ -219,6 +221,14 @@ void rgblight_step(void) { | |||
| 219 | } | 221 | } |
| 220 | rgblight_mode(mode); | 222 | rgblight_mode(mode); |
| 221 | } | 223 | } |
| 224 | void rgblight_step_reverse(void) { | ||
| 225 | uint8_t mode = 0; | ||
| 226 | mode = rgblight_config.mode - 1; | ||
| 227 | if (mode < 1) { | ||
| 228 | mode = RGBLIGHT_MODES; | ||
| 229 | } | ||
| 230 | rgblight_mode(mode); | ||
| 231 | } | ||
| 222 | 232 | ||
| 223 | void rgblight_mode(uint8_t mode) { | 233 | void rgblight_mode(uint8_t mode) { |
| 224 | if (!rgblight_config.enable) { | 234 | if (!rgblight_config.enable) { |
| @@ -237,7 +247,7 @@ void rgblight_mode(uint8_t mode) { | |||
| 237 | #ifdef RGBLIGHT_ANIMATIONS | 247 | #ifdef RGBLIGHT_ANIMATIONS |
| 238 | rgblight_timer_disable(); | 248 | rgblight_timer_disable(); |
| 239 | #endif | 249 | #endif |
| 240 | } else if (rgblight_config.mode >= 2 && rgblight_config.mode <= 23) { | 250 | } else if (rgblight_config.mode >= 2 && rgblight_config.mode <= 24) { |
| 241 | // MODE 2-5, breathing | 251 | // MODE 2-5, breathing |
| 242 | // MODE 6-8, rainbow mood | 252 | // MODE 6-8, rainbow mood |
| 243 | // MODE 9-14, rainbow swirl | 253 | // MODE 9-14, rainbow swirl |
| @@ -247,6 +257,12 @@ void rgblight_mode(uint8_t mode) { | |||
| 247 | #ifdef RGBLIGHT_ANIMATIONS | 257 | #ifdef RGBLIGHT_ANIMATIONS |
| 248 | rgblight_timer_enable(); | 258 | rgblight_timer_enable(); |
| 249 | #endif | 259 | #endif |
| 260 | } else if (rgblight_config.mode >= 25 && rgblight_config.mode <= 34) { | ||
| 261 | // MODE 25-34, static gradient | ||
| 262 | |||
| 263 | #ifdef RGBLIGHT_ANIMATIONS | ||
| 264 | rgblight_timer_disable(); | ||
| 265 | #endif | ||
| 250 | } | 266 | } |
| 251 | rgblight_sethsv(rgblight_config.hue, rgblight_config.sat, rgblight_config.val); | 267 | rgblight_sethsv(rgblight_config.hue, rgblight_config.sat, rgblight_config.val); |
| 252 | } | 268 | } |
| @@ -350,6 +366,17 @@ void rgblight_sethsv(uint16_t hue, uint8_t sat, uint8_t val) { | |||
| 350 | } else if (rgblight_config.mode >= 6 && rgblight_config.mode <= 14) { | 366 | } else if (rgblight_config.mode >= 6 && rgblight_config.mode <= 14) { |
| 351 | // rainbow mood and rainbow swirl, ignore the change of hue | 367 | // rainbow mood and rainbow swirl, ignore the change of hue |
| 352 | hue = rgblight_config.hue; | 368 | hue = rgblight_config.hue; |
| 369 | } else if (rgblight_config.mode >= 25 && rgblight_config.mode <= 34) { | ||
| 370 | // static gradient | ||
| 371 | uint16_t _hue; | ||
| 372 | int8_t direction = ((rgblight_config.mode - 25) % 2) ? -1 : 1; | ||
| 373 | uint16_t range = pgm_read_word(&RGBLED_GRADIENT_RANGES[(rgblight_config.mode - 25) / 2]); | ||
| 374 | for (uint8_t i = 0; i < RGBLED_NUM; i++) { | ||
| 375 | _hue = (range / RGBLED_NUM * i * direction + hue + 360) % 360; | ||
| 376 | dprintf("rgblight rainbow set hsv: %u,%u,%d,%u\n", i, _hue, direction, range); | ||
| 377 | sethsv(_hue, sat, val, (LED_TYPE *)&led[i]); | ||
| 378 | } | ||
| 379 | rgblight_set(); | ||
| 353 | } | 380 | } |
| 354 | } | 381 | } |
| 355 | rgblight_config.hue = hue; | 382 | rgblight_config.hue = hue; |
| @@ -450,7 +477,7 @@ void rgblight_task(void) { | |||
| 450 | } else if (rgblight_config.mode >= 21 && rgblight_config.mode <= 23) { | 477 | } else if (rgblight_config.mode >= 21 && rgblight_config.mode <= 23) { |
| 451 | // mode = 21 to 23, knight mode | 478 | // mode = 21 to 23, knight mode |
| 452 | rgblight_effect_knight(rgblight_config.mode - 21); | 479 | rgblight_effect_knight(rgblight_config.mode - 21); |
| 453 | } else { | 480 | } else if (rgblight_config.mode == 24) { |
| 454 | // mode = 24, christmas mode | 481 | // mode = 24, christmas mode |
| 455 | rgblight_effect_christmas(); | 482 | rgblight_effect_christmas(); |
| 456 | } | 483 | } |
| @@ -604,13 +631,13 @@ void rgblight_effect_christmas(void) { | |||
| 604 | static uint16_t last_timer = 0; | 631 | static uint16_t last_timer = 0; |
| 605 | uint16_t hue; | 632 | uint16_t hue; |
| 606 | uint8_t i; | 633 | uint8_t i; |
| 607 | if (timer_elapsed(last_timer) < 1000) { | 634 | if (timer_elapsed(last_timer) < RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL) { |
| 608 | return; | 635 | return; |
| 609 | } | 636 | } |
| 610 | last_timer = timer_read(); | 637 | last_timer = timer_read(); |
| 611 | current_offset = (current_offset + 1) % 2; | 638 | current_offset = (current_offset + 1) % 2; |
| 612 | for (i = 0; i < RGBLED_NUM; i++) { | 639 | for (i = 0; i < RGBLED_NUM; i++) { |
| 613 | hue = 0 + ((RGBLED_NUM * (i + current_offset)) % 2) * 80; | 640 | hue = 0 + ((i/RGBLIGHT_EFFECT_CHRISTMAS_STEP + current_offset) % 2) * 120; |
| 614 | sethsv(hue, rgblight_config.sat, rgblight_config.val, (LED_TYPE *)&led[i]); | 641 | sethsv(hue, rgblight_config.sat, rgblight_config.val, (LED_TYPE *)&led[i]); |
| 615 | } | 642 | } |
| 616 | rgblight_set(); | 643 | rgblight_set(); |
diff --git a/quantum/rgblight.h b/quantum/rgblight.h index 726b8de72..2b3e791bf 100644 --- a/quantum/rgblight.h +++ b/quantum/rgblight.h | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | #define RGBLIGHT_H | 2 | #define RGBLIGHT_H |
| 3 | 3 | ||
| 4 | #ifdef RGBLIGHT_ANIMATIONS | 4 | #ifdef RGBLIGHT_ANIMATIONS |
| 5 | #define RGBLIGHT_MODES 24 | 5 | #define RGBLIGHT_MODES 34 |
| 6 | #else | 6 | #else |
| 7 | #define RGBLIGHT_MODES 1 | 7 | #define RGBLIGHT_MODES 1 |
| 8 | #endif | 8 | #endif |
| @@ -22,6 +22,14 @@ | |||
| 22 | #define RGBLIGHT_EFFECT_DUALKNIGHT_LENGTH 4 | 22 | #define RGBLIGHT_EFFECT_DUALKNIGHT_LENGTH 4 |
| 23 | #endif | 23 | #endif |
| 24 | 24 | ||
| 25 | #ifndef RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL | ||
| 26 | #define RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL 1000 | ||
| 27 | #endif | ||
| 28 | |||
| 29 | #ifndef RGBLIGHT_EFFECT_CHRISTMAS_STEP | ||
| 30 | #define RGBLIGHT_EFFECT_CHRISTMAS_STEP 2 | ||
| 31 | #endif | ||
| 32 | |||
| 25 | #ifndef RGBLIGHT_HUE_STEP | 33 | #ifndef RGBLIGHT_HUE_STEP |
| 26 | #define RGBLIGHT_HUE_STEP 10 | 34 | #define RGBLIGHT_HUE_STEP 10 |
| 27 | #endif | 35 | #endif |
| @@ -65,6 +73,7 @@ void rgblight_decrease(void); | |||
| 65 | void rgblight_toggle(void); | 73 | void rgblight_toggle(void); |
| 66 | void rgblight_enable(void); | 74 | void rgblight_enable(void); |
| 67 | void rgblight_step(void); | 75 | void rgblight_step(void); |
| 76 | void rgblight_step_reverse(void); | ||
| 68 | void rgblight_mode(uint8_t mode); | 77 | void rgblight_mode(uint8_t mode); |
| 69 | void rgblight_set(void); | 78 | void rgblight_set(void); |
| 70 | void rgblight_update_dword(uint32_t dword); | 79 | void rgblight_update_dword(uint32_t dword); |
diff --git a/quantum/template/config.h b/quantum/template/config.h index b02f0c7eb..c61c4a618 100644 --- a/quantum/template/config.h +++ b/quantum/template/config.h | |||
| @@ -46,7 +46,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 46 | #define MATRIX_COL_PINS { F1, F0, B0 } | 46 | #define MATRIX_COL_PINS { F1, F0, B0 } |
| 47 | #define UNUSED_PINS | 47 | #define UNUSED_PINS |
| 48 | 48 | ||
| 49 | /* COL2ROW or ROW2COL */ | 49 | /* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ |
| 50 | #define DIODE_DIRECTION COL2ROW | 50 | #define DIODE_DIRECTION COL2ROW |
| 51 | 51 | ||
| 52 | // #define BACKLIGHT_PIN B7 | 52 | // #define BACKLIGHT_PIN B7 |
diff --git a/tmk_core/common/action_code.h b/tmk_core/common/action_code.h index 33da35f35..b15aaa0eb 100644 --- a/tmk_core/common/action_code.h +++ b/tmk_core/common/action_code.h | |||
| @@ -47,10 +47,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 47 | * 0100|10| usage(10) (reserved) | 47 | * 0100|10| usage(10) (reserved) |
| 48 | * 0100|11| usage(10) (reserved) | 48 | * 0100|11| usage(10) (reserved) |
| 49 | * | 49 | * |
| 50 | * ACT_MOUSEKEY(0110): TODO: Not needed? | 50 | * |
| 51 | * ACT_MOUSEKEY(0101): TODO: Merge these two actions to conserve space? | ||
| 51 | * 0101|xxxx| keycode Mouse key | 52 | * 0101|xxxx| keycode Mouse key |
| 52 | * | 53 | * |
| 53 | * 011x|xxxx xxxx xxxx (reseved) | 54 | * ACT_SWAP_HANDS(0110): |
| 55 | * 0110|xxxx| keycode Swap hands (keycode on tap, or options) | ||
| 56 | * | ||
| 57 | * | ||
| 58 | * 0111|xxxx xxxx xxxx (reserved) | ||
| 54 | * | 59 | * |
| 55 | * | 60 | * |
| 56 | * Layer Actions(10xx) | 61 | * Layer Actions(10xx) |
| @@ -67,7 +72,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 67 | * ee: on event(01:press, 10:release, 11:both) | 72 | * ee: on event(01:press, 10:release, 11:both) |
| 68 | * | 73 | * |
| 69 | * 1001|xxxx|xxxx xxxx (reserved) | 74 | * 1001|xxxx|xxxx xxxx (reserved) |
| 70 | * 1001|oopp|BBBB BBBB 8-bit Bitwise Operation??? | ||
| 71 | * | 75 | * |
| 72 | * ACT_LAYER_TAP(101x): | 76 | * ACT_LAYER_TAP(101x): |
| 73 | * 101E|LLLL| keycode On/Off with tap key (0x00-DF)[TAP] | 77 | * 101E|LLLL| keycode On/Off with tap key (0x00-DF)[TAP] |
diff --git a/tmk_core/common/action_macro.h b/tmk_core/common/action_macro.h index aedc32ec6..f373f5068 100644 --- a/tmk_core/common/action_macro.h +++ b/tmk_core/common/action_macro.h | |||
| @@ -20,11 +20,33 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 20 | #include "progmem.h" | 20 | #include "progmem.h" |
| 21 | 21 | ||
| 22 | 22 | ||
| 23 | #define MACRO_NONE 0 | 23 | |
| 24 | typedef uint8_t macro_t; | ||
| 25 | |||
| 26 | #define MACRO_NONE (macro_t*)0 | ||
| 24 | #define MACRO(...) ({ static const macro_t __m[] PROGMEM = { __VA_ARGS__ }; &__m[0]; }) | 27 | #define MACRO(...) ({ static const macro_t __m[] PROGMEM = { __VA_ARGS__ }; &__m[0]; }) |
| 25 | #define MACRO_GET(p) pgm_read_byte(p) | 28 | #define MACRO_GET(p) pgm_read_byte(p) |
| 26 | 29 | ||
| 27 | typedef uint8_t macro_t; | 30 | // Sends press when the macro key is pressed, release when release, or tap_macro when the key has been tapped |
| 31 | #define MACRO_TAP_HOLD(record, press, release, tap_macro) ( ((record)->event.pressed) ? \ | ||
| 32 | ( ((record)->tap.count <= 0 || (record)->tap.interrupted) ? (press) : MACRO_NONE ) : \ | ||
| 33 | ( ((record)->tap.count > 0 && !((record)->tap.interrupted)) ? (tap_macro) : (release) ) ) | ||
| 34 | |||
| 35 | // Holds down the modifier mod when the macro key is held, or sends macro instead when tapped | ||
| 36 | #define MACRO_TAP_HOLD_MOD(record, macro, mod) MACRO_TAP_HOLD(record, (MACRO(D(mod), END)), MACRO(U(mod), END), macro) | ||
| 37 | |||
| 38 | // Holds down the modifier mod when the macro key is held, or pressed a shifted key when tapped (eg: shift+3 for #) | ||
| 39 | #define MACRO_TAP_SHFT_KEY_HOLD_MOD(record, key, mod) MACRO_TAP_HOLD_MOD(record, (MACRO(I(10), D(LSFT), T(key), U(LSFT), END)), mod) | ||
| 40 | |||
| 41 | |||
| 42 | // Momentary switch layer when held, sends macro if tapped | ||
| 43 | #define MACRO_TAP_HOLD_LAYER(record, macro, layer) ( ((record)->event.pressed) ? \ | ||
| 44 | ( ((record)->tap.count <= 0 || (record)->tap.interrupted) ? ({layer_on((layer)); MACRO_NONE; }) : MACRO_NONE ) : \ | ||
| 45 | ( ((record)->tap.count > 0 && !((record)->tap.interrupted)) ? (macro) : ({layer_off((layer)); MACRO_NONE; }) ) ) | ||
| 46 | |||
| 47 | // Momentary switch layer when held, presses a shifted key when tapped (eg: shift+3 for #) | ||
| 48 | #define MACRO_TAP_SHFT_KEY_HOLD_LAYER(record, key, layer) MACRO_TAP_HOLD_LAYER(record, MACRO(I(10), D(LSFT), T(key), U(LSFT), END), layer) | ||
| 49 | |||
| 28 | 50 | ||
| 29 | 51 | ||
| 30 | #ifndef NO_ACTION_MACRO | 52 | #ifndef NO_ACTION_MACRO |
diff --git a/tmk_core/common/keyboard.c b/tmk_core/common/keyboard.c index 765350792..3aa82231b 100644 --- a/tmk_core/common/keyboard.c +++ b/tmk_core/common/keyboard.c | |||
| @@ -14,6 +14,7 @@ GNU General Public License for more details. | |||
| 14 | You should have received a copy of the GNU General Public License | 14 | You should have received a copy of the GNU General Public License |
| 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 16 | */ | 16 | */ |
| 17 | |||
| 17 | #include <stdint.h> | 18 | #include <stdint.h> |
| 18 | #include "keyboard.h" | 19 | #include "keyboard.h" |
| 19 | #include "matrix.h" | 20 | #include "matrix.h" |
diff --git a/tmk_core/common/matrix.h b/tmk_core/common/matrix.h index cee3593ee..2543f5abc 100644 --- a/tmk_core/common/matrix.h +++ b/tmk_core/common/matrix.h | |||
| @@ -50,7 +50,7 @@ void matrix_init(void); | |||
| 50 | uint8_t matrix_scan(void); | 50 | uint8_t matrix_scan(void); |
| 51 | /* whether modified from previous scan. used after matrix_scan. */ | 51 | /* whether modified from previous scan. used after matrix_scan. */ |
| 52 | bool matrix_is_modified(void) __attribute__ ((deprecated)); | 52 | bool matrix_is_modified(void) __attribute__ ((deprecated)); |
| 53 | /* whether a swtich is on */ | 53 | /* whether a switch is on */ |
| 54 | bool matrix_is_on(uint8_t row, uint8_t col); | 54 | bool matrix_is_on(uint8_t row, uint8_t col); |
| 55 | /* matrix state on row */ | 55 | /* matrix state on row */ |
| 56 | matrix_row_t matrix_get_row(uint8_t row); | 56 | matrix_row_t matrix_get_row(uint8_t row); |
diff --git a/tmk_core/common/report.h b/tmk_core/common/report.h index 0c799eca3..8fb28b6ce 100644 --- a/tmk_core/common/report.h +++ b/tmk_core/common/report.h | |||
| @@ -134,13 +134,6 @@ typedef union { | |||
| 134 | } nkro; | 134 | } nkro; |
| 135 | #endif | 135 | #endif |
| 136 | } __attribute__ ((packed)) report_keyboard_t; | 136 | } __attribute__ ((packed)) report_keyboard_t; |
| 137 | /* | ||
| 138 | typedef struct { | ||
| 139 | uint8_t mods; | ||
| 140 | uint8_t reserved; | ||
| 141 | uint8_t keys[REPORT_KEYS]; | ||
| 142 | } __attribute__ ((packed)) report_keyboard_t; | ||
| 143 | */ | ||
| 144 | 137 | ||
| 145 | typedef struct { | 138 | typedef struct { |
| 146 | uint8_t buttons; | 139 | uint8_t buttons; |
diff --git a/tmk_core/protocol/lufa.mk b/tmk_core/protocol/lufa.mk index 151d26cbc..de0cc795f 100644 --- a/tmk_core/protocol/lufa.mk +++ b/tmk_core/protocol/lufa.mk | |||
| @@ -8,13 +8,14 @@ LUFA_PATH ?= $(LUFA_DIR)/LUFA-git | |||
| 8 | ifneq (, $(wildcard $(TMK_PATH)/$(LUFA_PATH)/LUFA/Build/lufa_sources.mk)) | 8 | ifneq (, $(wildcard $(TMK_PATH)/$(LUFA_PATH)/LUFA/Build/lufa_sources.mk)) |
| 9 | # New build system from 20120730 | 9 | # New build system from 20120730 |
| 10 | LUFA_ROOT_PATH = $(LUFA_PATH)/LUFA | 10 | LUFA_ROOT_PATH = $(LUFA_PATH)/LUFA |
| 11 | include $(TMK_PATH)/$(LUFA_PATH)/LUFA/Build/lufa_sources.mk | 11 | include $(TMK_PATH)/$(LUFA_PATH)/LUFA/Build/lufa_sources.mk |
| 12 | else | 12 | else |
| 13 | include $(TMK_PATH)/$(LUFA_PATH)/LUFA/makefile | 13 | include $(TMK_PATH)/$(LUFA_PATH)/LUFA/makefile |
| 14 | endif | 14 | endif |
| 15 | 15 | ||
| 16 | LUFA_SRC = lufa.c \ | 16 | LUFA_SRC = lufa.c \ |
| 17 | descriptor.c \ | 17 | descriptor.c \ |
| 18 | outputselect.c \ | ||
| 18 | $(LUFA_SRC_USB) | 19 | $(LUFA_SRC_USB) |
| 19 | 20 | ||
| 20 | ifeq ($(strip $(MIDI_ENABLE)), yes) | 21 | ifeq ($(strip $(MIDI_ENABLE)), yes) |
diff --git a/tmk_core/protocol/lufa/lufa.c b/tmk_core/protocol/lufa/lufa.c index 6dd5959dc..ba49284c9 100644 --- a/tmk_core/protocol/lufa/lufa.c +++ b/tmk_core/protocol/lufa/lufa.c | |||
| @@ -53,6 +53,7 @@ | |||
| 53 | #include "lufa.h" | 53 | #include "lufa.h" |
| 54 | #include "quantum.h" | 54 | #include "quantum.h" |
| 55 | #include <util/atomic.h> | 55 | #include <util/atomic.h> |
| 56 | #include "outputselect.h" | ||
| 56 | 57 | ||
| 57 | #ifdef NKRO_ENABLE | 58 | #ifdef NKRO_ENABLE |
| 58 | #include "keycode_config.h" | 59 | #include "keycode_config.h" |
| @@ -589,59 +590,33 @@ void EVENT_USB_Device_ControlRequest(void) | |||
| 589 | 590 | ||
| 590 | /******************************************************************************* | 591 | /******************************************************************************* |
| 591 | * Host driver | 592 | * Host driver |
| 592 | p | ||
| 593 | ******************************************************************************/ | 593 | ******************************************************************************/ |
| 594 | static uint8_t keyboard_leds(void) | 594 | static uint8_t keyboard_leds(void) |
| 595 | { | 595 | { |
| 596 | return keyboard_led_stats; | 596 | return keyboard_led_stats; |
| 597 | } | 597 | } |
| 598 | 598 | ||
| 599 | #define SendToUSB 1 | ||
| 600 | #define SendToBT 2 | ||
| 601 | #define SendToBLE 4 | ||
| 602 | |||
| 603 | static inline uint8_t where_to_send(void) { | ||
| 604 | #ifdef ADAFRUIT_BLE_ENABLE | ||
| 605 | #if 0 | ||
| 606 | if (adafruit_ble_is_connected()) { | ||
| 607 | // For testing, send to BLE as a priority | ||
| 608 | return SendToBLE; | ||
| 609 | } | ||
| 610 | #endif | ||
| 611 | |||
| 612 | // This is the real policy | ||
| 613 | if (USB_DeviceState != DEVICE_STATE_Configured) { | ||
| 614 | if (adafruit_ble_is_connected()) { | ||
| 615 | return SendToBLE; | ||
| 616 | } | ||
| 617 | } | ||
| 618 | #endif | ||
| 619 | return ((USB_DeviceState == DEVICE_STATE_Configured) ? SendToUSB : 0) | ||
| 620 | #ifdef BLUETOOTH_ENABLE | ||
| 621 | || SendToBT | ||
| 622 | #endif | ||
| 623 | ; | ||
| 624 | } | ||
| 625 | |||
| 626 | static void send_keyboard(report_keyboard_t *report) | 599 | static void send_keyboard(report_keyboard_t *report) |
| 627 | { | 600 | { |
| 601 | uint8_t timeout = 255; | ||
| 602 | uint8_t where = where_to_send(); | ||
| 603 | |||
| 628 | #ifdef BLUETOOTH_ENABLE | 604 | #ifdef BLUETOOTH_ENABLE |
| 629 | bluefruit_serial_send(0xFD); | 605 | if (where == OUTPUT_BLUETOOTH || where == OUTPUT_USB_AND_BT) { |
| 630 | for (uint8_t i = 0; i < KEYBOARD_EPSIZE; i++) { | 606 | bluefruit_serial_send(0xFD); |
| 631 | bluefruit_serial_send(report->raw[i]); | 607 | for (uint8_t i = 0; i < KEYBOARD_EPSIZE; i++) { |
| 608 | bluefruit_serial_send(report->raw[i]); | ||
| 609 | } | ||
| 632 | } | 610 | } |
| 633 | #endif | 611 | #endif |
| 634 | 612 | ||
| 635 | uint8_t timeout = 255; | ||
| 636 | uint8_t where = where_to_send(); | ||
| 637 | |||
| 638 | #ifdef ADAFRUIT_BLE_ENABLE | 613 | #ifdef ADAFRUIT_BLE_ENABLE |
| 639 | if (where & SendToBLE) { | 614 | if (where == OUTPUT_ADAFRUIT_BLE) { |
| 640 | adafruit_ble_send_keys(report->mods, report->keys, sizeof(report->keys)); | 615 | adafruit_ble_send_keys(report->mods, report->keys, sizeof(report->keys)); |
| 641 | } | 616 | } |
| 642 | #endif | 617 | #endif |
| 643 | 618 | ||
| 644 | if (!(where & SendToUSB)) { | 619 | if (where != OUTPUT_USB && where != OUTPUT_USB_AND_BT) { |
| 645 | return; | 620 | return; |
| 646 | } | 621 | } |
| 647 | 622 | ||
| @@ -681,30 +656,31 @@ static void send_keyboard(report_keyboard_t *report) | |||
| 681 | static void send_mouse(report_mouse_t *report) | 656 | static void send_mouse(report_mouse_t *report) |
| 682 | { | 657 | { |
| 683 | #ifdef MOUSE_ENABLE | 658 | #ifdef MOUSE_ENABLE |
| 659 | uint8_t timeout = 255; | ||
| 660 | uint8_t where = where_to_send(); | ||
| 684 | 661 | ||
| 685 | #ifdef BLUETOOTH_ENABLE | 662 | #ifdef BLUETOOTH_ENABLE |
| 686 | bluefruit_serial_send(0xFD); | 663 | if (where == OUTPUT_BLUETOOTH || where == OUTPUT_USB_AND_BT) { |
| 687 | bluefruit_serial_send(0x00); | 664 | bluefruit_serial_send(0xFD); |
| 688 | bluefruit_serial_send(0x03); | 665 | bluefruit_serial_send(0x00); |
| 689 | bluefruit_serial_send(report->buttons); | 666 | bluefruit_serial_send(0x03); |
| 690 | bluefruit_serial_send(report->x); | 667 | bluefruit_serial_send(report->buttons); |
| 691 | bluefruit_serial_send(report->y); | 668 | bluefruit_serial_send(report->x); |
| 692 | bluefruit_serial_send(report->v); // should try sending the wheel v here | 669 | bluefruit_serial_send(report->y); |
| 693 | bluefruit_serial_send(report->h); // should try sending the wheel h here | 670 | bluefruit_serial_send(report->v); // should try sending the wheel v here |
| 694 | bluefruit_serial_send(0x00); | 671 | bluefruit_serial_send(report->h); // should try sending the wheel h here |
| 672 | bluefruit_serial_send(0x00); | ||
| 673 | } | ||
| 695 | #endif | 674 | #endif |
| 696 | 675 | ||
| 697 | uint8_t timeout = 255; | ||
| 698 | |||
| 699 | uint8_t where = where_to_send(); | ||
| 700 | |||
| 701 | #ifdef ADAFRUIT_BLE_ENABLE | 676 | #ifdef ADAFRUIT_BLE_ENABLE |
| 702 | if (where & SendToBLE) { | 677 | if (where == OUTPUT_ADAFRUIT_BLE) { |
| 703 | // FIXME: mouse buttons | 678 | // FIXME: mouse buttons |
| 704 | adafruit_ble_send_mouse_move(report->x, report->y, report->v, report->h); | 679 | adafruit_ble_send_mouse_move(report->x, report->y, report->v, report->h); |
| 705 | } | 680 | } |
| 706 | #endif | 681 | #endif |
| 707 | if (!(where & SendToUSB)) { | 682 | |
| 683 | if (where != OUTPUT_USB && where != OUTPUT_USB_AND_BT) { | ||
| 708 | return; | 684 | return; |
| 709 | } | 685 | } |
| 710 | 686 | ||
| @@ -746,32 +722,34 @@ static void send_system(uint16_t data) | |||
| 746 | 722 | ||
| 747 | static void send_consumer(uint16_t data) | 723 | static void send_consumer(uint16_t data) |
| 748 | { | 724 | { |
| 725 | uint8_t timeout = 255; | ||
| 726 | uint8_t where = where_to_send(); | ||
| 749 | 727 | ||
| 750 | #ifdef BLUETOOTH_ENABLE | 728 | #ifdef BLUETOOTH_ENABLE |
| 751 | static uint16_t last_data = 0; | 729 | if (where == OUTPUT_BLUETOOTH || where == OUTPUT_USB_AND_BT) { |
| 752 | if (data == last_data) return; | 730 | static uint16_t last_data = 0; |
| 753 | last_data = data; | 731 | if (data == last_data) return; |
| 754 | uint16_t bitmap = CONSUMER2BLUEFRUIT(data); | 732 | last_data = data; |
| 755 | bluefruit_serial_send(0xFD); | 733 | uint16_t bitmap = CONSUMER2BLUEFRUIT(data); |
| 756 | bluefruit_serial_send(0x00); | 734 | bluefruit_serial_send(0xFD); |
| 757 | bluefruit_serial_send(0x02); | 735 | bluefruit_serial_send(0x00); |
| 758 | bluefruit_serial_send((bitmap>>8)&0xFF); | 736 | bluefruit_serial_send(0x02); |
| 759 | bluefruit_serial_send(bitmap&0xFF); | 737 | bluefruit_serial_send((bitmap>>8)&0xFF); |
| 760 | bluefruit_serial_send(0x00); | 738 | bluefruit_serial_send(bitmap&0xFF); |
| 761 | bluefruit_serial_send(0x00); | 739 | bluefruit_serial_send(0x00); |
| 762 | bluefruit_serial_send(0x00); | 740 | bluefruit_serial_send(0x00); |
| 763 | bluefruit_serial_send(0x00); | 741 | bluefruit_serial_send(0x00); |
| 742 | bluefruit_serial_send(0x00); | ||
| 743 | } | ||
| 764 | #endif | 744 | #endif |
| 765 | 745 | ||
| 766 | uint8_t timeout = 255; | ||
| 767 | uint8_t where = where_to_send(); | ||
| 768 | |||
| 769 | #ifdef ADAFRUIT_BLE_ENABLE | 746 | #ifdef ADAFRUIT_BLE_ENABLE |
| 770 | if (where & SendToBLE) { | 747 | if (where == OUTPUT_ADAFRUIT_BLE) { |
| 771 | adafruit_ble_send_consumer_key(data, 0); | 748 | adafruit_ble_send_consumer_key(data, 0); |
| 772 | } | 749 | } |
| 773 | #endif | 750 | #endif |
| 774 | if (!(where & SendToUSB)) { | 751 | |
| 752 | if (where != OUTPUT_USB && where != OUTPUT_USB_AND_BT) { | ||
| 775 | return; | 753 | return; |
| 776 | } | 754 | } |
| 777 | 755 | ||
diff --git a/tmk_core/protocol/lufa/outputselect.c b/tmk_core/protocol/lufa/outputselect.c new file mode 100644 index 000000000..5d2457bff --- /dev/null +++ b/tmk_core/protocol/lufa/outputselect.c | |||
| @@ -0,0 +1,56 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2017 Priyadi Iman Nurcahyo | ||
| 3 | This program is free software: you can redistribute it and/or modify | ||
| 4 | it under the terms of the GNU General Public License as published by | ||
| 5 | the Free Software Foundation, either version 2 of the License, or | ||
| 6 | (at your option) any later version. | ||
| 7 | This program is distributed in the hope that it will be useful, | ||
| 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 10 | GNU General Public License for more details. | ||
| 11 | You should have received a copy of the GNU General Public License | ||
| 12 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 13 | */ | ||
| 14 | |||
| 15 | #include "lufa.h" | ||
| 16 | #include "outputselect.h" | ||
| 17 | #ifdef ADAFRUIT_BLE_ENABLE | ||
| 18 | #include "adafruit_ble.h" | ||
| 19 | #endif | ||
| 20 | |||
| 21 | uint8_t desired_output = OUTPUT_DEFAULT; | ||
| 22 | |||
| 23 | void set_output(uint8_t output) { | ||
| 24 | set_output_user(output); | ||
| 25 | desired_output = output; | ||
| 26 | } | ||
| 27 | |||
| 28 | __attribute__((weak)) | ||
| 29 | void set_output_user(uint8_t output) { | ||
| 30 | } | ||
| 31 | |||
| 32 | uint8_t auto_detect_output(void) { | ||
| 33 | if (USB_DeviceState == DEVICE_STATE_Configured) { | ||
| 34 | return OUTPUT_USB; | ||
| 35 | } | ||
| 36 | |||
| 37 | #ifdef ADAFRUIT_BLE_ENABLE | ||
| 38 | if (adafruit_ble_is_connected()) { | ||
| 39 | return OUTPUT_ADAFRUIT_BLE; | ||
| 40 | } | ||
| 41 | #endif | ||
| 42 | |||
| 43 | #ifdef BLUETOOTH_ENABLE | ||
| 44 | return OUTPUT_BLUETOOTH; // should check if BT is connected here | ||
| 45 | #endif | ||
| 46 | |||
| 47 | return OUTPUT_NONE; | ||
| 48 | } | ||
| 49 | |||
| 50 | uint8_t where_to_send(void) { | ||
| 51 | if (desired_output == OUTPUT_AUTO) { | ||
| 52 | return auto_detect_output(); | ||
| 53 | } | ||
| 54 | return desired_output; | ||
| 55 | } | ||
| 56 | |||
diff --git a/tmk_core/protocol/lufa/outputselect.h b/tmk_core/protocol/lufa/outputselect.h new file mode 100644 index 000000000..79b4dd35d --- /dev/null +++ b/tmk_core/protocol/lufa/outputselect.h | |||
| @@ -0,0 +1,41 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2017 Priyadi Iman Nurcahyo | ||
| 3 | This program is free software: you can redistribute it and/or modify | ||
| 4 | it under the terms of the GNU General Public License as published by | ||
| 5 | the Free Software Foundation, either version 2 of the License, or | ||
| 6 | (at your option) any later version. | ||
| 7 | This program is distributed in the hope that it will be useful, | ||
| 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 10 | GNU General Public License for more details. | ||
| 11 | You should have received a copy of the GNU General Public License | ||
| 12 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 13 | */ | ||
| 14 | |||
| 15 | enum outputs { | ||
| 16 | OUTPUT_AUTO, | ||
| 17 | |||
| 18 | OUTPUT_NONE, | ||
| 19 | OUTPUT_USB, | ||
| 20 | OUTPUT_BLUETOOTH, | ||
| 21 | OUTPUT_ADAFRUIT_BLE, | ||
| 22 | |||
| 23 | // backward compatibility | ||
| 24 | OUTPUT_USB_AND_BT | ||
| 25 | }; | ||
| 26 | |||
| 27 | /** | ||
| 28 | * backward compatibility for BLUETOOTH_ENABLE, send to BT and USB by default | ||
| 29 | */ | ||
| 30 | #ifndef OUTPUT_DEFAULT | ||
| 31 | #ifdef BLUETOOTH_ENABLE | ||
| 32 | #define OUTPUT_DEFAULT OUTPUT_USB_AND_BT | ||
| 33 | #else | ||
| 34 | #define OUTPUT_DEFAULT OUTPUT_AUTO | ||
| 35 | #endif | ||
| 36 | #endif | ||
| 37 | |||
| 38 | void set_output(uint8_t output); | ||
| 39 | void set_output_user(uint8_t output); | ||
| 40 | uint8_t auto_detect_output(void); | ||
| 41 | uint8_t where_to_send(void); \ No newline at end of file | ||
diff --git a/tmk_core/protocol/vusb/vusb.c b/tmk_core/protocol/vusb/vusb.c index a8c13b928..022ac6f6b 100644 --- a/tmk_core/protocol/vusb/vusb.c +++ b/tmk_core/protocol/vusb/vusb.c | |||
| @@ -280,7 +280,7 @@ const PROGMEM uchar keyboard_hid_report[] = { | |||
| 280 | 0x95, 0x06, // Report Count (6), | 280 | 0x95, 0x06, // Report Count (6), |
| 281 | 0x75, 0x08, // Report Size (8), | 281 | 0x75, 0x08, // Report Size (8), |
| 282 | 0x15, 0x00, // Logical Minimum (0), | 282 | 0x15, 0x00, // Logical Minimum (0), |
| 283 | 0x25, 0xFF, 0x00, // Logical Maximum(255), | 283 | 0x26, 0xFF, 0x00, // Logical Maximum(255), |
| 284 | 0x05, 0x07, // Usage Page (Key Codes), | 284 | 0x05, 0x07, // Usage Page (Key Codes), |
| 285 | 0x19, 0x00, // Usage Minimum (0), | 285 | 0x19, 0x00, // Usage Minimum (0), |
| 286 | 0x29, 0xFF, // Usage Maximum (255), | 286 | 0x29, 0xFF, // Usage Maximum (255), |
| @@ -350,7 +350,7 @@ const PROGMEM uchar mouse_hid_report[] = { | |||
| 350 | 0xa1, 0x01, // COLLECTION (Application) | 350 | 0xa1, 0x01, // COLLECTION (Application) |
| 351 | 0x85, REPORT_ID_SYSTEM, // REPORT_ID (2) | 351 | 0x85, REPORT_ID_SYSTEM, // REPORT_ID (2) |
| 352 | 0x15, 0x01, // LOGICAL_MINIMUM (0x1) | 352 | 0x15, 0x01, // LOGICAL_MINIMUM (0x1) |
| 353 | 0x25, 0xb7, 0x00, // LOGICAL_MAXIMUM (0xb7) | 353 | 0x26, 0xb7, 0x00, // LOGICAL_MAXIMUM (0xb7) |
| 354 | 0x19, 0x01, // USAGE_MINIMUM (0x1) | 354 | 0x19, 0x01, // USAGE_MINIMUM (0x1) |
| 355 | 0x29, 0xb7, // USAGE_MAXIMUM (0xb7) | 355 | 0x29, 0xb7, // USAGE_MAXIMUM (0xb7) |
| 356 | 0x75, 0x10, // REPORT_SIZE (16) | 356 | 0x75, 0x10, // REPORT_SIZE (16) |
diff --git a/util/travis_build.sh b/util/travis_build.sh new file mode 100644 index 000000000..794b0d3a1 --- /dev/null +++ b/util/travis_build.sh | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | |||
| 3 | TRAVIS_COMMIT_MESSAGE="${TRAVIS_COMMIT_MESSAGE:-none}" | ||
| 4 | TRAVIS_COMMIT_RANGE="${TRAVIS_COMMIT_RANGE:-HEAD~1..HEAD}" | ||
| 5 | |||
| 6 | if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then | ||
| 7 | exit_code=0 | ||
| 8 | NEFM=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -Ev '^(keyboards/)' | wc -l) | ||
| 9 | if [[ $NEFM -gt 0 ]] ; then | ||
| 10 | echo "Making all keymaps for all keyboards" | ||
| 11 | make all-keyboards AUTOGEN="true" | ||
| 12 | : $((exit_code = $exit_code + $?)) | ||
| 13 | else | ||
| 14 | MKB=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -oP '(?<=keyboards\/)([a-zA-Z_]+)' | sort -u) | ||
| 15 | for KB in $MKB ; do | ||
| 16 | echo "Making all keymaps for $KB" | ||
| 17 | make "$KB" AUTOGEN=true | ||
| 18 | : $((exit_code = $exit_code + $?)) | ||
| 19 | done | ||
| 20 | fi | ||
| 21 | exit $exit_code | ||
| 22 | fi | ||
diff --git a/util/travis_compiled_push.sh b/util/travis_compiled_push.sh index 3751da1e5..de2481ce5 100644 --- a/util/travis_compiled_push.sh +++ b/util/travis_compiled_push.sh | |||
| @@ -38,10 +38,10 @@ if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then | |||
| 38 | git clone https://$GH_TOKEN@github.com/jackhumbert/qmk.fm.git | 38 | git clone https://$GH_TOKEN@github.com/jackhumbert/qmk.fm.git |
| 39 | cd qmk.fm | 39 | cd qmk.fm |
| 40 | git submodule update --init --recursive | 40 | git submodule update --init --recursive |
| 41 | rm -rf keyboard | 41 | #rm -rf keyboard |
| 42 | rm -rf keyboards | 42 | #rm -rf keyboards |
| 43 | cp -r ../qmk_firmware/keyboards . | 43 | yes | cp -rf ../qmk_firmware/keyboards . |
| 44 | mkdir keyboards/ergodox_ez/ | 44 | #mkdir keyboards/ergodox_ez/ |
| 45 | cp ../qmk_firmware/util/ergodox_ez.html keyboards/ergodox_ez/index.html | 45 | cp ../qmk_firmware/util/ergodox_ez.html keyboards/ergodox_ez/index.html |
| 46 | cp ../qmk_firmware/readme.md qmk_readme.md | 46 | cp ../qmk_firmware/readme.md qmk_readme.md |
| 47 | ./generate.sh | 47 | ./generate.sh |
