diff options
| author | TerryMathews <terry@terrymathews.net> | 2020-07-28 01:34:18 -0400 |
|---|---|---|
| committer | James Young <18669334+noroadsleft@users.noreply.github.com> | 2020-08-29 14:30:02 -0700 |
| commit | 4764aa8711cadc2776fde7641e97e280c4ac55c5 (patch) | |
| tree | 3d756581c9fa601ae9a3fdb4311739be03e2005f /keyboards/tkc/m0lly | |
| parent | e6266b19be46c1340209bdd0a6c519452d5b9f2a (diff) | |
| download | qmk_firmware-4764aa8711cadc2776fde7641e97e280c4ac55c5.tar.gz qmk_firmware-4764aa8711cadc2776fde7641e97e280c4ac55c5.zip | |
The Key Company project consolidation (#9547)
* Consolidate TKC projects and increase VIA keymap count to 4.
* Updated readme files.
* Removed config.h via limitation of 2 dynamic keymaps
* Reduce dynamic keymaps from 4 to 3 due to EEPROM space limitations.
* Update dynamic_keymap.c
* Restore 4 dynamic keymaps for VIA in TKC projects.
* Update quantum/dynamic_keymap.c
Diffstat (limited to 'keyboards/tkc/m0lly')
| -rw-r--r-- | keyboards/tkc/m0lly/README.md | 17 | ||||
| -rw-r--r-- | keyboards/tkc/m0lly/config.h | 183 | ||||
| -rw-r--r-- | keyboards/tkc/m0lly/info.json | 97 | ||||
| -rw-r--r-- | keyboards/tkc/m0lly/keymaps/default/keymap.c | 94 | ||||
| -rw-r--r-- | keyboards/tkc/m0lly/keymaps/via/keymap.c | 116 | ||||
| -rw-r--r-- | keyboards/tkc/m0lly/keymaps/via/rules.mk | 1 | ||||
| -rw-r--r-- | keyboards/tkc/m0lly/m0lly.c | 76 | ||||
| -rw-r--r-- | keyboards/tkc/m0lly/m0lly.h | 32 | ||||
| -rw-r--r-- | keyboards/tkc/m0lly/rules.mk | 32 |
9 files changed, 648 insertions, 0 deletions
diff --git a/keyboards/tkc/m0lly/README.md b/keyboards/tkc/m0lly/README.md new file mode 100644 index 000000000..9af80c7e9 --- /dev/null +++ b/keyboards/tkc/m0lly/README.md | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | The Key Company M0LLY | ||
| 2 | |||
| 3 | [TKC M0LLY](https://cdn.shopify.com/s/files/1/1679/2319/files/Molly_Terminal_1024x1024.jpg?v=1529067702) | ||
| 4 | |||
| 5 | |||
| 6 | The Key Company's M0LLY keyboard is inspired by the Apple Macintosh M0110A, and utilizes the AT90USB1286 microcontroller. | ||
| 7 | |||
| 8 | Keyboard Maintainer: [Terry Mathews](https://github.com/TerryMathews/) | ||
| 9 | Hardware Supported: TKC M0LLY | ||
| 10 | Hardware Availability: [TheKey.Company](https://thekey.company) | ||
| 11 | |||
| 12 | |||
| 13 | Make example for this keyboard (after setting up your build environment): | ||
| 14 | |||
| 15 | make tkc/m0lly:default | ||
| 16 | |||
| 17 | See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). | ||
diff --git a/keyboards/tkc/m0lly/config.h b/keyboards/tkc/m0lly/config.h new file mode 100644 index 000000000..29bd8411e --- /dev/null +++ b/keyboards/tkc/m0lly/config.h | |||
| @@ -0,0 +1,183 @@ | |||
| 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 | #pragma once | ||
| 19 | |||
| 20 | #include "config_common.h" | ||
| 21 | |||
| 22 | /* USB Device descriptor parameter */ | ||
| 23 | #define VENDOR_ID 0x544B // "TK" | ||
| 24 | #define PRODUCT_ID 0x0004 | ||
| 25 | #define DEVICE_VER 0x0001 | ||
| 26 | #define MANUFACTURER The Key Company | ||
| 27 | #define PRODUCT M0lly | ||
| 28 | #define DESCRIPTION QMK keyboard firmware for M0lly | ||
| 29 | |||
| 30 | /* key matrix size */ | ||
| 31 | #define MATRIX_ROWS 5 | ||
| 32 | #define MATRIX_COLS 19 | ||
| 33 | |||
| 34 | // ROWS: Top to bottom, COLS: Left to right | ||
| 35 | /* Row pin configuration | ||
| 36 | */ | ||
| 37 | #define MATRIX_ROW_PINS { F2, F1, F0, E1, E0 } | ||
| 38 | /* Column pin configuration | ||
| 39 | */ | ||
| 40 | #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, C1, C0, F5, F6, F7 } | ||
| 41 | #define UNUSED_PINS | ||
| 42 | |||
| 43 | /* COL2ROW or ROW2COL */ | ||
| 44 | #define DIODE_DIRECTION COL2ROW | ||
| 45 | |||
| 46 | #define BACKLIGHT_PIN B6 | ||
| 47 | #define BACKLIGHT_BREATHING | ||
| 48 | #define BACKLIGHT_LEVELS 3 | ||
| 49 | |||
| 50 | /* Underlight configuration | ||
| 51 | */ | ||
| 52 | #define RGB_DI_PIN D7 | ||
| 53 | #define RGBLIGHT_ANIMATIONS | ||
| 54 | #define RGBLED_NUM 30 // Number of LEDs | ||
| 55 | #define RGBLIGHT_HUE_STEP 5 | ||
| 56 | #define RGBLIGHT_SAT_STEP 10 | ||
| 57 | #define RGBLIGHT_VAL_STEP 10 | ||
| 58 | |||
| 59 | /* define if matrix has ghost */ | ||
| 60 | //#define MATRIX_HAS_GHOST | ||
| 61 | |||
| 62 | /* Set 0 if debouncing isn't needed */ | ||
| 63 | #define DEBOUNCE 5 | ||
| 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 | #define QMK_ESC_OUTPUT A0 // usually COL | ||
| 71 | #define QMK_ESC_INPUT F4 // usually ROW | ||
| 72 | #define QMK_LED D2 // NumLock on M0lly | ||
| 73 | //#define QMK_SPEAKER C6 | ||
| 74 | |||
| 75 | /* | ||
| 76 | * Force NKRO | ||
| 77 | * | ||
| 78 | * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved | ||
| 79 | * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the | ||
| 80 | * makefile for this to work.) | ||
| 81 | * | ||
| 82 | * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) | ||
| 83 | * until the next keyboard reset. | ||
| 84 | * | ||
| 85 | * NKRO may prevent your keystrokes from being detected in the BIOS, but it is | ||
| 86 | * fully operational during normal computer usage. | ||
| 87 | * | ||
| 88 | * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) | ||
| 89 | * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by | ||
| 90 | * bootmagic, NKRO mode will always be enabled until it is toggled again during a | ||
| 91 | * power-up. | ||
| 92 | * | ||
| 93 | */ | ||
| 94 | //#define FORCE_NKRO | ||
| 95 | |||
| 96 | /* | ||
| 97 | * Magic Key Options | ||
| 98 | * | ||
| 99 | * Magic keys are hotkey commands that allow control over firmware functions of | ||
| 100 | * the keyboard. They are best used in combination with the HID Listen program, | ||
| 101 | * found here: https://www.pjrc.com/teensy/hid_listen.html | ||
| 102 | * | ||
| 103 | * The options below allow the magic key functionality to be changed. This is | ||
| 104 | * useful if your keyboard/keypad is missing keys and you want magic key support. | ||
| 105 | * | ||
| 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 | /* | ||
| 163 | * MIDI options | ||
| 164 | */ | ||
| 165 | |||
| 166 | /* Prevent use of disabled MIDI features in the keymap */ | ||
| 167 | //#define MIDI_ENABLE_STRICT 1 | ||
| 168 | |||
| 169 | /* enable basic MIDI features: | ||
| 170 | - MIDI notes can be sent when in Music mode is on | ||
| 171 | */ | ||
| 172 | //#define MIDI_BASIC | ||
| 173 | |||
| 174 | /* enable advanced MIDI features: | ||
| 175 | - MIDI notes can be added to the keymap | ||
| 176 | - Octave shift and transpose | ||
| 177 | - Virtual sustain, portamento, and modulation wheel | ||
| 178 | - etc. | ||
| 179 | */ | ||
| 180 | //#define MIDI_ADVANCED | ||
| 181 | |||
| 182 | /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ | ||
| 183 | //#define MIDI_TONE_KEYCODE_OCTAVES 1 | ||
diff --git a/keyboards/tkc/m0lly/info.json b/keyboards/tkc/m0lly/info.json new file mode 100644 index 000000000..f2ac456b1 --- /dev/null +++ b/keyboards/tkc/m0lly/info.json | |||
| @@ -0,0 +1,97 @@ | |||
| 1 | { | ||
| 2 | "keyboard_name": "TKC M0LLY", | ||
| 3 | "url": "", | ||
| 4 | "maintainer": "qmk", | ||
| 5 | "width": 19.5, | ||
| 6 | "height": 5, | ||
| 7 | "layouts": { | ||
| 8 | "LAYOUT_all": { | ||
| 9 | "layout": [ | ||
| 10 | {"label":"~", "x":0, "y":0}, | ||
| 11 | {"label":"!", "x":1, "y":0}, | ||
| 12 | {"label":"@", "x":2, "y":0}, | ||
| 13 | {"label":"#", "x":3, "y":0}, | ||
| 14 | {"label":"$", "x":4, "y":0}, | ||
| 15 | {"label":"%", "x":5, "y":0}, | ||
| 16 | {"label":"^", "x":6, "y":0}, | ||
| 17 | {"label":"&", "x":7, "y":0}, | ||
| 18 | {"label":"*", "x":8, "y":0}, | ||
| 19 | {"label":"(", "x":9, "y":0}, | ||
| 20 | {"label":")", "x":10, "y":0}, | ||
| 21 | {"label":"_", "x":11, "y":0}, | ||
| 22 | {"label":"+", "x":12, "y":0}, | ||
| 23 | {"label":"Bksp", "x":13, "y":0}, | ||
| 24 | {"x":14, "y":0}, | ||
| 25 | {"label":"Num", "x":15.5, "y":0}, | ||
| 26 | {"label":"/", "x":16.5, "y":0}, | ||
| 27 | {"label":"*", "x":17.5, "y":0}, | ||
| 28 | {"label":"-", "x":18.5, "y":0}, | ||
| 29 | {"label":"Tab", "x":0, "y":1, "w":1.5}, | ||
| 30 | {"label":"Q", "x":1.5, "y":1}, | ||
| 31 | {"label":"W", "x":2.5, "y":1}, | ||
| 32 | {"label":"E", "x":3.5, "y":1}, | ||
| 33 | {"label":"R", "x":4.5, "y":1}, | ||
| 34 | {"label":"T", "x":5.5, "y":1}, | ||
| 35 | {"label":"Y", "x":6.5, "y":1}, | ||
| 36 | {"label":"U", "x":7.5, "y":1}, | ||
| 37 | {"label":"I", "x":8.5, "y":1}, | ||
| 38 | {"label":"O", "x":9.5, "y":1}, | ||
| 39 | {"label":"P", "x":10.5, "y":1}, | ||
| 40 | {"label":"{", "x":11.5, "y":1}, | ||
| 41 | {"label":"}", "x":12.5, "y":1}, | ||
| 42 | {"label":"|", "x":13.5, "y":1, "w":1.5}, | ||
| 43 | {"label":"7", "x":15.5, "y":1}, | ||
| 44 | {"label":"8", "x":16.5, "y":1}, | ||
| 45 | {"label":"9", "x":17.5, "y":1}, | ||
| 46 | {"x":18.5, "y":1}, | ||
| 47 | {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, | ||
| 48 | {"label":"A", "x":1.75, "y":2}, | ||
| 49 | {"label":"S", "x":2.75, "y":2}, | ||
| 50 | {"label":"D", "x":3.75, "y":2}, | ||
| 51 | {"label":"F", "x":4.75, "y":2}, | ||
| 52 | {"label":"G", "x":5.75, "y":2}, | ||
| 53 | {"label":"H", "x":6.75, "y":2}, | ||
| 54 | {"label":"J", "x":7.75, "y":2}, | ||
| 55 | {"label":"K", "x":8.75, "y":2}, | ||
| 56 | {"label":"L", "x":9.75, "y":2}, | ||
| 57 | {"label":":", "x":10.75, "y":2}, | ||
| 58 | {"label":"\"", "x":11.75, "y":2}, | ||
| 59 | {"label":"ISO ~", "x":12.75, "y":2}, | ||
| 60 | {"label":"Enter", "x":13.75, "y":2, "w":1.25}, | ||
| 61 | {"label":"4", "x":15.5, "y":2}, | ||
| 62 | {"label":"5", "x":16.5, "y":2}, | ||
| 63 | {"label":"6", "x":17.5, "y":2}, | ||
| 64 | {"label":"+", "x":18.5, "y":2}, | ||
| 65 | {"label":"Shift", "x":0, "y":3, "w":1.25}, | ||
| 66 | {"x":1.25, "y":3}, | ||
| 67 | {"label":"Z", "x":2.25, "y":3}, | ||
| 68 | {"label":"X", "x":3.25, "y":3}, | ||
| 69 | {"label":"C", "x":4.25, "y":3}, | ||
| 70 | {"label":"V", "x":5.25, "y":3}, | ||
| 71 | {"label":"B", "x":6.25, "y":3}, | ||
| 72 | {"label":"N", "x":7.25, "y":3}, | ||
| 73 | {"label":"M", "x":8.25, "y":3}, | ||
| 74 | {"label":"<", "x":9.25, "y":3}, | ||
| 75 | {"label":">", "x":10.25, "y":3}, | ||
| 76 | {"label":"?", "x":11.25, "y":3}, | ||
| 77 | {"label":"Shift", "x":12.25, "y":3, "w":1.75}, | ||
| 78 | {"x":14, "y":3}, | ||
| 79 | {"label":"1", "x":15.5, "y":3}, | ||
| 80 | {"label":"2", "x":16.5, "y":3}, | ||
| 81 | {"label":"3", "x":17.5, "y":3}, | ||
| 82 | {"x":18.5, "y":3}, | ||
| 83 | {"label":"Ctrl", "x":0, "y":4, "w":1.25}, | ||
| 84 | {"label":"Win", "x":1.25, "y":4, "w":1.25}, | ||
| 85 | {"label":"Alt", "x":2.5, "y":4, "w":1.25}, | ||
| 86 | {"x":3.75, "y":4, "w":6.25}, | ||
| 87 | {"label":"Alt", "x":10, "y":4, "w":1.25}, | ||
| 88 | {"label":"Win", "x":11.25, "y":4, "w":1.25}, | ||
| 89 | {"label":"FN", "x":12.5, "y":4, "w":1.25}, | ||
| 90 | {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}, | ||
| 91 | {"label":"0", "x":15.5, "y":4}, | ||
| 92 | {"x":16.5, "y":4}, | ||
| 93 | {"label":".", "x":17.5, "y":4}, | ||
| 94 | {"label":"Ent", "x":18.5, "y":4}] | ||
| 95 | } | ||
| 96 | } | ||
| 97 | } | ||
diff --git a/keyboards/tkc/m0lly/keymaps/default/keymap.c b/keyboards/tkc/m0lly/keymaps/default/keymap.c new file mode 100644 index 000000000..27e83cd21 --- /dev/null +++ b/keyboards/tkc/m0lly/keymaps/default/keymap.c | |||
| @@ -0,0 +1,94 @@ | |||
| 1 | /* Copyright 2017 Mathias Andersson <wraul@dbox.se> | ||
| 2 | * | ||
| 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 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #include QMK_KEYBOARD_H | ||
| 18 | |||
| 19 | //Layers | ||
| 20 | |||
| 21 | enum { | ||
| 22 | BASE = 0, | ||
| 23 | FUNCTION, | ||
| 24 | }; | ||
| 25 | |||
| 26 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 27 | /* Keymap BASE: (Base Layer) Default Layer | ||
| 28 | * | ||
| 29 | * ,-----------------------------------------------------------. .-------------------. | ||
| 30 | * | ~ | 1 | 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | |NumL| / | * | - | | ||
| 31 | * |-----------------------------------------------------------| |-------------------| | ||
| 32 | * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | | 7 | 8 | 9 | | | ||
| 33 | * |-----------------------------------------------------------| |--------------| + | | ||
| 34 | * |CAPS | A| S| D| F| G| H| J| K| L| ;| '|Return | | 4 | 5 | 6 | | | ||
| 35 | * |-----------------------------------------------------------| |-------------------| | ||
| 36 | * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | | 1 | 2 | 3 | Ent| | ||
| 37 | * |-----------------------------------------------------------| |--------------| | | ||
| 38 | * |Ctrl|Gui |Alt | Space | Alt | Win |FN |Ctr | | 0 | . | | | ||
| 39 | * `-----------------------------------------------------------' '-------------------' | ||
| 40 | */ | ||
| 41 | [BASE] = LAYOUT_all( | ||
| 42 | KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, XXXXXXX, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \ | ||
| 43 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_P7, KC_P8, KC_P9, XXXXXXX, \ | ||
| 44 | KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, XXXXXXX, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, \ | ||
| 45 | KC_LSFT, XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, XXXXXXX, KC_P1, KC_P2, KC_P3, XXXXXXX, \ | ||
| 46 | KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RWIN, MO(FUNCTION), KC_RCTL, KC_P0, XXXXXXX, KC_PDOT, KC_PENT \ | ||
| 47 | ), | ||
| 48 | /* Keymap FUNCTION: (Function Layer) | ||
| 49 | * | ||
| 50 | * ,-----------------------------------------------------------. .-------------------. | ||
| 51 | * | | | | | | | | | | | | | | RESET | | | | | | | ||
| 52 | * |-----------------------------------------------------------| |-------------------| | ||
| 53 | * | | | | | | | | | | | | | | | | | | | | | ||
| 54 | * |-----------------------------------------------------------| |-------------------| | ||
| 55 | * | | | | | | | | | | | | | | | | | | | | ||
| 56 | * |-----------------------------------------------------------| |-------------------| | ||
| 57 | * | |Tog|Mod|Hu+|Hu-|Sa+|Sa-|Va+|Va-|Stp| | | | | | | | | ||
| 58 | * |-----------------------------------------------------------| |--------------| | | ||
| 59 | * | | | | | | | | | | | | | | ||
| 60 | * `-----------------------------------------------------------' '-------------------' | ||
| 61 | */ | ||
| 62 | [FUNCTION] = LAYOUT_all( | ||
| 63 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, XXXXXXX, _______, _______, _______, _______, \ | ||
| 64 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, \ | ||
| 65 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, _______, _______, _______, _______, _______, \ | ||
| 66 | _______, XXXXXXX, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, BL_STEP, _______, _______, XXXXXXX, _______, _______, _______, XXXXXXX, \ | ||
| 67 | _______, _______, _______, _______, _______, _______, MO(FUNCTION), _______, _______, XXXXXXX, _______, _______ \ | ||
| 68 | ), | ||
| 69 | }; | ||
| 70 | |||
| 71 | #ifdef OLED_DRIVER_ENABLE | ||
| 72 | void oled_task_user(void) { | ||
| 73 | oled_write_P(PSTR("M0lly\n"),false); | ||
| 74 | // Host Keyboard Layer Status | ||
| 75 | oled_write_P(PSTR("Layer: "), false); | ||
| 76 | |||
| 77 | switch (get_highest_layer(layer_state)) { | ||
| 78 | case BASE: | ||
| 79 | oled_write_P(PSTR("Base\n"), false); | ||
| 80 | break; | ||
| 81 | case FUNCTION: | ||
| 82 | oled_write_P(PSTR("Function\n"), false); | ||
| 83 | break; | ||
| 84 | default: | ||
| 85 | // Or use the write_ln shortcut over adding '\n' to the end of your string | ||
| 86 | oled_write_ln_P(PSTR("Undefined"), false); | ||
| 87 | } | ||
| 88 | // Host Keyboard LED Status | ||
| 89 | led_t led_state = host_keyboard_led_state(); | ||
| 90 | oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); | ||
| 91 | oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); | ||
| 92 | oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); | ||
| 93 | } | ||
| 94 | #endif \ No newline at end of file | ||
diff --git a/keyboards/tkc/m0lly/keymaps/via/keymap.c b/keyboards/tkc/m0lly/keymaps/via/keymap.c new file mode 100644 index 000000000..b72b8f035 --- /dev/null +++ b/keyboards/tkc/m0lly/keymaps/via/keymap.c | |||
| @@ -0,0 +1,116 @@ | |||
| 1 | /* Copyright 2017 Mathias Andersson <wraul@dbox.se> | ||
| 2 | * | ||
| 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 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #include QMK_KEYBOARD_H | ||
| 18 | |||
| 19 | //Layers | ||
| 20 | |||
| 21 | enum { | ||
| 22 | BASE = 0, | ||
| 23 | FUNCTION, | ||
| 24 | ALTERNATE, | ||
| 25 | LAST, | ||
| 26 | }; | ||
| 27 | |||
| 28 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 29 | /* Keymap BASE: (Base Layer) Default Layer | ||
| 30 | * | ||
| 31 | * ,-----------------------------------------------------------. .-------------------. | ||
| 32 | * | ~ | 1 | 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | |NumL| / | * | - | | ||
| 33 | * |-----------------------------------------------------------| |-------------------| | ||
| 34 | * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | | 7 | 8 | 9 | | | ||
| 35 | * |-----------------------------------------------------------| |--------------| + | | ||
| 36 | * |CAPS | A| S| D| F| G| H| J| K| L| ;| '|Return | | 4 | 5 | 6 | | | ||
| 37 | * |-----------------------------------------------------------| |-------------------| | ||
| 38 | * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | | 1 | 2 | 3 | Ent| | ||
| 39 | * |-----------------------------------------------------------| |--------------| | | ||
| 40 | * |Ctrl|Gui |Alt | Space | Alt | Win |FN |Ctr | | 0 | . | | | ||
| 41 | * `-----------------------------------------------------------' '-------------------' | ||
| 42 | */ | ||
| 43 | [BASE] = LAYOUT_all( | ||
| 44 | KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, XXXXXXX, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, | ||
| 45 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_P7, KC_P8, KC_P9, XXXXXXX, | ||
| 46 | KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, XXXXXXX, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, | ||
| 47 | KC_LSFT, XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, XXXXXXX, KC_P1, KC_P2, KC_P3, XXXXXXX, | ||
| 48 | KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RWIN, MO(FUNCTION), KC_RCTL, KC_P0, XXXXXXX, KC_PDOT, KC_PENT | ||
| 49 | ), | ||
| 50 | /* Keymap FUNCTION: (Function Layer) | ||
| 51 | * | ||
| 52 | * ,-----------------------------------------------------------. .-------------------. | ||
| 53 | * | | | | | | | | | | | | | | RESET | | | | | | | ||
| 54 | * |-----------------------------------------------------------| |-------------------| | ||
| 55 | * | | | | | | | | | | | | | | | | | | | | | ||
| 56 | * |-----------------------------------------------------------| |-------------------| | ||
| 57 | * | | | | | | | | | | | | | | | | | | | | ||
| 58 | * |-----------------------------------------------------------| |-------------------| | ||
| 59 | * | |Tog|Mod|Hu+|Hu-|Sa+|Sa-|Va+|Va-|Stp| | | | | | | | | ||
| 60 | * |-----------------------------------------------------------| |--------------| | | ||
| 61 | * | | | | | | | | | | | | | | ||
| 62 | * `-----------------------------------------------------------' '-------------------' | ||
| 63 | */ | ||
| 64 | [FUNCTION] = LAYOUT_all( | ||
| 65 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, XXXXXXX, _______, _______, _______, _______, | ||
| 66 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, | ||
| 67 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, _______, _______, _______, _______, _______, | ||
| 68 | _______, XXXXXXX, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, BL_STEP, _______, _______, XXXXXXX, _______, _______, _______, XXXXXXX, | ||
| 69 | _______, _______, _______, _______, _______, _______, MO(FUNCTION), _______, _______, XXXXXXX, _______, _______ | ||
| 70 | ), | ||
| 71 | [ALTERNATE] = LAYOUT_all( | ||
| 72 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, XXXXXXX, _______, _______, _______, _______, | ||
| 73 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, | ||
| 74 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, _______, _______, _______, _______, _______, | ||
| 75 | _______, XXXXXXX, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, BL_STEP, _______, _______, XXXXXXX, _______, _______, _______, XXXXXXX, | ||
| 76 | _______, _______, _______, _______, _______, _______, MO(FUNCTION), _______, _______, XXXXXXX, _______, _______ | ||
| 77 | ), | ||
| 78 | [LAST] = LAYOUT_all( | ||
| 79 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, XXXXXXX, _______, _______, _______, _______, | ||
| 80 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, | ||
| 81 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, _______, _______, _______, _______, _______, | ||
| 82 | _______, XXXXXXX, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, BL_STEP, _______, _______, XXXXXXX, _______, _______, _______, XXXXXXX, | ||
| 83 | _______, _______, _______, _______, _______, _______, MO(FUNCTION), _______, _______, XXXXXXX, _______, _______ | ||
| 84 | ), | ||
| 85 | }; | ||
| 86 | |||
| 87 | #ifdef OLED_DRIVER_ENABLE | ||
| 88 | void oled_task_user(void) { | ||
| 89 | oled_write_P(PSTR("M0lly\n"),false); | ||
| 90 | // Host Keyboard Layer Status | ||
| 91 | oled_write_P(PSTR("Layer: "), false); | ||
| 92 | |||
| 93 | switch (get_highest_layer(layer_state)) { | ||
| 94 | case BASE: | ||
| 95 | oled_write_P(PSTR("Base\n"), false); | ||
| 96 | break; | ||
| 97 | case FUNCTION: | ||
| 98 | oled_write_P(PSTR("Function\n"), false); | ||
| 99 | break; | ||
| 100 | case ALTERNATE: | ||
| 101 | oled_write_P(PSTR("Alternate\n"), false); | ||
| 102 | break; | ||
| 103 | case LAST: | ||
| 104 | oled_write_P(PSTR("Last\n"), false); | ||
| 105 | break; | ||
| 106 | default: | ||
| 107 | // Or use the write_ln shortcut over adding '\n' to the end of your string | ||
| 108 | oled_write_ln_P(PSTR("Undefined"), false); | ||
| 109 | } | ||
| 110 | // Host Keyboard LED Status | ||
| 111 | led_t led_state = host_keyboard_led_state(); | ||
| 112 | oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); | ||
| 113 | oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); | ||
| 114 | oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); | ||
| 115 | } | ||
| 116 | #endif | ||
diff --git a/keyboards/tkc/m0lly/keymaps/via/rules.mk b/keyboards/tkc/m0lly/keymaps/via/rules.mk new file mode 100644 index 000000000..1e5b99807 --- /dev/null +++ b/keyboards/tkc/m0lly/keymaps/via/rules.mk | |||
| @@ -0,0 +1 @@ | |||
| VIA_ENABLE = yes | |||
diff --git a/keyboards/tkc/m0lly/m0lly.c b/keyboards/tkc/m0lly/m0lly.c new file mode 100644 index 000000000..e47f9531e --- /dev/null +++ b/keyboards/tkc/m0lly/m0lly.c | |||
| @@ -0,0 +1,76 @@ | |||
| 1 | /* Copyright 2017 Mathias Andersson <wraul@dbox.se> | ||
| 2 | * | ||
| 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 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | #include "m0lly.h" | ||
| 17 | #include "led.h" | ||
| 18 | |||
| 19 | void keyboard_pre_init_kb(void) { | ||
| 20 | setPinInputHigh(D0); | ||
| 21 | setPinInputHigh(D1); | ||
| 22 | |||
| 23 | keyboard_pre_init_user(); | ||
| 24 | } | ||
| 25 | |||
| 26 | void matrix_init_kb(void) { | ||
| 27 | // put your keyboard start-up code here | ||
| 28 | // runs once when the firmware starts up | ||
| 29 | led_init_ports(); | ||
| 30 | matrix_init_user(); | ||
| 31 | } | ||
| 32 | |||
| 33 | void matrix_scan_kb(void) { | ||
| 34 | // put your looping keyboard code here | ||
| 35 | // runs every cycle (a lot) | ||
| 36 | |||
| 37 | matrix_scan_user(); | ||
| 38 | } | ||
| 39 | |||
| 40 | bool process_record_kb(uint16_t keycode, keyrecord_t *record) { | ||
| 41 | // put your per-action keyboard code here | ||
| 42 | // runs for every action, just before processing by the firmware | ||
| 43 | |||
| 44 | return process_record_user(keycode, record); | ||
| 45 | } | ||
| 46 | |||
| 47 | void led_init_ports(void) { | ||
| 48 | DDRD |= (1<<2) | (1<<3) | (1<<4); // OUT | ||
| 49 | DDRB |= (1<<7); // OUT | ||
| 50 | PORTB |= (1<<7); | ||
| 51 | } | ||
| 52 | |||
| 53 | void led_set_kb(uint8_t usb_led) { | ||
| 54 | // led_set_user(usb_led); | ||
| 55 | if (usb_led & (1<<USB_LED_NUM_LOCK)) { | ||
| 56 | // Turn numlock on | ||
| 57 | PORTD |= (1<<2); | ||
| 58 | } else { | ||
| 59 | // Turn numlock off | ||
| 60 | PORTD &= ~(1<<2); | ||
| 61 | } | ||
| 62 | if (usb_led & (1<<USB_LED_CAPS_LOCK)) { | ||
| 63 | // Turn capslock on | ||
| 64 | PORTD |= (1<<3); | ||
| 65 | } else { | ||
| 66 | // Turn capslock off | ||
| 67 | PORTD &= ~(1<<3); | ||
| 68 | } | ||
| 69 | if (usb_led & (1<<USB_LED_SCROLL_LOCK)) { | ||
| 70 | // Turn scrolllock on | ||
| 71 | PORTD |= (1<<4); | ||
| 72 | } else { | ||
| 73 | // Turn scrolllock off | ||
| 74 | PORTD &= ~(1<<4); | ||
| 75 | } | ||
| 76 | } \ No newline at end of file | ||
diff --git a/keyboards/tkc/m0lly/m0lly.h b/keyboards/tkc/m0lly/m0lly.h new file mode 100644 index 000000000..0c62876ef --- /dev/null +++ b/keyboards/tkc/m0lly/m0lly.h | |||
| @@ -0,0 +1,32 @@ | |||
| 1 | /* Copyright 2017 Mathias Andersson <wraul@dbox.se> | ||
| 2 | * | ||
| 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 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | #pragma once | ||
| 17 | |||
| 18 | #include "quantum.h" | ||
| 19 | |||
| 20 | #define LAYOUT_all( \ | ||
| 21 | K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, K0H, K0I, \ | ||
| 22 | K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1F, K1G, K1H, K1I, \ | ||
| 23 | K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2F, K2G, K2H, K2I, \ | ||
| 24 | K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3F, K3G, K3H, K3I, \ | ||
| 25 | K40, K41, K42, K45, K49, K4B, K4C, K4D, K4F, K4G, K4H, K4I \ | ||
| 26 | ) { \ | ||
| 27 | { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, K0H, K0I }, \ | ||
| 28 | { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, KC_NO, K1F, K1G, K1H, K1I }, \ | ||
| 29 | { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, KC_NO, K2F, K2G, K2H, K2I }, \ | ||
| 30 | { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, KC_NO, K3F, K3G, K3H, K3I }, \ | ||
| 31 | { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, KC_NO, K49, KC_NO, K4B, K4C, K4D, KC_NO, K4F, K4G, K4H, K4I } \ | ||
| 32 | } | ||
diff --git a/keyboards/tkc/m0lly/rules.mk b/keyboards/tkc/m0lly/rules.mk new file mode 100644 index 000000000..05e629075 --- /dev/null +++ b/keyboards/tkc/m0lly/rules.mk | |||
| @@ -0,0 +1,32 @@ | |||
| 1 | # MCU name | ||
| 2 | MCU = at90usb1286 | ||
| 3 | |||
| 4 | # Bootloader selection | ||
| 5 | # Teensy halfkay | ||
| 6 | # Pro Micro caterina | ||
| 7 | # Atmel DFU atmel-dfu | ||
| 8 | # LUFA DFU lufa-dfu | ||
| 9 | # QMK DFU qmk-dfu | ||
| 10 | # ATmega32A bootloadHID | ||
| 11 | # ATmega328P USBasp | ||
| 12 | BOOTLOADER = qmk-dfu | ||
| 13 | |||
| 14 | # Build Options | ||
| 15 | # change yes to no to disable | ||
| 16 | # | ||
| 17 | BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration | ||
| 18 | MOUSEKEY_ENABLE = yes # Mouse keys | ||
| 19 | EXTRAKEY_ENABLE = yes # Audio control and System control | ||
| 20 | CONSOLE_ENABLE = yes # Console for debug | ||
| 21 | COMMAND_ENABLE = yes # Commands for debug and configuration | ||
| 22 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
| 23 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
| 24 | # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
| 25 | NKRO_ENABLE = yes # USB Nkey Rollover | ||
| 26 | BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default | ||
| 27 | RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. | ||
| 28 | MIDI_ENABLE = no # MIDI controls | ||
| 29 | UNICODE_ENABLE = no # Unicode | ||
| 30 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | ||
| 31 | AUDIO_ENABLE = no # Audio output on port C6 | ||
| 32 | OLED_DRIVER_ENABLE = yes \ No newline at end of file | ||
