diff options
21 files changed, 934 insertions, 141 deletions
diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 697686cd59..889d9d610e 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -5,7 +5,6 @@ "xaver.clang-format", "ms-vscode.cpptools", "bierner.github-markdown-preview", - "donjayamanne.git-extension-pack", - "CoenraadS.bracket-pair-colorizer-2" + "donjayamanne.git-extension-pack" ] } diff --git a/docs/reference_info_json.md b/docs/reference_info_json.md index 646b6b5cc9..b2e6cae28e 100644 --- a/docs/reference_info_json.md +++ b/docs/reference_info_json.md @@ -9,33 +9,39 @@ You can create `info.json` files at every level under `qmk_firmware/keyboards/<n The `info.json` file is a JSON formatted dictionary with the following keys available to be set. You do not have to set all of them, merely the keys that apply to your keyboard. * `keyboard_name` - * A free-form text string describing the keyboard. - * Example: `Clueboard 66%` + * A free-form text string describing the keyboard. + * Example: `Clueboard 66%` +* `manufacturer` + * A free-form text string describing the keyboard's manufacturer. + * Example: `Clueboard` * `url` - * A URL to the keyboard's product page, [QMK.fm/keyboards](https://qmk.fm/keyboards) page, or other page describing information about the keyboard. + * A URL to the keyboard's product page, [QMK.fm/keyboards](https://qmk.fm/keyboards) page, or other page describing information about the keyboard. + * Example: `https://clueboard.co` * `maintainer` - * GitHub username of the maintainer, or `qmk` for community maintained boards + * GitHub username of the maintainer, or `qmk` for community maintained boards. + * Example: `skullydazed` * `debounce` - * How many milliseconds (ms) to wait for debounce to happen. (Default: 5) + * The amount of time in milliseconds to wait for debounce to happen. + * Default: `5` * `diode_direction` - * The direction diodes face. See [`DIRECT_PINS` in the hardware configuration](https://docs.qmk.fm/#/config_options?id=hardware-options) for more details. + * The direction diodes face. See [`DIRECT_PINS` in the hardware configuration](https://docs.qmk.fm/#/config_options?id=hardware-options) for more details. * `layout_aliases` - * A dictionary containing layout aliases. The key is the alias and the value is a layout in `layouts` it maps to. + * A dictionary containing layout aliases. The key is the alias and the value is a layout in `layouts` it maps to. * `layouts` - * Physical Layout representations. See the [Layout Format](#layout_format) section for more detail. + * Physical Layout representations. See the [Layout Format](#layout_format) section for more detail. * `matrix_pins` - * Configure the pins corresponding to columns and rows, or direct pins. See [Matrix Pins](#matrix_pins) for more detail. + * Configure the pins corresponding to columns and rows, or direct pins. See the [Matrix Pins](#matrix_pins) section for more detail. * `rgblight` - * Configure the [RGB Lighting feature](feature_rgblight.md). See the [RGB Lighting](#rgb_lighting) section for more detail. + * Configure the [RGB Lighting feature](feature_rgblight.md). See the [RGB Lighting](#rgb_lighting) section for more detail. * `usb` - * Configure USB VID, PID, and other parameters. See [USB](#USB) for more detail. + * Configure USB VID, PID, and other parameters. See the [USB](#USB) section for more detail. ### Layout Format Within our `info.json` file the `layouts` portion of the dictionary contains several nested dictionaries. The outer layer consists of QMK layout macros, for example `LAYOUT_ansi` or `LAYOUT_iso`. * `layout` - * A list of Key Dictionaries describing the physical layout. See the next section for more details. + * A list of Key Dictionaries describing the physical layout. See the next section for more details. ### Key Dictionary Format @@ -44,18 +50,20 @@ Each Key Dictionary in a layout describes the physical properties of a key. If y All key positions and rotations are specified in relation to the top-left corner of the keyboard, and the top-left corner of each key. * `x` - * **Required**: The absolute position of the key in the horizontal axis, in Key Units. + * **Required**. The absolute position of the key in the horizontal axis, in Key Units. * `y` - * **Required**: The absolute position of the key in the vertical axis, in Key Units. + * **Required**. The absolute position of the key in the vertical axis, in Key Units. * `w` - * The width of the key, in Key Units. Ignored if `ks` is provided. Default: `1` + * The width of the key, in Key Units. + * Default: `1` * `h` - * The height of the key, in Key Units. Ignored if `ks` is provided. Default: `1` + * The height of the key, in Key Units. + * Default: `1` * `label` - * What to name this position in the matrix. - * This should usually correspond to the keycode for the first layer of the default keymap. + * What to name this position in the matrix. This should usually correspond to the keycode for the first layer of the default keymap. * `matrix` - * A 2 item list describing the row and column location for this key. + * A two item list describing the row and column location for this key. + * Example: `[0, 4]` ### Matrix Pins @@ -69,11 +77,11 @@ Example: ```json { - "diode_direction": "COL2ROW", - "matrix_pins": { - "cols": ["F4", "E6", "B1", "D2"], - "rows": ["B0", "D3", "D5", "D4", "D6"] - } + "diode_direction": "COL2ROW", + "matrix_pins": { + "cols": ["F4", "E6", "B1", "D2"], + "rows": ["B0", "D3", "D5", "D4", "D6"] + } } ``` @@ -144,23 +152,23 @@ Example: } ``` -#### RGB Light Animations +#### RGBLight Animations The following animations can be enabled: -| Key | Description | -|-----|-------------| -| `all` | Enable all additional animation modes. | -| `alternating` | Enable alternating animation mode. | -| `breathing` | Enable breathing animation mode. | -| `christmas` | Enable christmas animation mode. | -| `knight` | Enable knight animation mode. | -| `rainbow_mood` | Enable rainbow mood animation mode. | -| `rainbow_swirl` | Enable rainbow swirl animation mode. | -| `rgb_test` | Enable RGB test animation mode. | -| `snake` | Enable snake animation mode. | -| `static_gradient` | Enable static gradient mode. | -| `twinkle` | Enable twinkle animation mode. | +|Key |Description | +|-----------------|--------------------------------------| +|`all` |Enable all additional animation modes.| +|`alternating` |Enable alternating animation mode. | +|`breathing` |Enable breathing animation mode. | +|`christmas` |Enable christmas animation mode. | +|`knight` |Enable knight animation mode. | +|`rainbow_mood` |Enable rainbow mood animation mode. | +|`rainbow_swirl` |Enable rainbow swirl animation mode. | +|`rgb_test` |Enable RGB test animation mode. | +|`snake` |Enable snake animation mode. | +|`static_gradient`|Enable static gradient mode. | +|`twinkle` |Enable twinkle animation mode. | ### USB @@ -170,10 +178,10 @@ Example: ```json { - "usb": { - "vid": "0xC1ED", - "pid": "0x23B0", - "device_ver": "0x0001" - } + "usb": { + "vid": "0xC1ED", + "pid": "0x23B0", + "device_ver": "0x0001" + } } ``` diff --git a/keyboards/fjlabs/mk61rgbansi/config.h b/keyboards/fjlabs/mk61rgbansi/config.h new file mode 100644 index 0000000000..4d459b6f88 --- /dev/null +++ b/keyboards/fjlabs/mk61rgbansi/config.h @@ -0,0 +1,121 @@ +/* +Copyright 2021 <me@fjlaboratories.com> + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x7074 // FJLabs +#define PRODUCT_ID 0x1011 // mk61-rgb-ansi +#define DEVICE_VER 0x0001 // Version 1 +#define MANUFACTURER Mechanical Keyboards LLC +#define PRODUCT MK61-RGB-ANSI + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 14 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ + +// Checked with Eagle Schematic +#define MATRIX_ROW_PINS { F0, F1, F4, F5, F6 } +#define MATRIX_COL_PINS { C7, C6, B6, B5, B4, D7, D6, D4, D5, D3, D2, B3, B2, B1 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* Define RGB Underglow */ +#define RGB_DI_PIN F7 +#define RGBLED_NUM 64 +#define RGBLIGHT_EFFECT_BREATHING +#define RGBLIGHT_EFFECT_RAINBOW_MOOD +#define RGBLIGHT_EFFECT_RAINBOW_SWIRL +#define RGBLIGHT_EFFECT_SNAKE +#define RGBLIGHT_EFFECT_KNIGHT +#define RGBLIGHT_EFFECT_CHRISTMAS +#define RGBLIGHT_EFFECT_STATIC_GRADIENT +#define RGBLIGHT_EFFECT_RGB_TEST +#define RGBLIGHT_EFFECT_ALTERNATING +#define RGBLIGHT_EFFECT_TWINKLE +#define RGBLIGHT_LIMIT_VAL 108 +#define RGB_VAL_STEP 12 +#define RGBLIGHT_DEFAULT_SPD 144 +#define RGBLIGHT_DEFAULT_MODE RGBLIGHT_MODE_RAINBOW_SWIRL +/* #define RGBLIGHT_LAYER_BLINK*/ + +/* Define less important options */ + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION diff --git a/keyboards/fjlabs/mk61rgbansi/info.json b/keyboards/fjlabs/mk61rgbansi/info.json new file mode 100644 index 0000000000..84cc8a46ae --- /dev/null +++ b/keyboards/fjlabs/mk61rgbansi/info.json @@ -0,0 +1,76 @@ +{ + "keyboard_name": "MK61-RGB-ANSI", + "url": "https://www.fjlaboratories.com/", + "maintainer": "Mechanical Keyboards, LLC", + "layouts": { + "LAYOUT_60_ansi": { + "layout": [ + {"x": 0, "y": 0}, + {"x": 1, "y": 0}, + {"x": 2, "y": 0}, + {"x": 3, "y": 0}, + {"x": 4, "y": 0}, + {"x": 5, "y": 0}, + {"x": 6, "y": 0}, + {"x": 7, "y": 0}, + {"x": 8, "y": 0}, + {"x": 9, "y": 0}, + {"x": 10, "y": 0}, + {"x": 11, "y": 0}, + {"x": 12, "y": 0}, + {"x": 13, "y": 0, "w": 2}, + + {"x": 0, "y": 1, "w": 1.5}, + {"x": 1.5, "y": 1}, + {"x": 2.5, "y": 1}, + {"x": 3.5, "y": 1}, + {"x": 4.5, "y": 1}, + {"x": 5.5, "y": 1}, + {"x": 6.5, "y": 1}, + {"x": 7.5, "y": 1}, + {"x": 8.5, "y": 1}, + {"x": 9.5, "y": 1}, + {"x": 10.5, "y": 1}, + {"x": 11.5, "y": 1}, + {"x": 12.5, "y": 1}, + {"x": 13.5, "y": 1, "w": 1.5}, + + {"x": 0, "y": 2, "w": 1.75}, + {"x": 1.75, "y": 2}, + {"x": 2.75, "y": 2}, + {"x": 3.75, "y": 2}, + {"x": 4.75, "y": 2}, + {"x": 5.75, "y": 2}, + {"x": 6.75, "y": 2}, + {"x": 7.75, "y": 2}, + {"x": 8.75, "y": 2}, + {"x": 9.75, "y": 2}, + {"x": 10.75, "y": 2}, + {"x": 11.75, "y": 2}, + {"x": 12.75, "y": 2, "w": 2.25}, + + {"x": 0, "y": 3, "w": 2.25}, + {"x": 2.25, "y": 3}, + {"x": 3.25, "y": 3}, + {"x": 4.25, "y": 3}, + {"x": 5.25, "y": 3}, + {"x": 6.25, "y": 3}, + {"x": 7.25, "y": 3}, + {"x": 8.25, "y": 3}, + {"x": 9.25, "y": 3}, + {"x": 10.25, "y": 3}, + {"x": 11.25, "y": 3}, + {"x": 12.25, "y": 3, "w": 2.75}, + + {"x": 0, "y": 4, "w": 1.25}, + {"x": 1.25, "y": 4, "w": 1.25}, + {"x": 2.5, "y": 4, "w": 1.25}, + {"x": 3.75, "y": 4, "w": 6.25}, + {"x": 10, "y": 4, "w": 1.25}, + {"x": 11.25, "y": 4, "w": 1.25}, + {"x": 12.5, "y": 4, "w": 1.25}, + {"x": 13.75, "y": 4, "w": 1.25} + ] + } + } +} diff --git a/keyboards/fjlabs/mk61rgbansi/keymaps/default/keymap.c b/keyboards/fjlabs/mk61rgbansi/keymaps/default/keymap.c new file mode 100644 index 0000000000..7873f0e5e5 --- /dev/null +++ b/keyboards/fjlabs/mk61rgbansi/keymaps/default/keymap.c @@ -0,0 +1,40 @@ +/* +Copyright 2021 <me@fjlaboratories.com> +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#include QMK_KEYBOARD_H + +enum layers { + _LAYER0, + _LAYER1, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_LAYER0] = LAYOUT_60_ansi( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, + KC_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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTRL + ), + + [_LAYER1] = LAYOUT_60_ansi( + KC_GESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, + KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUSE, RESET, + KC_TRNS, RGB_SPI, RGB_SPD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, NK_TOGG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) + +};
\ No newline at end of file diff --git a/keyboards/fjlabs/mk61rgbansi/keymaps/via/keymap.c b/keyboards/fjlabs/mk61rgbansi/keymaps/via/keymap.c new file mode 100644 index 0000000000..2e4dac7fc2 --- /dev/null +++ b/keyboards/fjlabs/mk61rgbansi/keymaps/via/keymap.c @@ -0,0 +1,58 @@ +/* +Copyright 2021 <me@fjlaboratories.com> +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#include QMK_KEYBOARD_H + +enum layers { + _LAYER0, + _LAYER1, + _LAYER2, + _LAYER3, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_LAYER0] = LAYOUT_60_ansi( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, + KC_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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTRL + ), + + [_LAYER1] = LAYOUT_60_ansi( + KC_GESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, + KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUSE, RESET, + KC_TRNS, RGB_SPI, RGB_SPD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, NK_TOGG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + [_LAYER2] = LAYOUT_60_ansi( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + [_LAYER3] = LAYOUT_60_ansi( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + +}; diff --git a/keyboards/fjlabs/mk61rgbansi/keymaps/via/rules.mk b/keyboards/fjlabs/mk61rgbansi/keymaps/via/rules.mk new file mode 100644 index 0000000000..1e5b99807c --- /dev/null +++ b/keyboards/fjlabs/mk61rgbansi/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/fjlabs/mk61rgbansi/mk61rgbansi.c b/keyboards/fjlabs/mk61rgbansi/mk61rgbansi.c new file mode 100644 index 0000000000..5bf82ad443 --- /dev/null +++ b/keyboards/fjlabs/mk61rgbansi/mk61rgbansi.c @@ -0,0 +1,13 @@ +/* Copyright 2021 <me@fjlaboratories.com> +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ +#include "mk61rgbansi.h" diff --git a/keyboards/fjlabs/mk61rgbansi/mk61rgbansi.h b/keyboards/fjlabs/mk61rgbansi/mk61rgbansi.h new file mode 100644 index 0000000000..8ab4873e08 --- /dev/null +++ b/keyboards/fjlabs/mk61rgbansi/mk61rgbansi.h @@ -0,0 +1,32 @@ +/* +Copyright 2021 <me@fjlaboratories.com> +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#pragma once + +#include "quantum.h" + +/* MK61-RGB-ANSI Keymap Definitions */ +#define LAYOUT_60_ansi( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3C, \ + K40, K41, K42, K45, K49, K4A, K4C, K4D \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, KC_NO, K3C, KC_NO }, \ + { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, KC_NO, K49, K4A, KC_NO, K4C, K4D } \ +} diff --git a/keyboards/fjlabs/mk61rgbansi/readme.md b/keyboards/fjlabs/mk61rgbansi/readme.md new file mode 100644 index 0000000000..6425f09406 --- /dev/null +++ b/keyboards/fjlabs/mk61rgbansi/readme.md @@ -0,0 +1,14 @@ +# Mechanical Keyboards, LLC MK61-RGB-ANSI + +The following is the QMK Firmware for the Mechanical Keyboards, LLC MK61-RGB-ANSI PCB. + +--- + +* Keyboard Maintainer: Mechanical Keyboards, LLC +* Hardware Supported: MK61-RGB-ANSI + +Make example for this keyboard (after setting up your build environment): + + make fjlabs/mk61-rgb-ansi:default + +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). You can enter the bootloader by pressing the reset button on the back of the PCB. diff --git a/keyboards/fjlabs/mk61rgbansi/rules.mk b/keyboards/fjlabs/mk61rgbansi/rules.mk new file mode 100644 index 0000000000..dbd20b9e1e --- /dev/null +++ b/keyboards/fjlabs/mk61rgbansi/rules.mk @@ -0,0 +1,26 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency +F_CPU = 8000000 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output + +LAYOUTS = 60_ansi diff --git a/keyboards/keebio/iris/keymaps/sq5rix/config.h b/keyboards/keebio/iris/keymaps/sq5rix/config.h new file mode 100644 index 0000000000..8c576917e8 --- /dev/null +++ b/keyboards/keebio/iris/keymaps/sq5rix/config.h @@ -0,0 +1,25 @@ +/* +Copyright 2017 Danny Nguyen <danny@keeb.io> + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#pragma once +#define EE_HANDS +#define TAPPING_TERM 164 +#define IGNORE_MOD_TAP_INTERRUPT +#define PERMISSIVE_HOLD +#define RGBLIGHT_LAYERS +#define ENCODER_RESOLUTION 4 +#define ENCODER_DEFAULT_POS 0x3 diff --git a/keyboards/keebio/iris/keymaps/sq5rix/keymap.c b/keyboards/keebio/iris/keymaps/sq5rix/keymap.c new file mode 100644 index 0000000000..19a939a55b --- /dev/null +++ b/keyboards/keebio/iris/keymaps/sq5rix/keymap.c @@ -0,0 +1,185 @@ +// Copyright 2021 Tomasz Wawer (@sq5rix) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +enum layers { + _BEAKL15, + _LOWER, + _RAISE, + _MOUSE +}; + +enum custom_keycodes { + LT_DAT = SAFE_RANGE, + LT_COM, + LT_QUOT +}; + +#define LOWER LT(_LOWER, KC_ENT) +#define LOWER2 LT(_LOWER, KC_T) +#define RAISE LT(_RAISE, KC_SPC) +#define RAISE2 LT(_RAISE, KC_BSPC) +#define MOUSE LT(_MOUSE, KC_A) + +#define SH_ESC MT(MOD_LSFT, KC_ESC) +#define SH_CWD MT(MOD_LALT, KC_BSPC) +#define SH_LTAB MT(MOD_LALT, KC_TAB) +#define SH_UND MT(MOD_LCTL, KC_UNDS) +#define SH_Z MT(MOD_LCTL, KC_Z) + +#define SH_LGS MT(MOD_LGUI, KC_B) +#define AL_I ALGR_T(KC_I) +#define AL_N ALGR_T(KC_N) + +// Tap Dance definitions +enum { + TD_S +}; +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_S] = ACTION_TAP_DANCE_DOUBLE(KC_S, KC_Z), +}; + +bool sh_key(keyrecord_t *record, uint8_t sk, uint8_t nk); +bool sh_key8(keyrecord_t *record, uint8_t sk, uint8_t nk); + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BEAKL15] = LAYOUT( + TG(_RAISE), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL, + SH_LTAB, KC_Q, KC_H, KC_O, KC_U, KC_X, KC_G, KC_C, KC_R, KC_F, KC_Z, KC_LGUI, + SH_UND, KC_Y, AL_I, KC_E, MOUSE, LT_DAT, KC_D, TD(TD_S),LOWER2, AL_N, KC_B, KC_SCLN, + KC_LSFT, KC_J, KC_SLSH, LT_COM, KC_K, LT_QUOT, RGB_TOG, BL_TOGG, KC_W, KC_M, KC_L, KC_P, KC_V, KC_RSFT, + SH_Z, LOWER, RAISE, SH_ESC, RAISE2, SH_LTAB + ), + + [_LOWER] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_LT, KC_DLR, KC_GT, KC_EXLM, _______, KC_LBRC, KC_UNDS, KC_RBRC, KC_EXLM, _______, + _______, KC_BSLS, KC_LPRN, KC_DQUO, KC_RPRN, KC_HASH, KC_PERC, KC_LCBR, KC_EQL, KC_RCBR, KC_PIPE, _______, + _______, KC_SCLN, KC_SLSH, KC_ASTR, KC_PLUS, _______, _______, _______, _______, KC_AMPR, KC_CIRC, KC_TILD, KC_SCLN, _______, + _______, _______, _______, _______, _______, _______ + + ), + + [_RAISE] = LAYOUT( + _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_BRIGHTNESS_DOWN, KC_BRIGHTNESS_UP, KC_PSCREEN, _______, _______, _______, _______, RESET, + _______, KC_SLSH, KC_6, KC_5, KC_4, KC_EQL, KC_CIRC, KC_PGUP, KC_UP, KC_PGDN, _______, RGB_VAI, + _______, KC_3, KC_2, KC_1, KC_0, KC_DOT, KC_EQL, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, + _______, KC_ASTR, KC_9, KC_8, KC_7, KC_PLUS, _______, _______, KC_PLUS, KC_HOME, KC_COLN, KC_END, _______, RGB_MOD, + _______, _______, _______, _______, _______, _______ + ), + + [_MOUSE] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_BTN1, KC_MS_U, KC_BTN2, _______, _______, + _______, _______, _______, KC_BTN1, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BTN3, _______, _______, _______, + _______, _______, _______, _______, _______, _______ + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case LT_DAT: + return sh_key8(record, KC_2, KC_DOT); + case LT_COM: + return sh_key8(record, KC_1, KC_COMM); + case LT_QUOT: + return sh_key(record, KC_GRV, KC_QUOT); + default: + return true; + } +} + +bool sh_key(keyrecord_t *record, uint8_t sk, uint8_t nk){ + if (record->event.pressed) { + if (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT)){ + unregister_code(KC_LSFT); + unregister_code(KC_RSFT); + register_code(sk); + } else { + register_code(nk); + } + } + else { + unregister_code16(sk); + unregister_code(nk); + } + return false; +} + +bool sh_key8(keyrecord_t *record, uint8_t sk, uint8_t nk){ + if (record->event.pressed) { + if (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT)){ + register_code(sk); + } else { + register_code(nk); + } + } + else { + unregister_code(sk); + unregister_code(nk); + } + return false; +} + +bool encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + if (clockwise) { + tap_code16(C(G(KC_LEFT))); + } else { + tap_code16(C(G(KC_RGHT))); + } + } + // tmux screen + else if (index == 1) { + switch(biton32(layer_state)){ + case 0: + if (clockwise) { + send_string(SS_LCTL("B")"p"); + } else { + send_string(SS_LCTL("B")"n"); + } + break; + case _RAISE: + if (clockwise) { + tap_code16(C(G(KC_PGUP))); + } else { + tap_code16(C(G(KC_PGDN))); + } + break; + } + } + return true; +} + +const rgblight_segment_t PROGMEM raise_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {1, 12, HSV_RED} +); +const rgblight_segment_t PROGMEM lower_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {1, 12, HSV_BLUE} +); +const rgblight_segment_t PROGMEM mouse_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {1, 12, HSV_GREEN} +); + +// Now define the array of layers. Later layers take precedence +const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST( + lower_layer, + raise_layer, + mouse_layer +); + +void keyboard_post_init_user(void) { + // Enable the LED layers + rgblight_layers = my_rgb_layers; +} + +layer_state_t layer_state_set_user(layer_state_t state) { + rg |