diff options
139 files changed, 6481 insertions, 447 deletions
diff --git a/keyboards/3w6/info.json b/keyboards/3w6/info.json new file mode 100644 index 000000000..5a0e9be2f --- /dev/null +++ b/keyboards/3w6/info.json | |||
| @@ -0,0 +1,56 @@ | |||
| 1 | { | ||
| 2 | "keyboard_name": "3w6", | ||
| 3 | "url": "https://github.com/weteor/3W6/", | ||
| 4 | "maintainer": "weteor", | ||
| 5 | "width": 13, | ||
| 6 | "height": 5, | ||
| 7 | "layouts": { | ||
| 8 | "LAYOUT": { | ||
| 9 | "layout": [ | ||
| 10 | {"label": "k00", "x": 0, "y": 0.8}, | ||
| 11 | {"label": "k01", "x": 1, "y": 0.2}, | ||
| 12 | {"label": "k02", "x": 2, "y": 0}, | ||
| 13 | {"label": "k03", "x": 3, "y": 0.2}, | ||
| 14 | {"label": "k04", "x": 4, "y": 0.4}, | ||
| 15 | |||
| 16 | {"label": "k05", "x": 8, "y": 0.4}, | ||
| 17 | {"label": "k06", "x": 9, "y": 0.2}, | ||
| 18 | {"label": "k07", "x": 10, "y": 0}, | ||
| 19 | {"label": "k08", "x": 11, "y": 0.2}, | ||
| 20 | {"label": "k09", "x": 12, "y": 0.8}, | ||
| 21 | |||
| 22 | {"label": "k10", "x": 0, "y": 1.8}, | ||
| 23 | {"label": "k11", "x": 1, "y": 1.2}, | ||
| 24 | {"label": "k12", "x": 2, "y": 1}, | ||
| 25 | {"label": "k13", "x": 3, "y": 1.2}, | ||
| 26 | {"label": "k14", "x": 4, "y": 1.4}, | ||
| 27 | |||
| 28 | {"label": "k15", "x": 8, "y": 1.4}, | ||
| 29 | {"label": "k16", "x": 9, "y": 1.2}, | ||
| 30 | {"label": "k17", "x": 10, "y": 1}, | ||
| 31 | {"label": "k18", "x": 11, "y": 1.2}, | ||
| 32 | {"label": "k19", "x": 12, "y": 1.8}, | ||
| 33 | |||
| 34 | {"label": "k20", "x": 0, "y": 2.8}, | ||
| 35 | {"label": "k21", "x": 1, "y": 2.2}, | ||
| 36 | {"label": "k22", "x": 2, "y": 2}, | ||
| 37 | {"label": "k23", "x": 3, "y": 2.2}, | ||
| 38 | {"label": "k24", "x": 4, "y": 2.4}, | ||
| 39 | |||
| 40 | {"label": "k25", "x": 8, "y": 2.4}, | ||
| 41 | {"label": "k26", "x": 9, "y": 2.2}, | ||
| 42 | {"label": "k27", "x": 10, "y": 2}, | ||
| 43 | {"label": "k28", "x": 11, "y": 2.2}, | ||
| 44 | {"label": "k29", "x": 12, "y": 2.8}, | ||
| 45 | |||
| 46 | {"label": "k32", "x": 3.2, "y": 3.6}, | ||
| 47 | {"label": "k33", "x": 4.2, "y": 3.6}, | ||
| 48 | {"label": "k34", "x": 5.2, "y": 3.8}, | ||
| 49 | |||
| 50 | {"label": "k35", "x": 6.8, "y": 3.8}, | ||
| 51 | {"label": "k36", "x": 7.8, "y": 3.6}, | ||
| 52 | {"label": "k37", "x": 8.8, "y": 3.6} | ||
| 53 | ] | ||
| 54 | } | ||
| 55 | } | ||
| 56 | } | ||
diff --git a/keyboards/3w6/keymaps/default/keymap.c b/keyboards/3w6/keymaps/default/keymap.c new file mode 100644 index 000000000..029173b67 --- /dev/null +++ b/keyboards/3w6/keymaps/default/keymap.c | |||
| @@ -0,0 +1,69 @@ | |||
| 1 | /* Copyright 2021 weteor | ||
| 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 | enum layers | ||
| 20 | { | ||
| 21 | _ALPHA_QWERTY = 0, | ||
| 22 | _ALPHA_COLEMAK, | ||
| 23 | _SYM, | ||
| 24 | _NAV, | ||
| 25 | _NUM, | ||
| 26 | _CFG, | ||
| 27 | }; | ||
| 28 | |||
| 29 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 30 | |||
| 31 | |||
| 32 | [_ALPHA_QWERTY] = LAYOUT( | ||
| 33 | KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, | ||
| 34 | KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, | ||
| 35 | LSFT_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, RSFT_T(KC_SLSH), | ||
| 36 | |||
| 37 | LCTL_T(KC_ESC), LT(_NUM,KC_SPC), LT(_NAV, KC_TAB), LT(_SYM, KC_BSPC), KC_ENT, LALT_T(KC_DEL) | ||
| 38 | ), | ||
| 39 | [_ALPHA_COLEMAK] = LAYOUT( | ||
| 40 | KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_QUOT, | ||
| 41 | KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, | ||
| 42 | LSFT_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, RSFT_T(KC_SCLN), | ||
| 43 | LCTL_T(KC_ENT), LT(_NUM,KC_SPC), LT(_NAV, KC_TAB), LT(_SYM, KC_BSPC), KC_ENT, LALT_T(KC_DEL) | ||
| 44 | ), | ||
| 45 | [_SYM] = LAYOUT( | ||
| 46 | KC_GRV , KC_CIRC, KC_AT, KC_DLR, KC_TILD, KC_AMPR, KC_EXLM, KC_PIPE, KC_UNDS, KC_HASH, | ||
| 47 | KC_SLSH, KC_LBRC, KC_LCBR, KC_LPRN, KC_EQL, KC_ASTR, KC_RPRN, KC_RCBR, KC_RBRC, KC_BSLS, | ||
| 48 | _______, KC_QUES, KC_PLUS, KC_PERC, XXXXXXX, XXXXXXX, XXXXXXX, KC_MINS, XXXXXXX, _______, | ||
| 49 | XXXXXXX, MO(_CFG), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX | ||
| 50 | ), | ||
| 51 | [_NAV] = LAYOUT( | ||
| 52 | XXXXXXX, KC_VOLD, KC_MUTE, KC_VOLU, XXXXXXX, XXXXXXX, KC_PGDN, KC_UP, KC_PGUP, KC_DEL, | ||
| 53 | KC_MPRV, KC_MPLY, KC_MSTP, KC_MNXT, XXXXXXX, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, | ||
| 54 | XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | ||
| 55 | XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MO(_CFG), XXXXXXX | ||
| 56 | ), | ||
| 57 | [_NUM] = LAYOUT( | ||
| 58 | XXXXXXX, KC_F9, KC_F10, KC_F11, KC_F12, KC_PPLS, KC_P7, KC_P8, KC_P9, KC_PSLS, | ||
| 59 | XXXXXXX, KC_F5, KC_F6, KC_F7, KC_F8, KC_P0, KC_P4, KC_P5, KC_P6, KC_PDOT, | ||
| 60 | XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_PMNS, KC_P1, KC_P2, KC_P3, KC_PAST, | ||
| 61 | XXXXXXX, XXXXXXX, XXXXXXX, KC_PEQL, KC_PENT, XXXXXXX | ||
| 62 | ), | ||
| 63 | [_CFG] = LAYOUT( | ||
| 64 | XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,DF(_ALPHA_QWERTY), DF(_ALPHA_COLEMAK), | ||
| 65 | XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | ||
| 66 | XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | ||
| 67 | XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX | ||
| 68 | ), | ||
| 69 | }; | ||
diff --git a/keyboards/3w6/keymaps/manna-harbour_miryoku/config.h b/keyboards/3w6/keymaps/manna-harbour_miryoku/config.h new file mode 100644 index 000000000..fb567ad7d --- /dev/null +++ b/keyboards/3w6/keymaps/manna-harbour_miryoku/config.h | |||
| @@ -0,0 +1,32 @@ | |||
| 1 | /* Copyright 2021 weteor | ||
| 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 | // generated from users/manna-harbour_miryoku/miryoku.org -*- buffer-read-only: t -*- | ||
| 18 | |||
| 19 | #pragma once | ||
| 20 | |||
| 21 | #define LAYOUT_miryoku( \ | ||
| 22 | K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, \ | ||
| 23 | K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, \ | ||
| 24 | K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, \ | ||
| 25 | N30, N31, K32, K33, K34, K35, K36, K37, N38, N39 \ | ||
| 26 | ) \ | ||
| 27 | LAYOUT( \ | ||
| 28 | K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, \ | ||
| 29 | K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, \ | ||
| 30 | K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, \ | ||
| 31 | K32, K33, K34, K35, K36, K37 \ | ||
| 32 | ) | ||
diff --git a/keyboards/3w6/keymaps/manna-harbour_miryoku/keymap.c b/keyboards/3w6/keymaps/manna-harbour_miryoku/keymap.c new file mode 100644 index 000000000..74df5e0fe --- /dev/null +++ b/keyboards/3w6/keymaps/manna-harbour_miryoku/keymap.c | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | /* Copyright 2021 weteor | ||
| 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 | // generated from users/manna-harbour_miryoku/miryoku.org -*- buffer-read-only: t -*- | ||
diff --git a/keyboards/3w6/readme.md b/keyboards/3w6/readme.md new file mode 100644 index 000000000..5878376bd --- /dev/null +++ b/keyboards/3w6/readme.md | |||
| @@ -0,0 +1,45 @@ | |||
| 1 | # 3W6 | ||
| 2 | |||
| 3 |  | ||
| 4 | |||
| 5 | The 3w6 is a low profile, split ortholinear keyboard with 36 keys. | ||
| 6 | |||
| 7 | I needed a keyboard for work and wasn't really satisfied with the available alternatives (namely Corne, Kyria and Ferris), mostly because they are either rather large and/or don't have the spacing I would like. | ||
| 8 | |||
| 9 | The 3w6 is designed to be a simple, realiable, cheap and small keyboard to be taken everywhere. | ||
| 10 | |||
| 11 | There are currently two revisions: | ||
| 12 | * Rev1: | ||
| 13 | - onboard microcontroller (ATMega32U4) | ||
| 14 | - USB-C connector Board <-> PC | ||
| 15 | - USB-C connectors between both split halfs | ||
| 16 | - choc spacing (18x17mm) | ||
| 17 | - aggressive pinky stagger | ||
| 18 | - support for Choc V1 switches | ||
| 19 | * Rev2: | ||
| 20 | - everything Rev1 did | ||
| 21 | - additional middle plate (2mm) | ||
| 22 | - support for [Pimoroni Trackball](https://shop.pimoroni.com/products/trackball-breakout) instead of outer thumb switch on right half, needs midplate | ||
| 23 | - mounting holes for [Tenting Puck](https://splitkb.com/collections/keyboard-parts/products/tenting-puck), only usable without mid or switchplate | ||
| 24 | |||
| 25 | --- | ||
| 26 | |||
| 27 | * Keyboard Maintainer: [weteor](https://github.com/weteor) | ||
| 28 | * Hardware Supported: | ||
| 29 | * 3w6 rev1 | ||
| 30 | * 3w6 rev2 (with Pimoroni support) | ||
| 31 | * Hardware Availability: | ||
| 32 | * make one yourself: [Design and Productionfiles](https://github.com/weteor/3w6) | ||
| 33 | * maintainer is selling kits when available | ||
| 34 | --- | ||
| 35 | To reach the bootloader, connect the board to the PC and push the reset button on left half. | ||
| 36 | |||
| 37 | Make examples for this keyboard (after setting up your build environment): | ||
| 38 | |||
| 39 | make 3w6/rev1:default | ||
| 40 | make 3w6/rev2:default | ||
| 41 | make 3w6/rev2:default_pimoroni | ||
| 42 | |||
| 43 | --- | ||
| 44 | |||
| 45 | 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/3w6/rev1/config.h b/keyboards/3w6/rev1/config.h new file mode 100644 index 000000000..1f0bab97f --- /dev/null +++ b/keyboards/3w6/rev1/config.h | |||
| @@ -0,0 +1,63 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2021 weteor | ||
| 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 | |||
| 21 | /* USB Device descriptor parameter */ | ||
| 22 | #define VENDOR_ID 0xFEED | ||
| 23 | #define PRODUCT_ID 0x4658 | ||
| 24 | #define DEVICE_VER 0x0001 | ||
| 25 | #define MANUFACTURER weteor | ||
| 26 | #define PRODUCT 3w6 | ||
| 27 | |||
| 28 | /* key matrix size */ | ||
| 29 | #define MATRIX_ROWS 8 | ||
| 30 | #define MATRIX_COLS 10 | ||
| 31 | |||
| 32 | #define MATRIX_ROWS_PER_SIDE (MATRIX_ROWS / 2) | ||
| 33 | #define MATRIX_COLS_PER_SIDE (MATRIX_COLS / 2) | ||
| 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_L { B0, B1, B2, B4} | ||
| 46 | #define MATRIX_COL_PINS_L { B3, E6, F7, B6, B5 } | ||
| 47 | #define UNUSED_PINS_L { B7, C6, C7, D2, D3, D4, D5, D6, D7, F0, F1, F4, F5, F6 } | ||
| 48 | |||
| 49 | #define MATRIX_ROW_PINS_R { P10, P11, P12, P05 } | ||
| 50 | #define MATRIX_COL_PINS_R { P06, P13, P14, P01, P00 } | ||
| 51 | #define UNUSED_PINS_R { P02, P03, P04, P07, P15, P16, P17 } | ||
| 52 | |||
| 53 | |||
| 54 | /* COL2ROW, ROW2COL */ | ||
| 55 | #define DIODE_DIRECTION COL2ROW | ||
| 56 | |||
| 57 | /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ | ||
| 58 | #define DEBOUNCE 5 | ||
| 59 | |||
| 60 | /* disable these deprecated features by default */ | ||
| 61 | #define NO_ACTION_MACRO | ||
| 62 | #define NO_ACTION_FUNCTION | ||
| 63 | |||
diff --git a/keyboards/3w6/rev1/matrix.c b/keyboards/3w6/rev1/matrix.c new file mode 100644 index 000000000..7262fd22e --- /dev/null +++ b/keyboards/3w6/rev1/matrix.c | |||
| @@ -0,0 +1,280 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2013 Oleg Kostyuk <cub.uanic@gmail.com> | ||
| 3 | 2020 Pierre Chevalier <pierrechevalier83@gmail.com> | ||
| 4 | 2021 weteor | ||
| 5 | |||
| 6 | This program is free software: you can redistribute it and/or modify | ||
| 7 | it under the terms of the GNU General Public License as published by | ||
| 8 | the Free Software Foundation, either version 2 of the License, or | ||
| 9 | (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, see <http://www.gnu.org/licenses/>. | ||
| 18 | */ | ||
| 19 | |||
| 20 | /* | ||
| 21 | * This code was heavily inspired by the ergodox_ez keymap, and modernized | ||
| 22 | * to take advantage of the quantum.h microcontroller agnostics gpio control | ||
| 23 | * abstractions and use the macros defined in config.h for the wiring as opposed | ||
| 24 | * to repeating that information all over the place. | ||
| 25 | */ | ||
| 26 | |||
| 27 | #include QMK_KEYBOARD_H | ||
| 28 | #include "i2c_master.h" | ||
| 29 | |||
| 30 | extern i2c_status_t tca9555_status; | ||
| 31 | #define I2C_TIMEOUT 1000 | ||
| 32 | |||
| 33 | // I2C address: | ||
| 34 | // All address pins of the tca9555 are connected to the ground | ||
| 35 | // | 0 | 1 | 0 | 0 | A2 | A1 | A0 | | ||
| 36 | // | 0 | 1 | 0 | 0 | 0 | 0 | 0 | | ||
| 37 | #define I2C_ADDR 0b0100000 | ||
| 38 | #define I2C_ADDR_WRITE ((I2C_ADDR << 1) | I2C_WRITE) | ||
| 39 | #define I2C_ADDR_READ ((I2C_ADDR << 1) | I2C_READ) | ||
| 40 | |||
| 41 | // Register addresses | ||
| 42 | #define IODIRA 0x06 // i/o direction register | ||
| 43 | #define IODIRB 0x07 | ||
| 44 | #define IREGP0 0x00 // GPIO pull-up resistor register | ||
| 45 | #define IREGP1 0x01 | ||
| 46 | #define OREGP0 0x02 // general purpose i/o port register (write modifies OLAT) | ||
| 47 | #define OREGP1 0x03 | ||
| 48 | |||
| 49 | bool i2c_initialized = 0; | ||
| 50 | i2c_status_t tca9555_status = I2C_ADDR; | ||
| 51 | |||
| 52 | uint8_t init_tca9555(void) { | ||
| 53 | print("starting init"); | ||
| 54 | tca9555_status = I2C_ADDR; | ||
| 55 | |||
| 56 | // I2C subsystem | ||
| 57 | if (i2c_initialized == 0) { | ||
| 58 | i2c_init(); // on pins D(1,0) | ||
| 59 | i2c_initialized = true; | ||
| 60 | wait_ms(I2C_TIMEOUT); | ||
| 61 | } | ||
| 62 | |||
| 63 | // set pin direction | ||
| 64 | // - unused : input : 1 | ||
| 65 | // - input : input : 1 | ||
| 66 | // - driving : output : 0 | ||
| 67 | tca9555_status = i2c_start(I2C_ADDR_WRITE, I2C_TIMEOUT); | ||
| 68 | if (tca9555_status) goto out; | ||
| 69 | tca9555_status = i2c_write(IODIRA, I2C_TIMEOUT); | ||
| 70 | if (tca9555_status) goto out; | ||
| 71 | // This means: write on pin 5 of port 0, read on rest | ||
| 72 | tca9555_status = i2c_write(0b11011111, I2C_TIMEOUT); | ||
| 73 | if (tca9555_status) goto out; | ||
| 74 | // This means: we will write on pins 0 to 2 on port 1. read rest | ||
| 75 | tca9555_status = i2c_write(0b11111000, I2C_TIMEOUT); | ||
| 76 | if (tca9555_status) goto out; | ||
| 77 | |||
| 78 | out: | ||
| 79 | i2c_stop(); | ||
| 80 | return tca9555_status; | ||
| 81 | } | ||
| 82 | |||
| 83 | /* matrix state(1:on, 0:off) */ | ||
| 84 | static matrix_row_t matrix[MATRIX_ROWS]; // debounced values | ||
| 85 | |||
| 86 | static matrix_row_t read_cols(uint8_t row); | ||
| 87 | static void init_cols(void); | ||
| 88 | static void unselect_rows(void); | ||
| 89 | static void select_row(uint8_t row); | ||
| 90 | |||
| 91 | static uint8_t tca9555_reset_loop; | ||
| 92 | |||
| 93 | void matrix_init_custom(void) { | ||
| 94 | // initialize row and col | ||
| 95 | |||
| 96 | tca9555_status = init_tca9555(); | ||
| 97 | |||
| 98 | unselect_rows(); | ||
| 99 | init_cols(); | ||
| 100 | |||
| 101 | // initialize matrix state: all keys off | ||
| 102 | for (uint8_t i = 0; i < MATRIX_ROWS; i++) { | ||
| 103 | matrix[i] = 0; | ||
| 104 | } | ||
| 105 | } | ||
| 106 | |||
| 107 | void matrix_power_up(void) { | ||
| 108 | tca9555_status = init_tca9555(); | ||
| 109 | |||
| 110 | unselect_rows(); | ||
| 111 | init_cols(); | ||
| 112 | |||
| 113 | // initialize matrix state: all keys off | ||
| 114 | for (uint8_t i = 0; i < MATRIX_ROWS; i++) { | ||
| 115 | matrix[i] = 0; | ||
| 116 | } | ||
| 117 | } | ||
| 118 | |||
| 119 | // Reads and stores a row, returning | ||
| 120 | // whether a change occurred. | ||
| 121 | static inline bool store_matrix_row(matrix_row_t current_matrix[], uint8_t index) { | ||
| 122 | matrix_row_t temp = read_cols(index); | ||
| 123 | if (current_matrix[index] != temp) { | ||
| 124 | current_matrix[index] = temp; | ||
| 125 | return true; | ||
| 126 | } | ||
| 127 | return false; | ||
| 128 | } | ||
| 129 | |||
| 130 | bool matrix_scan_custom(matrix_row_t current_matrix[]) { | ||
| 131 | if (tca9555_status) { // if there was an error | ||
| 132 | if (++tca9555_reset_loop == 0) { | ||
| 133 | // since tca9555_reset_loop is 8 bit - we'll try to reset once in 255 matrix scans | ||
| 134 | // this will be approx bit more frequent than once per second | ||
| 135 | dprint("trying to reset tca9555\n"); | ||
| 136 | tca9555_status = init_tca9555(); | ||
| 137 | if (tca9555_status) { | ||
| 138 | dprint("right side not responding\n"); | ||
| 139 | } else { | ||
| 140 | dprint("right side attached\n"); | ||
| 141 | } | ||
| 142 | } | ||
| 143 | } | ||
| 144 | |||
| 145 | bool changed = false; | ||
| 146 | for (uint8_t i = 0; i < MATRIX_ROWS_PER_SIDE; i++) { | ||
| 147 | // select rows from left and right hands | ||
| 148 | uint8_t left_index = i; | ||
| 149 | uint8_t right_index = i + MATRIX_ROWS_PER_SIDE; | ||
| 150 | select_row(left_index); | ||
| 151 | select_row(right_index); | ||
| 152 | |||
| 153 | // we don't need a 30us delay anymore, because selecting a | ||
| 154 | // left-hand row requires more than 30us for i2c. | ||
| 155 | |||
| 156 | changed |= store_matrix_row(current_matrix, left_index); | ||
| 157 | changed |= store_matrix_row(current_matrix, right_index); | ||
| 158 | |||
| 159 | unselect_rows(); | ||
| 160 | } | ||
| 161 | |||
| 162 | return changed; | ||
| 163 | } | ||
| 164 | |||
| 165 | static void init_cols(void) { | ||
| 166 | // init on tca9555 | ||
| 167 | // not needed, already done as part of init_tca9555() | ||
| 168 | |||
| 169 | // init on mcu | ||
| 170 | pin_t matrix_col_pins_mcu[MATRIX_COLS_PER_SIDE] = MATRIX_COL_PINS_L; | ||
| 171 | for (int pin_index = 0; pin_index < MATRIX_COLS_PER_SIDE; pin_index++) { | ||
| 172 | pin_t pin = matrix_col_pins_mcu[pin_index]; | ||
| 173 | setPinInput(pin); | ||
| 174 | writePinHigh(pin); | ||
| 175 | } | ||
| 176 | } | ||
| 177 | |||
| 178 | static matrix_row_t read_cols(uint8_t row) { | ||
| 179 | if (row < MATRIX_ROWS_PER_SIDE) { | ||
| 180 | pin_t matrix_col_pins_mcu[MATRIX_COLS_PER_SIDE] = MATRIX_COL_PINS_L; | ||
| 181 | matrix_row_t current_row_value = 0; | ||
| 182 | // For each col... | ||
| 183 | for (uint8_t col_index = 0; col_index < MATRIX_COLS_PER_SIDE; col_index++) { | ||
| 184 | // Select the col pin to read (active low) | ||
| 185 | uint8_t pin_state = readPin(matrix_col_pins_mcu[col_index]); | ||
| 186 | |||
| 187 | // Populate the matrix row with the state of the col pin | ||
| 188 | current_row_value |= pin_state ? 0 : (MATRIX_ROW_SHIFTER << col_index); | ||
| 189 | } | ||
| 190 | return current_row_value; | ||
| 191 | } else { | ||
| 192 | if (tca9555_status) { // if there was an error | ||
| 193 | return 0; | ||
| 194 | } else { | ||
| 195 | uint8_t data = 0; | ||
| 196 | uint8_t port0 = 0; | ||
| 197 | uint8_t port1 = 0; | ||
| 198 | tca9555_status = i2c_start(I2C_ADDR_WRITE, I2C_TIMEOUT); | ||
| 199 | if (tca9555_status) goto out; | ||
| 200 | tca9555_status = i2c_write(IREGP0, I2C_TIMEOUT); | ||
| 201 | if (tca9555_status) goto out; | ||
| 202 | tca9555_status = i2c_start(I2C_ADDR_READ, I2C_TIMEOUT); | ||
| 203 | if (tca9555_status) goto out; | ||
| 204 | tca9555_status = i2c_read_ack(I2C_TIMEOUT); | ||
| 205 | if (tca9555_status < 0) goto out; | ||
| 206 | port0 = (uint8_t)tca9555_status; | ||
| 207 | tca9555_status = i2c_read_nack(I2C_TIMEOUT); | ||
| 208 | if (tca9555_status < 0) goto out; | ||
| 209 | port1 = (uint8_t)tca9555_status; | ||
| 210 | |||
| 211 | // The initial state was all ones and any depressed key at a given column for the currently selected row will have its bit flipped to zero. | ||
| 212 | // The return value is a row as represented in the generic matrix code were the rightmost bits represent the lower columns and zeroes represent non-depressed keys while ones represent depressed keys. | ||
| 213 | // Since the pins are not ordered sequentially, we have to build the correct dataset from the two ports. Refer to the schematic to see where every pin is connected. | ||
| 214 | data |= ( port0 & 0x01 ); | ||
| 215 | data |= ( port0 & 0x02 ); | ||
| 216 | data |= ( port1 & 0x10 ) >> 2; | ||
| 217 | data |= ( port1 & 0x08 ); | ||
| 218 | data |= ( port0 & 0x40 ) >> 2; | ||
| 219 | data = ~(data); | ||
| 220 | |||
| 221 | tca9555_status = I2C_STATUS_SUCCESS; | ||
| 222 | out: | ||
| 223 | i2c_stop(); | ||
| 224 | return data; | ||
| 225 | } | ||
| 226 | } | ||
| 227 | } | ||
| 228 | |||
| 229 | static void unselect_rows(void) { | ||
| 230 | // no need to unselect on tca9555, because the select step sets all | ||
| 231 | // the other row bits high, and it's not changing to a different | ||
| 232 | // direction | ||
| 233 | |||
| 234 | // unselect rows on microcontroller | ||
| 235 | pin_t matrix_row_pins_mcu[MATRIX_ROWS_PER_SIDE] = MATRIX_ROW_PINS_L; | ||
| 236 | for (int pin_index = 0; pin_index < MATRIX_ROWS_PER_SIDE; pin_index++) { | ||
| 237 | pin_t pin = matrix_row_pins_mcu[pin_index]; | ||
| 238 | setPinInput(pin); | ||
| 239 | writePinLow(pin); | ||
| 240 | } | ||
| 241 | } | ||
| 242 | |||
| 243 | static void select_row(uint8_t row) { | ||
| 244 | uint8_t port0 = 0xff; | ||
| 245 | uint8_t port1 = 0xff; | ||
| 246 | |||
| 247 | if (row < MATRIX_ROWS_PER_SIDE) { | ||
| 248 | // select on atmega32u4 | ||
| 249 | pin_t matrix_row_pins_mcu[MATRIX_ROWS_PER_SIDE] = MATRIX_ROW_PINS_L; | ||
| 250 | pin_t pin = matrix_row_pins_mcu[row]; | ||
| 251 | setPinOutput(pin); | ||
| 252 | writePinLow(pin); | ||
| 253 | } else { | ||
| 254 | // select on tca9555 | ||
| 255 | if (tca9555_status) { // if there was an error | ||
| 256 | // do nothing | ||
| 257 | } else { | ||
| 258 | switch(row) { | ||
| 259 | case 4: port1 &= ~(1 << 0); break; | ||
| 260 | case 5: port1 &= ~(1 << 1); break; | ||
| 261 | case 6: port1 &= ~(1 << 2); break; | ||
| 262 | case 7: port0 &= ~(1 << 5); break; | ||
| 263 | default: break; | ||
| 264 | } | ||
| 265 | |||
| 266 | tca9555_status = i2c_start(I2C_ADDR_WRITE, I2C_TIMEOUT); | ||
| 267 | if (tca9555_status) goto out; | ||
| 268 | tca9555_status = i2c_write(OREGP0, I2C_TIMEOUT); | ||
| 269 | if (tca9555_status) goto out; | ||
| 270 | tca9555_status = i2c_write(port0, I2C_TIMEOUT); | ||
| 271 | if (tca9555_status) goto out; | ||
| 272 | tca9555_status = i2c_write(port1, I2C_TIMEOUT); | ||
| 273 | if (tca9555_status) goto out; | ||
| 274 | // Select the desired row by writing a byte for the entire GPIOB bus where only the bit representing the row we want to select is a zero (write instruction) and every other bit is a one. | ||
| 275 | // Note that the row - MATRIX_ROWS_PER_SIDE reflects the fact that being on the right hand, the columns are numbered from MATRIX_ROWS_PER_SIDE to MATRIX_ROWS, but the pins we want to write to are indexed from zero up on the GPIOB bus. | ||
| 276 | out: | ||
| 277 | i2c_stop(); | ||
| 278 | } | ||
| 279 | } | ||
| 280 | } | ||
diff --git a/keyboards/3w6/rev1/readme.md b/keyboards/3w6/rev1/readme.md new file mode 100644 index 000000000..4d806f922 --- /dev/null +++ b/keyboards/3w6/rev1/readme.md | |||
| @@ -0,0 +1,32 @@ | |||
| 1 | # 3W6 | ||
| 2 | |||
| 3 |  | ||
| 4 |  | ||
| 5 | |||
| 6 | The 3w6 is a low profile, split ortholinear keyboard with 36 keys. | ||
| 7 | |||
| 8 | * Rev1: | ||
| 9 | - onboard microcontroller (ATMega32U4) | ||
| 10 | - USB-C connector Board <-> PC | ||
| 11 | - USB-C connectors between both split halfs | ||
| 12 | - choc spacing (18x17mm) | ||
| 13 | - aggressive pinky stagger | ||
| 14 | - support for Choc V1 switches | ||
| 15 | |||
| 16 | --- | ||
| 17 | |||
| 18 | * Keyboard Maintainer: [weteor](https://github.com/weteor) | ||
| 19 | * Hardware Supported: | ||
| 20 | * 3w6 rev1 | ||
| 21 | * Hardware Availability (this is an older version, current revision is rev2): | ||
| 22 | * make one yourself: [Design and Productionfiles](https://github.com/weteor/3w6) | ||
| 23 | --- | ||
| 24 | To reach the bootloader, connect the board to the PC and push the reset button on left half. | ||
| 25 | |||
| 26 | Make examples for this keyboard (after setting up your build environment): | ||
| 27 | |||
| 28 | make 3w6/rev1:default | ||
| 29 | |||
| 30 | --- | ||
| 31 | |||
| 32 | 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/3w6/rev1/rev1.c b/keyboards/3w6/rev1/rev1.c new file mode 100644 index 000000000..3944ec3b1 --- /dev/null +++ b/keyboards/3w6/rev1/rev1.c | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | /* Copyright 2021 weteor | ||
| 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 "rev1.h" | ||
diff --git a/keyboards/3w6/rev1/rev1.h b/keyboards/3w6/rev1/rev1.h new file mode 100644 index 000000000..ba881ca43 --- /dev/null +++ b/keyboards/3w6/rev1/rev1.h | |||
| @@ -0,0 +1,44 @@ | |||
| 1 | /* Copyright 2021 weteor | ||
| 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 | #pragma once | ||
| 18 | |||
| 19 | #include "quantum.h" | ||
| 20 | |||
| 21 | /* This is a shortcut to help you visually see your layout. | ||
| 22 | * | ||
| 23 | * The first section contains all of the arguments representing the physical | ||
| 24 | * layout of the board and position of the keys. | ||
| 25 | * | ||
| 26 | * The second converts the arguments into a two-dimensional array which | ||
| 27 | * represents the switch matrix. | ||
| 28 | */ | ||
| 29 | #define LAYOUT( \ | ||
| 30 | k00, k01, k02, k03, k04, k05, k06, k07, k08, k09,\ | ||
| 31 | k10, k11, k12, k13, k14, k15, k16, k17, k18, k19,\ | ||
| 32 | k20, k21, k22, k23, k24, k25, k26, k27, k28, k29,\ | ||
| 33 | k32, k33, k34, k35, k36, k37\ | ||
| 34 | ) { \ | ||
| 35 | { k00, k01, k02, k03, k04 }, \ | ||
| 36 | { k10, k11, k12, k13, k14 }, \ | ||
| 37 | { k20, k21, k22, k23, k24 }, \ | ||
| 38 | { KC_NO, KC_NO, k32, k33, k34 }, \ | ||
| 39 | \ | ||
| 40 | { k05, k06, k07, k08, k09 }, \ | ||
| 41 | { k15, k16, k17, k18, k19 }, \ | ||
| 42 | { k25, k26, k27, k28, k29 }, \ | ||
| 43 | { k35, k36, k37, KC_NO, KC_NO }, \ | ||
| 44 | } | ||
diff --git a/keyboards/3w6/rev1/rules.mk b/keyboards/3w6/rev1/rules.mk new file mode 100644 index 000000000..d4876dde7 --- /dev/null +++ b/keyboards/3w6/rev1/rules.mk | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | # MCU name | ||
| 2 | MCU = atmega32u4 | ||
| 3 | |||
| 4 | # Bootloader selection | ||
| 5 | BOOTLOADER = atmel-dfu | ||
| 6 | |||
| 7 | # Build Options | ||
| 8 | # change yes to no to disable | ||
| 9 | # | ||
| 10 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration | ||
| 11 | MOUSEKEY_ENABLE = yes # Mouse keys | ||
| 12 | EXTRAKEY_ENABLE = yes # Audio control and System control | ||
| 13 | CONSOLE_ENABLE = no # Console for debug | ||
| 14 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
| 15 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
| 16 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
| 17 | # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
| 18 | NKRO_ENABLE = no # USB Nkey Rollover | ||
| 19 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | ||
| 20 | RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow | ||
| 21 | BLUETOOTH_ENABLE = no # Enable Bluetooth | ||
| 22 | AUDIO_ENABLE = no # Audio output | ||
| 23 | UNICODE_ENABLE = yes | ||
| 24 | CUSTOM_MATRIX = lite | ||
| 25 | NO_USB_STARTUP_CHECK = yes | ||
| 26 | LTO_ENABLE = no | ||
| 27 | |||
| 28 | SRC += matrix.c | ||
| 29 | QUANTUM_LIB_SRC += i2c_master.c | ||
diff --git a/keyboards/3w6/rev2/config.h b/keyboards/3w6/rev2/config.h new file mode 100644 index 000000000..d19136060 --- /dev/null +++ b/keyboards/3w6/rev2/config.h | |||
| @@ -0,0 +1,63 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2021 weteor | ||
| 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 | |||
| 21 | /* USB Device descriptor parameter */ | ||
| 22 | #define VENDOR_ID 0xFEED | ||
| 23 | #define PRODUCT_ID 0x4658 | ||
| 24 | #define DEVICE_VER 0x0002 | ||
| 25 | #define MANUFACTURER weteor | ||
| 26 | #define PRODUCT 3w6 | ||
| 27 | |||
| 28 | /* key matrix size */ | ||
| 29 | #define MATRIX_ROWS 8 | ||
| 30 | #define MATRIX_COLS 10 | ||
| 31 | |||
| 32 | #define MATRIX_ROWS_PER_SIDE (MATRIX_ROWS / 2) | ||
| 33 | #define MATRIX_COLS_PER_SIDE (MATRIX_COLS / 2) | ||
| 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_L { B0, B1, B2, B4} | ||
| 46 | #define MATRIX_COL_PINS_L { B3, E6, F7, B6, B5 } | ||
| 47 | #define UNUSED_PINS_L { B7, C6, C7, D2, D3, D4, D5, D6, D7, F0, F1, F4, F5, F6 } | ||
| 48 | |||
| 49 | #define MATRIX_ROW_PINS_R { P10, P11, P12, P05 } | ||
| 50 | #define MATRIX_COL_PINS_R { P06, P13, P14, P01, P00 } | ||
| 51 | #define UNUSED_PINS_R { P02, P03, P04, P07, P15, P16, P17 } | ||
| 52 | |||
| 53 | |||
| 54 | /* COL2ROW, ROW2COL */ | ||
| 55 | #define DIODE_DIRECTION COL2ROW | ||
| 56 | |||
| 57 | /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ | ||
| 58 | #define DEBOUNCE 5 | ||
| 59 | |||
| 60 | /* disable these deprecated features by default */ | ||
| 61 | #define NO_ACTION_MACRO | ||
| 62 | #define NO_ACTION_FUNCTION | ||
| 63 | |||
diff --git a/keyboards/3w6/rev2/keymaps/default_pimoroni/config.h b/keyboards/3w6/rev2/keymaps/default_pimoroni/config.h new file mode 100644 index 000000000..45c9d5154 --- /dev/null +++ b/keyboards/3w6/rev2/keymaps/default_pimoroni/config.h | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | /* Copyright 2021 weteor | ||
| 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 | #pragma once | ||
| 18 | |||
| 19 | #define PIMORONI_TRACKBALL_INVERT_Y | ||
| 20 | #define PIMORONI_TRACKBALL_ROTATE | ||
| 21 | |||
diff --git a/keyboards/3w6/rev2/keymaps/default_pimoroni/keymap.c b/keyboards/3w6/rev2/keymaps/default_pimoroni/keymap.c new file mode 100644 index 000000000..a5b8c6006 --- /dev/null +++ b/keyboards/3w6/rev2/keymaps/default_pimoroni/keymap.c | |||
| @@ -0,0 +1,70 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2021 weteor | ||
| 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 | #include QMK_KEYBOARD_H | ||
| 19 | |||
| 20 | enum layers | ||
| 21 | { | ||
| 22 | _ALPHA_QWERTY = 0, | ||
| 23 | _ALPHA_COLEMAK, | ||
| 24 | _SYM, | ||
| 25 | _NAV, | ||
| 26 | _NUM, | ||
| 27 | _CFG, | ||
| 28 | }; | ||
| 29 | |||
| 30 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 31 | |||
| 32 | |||
| 33 | [_ALPHA_QWERTY] = LAYOUT( | ||
| 34 | KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, | ||
| 35 | KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, | ||
| 36 | LSFT_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, RSFT_T(KC_SLSH), | ||
| 37 | |||
| 38 | LCTL_T(KC_ESC), LT(_NUM,KC_SPC), LT(_NAV, KC_TAB), LT(_SYM, KC_BSPC), KC_ENT, LALT_T(KC_DEL) | ||
| 39 | ), | ||
| 40 | [_ALPHA_COLEMAK] = LAYOUT( | ||
| 41 | KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_QUOT, | ||
| 42 | KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, | ||
| 43 | LSFT_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, RSFT_T(KC_SCLN), | ||
| 44 | LCTL_T(KC_ENT), LT(_NUM,KC_SPC), LT(_NAV, KC_TAB), LT(_SYM, KC_BSPC), KC_ENT, LALT_T(KC_DEL) | ||
| 45 | ), | ||
| 46 | [_SYM] = LAYOUT( | ||
| 47 | KC_GRV , KC_CIRC, KC_AT, KC_DLR, KC_TILD, KC_AMPR, KC_EXLM, KC_PIPE, KC_UNDS, KC_HASH, | ||
| 48 | KC_SLSH, KC_LBRC, KC_LCBR, KC_LPRN, KC_EQL, KC_ASTR, KC_RPRN, KC_RCBR, KC_RBRC, KC_BSLS, | ||
| 49 | _______, KC_QUES, KC_PLUS, KC_PERC, XXXXXXX, XXXXXXX, XXXXXXX, KC_MINS, XXXXXXX, _______, | ||
| 50 | XXXXXXX, MO(_CFG), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX | ||
| 51 | ), | ||
| 52 | [_NAV] = LAYOUT( | ||
| 53 | XXXXXXX, KC_VOLD, KC_MUTE, KC_VOLU, XXXXXXX, XXXXXXX, KC_PGDN, KC_UP, KC_PGUP, KC_DEL, | ||
| 54 | KC_MPRV, KC_MPLY, KC_MSTP, KC_MNXT, XXXXXXX, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, | ||
| 55 | XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | ||
| 56 | XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MO(_CFG), XXXXXXX | ||
| 57 | ), | ||
| 58 | [_NUM] = LAYOUT( | ||
| 59 | XXXXXXX, KC_F9, KC_F10, KC_F11, KC_F12, KC_PPLS, KC_P7, KC_P8, KC_P9, KC_PSLS, | ||
| 60 | XXXXXXX, KC_F5, KC_F6, KC_F7, KC_F8, KC_P0, KC_P4, KC_P5, KC_P6, KC_PDOT, | ||
| 61 | XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_PMNS, KC_P1, KC_P2, KC_P3, KC_PAST, | ||
| 62 | XXXXXXX, XXXXXXX, XXXXXXX, KC_PEQL, KC_PENT, XXXXXXX | ||
| 63 | ), | ||
| 64 | [_CFG] = LAYOUT( | ||
| 65 | XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,DF(_ALPHA_QWERTY), DF(_ALPHA_COLEMAK), | ||
| 66 | XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | ||
| 67 | XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | ||
| 68 | XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX | ||
| 69 | ), | ||
| 70 | }; | ||
diff --git a/keyboards/3w6/rev2/keymaps/default_pimoroni/pimoroni_trackball.c b/keyboards/3w6/rev2/keymaps/default_pimoroni/pimoroni_trackball.c new file mode 100644 index 000000000..c4f4a0441 --- /dev/null +++ b/keyboards/3w6/rev2/keymaps/default_pimoroni/pimoroni_trackball.c | |||
| @@ -0,0 +1,177 @@ | |||
| 1 | /* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com> | ||
| 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 "pimoroni_trackball.h" | ||
| 18 | #include "i2c_master.h" | ||
| 19 | |||
| 20 | static uint8_t scrolling = 0; | ||
| 21 | static int16_t x_offset = 0; | ||
| 22 | static int16_t y_offset = 0; | ||
| 23 | static int16_t h_offset = 0; | ||
| 24 | static int16_t v_offset = 0; | ||
| 25 | static float precisionSpeed = 1; | ||
| 26 | |||
| 27 | static uint16_t i2c_timeout_timer; | ||
| 28 | |||
| 29 | #ifndef I2C_TIMEOUT | ||
| 30 | # define I2C_TIMEOUT 100 | ||
| 31 | #endif | ||
| 32 | #ifndef I2C_WAITCHECK | ||
| 33 | # define I2C_WAITCHECK 1000 | ||
| 34 | #endif | ||
| 35 | #ifndef MOUSE_DEBOUNCE | ||
| 36 | # define MOUSE_DEBOUNCE 5 | ||
| 37 | #endif | ||
| 38 | |||
| 39 | void trackball_set_rgbw(uint8_t red, uint8_t green, uint8_t blue, uint8_t white) { | ||
| 40 | uint8_t data[] = {0x00, red, green, blue, white}; | ||
| 41 | i2c_transmit(TRACKBALL_WRITE, data, sizeof(data), I2C_TIMEOUT); | ||
| 42 | } | ||
| 43 | |||
| 44 | int16_t mouse_offset(uint8_t positive, uint8_t negative, int16_t scale) { | ||
| 45 | int16_t offset = (int16_t)positive - (int16_t)negative; | ||
| 46 | int16_t magnitude = (int16_t)(scale * offset * offset * precisionSpeed); | ||
| 47 | return offset < 0 ? -magnitude : magnitude; | ||
| 48 | } | ||
| 49 | |||
| 50 | void update_member(int8_t* member, int16_t* offset) { | ||
| 51 | if (*offset > 127) { | ||
| 52 | *member = 127; | ||
| 53 | *offset -= 127; | ||
| 54 | } else if (*offset < -127) { | ||
| 55 | *member = -127; | ||
| 56 | *offset += 127; | ||
| 57 | } else { | ||
| 58 | *member = *offset; | ||
| 59 | *offset = 0; | ||
| 60 | } | ||
| 61 | } | ||
| 62 | |||
| 63 | __attribute__((weak)) void trackball_check_click(bool pressed, report_mouse_t* mouse) { | ||
| 64 | if (pressed) { | ||
| 65 | mouse->buttons |= MOUSE_BTN1; | ||
| 66 | } else { | ||
| 67 | mouse->buttons &= ~MOUSE_BTN1; | ||
| 68 | } | ||
| 69 | } | ||
| 70 | |||
| 71 | bool process_record_kb(uint16_t keycode, keyrecord_t* record) { | ||
| 72 | if (true) { | ||
| 73 | xprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed); | ||
| 74 | } | ||
| 75 | |||
| 76 | |||
| 77 | if (!process_record_user(keycode, record)) { return false; } | ||
| 78 | |||
| 79 | /* If Mousekeys is disabled, then use handle the mouse button | ||
| 80 | * keycodes. This makes things simpler, and allows usage of | ||
| 81 | * the keycodes in a consistent manner. But only do this if | ||
| 82 | * Mousekeys is not enable, so it's not handled twice. | ||
| 83 | */ | ||
| 84 | #ifndef MOUSEKEY_ENABLE | ||
| 85 | if (IS_MOUSEKEY_BUTTON(keycode)) { | ||
| 86 | report_mouse_t currentReport = pointing_device_get_report(); | ||
| 87 | if (record->event.pressed) { | ||
| 88 | currentReport.buttons |= 1 << (keycode - KC_MS_BTN1); | ||
| 89 | } else { | ||
| 90 | currentReport.buttons &= ~(1 << (keycode - KC_MS_BTN1)); | ||
| 91 | } | ||
| 92 | pointing_device_set_report(currentReport); | ||
| 93 | pointing_device_send(); | ||
| 94 | } | ||
| 95 | #endif | ||
| 96 | |||
| 97 | return true; | ||
| 98 | } | ||
| 99 | |||
| 100 | void trackball_register_button(bool pressed, enum mouse_buttons button) { | ||
| 101 | report_mouse_t currentReport = pointing_device_get_report(); | ||
| 102 | if (pressed) { | ||
| 103 | currentReport.buttons |= button; | ||
| 104 | } else { | ||
| 105 | currentReport.buttons &= ~button; | ||
| 106 | } | ||
| 107 | pointing_device_set_report(currentReport); | ||
| 108 | } | ||
| 109 | |||
| 110 | float trackball_get_precision(void) { return precisionSpeed; } | ||
| 111 | void trackball_set_precision(float precision) { precisionSpeed = precision; } | ||
| 112 | bool trackball_is_scrolling(void) { return scrolling; } | ||
| 113 | void trackball_set_scrolling(bool scroll) { scrolling = scroll; } | ||
| 114 | |||
| 115 | |||
| 116 | __attribute__((weak)) void pointing_device_init(void) { trackball_set_rgbw(0x80, 0x00, 0x00, 0x00); } | ||
| 117 | |||
| 118 | void pointing_device_task(void) { | ||
| 119 | static bool debounce; | ||
| 120 | static uint16_t debounce_timer; | ||
| 121 | uint8_t state[5] = {}; | ||
| 122 | if (timer_elapsed(i2c_timeout_timer) > I2C_WAITCHECK) { | ||
| 123 | if (i2c_readReg(TRACKBALL_WRITE, 0x04, state, 5, I2C_TIMEOUT) == I2C_STATUS_SUCCESS) { | ||
| 124 | if (!state[4] && !debounce) { | ||
| 125 | if (scrolling) { | ||
| 126 | #ifdef PIMORONI_TRACKBALL_INVERT_X | ||
| 127 | h_offset += mouse_offset(state[2], state[3], 1); | ||
| 128 | #else | ||
| 129 | h_offset -= mouse_offset(state[2], state[3], 1); | ||
| 130 | #endif | ||
| 131 | #ifdef PIMORONI_TRACKBALL_INVERT_Y | ||
| 132 | v_offset += mouse_offset(state[1], state[0], 1); | ||
| 133 | #else | ||
| 134 | v_offset -= mouse_offset(state[1], state[0], 1); | ||
| 135 | #endif | ||
| 136 | } else { | ||
| 137 | #ifdef PIMORONI_TRACKBALL_INVERT_X | ||
| 138 | x_offset -= mouse_offset(state[2], state[3], 5); | ||
| 139 | #else | ||
| 140 | x_offset += mouse_offset(state[2], state[3], 5); | ||
| 141 | #endif | ||
| 142 | #ifdef PIMORONI_TRACKBALL_INVERT_Y | ||
| 143 | y_offset -= mouse_offset(state[1], state[0], 5); | ||
| 144 | #else | ||
| 145 | y_offset += mouse_offset(state[1], state[0], 5); | ||
| 146 | #endif | ||
| 147 | } | ||
| 148 | } else { | ||
| 149 | if (state[4]) { | ||
| 150 | debounce = true; | ||
| 151 | debounce_timer = timer_read(); | ||
| 152 | } | ||
| 153 | } | ||
| 154 | } else { | ||
| 155 | i2c_timeout_timer = timer_read(); | ||
| 156 | } | ||
| 157 | } | ||
| 158 | |||
| 159 | if (timer_elapsed(debounce_timer) > MOUSE_DEBOUNCE) debounce = false; | ||
| 160 | |||
| 161 | report_mouse_t mouse = pointing_device_get_report(); | ||
| 162 | // trackball_check_click(state[4] & (1 << 7), &mouse); | ||
| 163 | |||
| 164 | #ifndef PIMORONI_TRACKBALL_ROTATE | ||
| 165 | update_member(&mouse.x, &x_offset); | ||
| 166 | update_member(&mouse.y, &y_offset); | ||
| 167 | update_member(&mouse.h, &h_offset); | ||
| 168 | update_member(&mouse.v, &v_offset); | ||
| 169 | #else | ||
| 170 | update_member(&mouse.x, &y_offset); | ||
| 171 | update_member(&mouse.y, &x_offset); | ||
| 172 | update_member(&mouse.h, &v_offset); | ||
| 173 | update_member(&mouse.v, &h_offset); | ||
| 174 | #endif | ||
| 175 | pointing_device_set_report(mouse); | ||
| 176 | pointing_device_send(); | ||
| 177 | } | ||
diff --git a/keyboards/3w6/rev2/keymaps/default_pimoroni/pimoroni_trackball.h b/keyboards/3w6/rev2/keymaps/default_pimoroni/pimoroni_trackball.h new file mode 100644 index 000000000..cfcd5a47a --- /dev/null +++ b/keyboards/3w6/rev2/keymaps/default_pimoroni/pimoroni_trackball.h | |||
| @@ -0,0 +1,35 @@ | |||
| 1 | /* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com> | ||
| 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 | #pragma once | ||
| 18 | |||
| 19 | #include "quantum.h" | ||
| 20 | #include "pointing_device.h" | ||
| 21 | |||
| 22 | #ifndef TRACKBALL_ADDRESS | ||
| 23 | # define TRACKBALL_ADDRESS 0x0A | ||
| 24 | #endif | ||
| 25 | #define TRACKBALL_WRITE ((TRACKBALL_ADDRESS << 1) | I2C_WRITE) | ||
| 26 | #define TRACKBALL_READ ((TRACKBALL_ADDRESS << 1) | I2C_READ) | ||
| 27 | |||
| 28 | void trackball_set_rgbw(uint8_t red, uint8_t green, uint8_t blue, uint8_t white); | ||
| 29 | void trackball_check_click(bool pressed, report_mouse_t *mouse); | ||
| 30 | void trackball_register_button(bool pressed, enum mouse_buttons button); | ||
| 31 | |||
| 32 | float trackball_get_precision(void); | ||
| 33 | void trackball_set_precision(float precision); | ||
| 34 | bool trackball_is_scrolling(void); | ||
| 35 | void trackball_set_scrolling(bool scroll); \ No newline at end of file | ||
diff --git a/keyboards/3w6/rev2/keymaps/default_pimoroni/rules.mk b/keyboards/3w6/rev2/keymaps/default_pimoroni/rules.mk new file mode 100644 index 000000000..231a88371 --- /dev/null +++ b/keyboards/3w6/rev2/keymaps/default_pimoroni/rules.mk | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | POINTING_DEVICE_ENABLE = yes | ||
| 2 | SRC += pimoroni_trackball.c | ||
| 3 | MOUSEKEY_ENABLE = no | ||
diff --git a/keyboards/3w6/rev2/matrix.c b/keyboards/3w6/rev2/matrix.c new file mode 100644 index 000000000..5bc967bed --- /dev/null +++ b/keyboards/3w6/rev2/matrix.c | |||
| @@ -0,0 +1,275 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2013 Oleg Kostyuk <cub.uanic@gmail.com> | ||
| 3 | 2020 Pierre Chevalier <pierrechevalier83@gmail.com> | ||
| 4 | 2021 weteor | ||
| 5 | |||
| 6 | This program is free software: you can redistribute it and/or modify | ||
| 7 | it under the terms of the GNU General Public License as published by | ||
| 8 | the Free Software Foundation, either version 2 of the License, or | ||
| 9 | (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, see <http://www.gnu.org/licenses/>. | ||
| 18 | */ | ||
| 19 | |||
| 20 | /* | ||
| 21 | * This code was heavily inspired by the ergodox_ez keymap, and modernized | ||
| 22 | * to take advantage of the quantum.h microcontroller agnostics gpio control | ||
| 23 | * abstractions and use the macros defined in config.h for the wiring as opposed | ||
| 24 | * to repeating that information all over the place. | ||
| 25 | */ | ||
| 26 | |||
| 27 | #include QMK_KEYBOARD_H | ||
| 28 | #include "i2c_master.h" | ||
| 29 | |||
| 30 | extern i2c_status_t tca9555_status; | ||
| 31 | #define I2C_TIMEOUT 1000 | ||
| 32 | |||
| 33 | // I2C address: | ||
| 34 | // All address pins of the tca9555 are connected to the ground | ||
| 35 | // | 0 | 1 | 0 | 0 | A2 | A1 | A0 | | ||
| 36 | // | 0 | 1 | 0 | 0 | 0 | 0 | 0 | | ||
| 37 | #define I2C_ADDR 0b0100000 | ||
| 38 | #define I2C_ADDR_WRITE ((I2C_ADDR << 1) | I2C_WRITE) | ||
| 39 | #define I2C_ADDR_READ ((I2C_ADDR << 1) | I2C_READ) | ||
| 40 | |||
| 41 | // Register addresses | ||
| 42 | #define IODIRA 0x06 // i/o direction register | ||
| 43 | #define IODIRB 0x07 | ||
| 44 | #define IREGP0 0x00 // GPIO pull-up resistor register | ||
| 45 | #define IREGP1 0x01 | ||
| 46 | #define OREGP0 0x02 // general purpose i/o port register (write modifies OLAT) | ||
| 47 | #define OREGP1 0x03 | ||
| 48 | |||
| 49 | bool i2c_initialized = 0; | ||
| 50 | i2c_status_t tca9555_status = I2C_ADDR; | ||
| 51 | |||
| 52 | uint8_t init_tca9555(void) { | ||
| 53 | print("starting init"); | ||
| 54 | tca9555_status = I2C_ADDR; | ||
| 55 | |||
| 56 | // I2C subsystem | ||
| 57 | if (i2c_initialized == 0) { | ||
| 58 | i2c_init(); // on pins D(1,0) | ||
| 59 | i2c_initialized = true; | ||
| 60 | wait_ms(I2C_TIMEOUT); | ||
| 61 | } | ||
| 62 | |||
| 63 | // set pin direction | ||
| 64 | // - unused : input : 1 | ||
| 65 | // - input : input : 1 | ||
| 66 | // - driving : output : 0 | ||
| 67 | tca9555_status = i2c_start(I2C_ADDR_WRITE, I2C_TIMEOUT); | ||
| 68 | if (tca9555_status) goto out; | ||
| 69 | tca9555_status = i2c_write(IODIRA, I2C_TIMEOUT); | ||
| 70 | if (tca9555_status) goto out; | ||
| 71 | // This means: read all pins of port 0 | ||
| 72 | tca9555_status = i2c_write(0b11111111, I2C_TIMEOUT); | ||
| 73 | if (tca9555_status) goto out; | ||
| 74 | // This means: we will write on pins 0 to 3 on port 1. read rest | ||
| 75 | tca9555_status = i2c_write(0b11110000, I2C_TIMEOUT); | ||
| 76 | if (tca9555_status) goto out; | ||
| 77 | |||
| 78 | out: | ||
| 79 | i2c_stop(); | ||
| 80 | return tca9555_status; | ||
| 81 | } | ||
| 82 | |||
| 83 | /* matrix state(1:on, 0:off) */ | ||
| 84 | static matrix_row_t matrix[MATRIX_ROWS]; // debounced values | ||
| 85 | |||
| 86 | static matrix_row_t read_cols(uint8_t row); | ||
| 87 | static void init_cols(void); | ||
| 88 | static void unselect_rows(void); | ||
| 89 | static void select_row(uint8_t row); | ||
| 90 | |||
| 91 | static uint8_t tca9555_reset_loop; | ||
| 92 | |||
| 93 | void matrix_init_custom(void) { | ||
| 94 | // initialize row and col | ||
| 95 | |||
| 96 | tca9555_status = init_tca9555(); | ||
| 97 | |||
| 98 | unselect_rows(); | ||
| 99 | init_cols(); | ||
| 100 | |||
| 101 | // initialize matrix state: all keys off | ||
| 102 | for (uint8_t i = 0; i < MATRIX_ROWS; i++) { | ||
| 103 | matrix[i] = 0; | ||
| 104 | } | ||
| 105 | } | ||
| 106 | |||
| 107 | void matrix_power_up(void) { | ||
| 108 | tca9555_status = init_tca9555(); | ||
| 109 | |||
| 110 | unselect_rows(); | ||
| 111 | init_cols(); | ||
| 112 | |||
| 113 | // initialize matrix state: all keys off | ||
| 114 | for (uint8_t i = 0; i < MATRIX_ROWS; i++) { | ||
| 115 | matrix[i] = 0; | ||
| 116 | } | ||
| 117 | } | ||
| 118 | |||
| 119 | // Reads and stores a row, returning | ||
| 120 | // whether a change occurred. | ||
| 121 | static inline bool store_matrix_row(matrix_row_t current_matrix[], uint8_t index) { | ||
| 122 | matrix_row_t temp = read_cols(index); | ||
| 123 | if (current_matrix[index] != temp) { | ||
| 124 | current_matrix[index] = temp; | ||
| 125 | return true; | ||
| 126 | } | ||
| 127 | return false; | ||
| 128 | } | ||
| 129 | |||
| 130 | bool matrix_scan_custom(matrix_row_t current_matrix[]) { | ||
| 131 | if (tca9555_status) { // if there was an error | ||
| 132 | if (++tca9555_reset_loop == 0) { | ||
| 133 | // since tca9555_reset_loop is 8 bit - we'll try to reset once in 255 matrix scans | ||
| 134 | // this will be approx bit more frequent than once per second | ||
| 135 | dprint("trying to reset tca9555\n"); | ||
| 136 | tca9555_status = init_tca9555(); | ||
| 137 | if (tca9555_status) { | ||
| 138 | dprint("right side not responding\n"); | ||
| 139 | } else { | ||
| 140 | dprint("right side attached\n"); | ||
| 141 | } | ||
| 142 | } | ||
| 143 | } | ||
| 144 | |||
| 145 | bool changed = false; | ||
| 146 | for (uint8_t i = 0; i < MATRIX_ROWS_PER_SIDE; i++) { | ||
| 147 | // select rows from left and right hands | ||
| 148 | uint8_t left_index = i; | ||
| 149 | uint8_t right_index = i + MATRIX_ROWS_PER_SIDE; | ||
| 150 | select_row(left_index); | ||
| 151 | select_row(right_index); | ||
| 152 | |||
| 153 | // we don't need a 30us delay anymore, because selecting a | ||
| 154 | // left-hand row requires more than 30us for i2c. | ||
| 155 | |||
| 156 | changed |= store_matrix_row(current_matrix, left_index); | ||
| 157 | changed |= store_matrix_row(current_matrix, right_index); | ||
| 158 | |||
| 159 | unselect_rows(); | ||
| 160 | } | ||
| 161 | |||
| 162 | return changed; | ||
| 163 | } | ||
| 164 | |||
| 165 | static void init_cols(void) { | ||
| 166 | // init on tca9555 | ||
| 167 | // not needed, already done as part of init_tca9555() | ||
| 168 | |||
| 169 | // init on mcu | ||
| 170 | pin_t matrix_col_pins_mcu[MATRIX_COLS_PER_SIDE] = MATRIX_COL_PINS_L; | ||
| 171 | for (int pin_index = 0; pin_index < MATRIX_COLS_PER_SIDE; pin_index++) { | ||
| 172 | pin_t pin = matrix_col_pins_mcu[pin_index]; | ||
| 173 | setPinInput(pin); | ||
| 174 | writePinHigh(pin); | ||
| 175 | } | ||
| 176 | } | ||
| 177 | |||
| 178 | static matrix_row_t read_cols(uint8_t row) { | ||
| 179 | if (row < MATRIX_ROWS_PER_SIDE) { | ||
| 180 | pin_t matrix_col_pins_mcu[MATRIX_COLS_PER_SIDE] = MATRIX_COL_PINS_L; | ||
| 181 | matrix_row_t current_row_value = 0; | ||
| 182 | // For each col... | ||
| 183 | for (uint8_t col_index = 0; col_index < MATRIX_COLS_PER_SIDE; col_index++) { | ||
| 184 | // Select the col pin to read (active low) | ||
| 185 | uint8_t pin_state = readPin(matrix_col_pins_mcu[col_index]); | ||
| 186 | |||
| 187 | // Populate the matrix row with the state of the col pin | ||
| 188 | current_row_value |= pin_state ? 0 : (MATRIX_ROW_SHIFTER << col_index); | ||
| 189 | } | ||
| 190 | return current_row_value; | ||
| 191 | } else { | ||
| 192 | if (tca9555_status) { // if there was an error | ||
| 193 | return 0; | ||
| 194 | } else { | ||
| 195 | uint8_t data = 0; | ||
| 196 | uint8_t port0 = 0; | ||
| 197 | tca9555_status = i2c_start(I2C_ADDR_WRITE, I2C_TIMEOUT); | ||
| 198 | if (tca9555_status) goto out; | ||
| 199 | tca9555_status = i2c_write(IREGP0, I2C_TIMEOUT); | ||
| 200 | if (tca9555_status) goto out; | ||
| 201 | tca9555_status = i2c_start(I2C_ADDR_READ, I2C_TIMEOUT); | ||
| 202 | if (tca9555_status) goto out; | ||
| 203 | tca9555_status = i2c_read_nack(I2C_TIMEOUT); | ||
| 204 | if (tca9555_status < 0) goto out; | ||
| 205 | |||
| 206 | port0 = ~(uint8_t)tca9555_status; | ||
| 207 | |||
| 208 | // We read all the pins on GPIOA. | ||
| 209 | // The initial state was all ones and any depressed key at a given column for the currently selected row will have its bit flipped to zero. | ||
| 210 | // The return value is a row as represented in the generic matrix code were the rightmost bits represent the lower columns and zeroes represent non-depressed keys while ones represent depressed keys. | ||
| 211 | // the pins connected to eact columns are sequential, but in reverse order, and counting from zero down (col 5 -> GPIO04, col6 -> GPIO03 and so on). | ||
| 212 | data |= ( port0 & 0x01 ) << 4; | ||
| 213 | data |= ( port0 & 0x02 ) << 2; | ||
| 214 | data |= ( port0 & 0x04 ); | ||
| 215 | data |= ( port0 & 0x08 ) >> 2; | ||
| 216 | data |= ( port0 & 0x10 ) >> 4; | ||
| 217 | |||
| 218 | tca9555_status = I2C_STATUS_SUCCESS; | ||
| 219 | out: | ||
| 220 | i2c_stop(); | ||
| 221 | |||
| 222 | return data; | ||
| 223 | } | ||
| 224 | } | ||
| 225 | } | ||
| 226 | |||
| 227 | static void unselect_rows(void) { | ||
| 228 | // no need to unselect on tca9555, because the select step sets all | ||
| 229 | // the other row bits high, and it's not changing to a different | ||
| 230 | // direction | ||
| 231 | |||
| 232 | // unselect rows on microcontroller | ||
| 233 | pin_t matrix_row_pins_mcu[MATRIX_ROWS_PER_SIDE] = MATRIX_ROW_PINS_L; | ||
| 234 | for (int pin_index = 0; pin_index < MATRIX_ROWS_PER_SIDE; pin_index++) { | ||
| 235 | pin_t pin = matrix_row_pins_mcu[pin_index]; | ||
| 236 | setPinInput(pin); | ||
| 237 | writePinLow(pin); | ||
| 238 | } | ||
| 239 | } | ||
| 240 | |||
| 241 | static void select_row(uint8_t row) { | ||
| 242 | uint8_t port1 = 0xff; | ||
| 243 | |||
| 244 | if (row < MATRIX_ROWS_PER_SIDE) { | ||
| 245 | // select on atmega32u4 | ||
| 246 | pin_t matrix_row_pins_mcu[MATRIX_ROWS_PER_SIDE] = MATRIX_ROW_PINS_L; | ||
| 247 | pin_t pin = matrix_row_pins_mcu[row]; | ||
| 248 | setPinOutput(pin); | ||
| 249 | writePinLow(pin); | ||
| 250 | } else { | ||
| 251 | // select on tca9555 | ||
| 252 | if (tca9555_status) { // if there was an error | ||
| 253 | // do nothing | ||
| 254 | } else { | ||
| 255 | switch(row) { | ||
| 256 | case 4: port1 &= ~(1 << 0); break; | ||
| 257 | case 5: port1 &= ~(1 << 1); break; | ||
| 258 | case 6: port1 &= ~(1 << 2); break; | ||
| 259 | case 7: port1 &= ~(1 << 3); break; | ||
| 260 | default: break; | ||
| 261 | } | ||
| 262 | |||
| 263 | // Select the desired row by writing a byte for the entire GPIOB bus where only the bit representing the row we want to select is a zero (write instruction) and every other bit is a one. | ||
| 264 | // Note that the row - MATRIX_ROWS_PER_SIDE reflects the fact that being on the right hand, the columns are numbered from MATRIX_ROWS_PER_SIDE to MATRIX_ROWS, but the pins we want to write to are indexed from zero up on the GPIOB bus. | ||
| 265 | tca9555_status = i2c_start(I2C_ADDR_WRITE, I2C_TIMEOUT); | ||
| 266 | if (tca9555_status) goto out; | ||
| 267 | tca9555_status = i2c_write(OREGP1, I2C_TIMEOUT); | ||
| 268 | if (tca9555_status) goto out; | ||
| 269 | tca9555_status = i2c_write(port1, I2C_TIMEOUT); | ||
| 270 | if (tca9555_status) goto out; | ||
| 271 | out: | ||
| 272 | i2c_stop(); | ||
| 273 | } | ||
| 274 | } | ||
| 275 | } | ||
diff --git a/keyboards/3w6/rev2/readme.md b/keyboards/3w6/rev2/readme.md new file mode 100644 index 000000000..a17c2fd6b --- /dev/null +++ b/keyboards/3w6/rev2/readme.md | |||
| @@ -0,0 +1,38 @@ | |||
| 1 | # 3W6 | ||
| 2 | |||
| 3 |  | ||
| 4 |  | ||
| 5 | |||
| 6 | The 3w6 is a low profile, split ortholinear keyboard with 36 keys. | ||
| 7 | |||
| 8 | * Rev2: | ||
| 9 | - onboard microcontroller (ATMega32U4) | ||
| 10 | - USB-C connector Board <-> PC | ||
| 11 | - USB-C connectors between both split halfs | ||
| 12 | - choc spacing (18x17mm) | ||
| 13 | - aggressive pinky stagger | ||
| 14 | - support for Choc V1 switches | ||
| 15 | - files for midplate (1.6 to 2mm) | ||
| 16 | - support for [Pimoroni Trackball](https://shop.pimoroni.com/products/trackball-breakout) instead of outer thumb switch on right half, needs midplate | ||
| 17 | - mounting holes for [Tenting Puck](https://splitkb.com/collections/keyboard-parts/products/tenting-puck), only usable without mid or switchplate | ||
| 18 | |||
| 19 | --- | ||
| 20 | |||
| 21 | * Keyboard Maintainer: [weteor](https://github.com/weteor) | ||
| 22 | * Hardware Supported: | ||
| 23 | * 3w6 rev2 (with Pimoroni support) | ||
| 24 | * Hardware Availability: | ||
| 25 | * make one yourself: [Design and Productionfiles](https://github.com/weteor/3w6) | ||
| 26 | * maintainer is selling kits when available | ||
| 27 | |||
| 28 | --- | ||
| 29 | To reach the bootloader, connect the board to the PC and push the reset button on left half. | ||
| 30 | |||
| 31 | Make examples for this keyboard (after setting up your build environment): | ||
| 32 | |||
| 33 | make 3w6/rev2:default | ||
| 34 | make 3w6/rev2:default_pimoroni | ||
| 35 | |||
| 36 | --- | ||
| 37 | |||
| 38 | 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/3w6/rev2/rev2.c b/keyboards/3w6/rev2/rev2.c new file mode 100644 index 000000000..17bfb9b8a --- /dev/null +++ b/keyboards/3w6/rev2/rev2.c | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | /* Copyright 2021 weteor | ||
| 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 "rev2.h" | ||
diff --git a/keyboards/3w6/rev2/rev2.h b/keyboards/3w6/rev2/rev2.h new file mode 100644 index 000000000..ba881ca43 --- /dev/null +++ b/keyboards/3w6/rev2/rev2.h | |||
| @@ -0,0 +1,44 @@ | |||
| 1 | /* Copyright 2021 weteor | ||
| 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 | #pragma once | ||
| 18 | |||
| 19 | #include "quantum.h" | ||
| 20 | |||
| 21 | /* This is a shortcut to help you visually see your layout. | ||
| 22 | * | ||
| 23 | * The first section contains all of the arguments representing the physical | ||
| 24 | * layout of the board and position of the keys. | ||
| 25 | * | ||
| 26 | * The second converts the arguments into a two-dimensional array which | ||
| 27 | * represents the switch matrix. | ||
| 28 | */ | ||
| 29 | #define LAYOUT( \ | ||
| 30 | k00, k01, k02, k03, k04, k05, k06, k07, k08, k09,\ | ||
| 31 | k10, k11, k12, k13, k14, k15, k16, k17, k18, k19,\ | ||
| 32 | k20, k21, k22, k23, k24, k25, k26, k27, k28, k29,\ | ||
| 33 | k32, k33, k34, k35, k36, k37\ | ||
| 34 | ) { \ | ||
| 35 | { k00, k01, k02, k03, k04 }, \ | ||
| 36 | { k10, k11, k12, k13, k14 }, \ | ||
| 37 | { k20, k21, k22, k23, k24 }, \ | ||
| 38 | { KC_NO, KC_NO, k32, k33, k34 }, \ | ||
| 39 | \ | ||
| 40 | { k05, k06, k07, k08, k09 }, \ | ||
| 41 | { k15, k16, k17, k18, k19 }, \ | ||
| 42 | { k25, k26, k27, k28, k29 }, \ | ||
| 43 | { k35, k36, k37, KC_NO, KC_NO }, \ | ||
| 44 | } | ||
diff --git a/keyboards/3w6/rev2/rules.mk b/keyboards/3w6/rev2/rules.mk new file mode 100644 index 000000000..d4876dde7 --- /dev/null +++ b/keyboards/3w6/rev2/rules.mk | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | # MCU name | ||
| 2 | MCU = atmega32u4 | ||
| 3 | |||
| 4 | # Bootloader selection | ||
| 5 | BOOTLOADER = atmel-dfu | ||
| 6 | |||
| 7 | # Build Options | ||
| 8 | # change yes to no to disable | ||
| 9 | # | ||
| 10 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration | ||
| 11 | MOUSEKEY_ENABLE = yes # Mouse keys | ||
| 12 | EXTRAKEY_ENABLE = yes # Audio control and System control | ||
| 13 | CONSOLE_ENABLE = no # Console for debug | ||
| 14 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
| 15 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
| 16 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
| 17 | # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
| 18 | NKRO_ENABLE = no # USB Nkey Rollover | ||
| 19 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | ||
| 20 | RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow | ||
| 21 | BLUETOOTH_ENABLE = no # Enable Bluetooth | ||
| 22 | AUDIO_ENABLE = no # Audio output | ||
| 23 | UNICODE_ENABLE = yes | ||
| 24 | CUSTOM_MATRIX = lite | ||
| 25 | NO_USB_STARTUP_CHECK = yes | ||
| 26 | LTO_ENABLE = no | ||
| 27 | |||
| 28 | SRC += matrix.c | ||
| 29 | QUANTUM_LIB_SRC += i2c_master.c | ||
diff --git a/keyboards/acheron/shark/keymaps/ajp10304/readme.md b/keyboards/acheron/shark/keymaps/ajp10304/readme.md index 73e5b831e..c17232162 100644 --- a/keyboards/acheron/shark/keymaps/ajp10304/readme.md +++ b/keyboards/acheron/shark/keymaps/ajp10304/readme.md | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | # AJP10304 Custom Shark Layout | 1 | # AJP10304 Custom Shark Layout |
| 2 | # Also available for the Planck, JJ40 and Atreus50 | 2 | # Also available for the Planck, Quark, JJ40 and Atreus50 |
| 3 | 3 | ||
| 4 | **Note:** In the tables below where there are two characters on a key, | 4 | **Note:** In the tables below where there are two characters on a key, |
| 5 | the second is the output when shift is applied. | 5 | the second is the output when shift is applied. |
diff --git a/keyboards/dumbpad/config.h b/keyboards/dumbpad/config.h index 5a1a1c92b..7322d1bbb 100644 --- a/keyboards/dumbpad/config.h +++ b/keyboards/dumbpad/config.h | |||
| @@ -21,14 +21,29 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 21 | /* USB Device descriptor parameter */ | 21 | /* USB Device descriptor parameter */ |
| 22 | #define VENDOR_ID 0xFEED | 22 | #define VENDOR_ID 0xFEED |
| 23 | #define PRODUCT_ID 0x0913 | 23 | #define PRODUCT_ID 0x0913 |
| 24 | #define DEVICE_VER 0x0007 | ||
| 24 | #define MANUFACTURER imchipwood | 25 | #define MANUFACTURER imchipwood |
| 25 | #define PRODUCT dumbpad | 26 | #define PRODUCT dumbpad |
| 26 | 27 | ||
| 27 | /* Column/Row IO definitions */ | 28 | /* Column/Row IO definitions */ |
| 29 | #define MATRIX_ROWS 4 | ||
| 30 | #define MATRIX_COLS 5 | ||
| 31 | #define MATRIX_ROW_PINS { F4, F5, F6, F7 } | ||
| 32 | #define MATRIX_COL_PINS { C6, D7, E6, B4, B5 } | ||
| 33 | #define UNUSED_PINS | ||
| 34 | |||
| 35 | /* COL2ROW, ROW2COL*/ | ||
| 28 | #define DIODE_DIRECTION COL2ROW | 36 | #define DIODE_DIRECTION COL2ROW |
| 29 | 37 | ||
| 30 | /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ | 38 | /* Single rotary encoder */ |
| 31 | #define DEBOUNCE 5 | 39 | #define ENCODERS_PAD_A { B2, D0 } |
| 40 | #define ENCODERS_PAD_B { D4, D1 } | ||
| 41 | #define ENCODER_RESOLUTIONS { 4, 4 } | ||
| 42 | |||
| 43 | /* Onboard LEDs */ | ||
| 44 | #define LED_00 B3 | ||
| 45 | #define LED_01 B1 | ||
| 32 | 46 | ||
| 33 | /* Reduce tapdance required taps from 5 to 2 */ | 47 | /* Bootmagic - hold down rotary encoder pushbutton while plugging in to enter bootloader */ |
| 34 | #define TAPPING_TOGGLE 2 | 48 | #define BOOTMAGIC_LITE_ROW 3 |
| 49 | #define BOOTMAGIC_LITE_COLUMN 0 | ||
diff --git a/keyboards/dumbpad/dumbpad.c b/keyboards/dumbpad/dumbpad.c new file mode 100644 index 000000000..b575662a8 --- /dev/null +++ b/keyboards/dumbpad/dumbpad.c | |||
| @@ -0,0 +1,59 @@ | |||
| 1 | /* Copyright 2019 Chip | ||
| 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 "dumbpad.h" | ||
| 17 | |||
| 18 | void keyboard_pre_init_kb(void) { | ||
| 19 | // Set LED IO as outputs | ||
| 20 | setPinOutput(LED_00); | ||
| 21 | setPinOutput(LED_01); | ||
| 22 | keyboard_pre_init_user(); | ||
| 23 | } | ||
| 24 | |||
| 25 | void shutdown_user() { | ||
| 26 | // Shutdown LEDs | ||
| 27 | writePinLow(LED_00); | ||
| 28 | writePinLow(LED_01); | ||
| 29 | } | ||
| 30 | |||
| 31 | layer_state_t layer_state_set_kb(layer_state_t state) { | ||
| 32 | // Layer LEDs act as binary indication of current layer | ||
| 33 | uint8_t layer = get_highest_layer(state); | ||
| 34 | writePin(LED_00, layer & 0b1); | ||
| 35 | writePin(LED_01, (layer >> 1) & 0b1); | ||
| 36 | return layer_state_set_user(state); | ||
| 37 | } | ||
| 38 | |||
| 39 | // Optional override functions below. | ||
| 40 | // You can leave any or all of these undefined. | ||
| 41 | // These are only required if you want to perform custom actions. | ||
| 42 | |||
| 43 | void matrix_init_kb(void) { | ||
| 44 | // put your keyboard start-up code here | ||
| 45 | // runs once when the firmware starts up | ||
| 46 | uint8_t led_delay_ms = 80; | ||
| 47 | for (int i = 0; i < 2; i++) { | ||
| 48 | writePinHigh(LED_00); | ||
| 49 | writePinHigh(LED_01); | ||
| 50 | wait_ms(led_delay_ms); | ||
| 51 | writePinLow(LED_00); | ||
| 52 | writePinLow(LED_01); | ||
| 53 | if (i < 1) { | ||
| 54 | wait_ms(led_delay_ms); | ||
| 55 | } | ||
| 56 | } | ||
| 57 | |||
| 58 | matrix_init_user(); | ||
| 59 | } | ||
diff --git a/keyboards/dumbpad/dumbpad.h b/keyboards/dumbpad/dumbpad.h new file mode 100644 index 000000000..b7c7694e3 --- /dev/null +++ b/keyboards/dumbpad/dumbpad.h | |||
| @@ -0,0 +1,39 @@ | |||
| 1 | /* Copyright 2019 Chip | ||
| 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 | /* This a shortcut to help you visually see your layout. | ||
| 21 | * | ||
| 22 | * The first section contains all of the arguments representing the physical | ||
| 23 | * layout of the board and position of the keys. | ||
| 24 | * | ||
| 25 | * The second converts the arguments into a two-dimensional array which | ||
| 26 | * represents the switch matrix. | ||
| 27 | */ | ||
| 28 | #define LAYOUT( \ | ||
| 29 | k01, k02, k03, k04, \ | ||
| 30 | k11, k12, k13, k14, \ | ||
| 31 | k21, k22, k23, k24, \ | ||
| 32 | k30, k31, k32, k33, k34 \ | ||
| 33 | ) \ | ||
| 34 | { \ | ||
| 35 | { KC_NO, k01, k02, k03, k04 }, \ | ||
| 36 | { KC_NO, k11, k12, k13, k14 }, \ | ||
| 37 | { KC_NO, k21, k22, k23, k24 }, \ | ||
| 38 | { k30, k31, k32, k33, k34 }, \ | ||
| 39 | } | ||
diff --git a/keyboards/dumbpad/info.json b/keyboards/dumbpad/info.json new file mode 100644 index 000000000..82a53d852 --- /dev/null +++ b/keyboards/dumbpad/info.json | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | { | ||
| 2 | "keyboard_name": "dumbpad", | ||
| 3 | "keyboard_folder": "dumbpad", | ||
| 4 | "url": "https://www.github.com/imchipwood/dumbpad", | ||
| 5 | "maintainer": "imchipwood", | ||
| 6 | "width": 5, | ||
| 7 | "height": 4, | ||
| 8 | "layouts": { | ||
| 9 | "LAYOUT": { | ||
| 10 | "layout": [ | ||
| 11 | {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, | ||
| 12 | {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, | ||
| 13 | {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, | ||
| 14 | {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3} | ||
| 15 | ] | ||
| 16 | } | ||
| 17 | } | ||
| 18 | } | ||
diff --git a/keyboards/dumbpad/keymaps/default/keymap.c b/keyboards/dumbpad/keymaps/default/keymap.c new file mode 100644 index 000000000..9263af428 --- /dev/null +++ b/keyboards/dumbpad/keymaps/default/keymap.c | |||
| @@ -0,0 +1,89 @@ | |||
| 1 | /* Copyright 2020 imchipwood | ||
| 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 QMK_KEYBOARD_H | ||
| 17 | |||
| 18 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 19 | /* | ||
| 20 | BASE LAYER | ||
| 21 | /-----------------------------------------------------` | ||
| 22 | | | 7 | 8 | 9 | Bkspc | | ||
| 23 | | |---------|---------|---------|---------| | ||
| 24 | | | 4 | 5 | 6 | Esc | | ||
| 25 | | |---------|---------|---------|---------| | ||
| 26 | | | 1 | 2 | 3 | Tab | | ||
| 27 | |-------------|---------|---------|---------|---------| | ||
| 28 | | Left mouse | TT(1) | 0 | . | Enter | | ||
| 29 | \-----------------------------------------------------' | ||
| 30 | */ | ||
| 31 | [0] = LAYOUT( | ||
| 32 | KC_7, KC_8, KC_9, KC_BSPC, | ||
| 33 | KC_4, KC_5, KC_6, KC_ESC, | ||
| 34 | KC_1, KC_2, KC_3, KC_TAB, | ||
| 35 | KC_BTN1, TT(1), KC_0, LSFT_T(KC_DOT), KC_ENTER | ||
| 36 | ), | ||
| 37 | /* | ||
| 38 | SUB LAYER | ||
| 39 | /-----------------------------------------------------` | ||
| 40 | | | | | | Reset | | ||
| 41 | | |---------|---------|---------|---------| | ||
| 42 | | | | | | + | | ||
| 43 | | |---------|---------|---------|---------| | ||
| 44 | | | | | | - | | ||
| 45 | |-------------|---------|---------|---------|---------| | ||
| 46 | | LOCK | | | | = | | ||
| 47 | \-----------------------------------------------------' | ||
| 48 | */ | ||
| 49 | [1] = LAYOUT( | ||
| 50 | _______, _______, _______, RESET, | ||
| 51 | _______, _______, _______, KC_KP_PLUS, | ||
| 52 | _______, _______, _______, KC_KP_MINUS, | ||
| 53 | KC_LOCK, _______, _______, _______, KC_EQL | ||
| 54 | ), | ||
| 55 | }; | ||
| 56 | |||
| 57 | bool encoder_update_user(uint8_t index, bool clockwise) { | ||
| 58 | /* Custom encoder control - handles CW/CCW turning of encoder | ||
| 59 | * Default behavior: | ||
| 60 | * main layer: | ||
| 61 | * CW: move mouse right | ||
| 62 | * CCW: move mouse left | ||
| 63 | * other layers: | ||
| 64 | * CW: = (equals/plus - increase slider in Adobe products) | ||
| 65 | * CCW: - (minus/underscore - decrease slider in adobe products) | ||
| 66 | */ | ||
| 67 | if (index == 0) { | ||
| 68 | switch (get_highest_layer(layer_state)) { | ||
| 69 | case 0: | ||
| 70 | // main layer - move mouse right (CW) and left (CCW) | ||
| 71 | if (clockwise) { | ||
| 72 | tap_code(KC_MS_R); | ||
| 73 | } else { | ||
| 74 | tap_code(KC_MS_L); | ||
| 75 | } | ||
| 76 | break; | ||
| 77 | |||
| 78 | default: | ||
| 79 | // other layers - =/+ (quals/plus) (CW) and -/_ (minus/underscore) (CCW) | ||
| 80 | if (clockwise) { | ||
| 81 | tap_code(KC_EQL); | ||
| 82 | } else { | ||
| 83 | tap_code(KC_MINS); | ||
| 84 | } | ||
| 85 | break; | ||
| 86 | } | ||
| 87 | } | ||
| 88 | return true; | ||
| 89 | } | ||
diff --git a/keyboards/dumbpad/keymaps/via/keymap.c b/keyboards/dumbpad/keymaps/via/keymap.c new file mode 100644 index 000000000..d9f997531 --- /dev/null +++ b/keyboards/dumbpad/keymaps/via/keymap.c | |||
| @@ -0,0 +1,175 @@ | |||
| 1 | /* Copyright 2019 imchipwood | ||
| 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 QMK_KEYBOARD_H | ||
| 17 | |||
| 18 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 19 | /* | ||
| 20 | BASE LAYER | ||
| 21 | /-----------------------------------------------------` | ||
| 22 | | | 7 | 8 | 9 | Bkspc | | ||
| 23 | | |---------|---------|---------|---------| | ||
| 24 | | | 4 | 5 | 6 | Esc | | ||
| 25 | | |---------|---------|---------|---------| | ||
| 26 | | | 1 | 2 | 3 | Tab | | ||
| 27 | |-------------|---------|---------|---------|---------| | ||
| 28 | | Left mouse | MO(1) | 0 | . | Enter | | ||
| 29 | \-----------------------------------------------------' | ||
| 30 | */ | ||
| 31 | [0] = LAYOUT( | ||
| 32 | KC_7, KC_8, KC_9, KC_BSPC, | ||
| 33 | KC_4, KC_5, KC_6, KC_ESC, | ||
| 34 | KC_1, KC_2, KC_3, KC_TAB, | ||
| 35 | KC_BTN1, MO(1), KC_0, KC_PDOT, KC_ENTER | ||
| 36 | ), | ||
| 37 | /* | ||
| 38 | SUB LAYER | ||
| 39 | /-----------------------------------------------------` | ||
| 40 | | | | | | Reset | | ||
| 41 | | |---------|---------|---------|---------| | ||
| 42 | | | | | | + | | ||
| 43 | | |---------|---------|---------|---------| | ||
| 44 | | | | | | - | | ||
| 45 | |-------------|---------|---------|---------|---------| | ||
| 46 | | LOCK | | MO(2) | | = | | ||
| 47 | \-----------------------------------------------------' | ||
| 48 | */ | ||
| 49 | [1] = LAYOUT( | ||
| 50 | _______, _______, _______, RESET, | ||
| 51 | _______, _______, _______, KC_KP_PLUS, | ||
| 52 | _______, _______, _______, KC_KP_MINUS, | ||
| 53 | KC_MUTE, _______, MO(2) , _______, KC_EQL | ||
| 54 | ), | ||
| 55 | |||
| 56 | /* | ||
| 57 | DEBUG LAYER | ||
| 58 | /-----------------------------------------------------` | ||
| 59 | | | | | | Reset | | ||
| 60 | | |---------|---------|---------|---------| | ||
| 61 | | | | | | | | ||
| 62 | | |---------|---------|---------|---------| | ||
| 63 | | | | | | | | ||
| 64 | |-------------|---------|---------|---------|---------| | ||
| 65 | | | | | | | | ||
| 66 | \-----------------------------------------------------' | ||
| 67 | */ | ||
| 68 | [2] = LAYOUT( | ||
| 69 | _______, _______, _______, RESET, | ||
| 70 | _______, _______, _______, _______, | ||
| 71 | _______, _______, _______, _______, | ||
| 72 | _______, _______, _______, MO(3) , _______ | ||
| 73 | ), | ||
| 74 | |||
| 75 | /* | ||
| 76 | EXTRA LAYER | ||
| 77 | /-----------------------------------------------------` | ||
| 78 | | | | | | | | ||
| 79 | | |---------|---------|---------|---------| | ||
| 80 | | | | | | | | ||
| 81 | | |---------|---------|---------|---------| | ||
| 82 | | | | | | | | ||
| 83 | |-------------|---------|---------|---------|---------| | ||
| 84 | | | | | | | | ||
| 85 | \-----------------------------------------------------' | ||
| 86 | */ | ||
| 87 | [3] = LAYOUT( | ||
| 88 | _______, _______, _______, _______, | ||
| 89 | _______, _______, _______, _______, | ||
| 90 | _______, _______, _______, _______, | ||
| 91 | _______, _______, _______, _______, _______ | ||
| 92 | ), | ||
| 93 | }; | ||
| 94 | |||
| 95 | bool encoder_update_user(uint8_t index, bool clockwise) { | ||
| 96 | if (index == 0) { | ||
| 97 | switch (get_highest_layer(layer_state)) { | ||
| 98 | case 0: | ||
| 99 | // sub layer - Scroll | ||
| 100 | if (clockwise) { | ||
| 101 | tap_code(KC_MS_WH_DOWN); | ||
| 102 | } else { | ||
| 103 | tap_code(KC_MS_WH_UP); | ||
| 104 | } | ||
| 105 | break; | ||
| 106 | |||
| 107 | case 1: | ||
| 108 | // main layer - Volume | ||
| 109 | if (clockwise) { | ||
| 110 | tap_code(KC_VOLU); | ||
| 111 | } else { | ||
| 112 | tap_code(KC_VOLD); | ||
| 113 | } | ||
| 114 | break; | ||
| 115 | |||
| 116 | case 2: | ||
| 117 | // debug layer - Change track | ||
| 118 | if (clockwise) { | ||
| 119 | tap_code(KC_MNXT); | ||
| 120 | } else { | ||
| 121 | tap_code(KC_MPRV); | ||
| 122 | } | ||
| 123 | break; | ||
| 124 | |||
| 125 | default: | ||
| 126 | // any other layer Scroll | ||
| 127 | if (clockwise) { | ||
| 128 | tap_code(KC_MS_WH_DOWN); | ||
| 129 | } else { | ||
| 130 | tap_code(KC_MS_WH_UP); | ||
| 131 | } | ||
| 132 | break; | ||
| 133 | } | ||
| 134 | } | ||
| 135 | else if (index == 1) { | ||
| 136 | switch (get_highest_layer(layer_state)) { | ||
| 137 | case 0: | ||
| 138 | // sub layer - Volume | ||
| 139 | if (clockwise) { | ||
| 140 | tap_code(KC_VOLU); | ||
| 141 | } else { | ||
| 142 | tap_code(KC_VOLD); | ||
| 143 | } | ||
| 144 | break; | ||
| 145 | |||
| 146 | case 1: | ||
| 147 | // main layer - Scroll | ||
| 148 | if (clockwise) { | ||
| 149 | tap_code(KC_MS_WH_DOWN); | ||
| 150 | } else { | ||
| 151 | tap_code(KC_MS_WH_UP); | ||
| 152 | } | ||
| 153 | break; | ||
| 154 | |||
| 155 | case 2: | ||
| 156 | // debug layer - Brightness | ||
| 157 | if (clockwise) { | ||
| 158 | tap_code(KC_BRID); | ||
| 159 | } else { | ||
| 160 | tap_code(KC_BRIU); | ||
| 161 | } | ||
| 162 | break; | ||
| 163 | |||
| 164 | default: | ||
| 165 | // any other layer Scroll | ||
| 166 | if (clockwise) { | ||
| 167 | tap_code(KC_MS_WH_DOWN); | ||
| 168 | } else { | ||
| 169 | tap_code(KC_MS_WH_UP); | ||
| 170 | } | ||
| 171 | break; | ||
| 172 | } | ||
| 173 | } | ||
| 174 | return true; | ||
| 175 | } | ||
diff --git a/keyboards/dumbpad/keymaps/via/rules.mk b/keyboards/dumbpad/keymaps/via/rules.mk new file mode 100644 index 000000000..4650c471e --- /dev/null +++ b/keyboards/dumbpad/keymaps/via/rules.mk | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | CONSOLE_ENABLE = no | ||
| 2 | LTO_ENABLE = yes | ||
| 3 | VIA_ENABLE = yes \ No newline at end of file | ||
diff --git a/keyboards/dumbpad/rules.mk b/keyboards/dumbpad/rules.mk index 87ec1ab01..309e3d48c 100644 --- a/keyboards/dumbpad/rules.mk +++ b/keyboards/dumbpad/rules.mk | |||
| @@ -1 +1,25 @@ | |||
| 1 | DEFAULT_FOLDER = dumbpad/v0x | 1 | # MCU name |
| 2 | MCU = atmega32u4 | ||
| 3 | |||
| 4 | # Bootloader selection | ||
| 5 | BOOTLOADER = caterina | ||
| 6 | |||
| 7 | # Build Options | ||
| 8 | # change yes to no to disable | ||
| 9 | # | ||
| 10 | BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration | ||
| 11 | MOUSEKEY_ENABLE = yes # Mouse keys | ||
| 12 | EXTRAKEY_ENABLE = yes # Audio control and System control | ||
| 13 | CONSOLE_ENABLE = yes # Console for debug | ||
| 14 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
| 15 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
| 16 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
| 17 | # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
| 18 | NKRO_ENABLE = no # USB Nkey Rollover | ||
| 19 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | ||
| 20 | RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow | ||
| 21 | BLUETOOTH_ENABLE = no # Enable Bluetooth | ||
| 22 | AUDIO_ENABLE = no # Audio output | ||
| 23 | |||
| 24 | ENCODER_ENABLE = yes | ||
| 25 | KEY_LOCK_ENABLE = yes | ||
diff --git a/keyboards/gmmk/pro/ansi/keymaps/jonavin/keymap.c b/keyboards/gmmk/pro/ansi/keymaps/jonavin/keymap.c index 8b3744957..edca78cd1 100644 --- a/keyboards/gmmk/pro/ansi/keymaps/jonavin/keymap.c +++ b/keyboards/gmmk/pro/ansi/keymaps/jonavin/keymap.c | |||
| @@ -17,36 +17,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 17 | 17 | ||
| 18 | #include QMK_KEYBOARD_H | 18 | #include QMK_KEYBOARD_H |
| 19 | #include "rgb_matrix_map.h" | 19 | #include "rgb_matrix_map.h" |
| 20 | 20 | #include "jonavin.h" | |
| 21 | #define ARRAYSIZE(arr) sizeof(arr)/sizeof(arr[0]) | ||
| 22 | |||
| 23 | enum custom_layers { | ||
| 24 | _BASE, | ||
| 25 | _FN1, | ||
| 26 | _MO2, | ||
| 27 | _MO3, | ||
| 28 | }; | ||
| 29 | |||
| 30 | enum custom_keycodes { | ||
| 31 | KC_00 = SAFE_RANGE, | ||
| 32 | KC_WINLCK, //Toggles Win key on and off | ||
| 33 | RGB_TOI, // Timeout idle time up | ||
| 34 | RGB_TOD, // Timeout idle time down | ||
| 35 | }; | ||
| 36 | |||
| 37 | // Tap Dance Definitions | ||
| 38 | enum custom_tapdance { | ||
| 39 | TD_LSFT_CAPSLOCK, | ||
| 40 | }; | ||
| 41 | |||
| 42 | qk_tap_dance_action_t tap_dance_actions[] = { | ||
| 43 | // Tap once for shift, twice for Caps Lock | ||
| 44 | [TD_LSFT_CAPSLOCK] = ACTION_TAP_DANCE_DOUBLE(KC_LSFT, KC_CAPS), | ||
| 45 | }; | ||
| 46 | |||
| 47 | #define KC_LSFTCAPS TD(TD_LSFT_CAPSLOCK) | ||
| 48 | |||
| 49 | bool _isWinKeyDisabled = false; | ||
| 50 | 21 | ||
| 51 | 22 | ||
| 52 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | 23 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |
| @@ -63,8 +34,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 63 | KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_MUTE, | 34 | KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_MUTE, |
| 64 | KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, | 35 | KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, |
| 65 | 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_PGUP, | 36 | 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_PGUP, |
| 66 | TT(_MO2), 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_PGDN, | 37 | TT(_LOWER), 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_PGDN, |
| 67 | KC_LSFTCAPS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, | 38 | KC_LSFTCAPSWIN, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, |
| 68 | KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN1),KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT | 39 | KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN1),KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT |
| 69 | ), | 40 | ), |
| 70 | 41 | ||
| @@ -77,7 +48,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 77 | _______, KC_WINLCK, _______, _______, _______, _______, _______, RGB_SPD, RGB_RMOD, RGB_SPI | 48 | _______, KC_WINLCK, _______, _______, _______, _______, _______, RGB_SPD, RGB_RMOD, RGB_SPI |
| 78 | ), | 49 | ), |
| 79 | 50 | ||
| 80 | [_MO2] = LAYOUT( | 51 | [_LOWER] = LAYOUT( |
| 81 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | 52 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, |
| 82 | _______, _______, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, KC_P0, KC_PMNS, KC_PPLS, _______, _______, | 53 | _______, _______, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, KC_P0, KC_PMNS, KC_PPLS, _______, _______, |
| 83 | _______, KC_HOME, KC_UP, KC_END, KC_PGUP, _______, KC_TAB, KC_P4, KC_P5, KC_P6, KC_PDOT, _______, _______, _______, KC_HOME, | 54 | _______, KC_HOME, KC_UP, KC_END, KC_PGUP, _______, KC_TAB, KC_P4, KC_P5, KC_P6, KC_PDOT, _______, _______, _______, KC_HOME, |
| @@ -86,7 +57,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 86 | _______, _______, _______, KC_BSPC, _______, _______, _______, RCTL(KC_LEFT), RCTL(KC_PGDN), RCTL(KC_RIGHT) | 57 | _______, _______, _______, KC_BSPC, _______, _______, _______, RCTL(KC_LEFT), RCTL(KC_PGDN), RCTL(KC_RIGHT) |
| 87 | ), | 58 | ), |
| 88 | 59 | ||
| 89 | [_MO3] = LAYOUT( | 60 | [_RAISE] = LAYOUT( |
| 90 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | 61 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, |
| 91 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | 62 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, |
| 92 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | 63 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, |
| @@ -98,139 +69,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 98 | }; | 69 | }; |
| 99 | 70 | ||
| 100 | 71 | ||
| 101 | // TIMEOUTS | ||
| 102 | #define TIMEOUT_THRESHOLD_DEFAULT 5 // default timeout minutes | ||
| 103 | #define TIMEOUT_THRESHOLD_MAX 140 // upper limits (2 hours and 10 minutes -- no rgb indicators above this value) | ||
| 104 | static uint16_t timeout_timer = 0; | ||
| 105 | static uint16_t timeout_counter = 0; //in minute intervals | ||
| 106 | static uint16_t timeout_threshold = TIMEOUT_THRESHOLD_DEFAULT; | ||
| 107 | |||
| 108 | void timeout_reset_timer(void) { | ||
| 109 | timeout_timer = timer_read(); | ||
| 110 | timeout_counter = 0; | ||
| 111 | }; | ||
| 112 | |||
| 113 | void timeout_update_threshold(bool increase) { | ||
| 114 | if (increase && timeout_threshold < TIMEOUT_THRESHOLD_MAX) timeout_threshold++; | ||
| 115 | if (!increase && timeout_threshold > 0) timeout_threshold--; | ||
| 116 | }; | ||
| 117 | |||
| 118 | |||
| 119 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
| 120 | switch (keycode) { | ||
| 121 | case KC_00: | ||
| 122 | if (record->event.pressed) { | ||
| 123 | // when keycode KC_00 is pressed | ||
| 124 | SEND_STRING("00"); | ||
| 125 | } else { | ||
| 126 | // when keycode KC_00 is released | ||
| 127 | } | ||
| 128 | break; | ||
| 129 | case KC_WINLCK: | ||
| 130 | if (record->event.pressed) { | ||
| 131 | _isWinKeyDisabled = !_isWinKeyDisabled; //toggle status | ||
| 132 | if(_isWinKeyDisabled) { | ||
| 133 | process_magic(GUI_OFF, record); | ||
| 134 | } else { | ||
| 135 | process_magic(GUI_ON, record); | ||
| 136 | } | ||
| 137 | } else unregister_code16(keycode); | ||
| 138 | break; | ||
| 139 | case RGB_TOI: | ||
| 140 | if(record->event.pressed) { | ||
| 141 | timeout_update_threshold(true); | ||
| 142 | } else unregister_code16(keycode); | ||
| 143 | break; | ||
| 144 | case RGB_TOD: | ||
| 145 | if(record->event.pressed) { | ||
| 146 | timeout_update_threshold(false); //decrease timeout | ||
| 147 | } else unregister_code16(keycode); | ||
| 148 | break; | ||
| 149 | default: | ||
| 150 | if (record->event.pressed) { //reset activity timer | ||
| 151 | #ifdef RGB_MATRIX_ENABLE | ||
| 152 | rgb_matrix_enable(); | ||
| 153 | #endif | ||
| 154 | timeout_reset_timer(); | ||
| 155 | } | ||
| 156 | break; | ||
| 157 | } | ||
| 158 | return true; | ||
| 159 | }; | ||
| 160 | |||
| 161 | void matrix_scan_user(void) { | ||
| 162 | if (timeout_threshold > 0) { | ||
| 163 | if (timer_elapsed(timeout_timer) >= 60000) { // 1 minute tick | ||
| 164 | timeout_counter++; | ||
| 165 | timeout_timer = timer_read(); | ||
| 166 | } | ||
| 167 | #ifdef RGB_MATRIX_ENABLE | ||
| 168 | if (timeout_threshold > 0 && timeout_counter >= timeout_threshold) { | ||
| 169 | rgb_matrix_disable_noeeprom(); | ||
| 170 | } | ||
| 171 | #endif | ||
| 172 | } // timeout_threshold = 0 will disable timeout | ||
| 173 | }; | ||
| 174 | |||
| 175 | |||
| 176 | #ifdef ENCODER_ENABLE // Encoder Functionality | ||
| 177 | uint8_t selected_layer = 0; | ||
| 178 | |||
| 179 | bool encoder_update_user(uint8_t index, bool clockwise) { | ||
| 180 | if ( clockwise ) { | ||
| 181 | if (keyboard_report->mods & MOD_BIT(KC_LSFT) ) { // If you are holding L shift, encoder changes layers | ||
| 182 | if(selected_layer < 3) { | ||
| 183 | selected_layer ++; | ||
| 184 | layer_move(selected_layer); | ||
| 185 | } | ||
| 186 | } else if (keyboard_report->mods & MOD_BIT(KC_RSFT) ) { // If you are holding R shift, Page up | ||
| 187 | unregister_mods(MOD_BIT(KC_LSFT)); | ||
| 188 | register_code(KC_PGDN); | ||
| 189 | register_mods(MOD_BIT(KC_LSFT)); | ||
| 190 | } else if (keyboard_report->mods & MOD_BIT(KC_LCTL)) { // if holding Left Ctrl, navigate next word | ||
| 191 | tap_code16(LCTL(KC_RGHT)); | ||
| 192 | } else if (keyboard_report->mods & MOD_BIT(KC_LALT)) { // if holding Left Alt, change media next track | ||
| 193 | tap_code(KC_MEDIA_NEXT_TRACK); | ||
| 194 | } else { | ||
| 195 | switch (selected_layer) { | ||
| 196 | case _FN1: | ||
| 197 | timeout_update_threshold(true); | ||
| 198 | break; | ||
| 199 | default: | ||
| 200 | tap_code(KC_VOLU); // Otherwise it just changes volume | ||
| 201 | break; | ||
| 202 | } | ||
| 203 | } | ||
| 204 | } else { | ||
| 205 | if (keyboard_report->mods & MOD_BIT(KC_LSFT) ) { | ||
| 206 | if (selected_layer > 0) { | ||
| 207 | selected_layer --; | ||
| 208 | layer_move(selected_layer); | ||
| 209 | } | ||
| 210 | } else if (keyboard_report->mods & MOD_BIT(KC_RSFT) ) { | ||
| 211 | unregister_mods(MOD_BIT(KC_LSFT)); | ||
| 212 | register_code(KC_PGUP); | ||
| 213 | register_mods(MOD_BIT(KC_LSFT)); | ||
| 214 | } else if (keyboard_report->mods & MOD_BIT(KC_LCTL)) { // if holding Left Ctrl, navigate previous word | ||
| 215 | tap_code16(LCTL(KC_LEFT)); | ||
| 216 | } else if (keyboard_report->mods & MOD_BIT(KC_LALT)) { // if holding Left Alt, change media previous track | ||
| 217 | tap_code(KC_MEDIA_PREV_TRACK); | ||
| 218 | } else { | ||
| 219 | switch (selected_layer) { | ||
| 220 | case _FN1: | ||
| 221 | timeout_update_threshold(false); | ||
| 222 | break; | ||
| 223 | default: | ||
| 224 | tap_code(KC_VOLD); | ||
| 225 | break; | ||
| 226 | } | ||
| 227 | } | ||
| 228 | } | ||
| 229 | |||
| 230 | return true; | ||
| 231 | } | ||
| 232 | #endif | ||
| 233 | |||
| 234 | #ifdef RGB_MATRIX_ENABLE | 72 | #ifdef RGB_MATRIX_ENABLE |
| 235 | // Capslock, Scroll lock and Numlock indicator on Left side lights. | 73 | // Capslock, Scroll lock and Numlock indicator on Left side lights. |
| 236 | void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { | 74 | void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { |
| @@ -247,7 +85,7 @@ void matrix_scan_user(void) { | |||
| 247 | rgb_matrix_set_color(LED_L6, RGB_RED); | 85 | rgb_matrix_set_color(LED_L6, RGB_RED); |
| 248 | rgb_matrix_set_color(LED_L7, RGB_RED); | 86 | rgb_matrix_set_color(LED_L7, RGB_RED); |
| 249 | } | 87 | } |
| 250 | if (_isWinKeyDisabled) { | 88 | if (keymap_config.no_gui) { |
| 251 | rgb_matrix_set_color(LED_LWIN, RGB_RED); //light up Win key when disabled | 89 | rgb_matrix_set_color(LED_LWIN, RGB_RED); //light up Win key when disabled |
| 252 | } | 90 | } |
| 253 | switch(get_highest_layer(layer_state)){ // special handling per layer | 91 | switch(get_highest_layer(layer_state)){ // special handling per layer |
| @@ -258,6 +96,7 @@ void matrix_scan_user(void) { | |||
| 258 | rgb_matrix_set_color(LED_FN, RGB_RED); //FN key | 96 | rgb_matrix_set_color(LED_FN, RGB_RED); //FN key |
| 259 | 97 | ||
| 260 | // Add RGB Timeout Indicator -- shows 0 to 139 using F row and num row; larger numbers using 16bit code | 98 | // Add RGB Timeout Indicator -- shows 0 to 139 using F row and num row; larger numbers using 16bit code |
| 99 | uint16_t timeout_threshold = get_timeout_threshold(); | ||
| 261 | if (timeout_threshold <= 10) rgb_matrix_set_color(LED_LIST_FUNCROW[timeout_threshold], RGB_RED); | 100 | if (timeout_threshold <= 10) rgb_matrix_set_color(LED_LIST_FUNCROW[timeout_threshold], RGB_RED); |
| 262 | else if (timeout_threshold < 140) { | 101 | else if (timeout_threshold < 140) { |
| 263 | rgb_matrix_set_color(LED_LIST_FUNCROW[(timeout_threshold / 10)], RGB_RED); | 102 | rgb_matrix_set_color(LED_LIST_FUNCROW[(timeout_threshold / 10)], RGB_RED); |
| @@ -268,7 +107,7 @@ void matrix_scan_user(void) { | |||
| 268 | rgb_matrix_set_color(LED_LIST_NUMROW[12], RGB_RED); | 107 | rgb_matrix_set_color(LED_LIST_NUMROW[12], RGB_RED); |
| 269 | } | 108 | } |
| 270 | break; | 109 | break; |
| 271 | case _MO2: | 110 | case _LOWER: |
| 272 | for (uint8_t i=0; i<ARRAYSIZE(LED_LIST_NUMPAD); i++) { | 111 | for (uint8_t i=0; i<ARRAYSIZE(LED_LIST_NUMPAD); i++) { |
| 273 | rgb_matrix_set_color(LED_LIST_NUMPAD[i], RGB_MAGENTA); | 112 | rgb_matrix_set_color(LED_LIST_NUMPAD[i], RGB_MAGENTA); |
| 274 | } | 113 | } |
| @@ -276,7 +115,7 @@ void matrix_scan_user(void) { | |||
| 276 | rgb_matrix_set_color(LED_R5, RGB_MAGENTA); | 115 | rgb_matrix_set_color(LED_R5, RGB_MAGENTA); |
| 277 | rgb_matrix_set_color(LED_R6, RGB_MAGENTA); | 116 | rgb_matrix_set_color(LED_R6, RGB_MAGENTA); |
| 278 | break; | 117 | break; |
| 279 | case _MO3: | 118 | case _RAISE: |
| 280 | rgb_matrix_set_color(LED_R6, RGB_GREEN); | 119 | rgb_matrix_set_color(LED_R6, RGB_GREEN); |
| 281 | rgb_matrix_set_color(LED_R7, RGB_GREEN); | 120 | rgb_matrix_set_color(LED_R7, RGB_GREEN); |
| 282 | rgb_matrix_set_color(LED_R8, RGB_GREEN); | 121 | rgb_matrix_set_color(LED_R8, RGB_GREEN); |
| @@ -296,12 +135,8 @@ void matrix_scan_user(void) { | |||
| 296 | #endif | 135 | #endif |
| 297 | 136 | ||
| 298 | 137 | ||
| 299 | void keyboard_post_init_user(void) { | 138 | void keyboard_post_init_keymap(void) { |
| 300 | 139 | // keyboard_post_init_user() moved to userspace | |
| 301 | if (IS_HOST_LED_ON(USB_LED_NUM_LOCK)) { // turn on Num lock by defautl so that the numpad layer always has predictable results | ||
| 302 | tap_code(KC_NUMLOCK); | ||
| 303 | } | ||
| 304 | timeout_timer = timer_read(); // set inital time for ide timeout | ||
| 305 | #ifdef RGB_MATRIX_ENABLE | 140 | #ifdef RGB_MATRIX_ENABLE |
| 306 | rgb_matrix_set_color_all(RGB_NAUTILUS); // Default startup colour | 141 | rgb_matrix_set_color_all(RGB_NAUTILUS); // Default startup colour |
| 307 | #endif | 142 | #endif |
diff --git a/keyboards/gmmk/pro/ansi/keymaps/jonavin/readme.md b/keyboards/gmmk/pro/ansi/keymaps/jonavin/readme.md index f4f3401ab..dceaa1307 100644 --- a/keyboards/gmmk/pro/ansi/keymaps/jonavin/readme.md +++ b/keyboards/gmmk/pro/ansi/keymaps/jonavin/readme.md | |||
| @@ -29,6 +29,19 @@ | |||
| 29 | - Win Key light up red when Win Lock mode enabled | 29 | - Win Key light up red when Win Lock mode enabled |
| 30 | - Layer 2 activation lights up Numpad area | 30 | - Layer 2 activation lights up Numpad area |
| 31 | 31 | ||
| 32 | rules.mk OPTIONS - Active features from userspace | ||
| 33 | STARTUP_NUMLOCK_ON = yes | ||
| 34 | - turns on NUMLOCK by default | ||
| 35 | |||
| 36 | ENCODER_DEFAULTACTIONS_ENABLE = yes | ||
| 37 | - Enabled default encoder funtions | ||
| 38 | |||
| 39 | TD_LSFT_CAPSLOCK_ENABLE = yes | ||
| 40 | - This will enable double tap on Left Shift to toggle CAPSLOCK when using KC_LSFTCAPS | ||
| 41 | |||
| 42 | IDLE_TIMEOUT_ENABLE = yes | ||
| 43 | - Enables Timer functionality; for RGB idle timeouts that can be changed dynamically | ||
| 44 | |||
| 32 | ## All layers diagram | 45 | ## All layers diagram |
| 33 | Default layer | 46 | Default layer |
| 34 |  | 47 |  |
diff --git a/keyboards/gmmk/pro/ansi/keymaps/jonavin/rules.mk b/keyboards/gmmk/pro/ansi/keymaps/jonavin/rules.mk index d2ed00e02..6d3574e7f 100644 --- a/keyboards/gmmk/pro/ansi/keymaps/jonavin/rules.mk +++ b/keyboards/gmmk/pro/ansi/keymaps/jonavin/rules.mk | |||
| @@ -2,3 +2,8 @@ VIA_ENABLE = yes | |||
| 2 | MOUSEKEY_ENABLE = no | 2 | MOUSEKEY_ENABLE = no |
| 3 | TAP_DANCE_ENABLE = yes | 3 | TAP_DANCE_ENABLE = yes |
| 4 | BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite | 4 | BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite |
| 5 | |||
| 6 | TD_LSFT_CAPSLOCK_ENABLE = yes | ||
| 7 | IDLE_TIMEOUT_ENABLE = yes | ||
| 8 | STARTUP_NUMLOCK_ON = yes | ||
| 9 | ENCODER_DEFAULTACTIONS_ENABLE = yes | ||
diff --git a/keyboards/handwired/atreus50/keymaps/ajp10304/config.h b/keyboards/handwired/atreus50/keymaps/ajp10304/config.h index f5e6bbabe..4f15c5626 100644 --- a/keyboards/handwired/atreus50/keymaps/ajp10304/config.h +++ b/keyboards/handwired/atreus50/keymaps/ajp10304/config.h | |||
| @@ -1,3 +1,19 @@ | |||
| 1 | /* Copyright 2021 Alan Pocklington | ||
| 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 | |||
| 1 | #ifndef CONFIG_USER_H | 17 | #ifndef CONFIG_USER_H |
| 2 | #define CONFIG_USER_H | 18 | #define CONFIG_USER_H |
| 3 | 19 | ||
diff --git a/keyboards/handwired/atreus50/keymaps/ajp10304/keymap.c b/keyboards/handwired/atreus50/keymaps/ajp10304/keymap.c index 46a5995d0..2b0616ad7 100644 --- a/keyboards/handwired/atreus50/keymaps/ajp10304/keymap.c +++ b/keyboards/handwired/atreus50/keymaps/ajp10304/keymap.c | |||
| @@ -1,3 +1,19 @@ | |||
| 1 | /* Copyright 2021 Alan Pocklington | ||
| 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 | |||
| 1 | #include QMK_KEYBOARD_H | 17 | #include QMK_KEYBOARD_H |
| 2 | #include "keymap_uk.h" | 18 | #include "keymap_uk.h" |
| 3 | #include "ajp10304.h" | 19 | #include "ajp10304.h" |
diff --git a/keyboards/handwired/atreus50/keymaps/ajp10304/readme.md b/keyboards/handwired/atreus50/keymaps/ajp10304/readme.md index 5c6a703a8..4f1bac8da 100644 --- a/keyboards/handwired/atreus50/keymaps/ajp10304/readme.md +++ b/keyboards/handwired/atreus50/keymaps/ajp10304/readme.md | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | # AJP10304 Custom Atreus50 Layout | 1 | # AJP10304 Custom Atreus50 Layout |
| 2 | # Also available for the Planck, Shark and JJ40 | 2 | # Also available for the Planck, Shark, Quark and JJ40 |
| 3 | 3 | ||
| 4 | **Note:** In the tables below where there are two characters on a key, | 4 | **Note:** In the tables below where there are two characters on a key, |
| 5 | the second is the output when shift is applied. | 5 | the second is the output when shift is applied. |
diff --git a/keyboards/handwired/elrgo_s/config.h b/keyboards/handwired/elrgo_s/config.h new file mode 100644 index 000000000..b2ef4681e --- /dev/null +++ b/keyboards/handwired/elrgo_s/config.h | |||
| @@ -0,0 +1,58 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2021 Yaroslav Smirnov <elorenn@bk.ru> | ||
| 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 | // Rows are doubled-up for splits | ||
| 23 | #define MATRIX_ROWS 8 | ||
| 24 | #define MATRIX_COLS 6 | ||
| 25 | |||
| 26 | // Wiring of each half | ||
| 27 | #define MATRIX_ROW_PINS { B1, B3, B2, B6 } | ||
| 28 | #define MATRIX_COL_PINS { D4, C6, D7, E6, B4, B5 } | ||
| 29 | // Reversed sort | ||
| 30 | |||
| 31 | #define DIODE_DIRECTION COL2ROW | ||
| 32 | |||
| 33 | /* USB Device descriptor parameter */ | ||
| 34 | #define PRODUCT Elrgo S | ||
| 35 | #define MANUFACTURER Eloren | ||
| 36 | #define VENDOR_ID 0x454C | ||
| 37 | #define PRODUCT_ID 0x3436 | ||
| 38 | #define DEVICE_VER 0x0001 | ||
| 39 | |||
| 40 | /* Set 0 if debouncing isn't needed */ | ||
| 41 | #define DEBOUNCE 5 | ||
| 42 | |||
| 43 | /* serial.c configuration for split keyboard */ | ||
| 44 | #define SOFT_SERIAL_PIN D0 | ||
| 45 | |||
| 46 | |||
| 47 | /* disable debug print */ | ||
| 48 | // #define NO_DEBUG | ||
| 49 | |||
| 50 | /* disable print */ | ||
| 51 | // #define NO_PRINT | ||
| 52 | |||
| 53 | /* disable action features */ | ||
| 54 | //#define NO_ACTION_LAYER | ||
| 55 | //#define NO_ACTION_TAPPING | ||
| 56 | //#define NO_ACTION_ONESHOT | ||
| 57 | //#define NO_ACTION_MACRO | ||
| 58 | //#define NO_ACTION_FUNCTION | ||
diff --git a/keyboards/handwired/elrgo_s/elrgo_s.c b/keyboards/handwired/elrgo_s/elrgo_s.c new file mode 100644 index 000000000..32640da06 --- /dev/null +++ b/keyboards/handwired/elrgo_s/elrgo_s.c | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | /* Copyright 2021 Yaroslav Smirnov <elorenn@bk.ru> | ||
| 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 "elrgo_s.h" | ||
diff --git a/keyboards/handwired/elrgo_s/elrgo_s.h b/keyboards/handwired/elrgo_s/elrgo_s.h new file mode 100644 index 000000000..0fb2b58e5 --- /dev/null +++ b/keyboards/handwired/elrgo_s/elrgo_s.h | |||
| @@ -0,0 +1,38 @@ | |||
| 1 | /* Copyright 2021 Yaroslav Smirnov <elorenn@bk.ru> | ||
| 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 | #pragma once | ||
| 18 | |||
| 19 | #include "quantum.h" | ||
| 20 | |||
| 21 | |||
| 22 | #define LAYOUT_split_3x6_5(\ | ||
| 23 | L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ | ||
| 24 | L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ | ||
| 25 | L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ | ||
| 26 | L31, L32, L33, L34, L35, R30, R31, R32, R33, R34 \ | ||
| 27 | ) \ | ||
| 28 | { \ | ||
| 29 | { L00, L01, L02, L03, L04, L05 }, \ | ||
| 30 | { L10, L11, L12, L13, L14, L15 }, \ | ||
| 31 | { L20, L21, L22, L23, L24, L25 }, \ | ||
| 32 | {KC_NO, L31, L32, L33, L34, L35}, \ | ||
| 33 | \ | ||
| 34 | { R00, R01, R02, R03, R04, R05 }, \ | ||
| 35 | { R10, R11, R12, R13, R14, R15 }, \ | ||
| 36 | { R20, R21, R22, R23, R24, R25 }, \ | ||
| 37 | { R30, R31, R32, R33, R34, KC_NO} \ | ||
| 38 | } | ||
diff --git a/keyboards/handwired/elrgo_s/info.json b/keyboards/handwired/elrgo_s/info.json new file mode 100644 index 000000000..0b561049e --- /dev/null +++ b/keyboards/handwired/elrgo_s/info.json | |||
| @@ -0,0 +1,59 @@ | |||
| 1 | { | ||
| 2 | "keyboard_name": "Elrgo S", | ||
| 3 | "url": "", | ||
| 4 | "maintainer": "qmk", | ||
| 5 | "width": 17, | ||
| 6 | "height": 4, | ||
| 7 | "layouts": { | ||
| 8 | "LAYOUT_split_3x6_5": { | ||
| 9 | "layout": [ | ||
| 10 | {"label":"L00", "x":0, "y":0}, | ||
| 11 | {"label":"L01", "x":1, "y":0}, | ||
| 12 | {"label":"L02", "x":2, "y":0}, | ||
| 13 | {"label":"L03", "x":3, "y":0}, | ||
| 14 | {"label":"L04", "x":4, "y":0}, | ||
| 15 | {"label":"L05", "x":5, "y":0}, | ||
| 16 | {"label":"R00", "x":9, "y":0}, | ||
| 17 | {"label":"R01", "x":10, "y":0}, | ||
| 18 | {"label":"R02", "x":11, "y":0}, | ||
| 19 | {"label":"R03", "x":12, "y":0}, | ||
| 20 | {"label":"R04", "x":13, "y":0}, | ||
| 21 | {"label":"R05", "x":14, "y":0}, | ||
| 22 | {"label":"L10", "x":0, "y":1}, | ||
| 23 | {"label":"L11", "x":1, "y":1}, | ||
| 24 | {"label":"L12", "x":2, "y":1}, | ||
| 25 | {"label":"L13", "x":3, "y":1}, | ||
| 26 | {"label":"L14", "x":4, "y":1}, | ||
| 27 | {"label":"L15", "x":5, "y":1}, | ||
| 28 | {"label":"R10", "x":9, "y":1}, | ||
| 29 | {"label":"R11", "x":10, "y":1}, | ||
| 30 | {"label":"R12", "x":11, "y":1}, | ||
| 31 | {"label":"R13", "x":12, "y":1}, | ||
| 32 | {"label":"R14", "x":13, "y":1}, | ||
| 33 | {"label":"R15", "x":14, "y":1}, | ||
| 34 | {"label":"L20", "x":0, "y":2}, | ||
| 35 | {"label":"L21", "x":1, "y":2}, | ||
| 36 | {"label":"L22", "x":2, "y":2}, | ||
| 37 | {"label":"L23", "x":3, "y":2}, | ||
| 38 | {"label":"L24", "x":4, "y":2}, | ||
| 39 | {"label":"L25", "x":5, "y":2}, | ||
| 40 | {"label":"R20", "x":9, "y":2}, | ||
| 41 | {"label":"R21", "x":10, "y":2}, | ||
| 42 | {"label":"R22", "x":11, "y":2}, | ||
| 43 | {"label":"R23", "x":12, "y":2}, | ||
| 44 | {"label":"R24", "x":13, "y":2}, | ||
| 45 | {"label":"R25", "x":14, "y":2}, | ||
| 46 | {"label":"L31", "x":3, "y":3}, | ||
| 47 | {"label":"L32", "x":4, "y":3}, | ||
| 48 | {"label":"L33", "x":5, "y":3}, | ||
| 49 | {"label":"L34", "x":6, "y":3}, | ||
| 50 | {"label":"L35", "x":6, "y":2}, | ||
| 51 | {"label":"R30", "x":8, "y":2}, | ||
| 52 | {"label":"R31", "x":8, "y":3}, | ||
| 53 | {"label":"R32", "x":9, "y":3}, | ||
| 54 | {"label":"R33", "x":10, "y":3}, | ||
| 55 | {"label":"R34", "x":11, "y":3} | ||
| 56 | ] | ||
| 57 | } | ||
| 58 | } | ||
| 59 | } | ||
diff --git a/keyboards/handwired/elrgo_s/keymaps/default/config.h b/keyboards/handwired/elrgo_s/keymaps/default/config.h new file mode 100644 index 000000000..f3ef42b9b --- /dev/null +++ b/keyboards/handwired/elrgo_s/keymaps/default/config.h | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | /* Copyright 2021 Yaroslav Smirnov <elorenn@bk.ru> | ||
| 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 | #pragma once | ||
| 18 | |||
| 19 | #define USE_SERIAL | ||
| 20 | |||
| 21 | #define MASTER_LEFT | ||
| 22 | // #define MASTER_RIGHT | ||
diff --git a/keyboards/handwired/elrgo_s/keymaps/default/keymap.c b/keyboards/handwired/elrgo_s/keymaps/default/keymap.c new file mode 100644 index 000000000..572edbf0b --- /dev/null +++ b/keyboards/handwired/elrgo_s/keymaps/default/keymap.c | |||
| @@ -0,0 +1,58 @@ | |||
| 1 | /* Copyright 2021 Yaroslav Smirnov <elorenn@bk.ru> | ||
| 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 | enum layers { _QWERTY, _LOWER, _RAISE, _ADJUST }; | ||
| 20 | |||
| 21 | #define LOWER TT(_LOWER) | ||
| 22 | #define RAISE MO(_RAISE) | ||
| 23 | |||
| 24 | #define M_SHLL LCTL(KC_LSFT) | ||
| 25 | #define M_SHLA LCTL(KC_LALT) | ||
| 26 | #define M_BBSLS LSFT(KC_BSLS) | ||
| 27 | #define M_FLEFT LCTL(KC_LEFT) | ||
| 28 | #define M_FRIGHT LCTL(KC_RIGHT) | ||
| 29 | |||
| 30 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 31 | [_QWERTY] = LAYOUT_split_3x6_5( | ||
| 32 | KC_ESC , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_BSPC , | ||
| 33 | KC_LBRC , KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN , KC_QUOT , | ||
| 34 | KC_RBRC , KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM , KC_DOT , KC_SLSH , KC_GRAVE, | ||
| 35 | KC_LGUI , KC_LCTL , KC_LSFT , LOWER , M_SHLL , M_SHLA , RAISE , KC_SPC , KC_LALT , KC_ENT | ||
| 36 | ), | ||
| 37 | |||
| 38 | [_LOWER] = LAYOUT_split_3x6_5( | ||
| 39 | KC_ESC , KC_PDOT , KC_PMNS , KC_PPLS , KC_MINS , KC_EQL , KC_MUTE , KC_MSTP , KC_MPLY , KC_MPRV , KC_MNXT , KC_BSPC , | ||
| 40 | KC_PAST , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , | ||
| 41 | KC_PSLS , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , | ||
| 42 | KC_LGUI , KC_LCTL , KC_LSFT , KC_TRNS , M_SHLL , M_SHLA , KC_TRNS , KC_SPC , KC_LALT , KC_ENT | ||
| 43 | ), | ||
| 44 | |||
| 45 | [_RAISE] = LAYOUT_split_3x6_5( | ||
| 46 | KC_ESC , KC_PDOT , M_BBSLS , KC_BSLS , LSFT(KC_MINS), LSFT(KC_EQL), KC_HOME , KC_WH_L , KC_UP , KC_WH_R , KC_PGUP , KC_BSPC , | ||
| 47 | KC_TAB , LSFT(KC_1), LSFT(KC_2), LSFT(KC_3), LSFT(KC_4) , LSFT(KC_5) , M_FLEFT , KC_LEFT , KC_DOWN , KC_RIGHT, M_FRIGHT, KC_DEL , | ||
| 48 | LSFT(KC_TAB), LSFT(KC_6), LSFT(KC_7), LSFT(KC_8), LSFT(KC_9) , LSFT(KC_0) , KC_END , KC_F22 , KC_F23 , KC_CAPS , KC_PGDN , MO(_ADJUST), | ||
| 49 | KC_LGUI , KC_LCTL , KC_LSFT , KC_LALT , M_SHLL , M_SHLA , KC_TRNS , KC_SPC , KC_RALT , KC_ENT | ||
| 50 | ), | ||
| 51 | |||
| 52 | [_ADJUST] = LAYOUT_split_3x6_5( | ||
| 53 | KC_NO , KC_SLEP , KC_VOLU , KC_BRIU , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NLCK , | ||
| 54 | KC_NO , KC_WAKE , KC_VOLD , KC_BRID , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , | ||
| 55 | KC_NO , KC_NO , KC_NO , KC_F13 , KC_F14 , KC_F15 , KC_F16 , KC_F17 , KC_F18 , KC_NO , KC_NO , MO(_ADJUST), | ||
| 56 | RESET , KC_NO , KC_NO , KC_TRNS , KC_NO , KC_NO , KC_TRNS , KC_TRNS , KC_NO , KC_NO | ||
| 57 | ) | ||
| 58 | }; | ||
diff --git a/keyboards/handwired/elrgo_s/readme.md b/keyboards/handwired/elrgo_s/readme.md new file mode 100644 index 000000000..5fb5ab6ac --- /dev/null +++ b/keyboards/handwired/elrgo_s/readme.md | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | # Elrgo S Split Keyboard | ||
| 2 | |||
| 3 | This is a fork of the VOID Ergo S with QMK Configurator support. | ||
| 4 | |||
| 5 | Elrgo S uses 2x Arduino Pro Micro (ATmega32U4) with 3D printed case. | ||
| 6 | |||
| 7 | [Building guide, models for 3D printing](https://github.com/Eloren1/Elrgo_S) | ||
| 8 | |||
| 9 | * Keyboard Maintainer: [Eloren](https://github.com/Eloren1) | ||
| 10 | * Hardware Supported: Arduino Pro Micro | ||
| 11 | * Hardware Availability: [Open Source](https://github.com/Eloren1/Elrgo_S) | ||
| 12 | |||
| 13 | Make example for this keyboard (after setting up your build environment): | ||
| 14 | |||
| 15 | make handwired/elrgo_s:default | ||
| 16 | |||
| 17 | Flashing example for this keyboard: | ||
| 18 | |||
| 19 | make handwired/elrgo_s:default:flash | ||
| 20 | |||
| 21 | 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). | ||
| 22 | |||
| 23 | ## Bootloader | ||
| 24 | |||
| 25 | Enter the bootloader in 2 ways: | ||
| 26 | |||
| 27 | * **Physical reset button**: Briefly press the button through the hole on the left side of the case. | ||
| 28 | * **Keycode in layout**: Press the key mapped to `RESET` if it is available | ||
diff --git a/keyboards/handwired/elrgo_s/rules.mk b/keyboards/handwired/elrgo_s/rules.mk new file mode 100644 index 000000000..ed3ed34a4 --- /dev/null +++ b/keyboards/handwired/elrgo_s/rules.mk | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | # MCU name | ||
| 2 | MCU = atmega32u4 | ||
| 3 | |||
| 4 | # Bootloader selection | ||
| 5 | BOOTLOADER = caterina | ||
| 6 | |||
| 7 | # Build Options | ||
| 8 | # change yes to no to disable | ||
| 9 | # | ||
| 10 | BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration | ||
| 11 | MOUSEKEY_ENABLE = yes # Mouse keys | ||
| 12 | EXTRAKEY_ENABLE = yes # Audio control and System control | ||
| 13 | CONSOLE_ENABLE = no # Console for debug | ||
| 14 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
| 15 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
| 16 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
| 17 | # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
| 18 | NKRO_ENABLE = no # USB Nkey Rollover | ||
| 19 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | ||
| 20 | RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow | ||
| 21 | BLUETOOTH_ENABLE = no # Enable Bluetooth | ||
| 22 | AUDIO_ENABLE = no # Audio output | ||
| 23 | SPLIT_KEYBOARD = yes | ||
diff --git a/keyboards/jj40/keymaps/ajp10304/readme.md b/keyboards/jj40/keymaps/ajp10304/readme.md index 345fbccf6..7336b1994 100644 --- a/keyboards/jj40/keymaps/ajp10304/readme.md +++ b/keyboards/jj40/keymaps/ajp10304/readme.md | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | # AJP10304 Custom JJ40 Layout | 1 | # AJP10304 Custom JJ40 Layout |
| 2 | # Also available for the Planck, Shark and Atreus50 | 2 | # Also available for the Planck, Shark, Quark and Atreus50 |
| 3 | 3 | ||
| 4 | **Note:** In the tables below where there are two characters on a key, | 4 | **Note:** In the tables below where there are two characters on a key, |
| 5 | the second is the output when shift is applied. | 5 | the second is the output when shift is applied. |
diff --git a/keyboards/kb_elmo/noah_avr/info.json b/keyboards/kb_elmo/noah_avr/info.json index 8560d4b86..571291d37 100644 --- a/keyboards/kb_elmo/noah_avr/info.json +++ b/keyboards/kb_elmo/noah_avr/info.json | |||
| @@ -4,6 +4,11 @@ | |||
| 4 | "maintainer": "kb-elmo", | 4 | "maintainer": "kb-elmo", |
| 5 | "width": 16, | 5 | "width": 16, |
| 6 | "height": 5, | 6 | "height": 5, |
| 7 | "layout_aliases": { | ||
| 8 | "LAYOUT_ansi": "LAYOUT_65_ansi_blocker", | ||
| 9 | "LAYOUT_ansi_splitbs": "LAYOUT_65_ansi_blocker_split_bs", | ||
| 10 | "LAYOUT_iso": "LAYOUT_65_iso_blocker" | ||
| 11 | }, | ||
| 7 | "layouts": { | 12 | "layouts": { |
| 8 | "LAYOUT_all": { | 13 | "LAYOUT_all": { |
| 9 | "layout": [ | 14 | "layout": [ |
| @@ -23,6 +28,7 @@ | |||
| 23 | {"x":13, "y":0}, | 28 | {"x":13, "y":0}, |
| 24 | {"x":14, "y":0}, | 29 | {"x":14, "y":0}, |
| 25 | {"x":15, "y":0}, | 30 | {"x":15, "y":0}, |
| 31 | |||
| 26 | {"x":0, "y":1, "w":1.5}, | 32 | {"x":0, "y":1, "w":1.5}, |
| 27 | {"x":1.5, "y":1}, | 33 | {"x":1.5, "y":1}, |
| 28 | {"x":2.5, "y":1}, | 34 | {"x":2.5, "y":1}, |
| @@ -38,6 +44,7 @@ | |||
| 38 | {"x":12.5, "y":1}, | 44 | {"x":12.5, "y":1}, |
| 39 | {"x":13.5, "y":1, "w":1.5}, | 45 | {"x":13.5, "y":1, "w":1.5}, |
| 40 | {"x":15, "y":1}, | 46 | {"x":15, "y":1}, |
| 47 | |||
| 41 | {"x":0, "y":2, "w":1.75}, | 48 | {"x":0, "y":2, "w":1.75}, |
| 42 | {"x":1.75, "y":2}, | 49 | {"x":1.75, "y":2}, |
| 43 | {"x":2.75, "y":2}, | 50 | {"x":2.75, "y":2}, |
| @@ -52,6 +59,7 @@ | |||
| 52 | {"x":11.75, "y":2}, | 59 | {"x":11.75, "y":2}, |
| 53 | {"x":12.75, "y":2, "w":2.25}, | 60 | {"x":12.75, "y":2, "w":2.25}, |
| 54 | {"x":15, "y":2}, | 61 | {"x":15, "y":2}, |
| 62 | |||
| 55 | {"x":0, "y":3, "w":1.25}, | 63 | {"x":0, "y":3, "w":1.25}, |
| 56 | {"x":1.25, "y":3}, | 64 | {"x":1.25, "y":3}, |
| 57 | {"x":2.25, "y":3}, | 65 | {"x":2.25, "y":3}, |
| @@ -67,6 +75,7 @@ | |||
| 67 | {"x":12.25, "y":3, "w":1.75}, | 75 | {"x":12.25, "y":3, "w":1.75}, |
| 68 | {"x":14, "y":3}, | 76 | {"x":14, "y":3}, |
| 69 | {"x":15, "y":3}, | 77 | {"x":15, "y":3}, |
| 78 | |||
| 70 | {"x":0, "y":4, "w":1.25}, | 79 | {"x":0, "y":4, "w":1.25}, |
| 71 | {"x":1.25, "y":4, "w":1.25}, | 80 | {"x":1.25, "y":4, "w":1.25}, |
| 72 | {"x":2.5, "y":4, "w":1.25}, | 81 | {"x":2.5, "y":4, "w":1.25}, |
| @@ -78,7 +87,7 @@ | |||
| 78 | {"x":15, "y":4} | 87 | {"x":15, "y":4} |
| 79 | ] | 88 | ] |
| 80 | }, | 89 | }, |
| 81 | "LAYOUT_ansi": { | 90 | "LAYOUT_65_ansi_blocker": { |
| 82 | "layout": [ | 91 | "layout": [ |
| 83 | {"x":0, "y":0}, | 92 | {"x":0, "y":0}, |
| 84 | {"x":1, "y":0}, | 93 | {"x":1, "y":0}, |
| @@ -95,6 +104,7 @@ | |||
| 95 | {"x":12, "y":0}, | 104 | {"x":12, "y":0}, |
| 96 | {"x":13, "y":0, "w":2}, | 105 | {"x":13, "y":0, "w":2}, |
| 97 | {"x":15, "y":0}, | 106 | {"x":15, "y":0}, |
| 107 | |||
| 98 | {"x":0, "y":1, "w":1.5}, | 108 | {"x":0, "y":1, "w":1.5}, |
| 99 | {"x":1.5, "y":1}, | 109 | {"x":1.5, "y":1}, |
| 100 | {"x":2.5, "y":1}, | 110 | {"x":2.5, "y":1}, |
| @@ -110,6 +120,7 @@ | |||
| 110 | {"x":12.5, "y":1}, | 120 | {"x":12.5, "y":1}, |
| 111 | {"x":13.5, "y":1, "w":1.5}, | 121 | {"x":13.5, "y":1, "w":1.5}, |
| 112 | {"x":15, "y":1}, | 122 | {"x":15, "y":1}, |
| 123 | |||
| 113 | {"x":0, "y":2, "w":1.75}, | 124 | {"x":0, "y":2, "w":1.75}, |
| 114 | {"x":1.75, "y":2}, | 125 | {"x":1.75, "y":2}, |
| 115 | {"x":2.75, "y":2}, | 126 | {"x":2.75, "y":2}, |
| @@ -124,6 +135,7 @@ | |||
| 124 | {"x":11.75, "y":2}, | 135 | {"x":11.75, "y":2}, |
| 125 | {"x":12.75, "y":2, "w":2.25}, | 136 | {"x":12.75, "y":2, "w":2.25}, |
| 126 | {"x":15, "y":2}, | 137 | {"x":15, "y":2}, |
| 138 | |||
| 127 | {"x":0, "y":3, "w":2.25}, | 139 | {"x":0, "y":3, "w":2.25}, |
| 128 | {"x":2.25, "y":3}, | 140 | {"x":2.25, "y":3}, |
| 129 | {"x":3.25, "y":3}, | 141 | {"x":3.25, "y":3}, |
| @@ -138,6 +150,7 @@ | |||
| 138 | {"x":12.25, "y":3, "w":1.75}, | 150 | {"x":12.25, "y":3, "w":1.75}, |
| 139 | {"x":14, "y":3}, | 151 | {"x":14, "y":3}, |
| 140 | {"x":15, "y":3}, | 152 | {"x":15, "y":3}, |
| 153 | |||
| 141 | {"x":0, "y":4, "w":1.25}, | 154 | {"x":0, "y":4, "w":1.25}, |
| 142 | {"x":1.25, "y":4, "w":1.25}, | 155 | {"x":1.25, "y":4, "w":1.25}, |
| 143 | {"x":2.5, "y":4, "w":1.25}, | 156 | {"x":2.5, "y":4, "w":1.25}, |
| @@ -149,7 +162,7 @@ | |||
| 149 | {"x":15, "y":4} | 162 | {"x":15, "y":4} |
| 150 | ] | 163 | ] |
| 151 | }, | 164 | }, |
| 152 | "LAYOUT_ansi_splitbs": { | 165 | "LAYOUT_65_ansi_blocker_split_bs": { |
| 153 | "layout": [ | 166 | "layout": [ |
| 154 | {"x":0, "y":0}, | 167 | {"x":0, "y":0}, |
| 155 | {"x":1, "y":0}, | 168 | {"x":1, "y":0}, |
| @@ -167,6 +180,7 @@ | |||
| 167 | {"x":13, "y":0}, | 180 | {"x":13, "y":0}, |
| 168 | {"x":14, "y":0}, | 181 | {"x":14, "y":0}, |
| 169 | {"x":15, "y":0}, | 182 | {"x":15, "y":0}, |
| 183 | |||
| 170 | {"x":0, "y":1, "w":1.5}, | 184 | {"x":0, "y":1, "w":1.5}, |
| 171 | {"x":1.5, "y":1}, | 185 | {"x":1.5, "y":1}, |
| 172 | {"x":2.5, "y":1}, | 186 | {"x":2.5, "y":1}, |
| @@ -182,6 +196,7 @@ | |||
| 182 | {"x":12.5, "y":1}, | 196 | {"x":12.5, "y":1}, |
| 183 | {"x":13.5, "y":1, "w":1.5}, | 197 | {"x":13.5, "y":1, "w":1.5}, |
| 184 | {"x":15, "y":1}, | 198 | {"x":15, "y":1}, |
| 199 | |||
| 185 | {"x":0, "y":2, "w":1.75}, | 200 | {"x":0, "y":2, "w":1.75}, |
| 186 | {"x":1.75, "y":2}, | 201 | {"x":1.75, "y":2}, |
| 187 | {"x":2.75, "y":2}, | 202 | {"x":2.75, "y":2}, |
| @@ -196,6 +211,7 @@ | |||
| 196 | {"x":11.75, "y":2}, | 211 | {"x":11.75, "y":2}, |
| 197 | {"x":12.75, "y":2, "w":2.25}, | 212 | {"x":12.75, "y":2, "w":2.25}, |
| 198 | {"x":15, "y":2}, | 213 | {"x":15, "y":2}, |
| 214 | |||
| 199 | {"x":0, "y":3, "w":2.25}, | 215 | {"x":0, "y":3, "w":2.25}, |
| 200 | {"x":2.25, "y":3}, | 216 | {"x":2.25, "y":3}, |
| 201 | {"x":3.25, "y":3}, | 217 | {"x":3.25, "y":3}, |
| @@ -210,6 +226,7 @@ | |||
| 210 | {"x":12.25, "y":3, "w":1.75}, | 226 | {"x":12.25, "y":3, "w":1.75}, |
| 211 | {"x":14, "y":3}, | 227 | {"x":14, "y":3}, |
| 212 | {"x":15, "y":3}, | 228 | {"x":15, "y":3}, |
| 229 | |||
| 213 | {"x":0, "y":4, "w":1.25}, | 230 | {"x":0, "y":4, "w":1.25}, |
| 214 | {"x":1.25, "y":4, "w":1.25}, | 231 | {"x":1.25, "y":4, "w":1.25}, |
| 215 | {"x":2.5, "y":4, "w":1.25}, | 232 | {"x":2.5, "y":4, "w":1.25}, |
| @@ -221,7 +238,83 @@ | |||
| 221 | {"x":15, "y":4} | 238 | {"x":15, "y":4} |
| 222 | ] | 239 | ] |
| 223 | }, | 240 | }, |
| 224 | "LAYOUT_iso": { | 241 | "LAYOUT_65_iso_blocker": { |
| 242 | "layout": [ | ||
| 243 | {"x":0, "y":0}, | ||
| 244 | {"x":1, "y":0}, | ||
| 245 | {"x":2, "y":0}, | ||
| 246 | {"x":3, "y":0}, | ||
| 247 | {"x":4, "y":0}, | ||
| 248 | {"x":5, "y":0}, | ||
| 249 | {"x":6, "y":0}, | ||
| 250 | {"x":7, "y":0}, | ||
| 251 | {"x":8, "y":0}, | ||
| 252 | {"x":9, "y":0}, | ||
| 253 | {"x":10, "y":0}, | ||
| 254 | {"x":11, "y":0}, | ||
| 255 | {"x":12, "y":0}, | ||
| 256 | {"x":13, "y":0, "w":2}, | ||
| 257 | {"x":15, "y":0}, | ||
| 258 | |||
| 259 | {"x":0, "y":1, "w":1.5}, | ||
| 260 | {"x":1.5, "y":1}, | ||
| 261 | {"x":2.5, "y":1}, | ||
| 262 | {"x":3.5, "y":1}, | ||
| 263 | {"x":4.5, "y":1}, | ||
| 264 | {"x":5.5, "y":1}, | ||
| 265 | {"x":6.5, "y":1}, | ||
| 266 | {"x":7.5, "y":1}, | ||
| 267 | {"x":8.5, "y":1}, | ||
| 268 | {"x":9.5, "y":1}, | ||
| 269 | {"x":10.5, "y":1}, | ||
| 270 | {"x":11.5, "y":1}, | ||
| 271 | {"x":12.5, "y":1}, | ||
| 272 | {"x":15, "y":1}, | ||
| 273 | |||
| 274 | {"x":0, "y":2, "w":1.75}, | ||
| 275 | {"x":1.75, "y":2}, | ||
| 276 | {"x":2.75, "y":2}, | ||
| 277 | {"x":3.75, "y":2}, | ||
| 278 | {"x":4.75, "y":2}, | ||
| 279 | {"x":5.75, "y":2}, | ||
| 280 | {"x":6.75, "y":2}, | ||
| 281 | {"x":7.75, "y":2}, | ||
| 282 | {"x":8.75, "y":2}, | ||
| 283 | {"x":9.75, "y":2}, | ||
| 284 | {"x":10.75, "y":2}, | ||
| 285 | {"x":11.75, "y":2}, | ||
| 286 | {"x":12.75, "y":2}, | ||
| 287 | {"x":13.75, "y":1, "w":1.25, "h":2}, | ||
| 288 | {"x":15, "y":2}, | ||
| 289 | |||
| 290 | {"x":0, "y":3, "w":1.25}, | ||
| 291 | {"x":1.25, "y":3}, | ||
| 292 | {"x":2.25, "y":3}, | ||
| 293 | {"x":3.25, "y":3}, | ||
| 294 | {"x":4.25, "y":3}, | ||
| 295 | {"x":5.25, "y":3}, | ||
| 296 | {"x":6.25, "y":3}, | ||
| 297 | {"x":7.25, "y":3}, | ||
| 298 | {"x":8.25, "y":3}, | ||
| 299 | {"x":9.25, "y":3}, | ||
| 300 | {"x":10.25, "y":3}, | ||
| 301 | {"x":11.25, "y":3}, | ||
| 302 | {"x":12.25, "y":3, "w":1.75}, | ||
| 303 | {"x":14, "y":3}, | ||
| 304 | {"x":15, "y":3}, | ||
| 305 | |||
| 306 | {"x":0, "y":4, "w":1.25}, | ||
| 307 | {"x":1.25, "y":4, "w":1.25}, | ||
| 308 | {"x":2.5, "y":4, "w":1.25}, | ||
| 309 | {"x":3.75, "y":4, "w":6.25}, | ||
| 310 | {"x":10, "y":4, "w":1.25}, | ||
| 311 | {"x":11.25, "y":4, "w":1.25}, | ||
| 312 | {"x":13, "y":4}, | ||
| 313 | {"x":14, "y":4}, | ||
| 314 | {"x":15, "y":4} | ||
| 315 | ] | ||
| 316 | }, | ||
| 317 | "LAYOUT_65_iso_blocker_split_bs": { | ||
| 225 | "layout": [ | 318 | "layout": [ |
| 226 | {"x":0, "y":0}, | 319 | {"x":0, "y":0}, |
| 227 | {"x":1, "y":0}, | 320 | {"x":1, "y":0}, |
| @@ -239,6 +332,7 @@ | |||
| 239 | {"x":13, "y":0}, | 332 | {"x":13, "y":0}, |
| 240 | {"x":14, "y":0}, | 333 | {"x":14, "y":0}, |
| 241 | {"x":15, "y":0}, | 334 | {"x":15, "y":0}, |
| 335 | |||
| 242 | {"x":0, "y":1, "w":1.5}, | 336 | {"x":0, "y":1, "w":1.5}, |
| 243 | {"x":1.5, "y":1}, | 337 | {"x":1.5, "y":1}, |
| 244 | {"x":2.5, "y":1}, | 338 | {"x":2.5, "y":1}, |
| @@ -252,8 +346,8 @@ | |||
| 252 | {"x":10.5, "y":1}, | 346 | {"x":10.5, "y":1}, |
| 253 | {"x":11.5, "y":1}, | 347 | {"x":11.5, "y":1}, |
| 254 | {"x":12.5, "y":1}, | 348 | {"x":12.5, "y":1}, |
| 255 | {"x":13.5, "y":1, "w":1.5}, | ||
| 256 | {"x":15, "y":1}, | 349 | {"x":15, "y":1}, |
| 350 | |||
| 257 | {"x":0, "y":2, "w":1.75}, | 351 | {"x":0, "y":2, "w":1.75}, |
| 258 | {"x":1.75, "y":2}, | 352 | {"x":1.75, "y":2}, |
| 259 | {"x":2.75, "y":2}, | 353 | {"x":2.75, "y":2}, |
| @@ -266,9 +360,12 @@ | |||
| 266 | {"x":9.75, "y":2}, | 360 | {"x":9.75, "y":2}, |
| 267 | {"x":10.75, "y":2}, | 361 | {"x":10.75, "y":2}, |
| 268 | {"x":11.75, "y":2}, | 362 | {"x":11.75, "y":2}, |
| 269 | {"x":12.75, "y":2, "w":2.25}, | 363 | {"x":12.75, "y":2}, |
| 364 | {"x":13.75, "y":1, "w":1.25, "h":2}, | ||
| 270 | {"x":15, "y":2}, | 365 | {"x":15, "y":2}, |
| 271 | {"x":0, "y":3, "w":2.25}, | 366 | |
| 367 | {"x":0, "y":3, "w":1.25}, | ||
| 368 | {"x":1.25, "y":3}, | ||
| 272 | {"x":2.25, "y":3}, | 369 | {"x":2.25, "y":3}, |
| 273 | {"x":3.25, "y":3}, | 370 | {"x":3.25, "y":3}, |
| 274 | {"x":4.25, "y":3}, | 371 | {"x":4.25, "y":3}, |
| @@ -282,6 +379,7 @@ | |||
| 282 | {"x":12.25, "y":3, "w":1.75}, | 379 | {"x":12.25, "y":3, "w":1.75}, |
| 283 | {"x":14, "y":3}, | 380 | {"x":14, "y":3}, |
| 284 | {"x":15, "y":3}, | 381 | {"x":15, "y":3}, |
| 382 | |||
| 285 | {"x":0, "y":4, "w":1.25}, | 383 | {"x":0, "y":4, "w":1.25}, |
| 286 | {"x":1.25, "y":4, "w":1.25}, | 384 | {"x":1.25, "y":4, "w":1.25}, |
| 287 | {"x":2.5, "y":4, "w":1.25}, | 385 | {"x":2.5, "y":4, "w":1.25}, |
diff --git a/keyboards/kb_elmo/noah_avr/keymaps/default/keymap.c b/keyboards/kb_elmo/noah_avr/keymaps/default/keymap.c index 6dae99e2b..1c4dde03b 100644 --- a/keyboards/kb_elmo/noah_avr/keymaps/default/keymap.c +++ b/keyboards/kb_elmo/noah_avr/keymaps/default/keymap.c | |||
| @@ -16,14 +16,14 @@ | |||
| 16 | #include QMK_KEYBOARD_H | 16 | #include QMK_KEYBOARD_H |
| 17 | 17 | ||
| 18 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | 18 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |
| 19 | [0] = LAYOUT_ansi( | 19 | [0] = LAYOUT_65_ansi_blocker( |
| 20 | KC_ESC, 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_DEL, | 20 | KC_ESC, 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_DEL, |
| 21 | 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_HOME, | 21 | 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_HOME, |
| 22 | 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_PGUP, | 22 | 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_PGUP, |
| 23 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, | 23 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, |
| 24 | KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT | 24 | KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT |
| 25 | ), | 25 | ), |
| 26 | [1] = LAYOUT_ansi( | 26 | [1] = LAYOUT_65_ansi_blocker( |
| 27 | 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, | 27 | 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, |
| 28 | 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, | 28 | 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, |
| 29 | 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, | 29 | 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/kb_elmo/noah_avr/noah_avr.h b/keyboards/kb_elmo/noah_avr/noah_avr.h index a816a30d0..66a85afa6 100644 --- a/keyboards/kb_elmo/noah_avr/noah_avr.h +++ b/keyboards/kb_elmo/noah_avr/noah_avr.h | |||
| @@ -18,68 +18,91 @@ | |||
| 18 | 18 | ||
| 19 | #include "quantum.h" | 19 | #include "quantum.h" |
| 20 | 20 | ||
| 21 | #define ____ KC_NO | 21 | #define ___ KC_NO |
| 22 | 22 | ||
| 23 | /* This is a shortcut to help you visually see your layout. | 23 | /* |
| 24 | * | 24 | * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ ┌───────┐ |
| 25 | * The first section contains all of the arguments representing the physical | 25 | * │00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0A │0B │0C │0D │0E │0F │ │0D │ 2u Backspace |
| 26 | * layout of the board and position of the keys. | 26 | * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┤ └─┬─────┤ |
| 27 | * | 27 | * │10 │11 │12 │13 │14 │15 │16 │17 │18 │19 │1A │1B │1C │1D │1F │ │ │ |
| 28 | * The second converts the arguments into a two-dimensional array which | 28 | * 2.25u ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ ┌──┴┐2D │ ISO Enter |
| 29 | * represents the switch matrix. | 29 | * LShift │20 │21 │22 │23 │24 │25 │26 │27 │28 │29 │2A │2B │2D │2F │ │1D │ │ |
| 30 | * ┌────────┐ ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ └───┴────┘ | ||
| 31 | * │30 │ │30 │31 │32 │33 │34 │35 │36 │37 │38 │39 │3A │3B │3C │3D │3F │ | ||
| 32 | * └────────┘ ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ | ||
| 33 | * │40 │41 │42 │46 │4B │4C │ │4D │4E │4F │ | ||
| 34 | * └────┴────┴────┴────────────────────────┴────┴────┴─┴───┴───┴───┘ | ||
| 35 | * ┌─────┬───┬─────┬───────────────────────────┬─────┐ | ||
| 36 | * │40 │41 │42 │46 │4C │ Tsangan | ||
| 37 | * └─────┴───┴─────┴───────────────────────────┴─────┘ | ||
| 30 | */ | 38 | */ |
| 39 | |||
| 31 | #define LAYOUT_all( \ | 40 | #define LAYOUT_all( \ |
| 32 | k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k013, k014, k015, \ | 41 | k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, \ |
| 33 | k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, k115, \ | 42 | k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1F, \ |
| 34 | k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k213, k215, \ | 43 | k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2D, k2F, \ |
| 35 | k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, k315, \ | 44 | k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3F, \ |
| 36 | k400, k401, k402, k406, k411, k412, k413, k414, k415 \ | 45 | k40, k41, k42, k46, k4B, k4C, k4D, k4E, k4F \ |
| 46 | ) { \ | ||
| 47 | { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ | ||
| 48 | { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, ___, k1F }, \ | ||
| 49 | { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, ___, k2D, ___, k2F }, \ | ||
| 50 | { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, ___, k3F }, \ | ||
| 51 | { k40, k41, k42, ___, ___, ___, k46, ___, ___, ___, ___, k4B, k4C, k4D, k4E, k4F } \ | ||
| 52 | } | ||
| 53 | |||
| 54 | #define LAYOUT_65_ansi_blocker( \ | ||
| 55 | k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0F, \ | ||
| 56 | k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1F, \ | ||
| 57 | k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2D, k2F, \ | ||
| 58 | k30, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3F, \ | ||
| 59 | k40, k41, k42, k46, k4B, k4C, k4D, k4E, k4F \ | ||
| 37 | ) { \ | 60 | ) { \ |
| 38 | { k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k013, k014, k015 }, \ | 61 | { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, ___, k0F }, \ |
| 39 | { k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, ____, k115 }, \ | 62 | { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, ___, k1F }, \ |
| 40 | { k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, ____, k213, ____, k215 }, \ | 63 | { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, ___, k2D, ___, k2F }, \ |
| 41 | { k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, ____, k315 }, \ | 64 | { k30, ___, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, ___, k3F }, \ |
| 42 | { k400, k401, k402, ____, ____, ____, k406, ____, ____, ____, ____, k411, k412, k413, k414, k415 } \ | 65 | { k40, k41, k42, ___, ___, ___, k46, ___, ___, ___, ___, k4B, k4C, k4D, k4E, k4F } \ |
| 43 | } | 66 | } |
| 44 | 67 | ||
| 45 | #define LAYOUT_ansi( \ | 68 | #define LAYOUT_65_ansi_blocker_split_bs( \ |
| 46 | k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k013, k015, \ | 69 | k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, \ |
| 47 | k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, k115, \ | 70 | k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1F, \ |
| 48 | k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k213, k215, \ | 71 | k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2D, k2F, \ |
| 49 | k300, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, k315, \ | 72 | k30, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3F, \ |
| 50 | k400, k401, k402, k406, k411, k412, k413, k414, k415 \ | 73 | k40, k41, k42, k46, k4B, k4C, k4D, k4E, k4F \ |
| 51 | ) { \ | 74 | ) { \ |
| 52 | { k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k013, ____, k015 }, \ | 75 | { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ |
| 53 | { k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, ____, k115 }, \ | 76 | { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, ___, k1F }, \ |
| 54 | { k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, ____, k213, ____, k215 }, \ | 77 | { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, ___, k2D, ___, k2F }, \ |
| 55 | { k300, ____, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, ____, k315 }, \ | 78 | { k30, ___, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, ___, k3F }, \ |
| 56 | { k400, k401, k402, ____, ____, ____, k406, ____, ____, ____, ____, k411, k412, k413, k414, k415 } \ | 79 | { k40, k41, k42, ___, ___, ___, k46, ___, ___, ___, ___, k4B, k4C, k4D, k4E, k4F } \ |
| 57 | } | 80 | } |
| 58 | 81 | ||
| 59 | #define LAYOUT_ansi_splitbs( \ | 82 | #define LAYOUT_65_iso_blocker( \ |
| 60 | k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k013, k014, k015, \ | 83 | k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0F, \ |
| 61 | k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, k115, \ | 84 | k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1F, \ |
| 62 | k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k213, k215, \ | 85 | k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k1D, k2D, k2F, \ |
| 63 | k300, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, k315, \ | 86 | k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3F, \ |
| 64 | k400, k401, k402, k406, k411, k412, k413, k414, k415 \ | 87 | k40, k41, k42, k46, k4B, k4C, k4D, k4E, k4F \ |
| 65 | ) { \ | 88 | ) { \ |
| 66 | { k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k013, k014, k015 }, \ | 89 | { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, ___, k0F }, \ |
| 67 | { k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, ____, k115 }, \ | 90 | { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, ___, k1F }, \ |
| 68 | { k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, ____, k213, ____, k215 }, \ | 91 | { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, ___, k2D, ___, k2F }, \ |
| 69 | { k300, ____, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, ____, k315 }, \ | 92 | { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, ___, k3F }, \ |
| 70 | { k400, k401, k402, ____, ____, ____, k406, ____, ____, ____, ____, k411, k412, k413, k414, k415 } \ | 93 | { k40, k41, k42, ___, ___, ___, k46, ___, ___, ___, ___, k4B, k4C, k4D, k4E, k4F } \ |
| 71 | } | 94 | } |
| 72 | 95 | ||
| 73 | #define LAYOUT_iso( \ | 96 | #define LAYOUT_65_iso_blocker_split_bs( \ |
| 74 | k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k013, k015, \ | 97 | k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, \ |
| 75 | k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k115, \ | 98 | k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1F, \ |
| 76 | k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k113, k213, k215, \ | 99 | k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k1D, k2D, k2F, \ |
| 77 | k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, k315, \ | 100 | k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3F, \ |
| 78 | k400, k401, k402, k406, k411, k412, k413, k414, k415 \ | 101 | k40, k41, k42, k46, k4B, k4C, k4D, k4E, k4F \ |
| 79 | ) { \ | 102 | ) { \ |
| 80 | { k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k013, ____, k015 }, \ | 103 | { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ |
| 81 | { k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, ____, k115 }, \ | 104 | { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, ___, k1F }, \ |
| 82 | { k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, ____, k213, ____, k215 }, \ | 105 | { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, ___, k2D, ___, k2F }, \ |
| 83 | { k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, ____, k315 }, \ | 106 | { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, ___, k3F }, \ |
| 84 | { k400, k401, k402, ____, ____, ____, k406, ____, ____, ____, ____, k411, k412, k413, k414, k415 } \ | 107 | { k40, k41, k42, ___, ___, ___, k46, ___, ___, ___, ___, k4B, k4C, k4D, k4E, k4F } \ |
| 85 | } | 108 | } |
diff --git a/keyboards/kb_elmo/noah_avr/rules.mk b/keyboards/kb_elmo/noah_avr/rules.mk index a13cc8c07..42b9b82a9 100644 --- a/keyboards/kb_elmo/noah_avr/rules.mk +++ b/keyboards/kb_elmo/noah_avr/rules.mk | |||
| @@ -20,3 +20,5 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | |||
| 20 | RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow | 20 | RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow |
| 21 | BLUETOOTH_ENABLE = no # Enable Bluetooth | 21 | BLUETOOTH_ENABLE = no # Enable Bluetooth |
| 22 | AUDIO_ENABLE = no # Audio output | 22 | AUDIO_ENABLE = no # Audio output |
| 23 | |||
| 24 | LAYOUTS = 65_ansi_blocker 65_ansi_blocker_split_bs 65_iso_blocker 65_iso_blocker_split_bs | ||
diff --git a/keyboards/keebio/quefrency/keymaps/jonavin/keymap.c b/keyboards/keebio/quefrency/keymaps/jonavin/keymap.c index 7243c59b6..721148f4d 100644 --- a/keyboards/keebio/quefrency/keymaps/jonavin/keymap.c +++ b/keyboards/keebio/quefrency/keymaps/jonavin/keymap.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* Copyright 2021 Jonavin Eng | 1 | /* Copyright 2021 Jonavin Eng @Jonavin |
| 2 | * | 2 | * |
| 3 | * This program is free software: you can redistribute it and/or modify | 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 | 4 | * it under the terms of the GNU General Public License as published by |
| @@ -16,36 +16,7 @@ | |||
| 16 | 16 | ||
| 17 | 17 | ||
| 18 | #include QMK_KEYBOARD_H | 18 | #include QMK_KEYBOARD_H |
| 19 | 19 | #include "jonavin.h" | |
| 20 | // Each layer gets a name for readability, which is then used in the keymap matrix below. | ||
| 21 | // The underscores don't mean anything - you can have a layer called STUFF or any other name. | ||
| 22 | // Layer names don't all need to be of the same length, obviously, and you can also skip them | ||
| 23 | // entirely and just use numbers. | ||
| 24 | enum custom_layers { | ||
| 25 | _BASE, | ||
| 26 | _FN1, | ||
| 27 | _MO2, | ||
| 28 | _MO3, | ||
| 29 | }; | ||
| 30 | |||
| 31 | enum custom_keycodes { | ||
| 32 | DOUBLEZERO = SAFE_RANGE, | ||
| 33 | KC_WINLCK, //Toggles Win key on and off | ||
| 34 | }; | ||
| 35 | |||
| 36 | // Tap Dance Definitions | ||
| 37 | enum custom_tapdance { | ||
| 38 | TD_LSFT_CAPSLOCK, | ||
| 39 | }; | ||
| 40 | |||
| 41 | qk_tap_dance_action_t tap_dance_actions[] = { | ||
| 42 | // Tap once for shift, twice for Caps Lock | ||
| 43 | [TD_LSFT_CAPSLOCK] = ACTION_TAP_DANCE_DOUBLE(KC_LSFT, KC_CAPS), | ||
| 44 | }; | ||
| 45 | |||
| 46 | #define KC_LSFTCAPS TD(TD_LSFT_CAPSLOCK) | ||
| 47 | |||
| 48 | bool _isWinKeyDisabled = false; | ||
| 49 | 20 | ||
| 50 | #ifdef RGBLIGHT_ENABLE | 21 | #ifdef RGBLIGHT_ENABLE |
| 51 | // Custom RGB Colours | 22 | // Custom RGB Colours |
| @@ -56,7 +27,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 56 | [_BASE] = LAYOUT_65( | 27 | [_BASE] = LAYOUT_65( |
| 57 | 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_BSLS, KC_INS, | 28 | 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_BSLS, KC_INS, |
| 58 | KC_PSCR, 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_BSPC, KC_DEL, | 29 | KC_PSCR, 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_BSPC, KC_DEL, |
| 59 | TT(_MO2), 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_PGUP, | 30 | TT(_LOWER), 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_PGUP, |
| 60 | KC_LSFTCAPS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, | 31 | KC_LSFTCAPS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, |
| 61 | KC_LCTL, KC_LGUI, KC_LALT, LT(_FN1, KC_SPC), KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(_FN1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), | 32 | KC_LCTL, KC_LGUI, KC_LALT, LT(_FN1, KC_SPC), KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(_FN1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), |
| 62 | [_FN1] = LAYOUT_65( | 33 | [_FN1] = LAYOUT_65( |
| @@ -65,13 +36,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 65 | KC_CAPS, KC_NO, RGB_VAD, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_HOME, | 36 | KC_CAPS, KC_NO, RGB_VAD, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_HOME, |
| 66 | KC_TRNS, KC_NO, RGB_HUI, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, RGB_MOD, KC_END, | 37 | KC_TRNS, KC_NO, RGB_HUI, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, RGB_MOD, KC_END, |
| 67 | KC_TRNS, KC_WINLCK, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_APP, RGB_SPD, RGB_RMOD, RGB_SPI), | 38 | KC_TRNS, KC_WINLCK, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_APP, RGB_SPD, RGB_RMOD, RGB_SPI), |
| 68 | [_MO2] = LAYOUT_65( | 39 | [_LOWER] = LAYOUT_65( |
| 69 | KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_P7, KC_P8, KC_P9, KC_P0, KC_PMNS, KC_PPLS, KC_PSLS, KC_PEQL, KC_TRNS, | 40 | KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_P7, KC_P8, KC_P9, KC_P0, KC_PMNS, KC_PPLS, KC_PSLS, KC_PEQL, KC_TRNS, |
| 70 | KC_TAB, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_NO, KC_NO, KC_P4, KC_P5, KC_P6, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_TRNS, | 41 | KC_TAB, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_NO, KC_NO, KC_P4, KC_P5, KC_P6, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_TRNS, |
| 71 | KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_NO, KC_TAB, KC_P1, KC_P2, KC_P3, KC_NO, KC_PAST, KC_PENT, KC_HOME, | 42 | KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_NO, KC_TAB, KC_P1, KC_P2, KC_P3, KC_NO, KC_PAST, KC_PENT, KC_HOME, |
| 72 | KC_TRNS, KC_NO, KC_DEL, KC_INS, KC_NO, KC_NO, KC_NLCK, KC_P0, DOUBLEZERO, KC_PDOT, KC_PSLS, KC_TRNS, RCTL(KC_PGUP), KC_END, | 43 | KC_TRNS, KC_NO, KC_DEL, KC_INS, KC_NO, KC_NO, KC_NLCK, KC_P0, KC_00, KC_PDOT, KC_PSLS, KC_TRNS, RCTL(KC_PGUP), KC_END, |
| 73 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSPC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RCTL(KC_LEFT), RCTL(KC_PGDN), RCTL(KC_RIGHT)), | 44 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSPC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RCTL(KC_LEFT), RCTL(KC_PGDN), RCTL(KC_RIGHT)), |
| 74 | [_MO3] = LAYOUT_65( | 45 | [_RAISE] = LAYOUT_65( |
| 75 | 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, | 46 | 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, |
| 76 | 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, | 47 | 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, |
| 77 | KC_TRNS, KC_TRNS, KC_DOWN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | 48 | KC_TRNS, KC_TRNS, KC_DOWN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, |
| @@ -80,27 +51,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 80 | }; | 51 | }; |
| 81 | 52 | ||
| 82 | 53 | ||
| 83 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | 54 | bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { |
| 84 | switch (keycode) { | 55 | // process_record_user() moved to userspace |
| 85 | case DOUBLEZERO: | ||
| 86 | if (record->event.pressed) { | ||
| 87 | // when keycode DOUBLEZERO is pressed | ||
| 88 | SEND_STRING("00"); | ||
| 89 | } else { | ||
| 90 | // when keycode DOUBLEZERO is released | ||
| 91 | } | ||
| 92 | break; | ||
| 93 | case KC_WINLCK: | ||
| 94 | if (record->event.pressed) { | ||
| 95 | _isWinKeyDisabled = !_isWinKeyDisabled; //toggle status | ||
| 96 | if(_isWinKeyDisabled) { | ||
| 97 | process_magic(GUI_OFF, record); | ||
| 98 | } else { | ||
| 99 | process_magic(GUI_ON, record); | ||
| 100 | } | ||
| 101 | } else unregister_code16(keycode); | ||
| 102 | break; | ||
| 103 | } | ||
| 104 | return true; | 56 | return true; |
| 105 | }; | 57 | }; |
| 106 | 58 | ||
| @@ -183,22 +135,19 @@ bool encoder_update_user(uint8_t index, bool clockwise) { | |||
| 183 | 135 | ||
| 184 | bool led_update_user(led_t led_state) { | 136 | bool led_update_user(led_t led_state) { |
| 185 | rgblight_set_layer_state(_rgbCAPS, led_state.caps_lock); | 137 | rgblight_set_layer_state(_rgbCAPS, led_state.caps_lock); |
| 186 | rgblight_set_layer_state(_rgbWINLOCK, _isWinKeyDisabled); | 138 | rgblight_set_layer_state(_rgbWINLOCK, keymap_config.no_gui); |
| 187 | return true; | 139 | return true; |
| 188 | } | 140 | } |
| 189 | 141 | ||
| 190 | layer_state_t layer_state_set_user(layer_state_t state) { | 142 | layer_state_t layer_state_set_user(layer_state_t state) { |
| 191 | rgblight_set_layer_state(_rgbFN, layer_state_cmp(state, _FN1)); | 143 | rgblight_set_layer_state(_rgbFN, layer_state_cmp(state, _FN1)); |
| 192 | rgblight_set_layer_state(_rgbNUMPAD, layer_state_cmp(state, _MO2)); | 144 | rgblight_set_layer_state(_rgbNUMPAD, layer_state_cmp(state, _LOWER)); |
| 193 | return state; | 145 | return state; |
| 194 | } | 146 | } |
| 195 | #endif // RGBLIGHT_ENABLE | 147 | #endif // RGBLIGHT_ENABLE |
| 196 | 148 | ||
| 197 | void keyboard_post_init_user(void) { | 149 | void keyboard_post_init_keymap(void) { |
| 198 | 150 | // keyboard_post_init_user() moved to userspace | |
| 199 | if (IS_HOST_LED_ON(USB_LED_NUM_LOCK)) { // turn on Num lock by defautl so that the numpad layer always has predictable results | ||
| 200 | tap_code(KC_NUMLOCK); | ||
| 201 | } | ||
| 202 | #ifdef RGBLIGHT_ENABLE | 151 | #ifdef RGBLIGHT_ENABLE |
| 203 | rgblight_mode(1); // single colour mode | 152 | rgblight_mode(1); // single colour mode |
| 204 | rgblight_setrgb(RGB_GODSPEED); // Default startup colour | 153 | rgblight_setrgb(RGB_GODSPEED); // Default startup colour |
diff --git a/keyboards/keebio/quefrency/keymaps/jonavin/readme.md b/keyboards/keebio/quefrency/keymaps/jonavin/readme.md index c782d26c0..4833c5b62 100644 --- a/keyboards/keebio/quefrency/keymaps/jonavin/readme.md +++ b/keyboards/keebio/quefrency/keymaps/jonavin/readme.md | |||
| @@ -18,6 +18,13 @@ | |||
| 18 | - Add capslock indicator, win key lock indicator | 18 | - Add capslock indicator, win key lock indicator |
| 19 | - Fn and layer 2 indicators using RGB underglow | 19 | - Fn and layer 2 indicators using RGB underglow |
| 20 | 20 | ||
| 21 | rules.mk OPTIONS - Active features from userspace | ||
| 22 | STARTUP_NUMLOCK_ON = yes | ||
| 23 | - turns on NUMLOCK by default | ||
| 24 | |||
| 25 | TD_LSFT_CAPSLOCK_ENABLE = yes | ||
| 26 | - This will enable double tap on Left Shift to toggle CAPSLOCK when using KC_LSFTCAPS | ||
| 27 | |||
| 21 | ## All layers diagram | 28 | ## All layers diagram |
| 22 | 29 | ||
| 23 | Default Layer | 30 | Default Layer |
diff --git a/keyboards/keebio/quefrency/keymaps/jonavin/rules.mk b/keyboards/keebio/quefrency/keymaps/jonavin/rules.mk index eff3d692e..f27873bb8 100644 --- a/keyboards/keebio/quefrency/keymaps/jonavin/rules.mk +++ b/keyboards/keebio/quefrency/keymaps/jonavin/rules.mk | |||
| @@ -4,3 +4,6 @@ LTO_ENABLE = yes | |||
| 4 | 4 | ||
| 5 | MOUSEKEY_ENABLE = no | 5 | MOUSEKEY_ENABLE = no |
| 6 | TAP_DANCE_ENABLE = yes | 6 | TAP_DANCE_ENABLE = yes |
| 7 | |||
| 8 | TD_LSFT_CAPSLOCK_ENABLE = yes | ||
| 9 | STARTUP_NUMLOCK_ON = yes | ||
diff --git a/keyboards/keebzdotnet/fme/fme.h b/keyboards/keebzdotnet/fme/fme.h index 912adf645..ff8da5d40 100644 --- a/keyboards/keebzdotnet/fme/fme.h +++ b/keyboards/keebzdotnet/fme/fme.h | |||
| @@ -20,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 20 | 20 | ||
| 21 | #define ___ KC_NO | 21 | #define ___ KC_NO |
| 22 | 22 | ||
| 23 | #define LAYOUT( \ | 23 | #define LAYOUT_all( \ |
| 24 | k00, k13, k14, k12, k10, \ | 24 | k00, k13, k14, k12, k10, \ |
| 25 | k11, k04, k02, k03, \ | 25 | k11, k04, k02, k03, \ |
| 26 | k22, k32, k21, k01 \ | 26 | k22, k32, k21, k01 \ |
diff --git a/keyboards/keebzdotnet/fme/info.json b/keyboards/keebzdotnet/fme/info.json new file mode 100644 index 000000000..2889cfa2d --- /dev/null +++ b/keyboards/keebzdotnet/fme/info.json | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | { | ||
| 2 | "keyboard_name": "FMe", | ||
| 3 | "url": "", | ||
| 4 | "maintainer": "keebzdotnet", | ||
| 5 | "height": 4, | ||
| 6 | "width": 5, | ||
| 7 | "layout_aliases": { | ||
| 8 | "LAYOUT": "LAYOUT_all" | ||
| 9 | }, | ||
| 10 | "layouts": { | ||
| 11 | "LAYOUT_all": { | ||
| 12 | "layout": [ | ||
| 13 | {"label":"k00", "x":0, "y":0}, | ||
| 14 | {"label":"k13", "x":1, "y":0}, | ||
| 15 | {"label":"k14", "x":2, "y":0}, | ||
| 16 | {"label":"k12", "x":3, "y":0}, | ||
| 17 | {"label":"k10", "x":4, "y":0}, | ||
| 18 | |||
| 19 | {"label":"k11", "x":0.25, "y":1}, | ||
| 20 | {"label":"k04", "x":1.25, "y":1}, | ||
| 21 | {"label":"k02", "x":2.25, "y":1}, | ||
| 22 | {"label":"k03", "x":3.25, "y":1, "w":1.75}, | ||
| 23 | |||
| 24 | {"label":"k22", "x":0.25, "y":2, "w":2.75}, | ||
| 25 | {"label":"k32", "x":3, "y":3}, | ||
| 26 | {"label":"k21", "x":3, "y":2, "w":2}, | ||
| 27 | {"label":"k01", "x":4, "y":3} | ||
| 28 | ] | ||
| 29 | } | ||
| 30 | } | ||
| 31 | } | ||
diff --git a/keyboards/keebzdotnet/fme/keymaps/default/keymap.c b/keyboards/keebzdotnet/fme/keymaps/default/keymap.c index d6b52efd0..a66b64eef 100644 --- a/keyboards/keebzdotnet/fme/keymaps/default/keymap.c +++ b/keyboards/keebzdotnet/fme/keymaps/default/keymap.c | |||
| @@ -17,13 +17,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 17 | #include QMK_KEYBOARD_H | 17 | #include QMK_KEYBOARD_H |
| 18 | 18 | ||
| 19 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | 19 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |
| 20 | [0] = LAYOUT( | 20 | [0] = LAYOUT_all( |
| 21 | KC_F, KC_U, KC_C, KC_K, KC_BSPC, | 21 | KC_F, KC_U, KC_C, KC_K, KC_BSPC, |
| 22 | KC_Y, KC_O, KC_U, MO(1), | 22 | KC_Y, KC_O, KC_U, MO(1), |
| 23 | KC_SPC, KC_SPC, KC_SPC, KC_SPC | 23 | KC_SPC, KC_SPC, KC_SPC, KC_SPC |
| 24 | ), | 24 | ), |
| 25 | 25 | ||
| 26 | [1] = LAYOUT( | 26 | [1] = LAYOUT_all( |
| 27 | RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, | 27 | RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, |
| 28 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | 28 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, |
| 29 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | 29 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS |
diff --git a/keyboards/keebzdotnet/fme/keymaps/via/config.h b/keyboards/keebzdotnet/fme/keymaps/via/config.h new file mode 100644 index 000000000..651c46be2 --- /dev/null +++ b/keyboards/keebzdotnet/fme/keymaps/via/config.h | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | /* Copyright 2021 QMK / James Young (@noroadsleft) | ||
| 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 | #pragma once | ||
| 18 | |||
| 19 | #define DYNAMIC_KEYMAP_LAYER_COUNT 2 | ||
diff --git a/keyboards/keebzdotnet/fme/keymaps/via/keymap.c b/keyboards/keebzdotnet/fme/keymaps/via/keymap.c index d6b52efd0..a66b64eef 100644 --- a/keyboards/keebzdotnet/fme/keymaps/via/keymap.c +++ b/keyboards/keebzdotnet/fme/keymaps/via/keymap.c | |||
| @@ -17,13 +17,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 17 | #include QMK_KEYBOARD_H | 17 | #include QMK_KEYBOARD_H |
| 18 | 18 | ||
| 19 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | 19 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |
| 20 | [0] = LAYOUT( | 20 | [0] = LAYOUT_all( |
| 21 | KC_F, KC_U, KC_C, KC_K, KC_BSPC, | 21 | KC_F, KC_U, KC_C, KC_K, KC_BSPC, |
| 22 | KC_Y, KC_O, KC_U, MO(1), | 22 | KC_Y, KC_O, KC_U, MO(1), |
| 23 | KC_SPC, KC_SPC, KC_SPC, KC_SPC | 23 | KC_SPC, KC_SPC, KC_SPC, KC_SPC |
| 24 | ), | 24 | ), |
| 25 | 25 | ||
| 26 | [1] = LAYOUT( | 26 | [1] = LAYOUT_all( |
| 27 | RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, | 27 | RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, |
| 28 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | 28 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, |
| 29 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | 29 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS |
diff --git a/keyboards/mechwild/mercutio/keymaps/jonavin/keymap.c b/keyboards/mechwild/mercutio/keymaps/jonavin/keymap.c index ed321e79b..ddde6d652 100755 --- a/keyboards/mechwild/mercutio/keymaps/jonavin/keymap.c +++ b/keyboards/mechwild/mercutio/keymaps/jonavin/keymap.c | |||
| @@ -18,35 +18,7 @@ | |||
| 18 | 18 | ||
| 19 | #include QMK_KEYBOARD_H | 19 | #include QMK_KEYBOARD_H |
| 20 | #include <stdio.h> | 20 | #include <stdio.h> |
| 21 | 21 | #include "jonavin.h" | |
| 22 | enum custom_layers { | ||
| 23 | _BASE, | ||
| 24 | _FN1, | ||
| 25 | _LOWER, | ||
| 26 | _RAISE, | ||
| 27 | }; | ||
| 28 | |||
| 29 | enum custom_keycodes { | ||
| 30 | ENCFUNC = SAFE_RANGE, // encoder function keys | ||
| 31 | KC_WINLCK, //Toggles Win key on and off | ||
| 32 | }; | ||
| 33 | |||
| 34 | // Tap Dance Definitions | ||
| 35 | enum custom_tapdance { | ||
| 36 | TD_LSFT_CAPSLOCK, | ||
| 37 | }; | ||
| 38 | |||
| 39 | qk_tap_dance_action_t tap_dance_actions[] = { | ||
| 40 | // Tap once for shift, twice for Caps Lock | ||
| 41 | [TD_LSFT_CAPSLOCK] = ACTION_TAP_DANCE_DOUBLE(KC_LSFT, KC_CAPS), | ||
| 42 | }; | ||
| 43 | |||
| 44 | bool _isWinKeyDisabled = false; | ||
| 45 | |||
| 46 | #define KC_LSFTCAPS TD(TD_LSFT_CAPSLOCK) | ||
| 47 | #define KC_CAD LALT(LCTL(KC_DEL)) | ||
| 48 | #define KC_AF4 LALT(KC_F4) | ||
| 49 | #define KC_TASK LCTL(LSFT(KC_ESC)) | ||
| 50 | 22 | ||
| 51 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | 23 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |
| 52 | [_BASE] = LAYOUT_all( | 24 | [_BASE] = LAYOUT_all( |
| @@ -113,13 +85,12 @@ static void set_selectedkey(uint8_t idx) { | |||
| 113 | 85 | ||
| 114 | } | 86 | } |
| 115 | 87 | ||
| 116 | void keyboard_post_init_user(void) { | 88 | void keyboard_post_init_keymap(void) { |
| 117 | // Call the keyboard post init code. | 89 | // Call the keyboard post init code. |
| 118 | //selectedkey_rec = keyselection[selectedkey_idx]; | ||
| 119 | set_selectedkey(selectedkey_idx); | 90 | set_selectedkey(selectedkey_idx); |
| 120 | } | 91 | } |
| 121 | 92 | ||
| 122 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | 93 | bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { |
| 123 | switch (keycode) { | 94 | switch (keycode) { |
| 124 | case ENCFUNC: | 95 | case ENCFUNC: |
| 125 | if (record->event.pressed) { | 96 | if (record->event.pressed) { |
| @@ -128,16 +99,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 128 | // when keycode is released | 99 | // when keycode is released |
| 129 | } | 100 | } |
| 130 | break; | 101 | break; |
| 131 | case KC_WINLCK: | ||
| 132 | if (record->event.pressed) { | ||
| 133 | _isWinKeyDisabled = !_isWinKeyDisabled; //toggle status | ||
| 134 | if(_isWinKeyDisabled) { | ||
| 135 | process_magic(GUI_OFF, record); | ||
| 136 | } else { | ||
| 137 | process_magic(GUI_ON, record); | ||
| 138 | } | ||
| 139 | } else unregister_code16(keycode); | ||
| 140 | break; | ||
| 141 | } | 102 | } |
| 142 | return true; | 103 | return true; |
| 143 | }; | 104 | }; |
| @@ -274,7 +235,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 274 | default: | 235 | default: |
| 275 | oled_write_P(PSTR("Layer ?"), false); // Should never display, here as a catchall | 236 | oled_write_P(PSTR("Layer ?"), false); // Should never display, here as a catchall |
| 276 | } | 237 | } |
| 277 | oled_write_P(_isWinKeyDisabled ? PSTR(" WL") : PSTR(" "), false); | 238 | oled_write_P(keymap_config.no_gui ? PSTR(" WL") : PSTR(" "), false); |
| 278 | oled_set_cursor(8,3); | 239 | oled_set_cursor(8,3); |
| 279 | if (get_highest_layer(layer_state) == selected_layer) { | 240 | if (get_highest_layer(layer_state) == selected_layer) { |
| 280 | oled_write_P(PSTR(" "), false); | 241 | oled_write_P(PSTR(" "), false); |
diff --git a/keyboards/mechwild/mercutio/keymaps/jonavin/readme.md b/keyboards/mechwild/mercutio/keymaps/jonavin/readme.md index 730bee889..6255dadd0 100644 --- a/keyboards/mechwild/mercutio/keymaps/jonavin/readme.md +++ b/keyboards/mechwild/mercutio/keymaps/jonavin/readme.md | |||
| @@ -38,6 +38,13 @@ Features | |||
| 38 | While holding Left Alt, media next track or previous track | 38 | While holding Left Alt, media next track or previous track |
| 39 | 39 | ||
| 40 | 40 | ||
| 41 | rules.mk OPTIONS - Active features from userspace | ||
| 42 | STARTUP_NUMLOCK_ON = yes | ||
| 43 | - turns on NUMLOCK by default | ||
| 44 | |||
| 45 | TD_LSFT_CAPSLOCK_ENABLE = yes | ||
| 46 | - This will enable double tap on Left Shift to toggle CAPSLOCK when using KC_LSFTCAPS | ||
| 47 | |||
| 41 | Default Layers | 48 | Default Layers |
| 42 |  | 49 |  |
| 43 | 50 | ||
diff --git a/keyboards/mechwild/mercutio/keymaps/jonavin/rules.mk b/keyboards/mechwild/mercutio/keymaps/jonavin/rules.mk index 550e84c80..0b76c6e57 100644 --- a/keyboards/mechwild/mercutio/keymaps/jonavin/rules.mk +++ b/keyboards/mechwild/mercutio/keymaps/jonavin/rules.mk | |||
| @@ -3,3 +3,6 @@ VIA_ENABLE = yes | |||
| 3 | MOUSEKEY_ENABLE = yes | 3 | MOUSEKEY_ENABLE = yes |
| 4 | WPM_ENABLE = yes | 4 | WPM_ENABLE = yes |
| 5 | TAP_DANCE_ENABLE = yes | 5 | TAP_DANCE_ENABLE = yes |
| 6 | |||
| 7 | TD_LSFT_CAPSLOCK_ENABLE = yes | ||
| 8 | STARTUP_NUMLOCK_ON = yes | ||
diff --git a/keyboards/owlab/voice65/hotswap/config.h b/keyboards/owlab/voice65/hotswap/config.h new file mode 100644 index 000000000..4b6e8d8b8 --- /dev/null +++ b/keyboards/owlab/voice65/hotswap/config.h | |||
| @@ -0,0 +1,90 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2021 kb-elmo<mail@elmo.space> | ||
| 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 0x4F53 | ||
| 24 | #define PRODUCT_ID 0x564F | ||
| 25 | #define DEVICE_VER 0x0001 | ||
| 26 | #define MANUFACTURER Owl Studio | ||
| 27 | #define PRODUCT Voice65 Hotswap | ||
| 28 | |||
| 29 | /* key matrix size */ | ||
| 30 | #define MATRIX_ROWS 5 | ||
| 31 | #define MATRIX_COLS 15 | ||
| 32 | |||
| 33 | /* Keyboard Matrix Assignments */ | ||
| 34 | #define MATRIX_ROW_PINS { B0, B1, B2, B10, B11 } | ||
| 35 | #define MATRIX_COL_PINS { A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A15, B8, B9, B12, B13 } | ||
| 36 | |||
| 37 | /* COL2ROW, ROW2COL */ | ||
| 38 | #define DIODE_DIRECTION COL2ROW | ||
| 39 | |||
| 40 | /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ | ||
| 41 | #define DEBOUNCE 5 | ||
| 42 | |||
| 43 | /* NKRO */ | ||
| 44 | #ifdef NKRO_ENABLE | ||
| 45 | # define FORCE_NKRO | ||
| 46 | #endif | ||
| 47 | |||
| 48 | /* RGB stripe */ | ||
| 49 | #define RGB_DI_PIN B15 | ||
| 50 | #ifdef RGB_DI_PIN | ||
| 51 | # define RGBLIGHT_EFFECT_ALTERNATING | ||
| 52 | # define RGBLIGHT_EFFECT_BREATHING | ||
| 53 | # define RGBLIGHT_EFFECT_CHRISTMAS | ||
| 54 | # define RGBLIGHT_EFFECT_KNIGHT | ||
| 55 | # define RGBLIGHT_EFFECT_RAINBOW_MOOD | ||
| 56 | # define RGBLIGHT_EFFECT_RAINBOW_SWIRL | ||
| 57 | # define RGBLIGHT_EFFECT_SNAKE | ||
| 58 | # define RGBLIGHT_EFFECT_STATIC_GRADIENT | ||
| 59 | # define RGBLIGHT_EFFECT_TWINKLE | ||
| 60 | # define RGBLED_NUM 20 | ||
| 61 | # define RGBLIGHT_HUE_STEP 8 | ||
| 62 | # define RGBLIGHT_SAT_STEP 8 | ||
| 63 | # define RGBLIGHT_VAL_STEP 10 | ||
| 64 | # define RGBLIGHT_LIMIT_VAL 180 | ||
| 65 | # define OWL_VOLUME_RANGE 50 | ||
| 66 | #endif | ||
| 67 | |||
| 68 | /* RGB matrix */ | ||
| 69 | #ifdef RGB_MATRIX_ENABLE | ||
| 70 | # define USE_I2CV2 | ||
| 71 | # define RGB_MATRIX_DISABLE_KEYCODES | ||
| 72 | # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects | ||
| 73 | # define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended | ||
| 74 | # define RGB_MATRIX_KEYPRESSES | ||
| 75 | # define RGB_MATRIX_LED_PROCESS_LIMIT 4 | ||
| 76 | # define RGB_MATRIX_LED_FLUSH_LIMIT 26 | ||
| 77 | # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 | ||
| 78 | # define RGB_MATRIX_STARTUP_VAL 128 | ||
| 79 | # define DRIVER_ADDR_1 0b0110000 | ||
| 80 | # define DRIVER_ADDR_2 0b0110000 | ||
| 81 | # define DRIVER_COUNT 2 | ||
| 82 | # define DRIVER_1_LED_TOTAL 67 | ||
| 83 | # define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL | ||
| 84 | #endif | ||
| 85 | |||
| 86 | /* Encoder */ | ||
| 87 | #define ENCODERS_PAD_A { B4 } | ||
| 88 | #define ENCODERS_PAD_B { B5 } | ||
| 89 | #define ENCODER_RESOLUTION 4 | ||
| 90 | #define TAP_CODE_DELAY 10 | ||
diff --git a/keyboards/owlab/voice65/hotswap/halconf.h b/keyboards/owlab/voice65/hotswap/halconf.h new file mode 100644 index 000000000..f88be4821 --- /dev/null +++ b/keyboards/owlab/voice65/hotswap/halconf.h | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | /* Copyright 2021 kb-elmo<mail@elmo.space> | ||
| 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 | #pragma once | ||
| 18 | |||
| 19 | #define HAL_USE_I2C TRUE | ||
| 20 | |||
| 21 | #include_next <halconf.h> | ||
diff --git a/keyboards/owlab/voice65/hotswap/hotswap.c b/keyboards/owlab/voice65/hotswap/hotswap.c new file mode 100644 index 000000000..343daafeb --- /dev/null +++ b/keyboards/owlab/voice65/hotswap/hotswap.c | |||
| @@ -0,0 +1,451 @@ | |||
| 1 | /* Copyright 2021 kb-elmo<mail@elmo.space> | ||
| 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 "hotswap.h" | ||
| 18 | |||
| 19 | #ifdef RGB_MATRIX_ENABLE | ||
| 20 | const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { | ||
| 21 | {0, CS3_SW1, CS2_SW1, CS1_SW1}, /* RGB0-ESC ROW0*/ | ||
| 22 | {0, CS6_SW1, CS5_SW1, CS4_SW1}, /* RGB1-1 */ | ||
| 23 | {0, CS9_SW1, CS8_SW1, CS7_SW1}, /* RGB2-2 */ | ||
| 24 | {0, CS12_SW1, CS11_SW1, CS10_SW1}, /* RGB3-3 */ | ||
| 25 | {0, CS15_SW1, CS14_SW1, CS13_SW1}, /* RGB4-4 */ | ||
| 26 | {0, CS18_SW1, CS17_SW1, CS16_SW1}, /* RGB5-5 */ | ||
| 27 | {0, CS21_SW1, CS20_SW1, CS19_SW1}, /* RGB6-6 */ | ||
| 28 | {0, CS24_SW1, CS23_SW1, CS22_SW1}, /* RGB7-7 */ | ||
| 29 | {0, CS27_SW1, CS26_SW1, CS25_SW1}, /* RGB8-8 */ | ||
| 30 | {0, CS30_SW1, CS29_SW1, CS28_SW1}, /* RGB9-9 */ | ||
| 31 | {0, CS33_SW1, CS32_SW1, CS31_SW1}, /* RGB10-0 */ | ||
| 32 | {0, CS36_SW1, CS35_SW1, CS34_SW1}, /* RGB11--- */ | ||
| 33 | {0, CS39_SW1, CS38_SW1, CS37_SW1}, /* RGB12-+= */ | ||
| 34 | {0, CS36_SW6, CS35_SW6, CS34_SW6}, /* RGB13-BS */ | ||
| 35 | {0, CS27_SW7, CS26_SW7, CS25_SW7}, /* RGB14-DEL */ | ||
| 36 | {0, CS3_SW2, CS2_SW2, CS1_SW2}, /* RGB15-TAB ----ROW1*/ | ||
| 37 | {0, CS6_SW2, CS5_SW2, CS4_SW2}, /* RGB16-Q */ | ||
| 38 | {0, CS9_SW2, CS8_SW2, CS7_SW2}, /* RGB17-W */ | ||
| 39 | {0, CS12_SW2, CS11_SW2, CS10_SW2}, /* RGB18-E */ | ||
| 40 | {0, CS15_SW2, CS14_SW2, CS13_SW2}, /* RGB19-R */ | ||
| 41 | {0, CS18_SW2, CS17_SW2, CS16_SW2}, /* RGB20-T */ | ||
| 42 | {0, CS21_SW2, CS20_SW2, CS19_SW2}, /* RGB21-Y */ | ||
| 43 | {0, CS24_SW2, CS23_SW2, CS22_SW2}, /* RGB22-U */ | ||
| 44 | {0, CS27_SW2, CS26_SW2, CS25_SW2}, /* RGB23-I */ | ||
| 45 | {0, CS30_SW2, CS29_SW2, CS28_SW2}, /* RGB24-O */ | ||
| 46 | {0, CS33_SW2, CS32_SW2, CS31_SW2}, /* RGB25-P */ | ||
| 47 | {0, CS36_SW2, CS35_SW2, CS34_SW2}, /* RGB26-[ */ | ||
| 48 | {0, CS39_SW2, CS38_SW2, CS37_SW2}, /* RGB27-] */ | ||
| 49 | {0, CS39_SW6, CS38_SW6, CS37_SW6}, /* RGB28-\ */ | ||
| 50 | {0, CS30_SW7, CS29_SW7, CS28_SW7}, /* RGB29-PGUP */ | ||
| 51 | {0, CS3_SW3, CS2_SW3, CS1_SW3}, /* RGB30-CAPS---ROW2*/ | ||
| 52 | {0, CS6_SW3, CS5_SW3, CS4_SW3}, /* RGB31-A-- */ | ||
| 53 | {0, CS9_SW3, CS8_SW3, CS7_SW3}, /* RGB32-S-- */ | ||
| 54 | {0, CS12_SW3, CS11_SW3, CS10_SW3}, /* RGB33-D-- */ | ||
| 55 | {0, CS15_SW3, CS14_SW3, CS13_SW3}, /* RGB34-F-- */ | ||
| 56 | {0, CS18_SW3, CS17_SW3, CS16_SW3}, /* RGB35-G-- */ | ||
| 57 | {0, CS21_SW3, CS20_SW3, CS19_SW3}, /* RGB36-H-- */ | ||
| 58 | {0, CS24_SW3, CS23_SW3, CS22_SW3}, /* RGB37-J-- */ | ||
| 59 | {0, CS27_SW3, CS26_SW3, CS25_SW3}, /* RGB38-K-- */ | ||
| 60 | {0, CS30_SW3, CS29_SW3, CS28_SW3}, /* RGB39-L-- */ | ||
| 61 | {0, CS33_SW3, CS32_SW3, CS31_SW3}, /* RGB40-;:- */ | ||
| 62 | {0, CS36_SW3, CS35_SW3, CS34_SW3}, /* RGB41-''- */ | ||
| 63 | {0, CS39_SW3, CS38_SW3, CS37_SW3}, /* RGB42-ENTER- */ | ||
| 64 | {0, CS33_SW7, CS32_SW7, CS31_SW7}, /* RGB43-PGDN */ | ||
| 65 | {0, CS3_SW4, CS2_SW4, CS1_SW4}, /* RGB44-LSF --ROW3*/ | ||
| 66 | {0, CS6_SW4, CS5_SW4, CS4_SW4}, /* RGB45-Z -*/ | ||
| 67 | {0, CS9_SW4, CS8_SW4, CS7_SW4}, /* RGB46-X -*/ | ||
| 68 | {0, CS12_SW4, CS11_SW4, CS10_SW4}, /* RGB47-C -*/ | ||
| 69 | {0, CS15_SW4, CS14_SW4, CS13_SW4}, /* RGB48-V -*/ | ||
| 70 | {0, CS18_SW4, CS17_SW4, CS16_SW4}, /* RGB49-B -*/ | ||
| 71 | {0, CS21_SW4, CS20_SW4, CS19_SW4}, /* RGB50-N -*/ | ||
| 72 | {0, CS24_SW4, CS23_SW4, CS22_SW4}, /* RGB51-M -*/ | ||
| 73 | {0, CS27_SW4, CS26_SW4, CS25_SW4}, /* RGB52-,< -*/ | ||
| 74 | {0, CS30_SW4, CS29_SW4, CS28_SW4}, /* RGB53->. -*/ | ||
| 75 | {0, CS33_SW4, CS32_SW4, CS31_SW4}, /* RGB54-? -*/ | ||
| 76 | {0, CS36_SW4, CS35_SW4, CS34_SW4}, /* RGB55-RSF -*/ | ||
| 77 | {0, CS39_SW4, CS38_SW4, CS37_SW4}, /* RGB56-UP -*/ | ||
| 78 | {0, CS36_SW7, CS35_SW7, CS34_SW7}, /* RGB57--MO-- */ | ||
| 79 | {0, CS3_SW5, CS2_SW5, CS1_SW5}, /* RGB58-lct-- row4*/ | ||
| 80 | {0, CS6_SW5, CS5_SW5, CS4_SW5}, /* RGB59-lwin- */ | ||
| 81 | {0, CS9_SW5, CS8_SW5, CS7_SW5}, /* RGB60-lalt- */ | ||
| 82 | {0, CS18_SW5, CS17_SW5, CS16_SW5}, /* RGB61-sp- */ | ||
| 83 | {0, CS30_SW5, CS29_SW5, CS28_SW5}, /* RGB62-ralt- */ | ||
| 84 | {0, CS33_SW5, CS32_SW5, CS31_SW5}, /* RGB63-rct- */ | ||
| 85 | {0, CS36_SW5, CS35_SW5, CS34_SW5}, /* RGB64-left- */ | ||
| 86 | {0, CS39_SW5, CS38_SW5, CS37_SW5}, /* RGB65-dn- */ | ||
| 87 | {0, CS39_SW7, CS38_SW7, CS37_SW7}, /* RGB66-right- */ | ||
| 88 | }; | ||
| 89 | |||
| 90 | led_config_t g_led_config = { { | ||
| 91 | { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 }, | ||
| 92 | { 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29 }, | ||
| 93 | { 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, NO_LED, 43 }, | ||
| 94 | { 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, NO_LED, 56, 57 }, | ||
| 95 | { 58, 59, 60, NO_LED, NO_LED, 61, NO_LED, NO_LED, NO_LED, 62, 63, 64, NO_LED, 65, 66 } | ||
| 96 | }, { | ||
| 97 | { 0, 0 }, { 16, 0 }, { 32, 0 }, { 48, 0 }, { 64, 0 }, { 80, 0 }, { 96, 0 }, { 112, 0 }, { 128, 0 }, { 144, 0 }, { 160, 0 }, { 176, 0 }, { 192, 0 }, { 208, 0 }, { 224, 0 }, | ||
| 98 | { 2, 16 }, { 18, 16 }, { 34, 16 }, { 50, 16 }, { 66, 16 }, { 82, 16 }, { 98, 16 }, { 114, 16 }, { 130, 16 }, { 146, 16 }, { 162, 16 }, { 178, 16 }, { 194, 16 }, { 210, 16 }, { 224, 16 }, | ||
| 99 | { 4, 32 }, { 20, 32 }, { 36, 32 }, { 52, 32 }, { 68, 32 }, { 84, 32 }, { 100, 32 }, { 116, 32 }, { 132, 32 }, { 148, 32 }, { 164, 32 }, { 180, 32 }, { 196, 32 }, { 224, 32 }, | ||
| 100 | { 8, 48 }, { 24, 48 }, { 40, 48 }, { 56, 48 }, { 72, 48 }, { 88, 48 }, { 104, 48 }, { 120, 48 }, { 136, 48 }, { 152, 48 }, { 168, 48 }, { 184, 48 }, { 208, 48 }, { 224, 48 }, | ||
| 101 | { 2, 64 }, { 18, 64 }, { 34, 64 }, { 82, 64 }, { 146, 64 }, { 162, 64 }, { 178, 64 }, { 210, 64 }, { 224, 64 } | ||
| 102 | }, { | ||
| 103 | 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, | ||
| 104 | 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, | ||
| 105 | 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, | ||
| 106 | 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, | ||
| 107 | 1, 1, 1, 1, 1, 1, 1, 1, 1, | ||
| 108 | } | ||
| 109 | }; | ||
| 110 | |||
| 111 | |||
| 112 | #endif | ||
| 113 | |||
| 114 | __attribute__ ((weak)) | ||
| 115 | void rgb_matrix_indicators_user(void) | ||
| 116 | { | ||
| 117 | if (host_keyboard_led_state().caps_lock) | ||
| 118 | { | ||
| 119 | rgb_matrix_set_color(31, 255, 255, 255); | ||
| 120 | } else { | ||
| 121 | rgb_matrix_set_color(31, 0, 0, 0); | ||
| 122 | } | ||
| 123 | } | ||
| 124 | |||
| 125 | enum encoder_modes{ | ||
| 126 | ENCODER_MODE_ONE = 0, | ||
| 127 | ENCODER_MODE_TWO, | ||
| 128 | ENCODER_MODE_THREE, | ||
| 129 | }; | ||
| 130 | |||
| 131 | keyboard_config_t keyboard_config; | ||
| 132 | rgblight_config_t rgblight_config; | ||
| 133 | |||
| 134 | uint8_t pre_hue, pre_sat, pre_val; | ||
| 135 | uint8_t previous_rgb_mode = 0; | ||
| 136 | uint8_t dir_hue, dir_sat; | ||
| 137 | |||
| 138 | bool encoder_in = false; | ||
| 139 | uint32_t encoder_timer; | ||
| 140 | |||
| 141 | bool encoder_ani_start= false; | ||
| 142 | uint32_t encoder_ani_timer = 0; | ||
| 143 | |||
| 144 | bool encoder_direction_start = false; | ||
| 145 | uint32_t encoder_direction_timer = 0; | ||
| 146 | |||
| 147 | |||
| 148 | bool lizm_restart_snake = false; | ||
| 149 | void rgblight_snake_restart(uint8_t hue, uint8_t sat, uint8_t val){ | ||
| 150 | lizm_restart_snake = true; // restart signal to local each effect | ||
| 151 | rgblight_config.hue = hue; | ||
| 152 | rgblight_config.sat = sat; | ||
| 153 | rgblight_config.val = val; | ||
| 154 | } | ||
| 155 | |||
| 156 | |||
| 157 | void keyboard_post_init_kb(void){ | ||
| 158 | keyboard_config.raw = eeconfig_read_kb(); | ||
| 159 | if( keyboard_config.encoder_mode_index > ENCODER_MODE_THREE ){ | ||
| 160 | keyboard_config.encoder_mode_index = ENCODER_MODE_ONE; | ||
| 161 | eeconfig_update_kb(keyboard_config.raw); | ||
| 162 | } | ||
| 163 | } | ||
| 164 | |||
| 165 | void switch_encoder_mode(uint8_t mode){ | ||
| 166 | switch(mode){ | ||
| 167 | case ENCODER_MODE_ONE: | ||
| 168 | dir_hue = 88; | ||
| 169 | dir_sat = 255; | ||
| 170 | break; | ||
| 171 | |||
| 172 | case ENCODER_MODE_TWO: | ||
| 173 | dir_hue = 0; | ||
| 174 | dir_sat = 240; | ||
| 175 | break; | ||
| 176 | |||
| 177 | case ENCODER_MODE_THREE: | ||
| 178 | dir_hue = 176; | ||
| 179 | dir_sat = 255; | ||
| 180 | break; | ||
| 181 | } | ||
| 182 | rgblight_sethsv_noeeprom(dir_hue,dir_sat,pre_val); | ||
| 183 | } | ||
| 184 | |||
| 185 | |||
| 186 | void init_encoder_mode(uint8_t mode){ | ||
| 187 | previous_rgb_mode = rgblight_get_mode(); | ||
| 188 | pre_hue = rgblight_get_hue(); | ||
| 189 | pre_sat = rgblight_get_sat(); | ||
| 190 | pre_val = rgblight_get_val(); | ||
| 191 | encoder_in = true; | ||
| 192 | |||
| 193 | rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); | ||
| 194 | |||
| 195 | switch_encoder_mode(mode); | ||
| 196 | } | ||
| 197 | |||
| 198 | |||
| 199 | void set_encoder_mode(uint8_t mode){ | ||
| 200 | if(encoder_in == false){ | ||
| 201 | init_encoder_mode(mode); | ||
| 202 | }else{ | ||
| 203 | switch_encoder_mode(mode); | ||
| 204 | } | ||
| 205 | eeconfig_update_kb(keyboard_config.raw); | ||
| 206 | encoder_timer = timer_read32(); | ||
| 207 | } | ||
| 208 | |||
| 209 | bool process_record_kb(uint16_t keycode, keyrecord_t *record) { | ||
| 210 | if (record->event.pressed) { | ||
| 211 | switch(keycode) { | ||
| 212 | case RGB_MOD: | ||
| 213 | case RGB_RMOD: | ||
| 214 | case RGB_HUI: | ||
| 215 | case RGB_HUD: | ||
| 216 | case RGB_SAI: | ||
| 217 | case RGB_SAD: | ||
| 218 | case RGB_VAI: | ||
| 219 | case RGB_VAD: | ||
| 220 | |||
| 221 | if(encoder_in){ | ||
| 222 | return false; | ||
| 223 | } | ||
| 224 | break; | ||
| 225 | |||
| 226 | case KC_F13: | ||
| 227 | rgb_matrix_toggle(); | ||
| 228 | break; | ||
| 229 | |||
| 230 | case KC_F14: | ||
| 231 | rgb_matrix_step(); | ||
| 232 | break; | ||
| 233 | |||
| 234 | case KC_F15: | ||
| 235 | rgb_matrix_step_reverse(); | ||
| 236 | break; | ||
| 237 | |||
| 238 | case KC_F16: | ||
| 239 | rgb_matrix_increase_hue(); //Increase the hue for effect range LEDs | ||
| 240 | break; | ||
| 241 | |||
| 242 | case KC_F17: | ||
| 243 | rgb_matrix_decrease_hue(); //Decrease the hue for effect range LEDs | ||
| 244 | break; | ||
| 245 | |||
| 246 | case KC_F18: | ||
| 247 | rgb_matrix_increase_sat(); //Increase the saturation for effect range LEDs | ||
| 248 | break; | ||
| 249 | |||
| 250 | case KC_F19: | ||
| 251 | rgb_matrix_decrease_sat(); //Decrease the saturation for effect range LEDs | ||
| 252 | break; | ||
| 253 | |||
| 254 | case KC_F20: | ||
| 255 | rgb_matrix_increase_val(); //Increase the value for effect range LEDs | ||
| 256 | break; | ||
| 257 | |||
| 258 | case KC_F21: | ||
| 259 | rgb_matrix_decrease_val();//Decrease the value for effect range LEDs | ||
| 260 | break; | ||
| 261 | |||
| 262 | case KC_F22: //change encoder mode upward | ||
| 263 | |||
| 264 | if(!encoder_direction_start){ | ||
| 265 | if(keyboard_config.encoder_mode_index < ENCODER_MODE_THREE){ | ||
| 266 | keyboard_config.encoder_mode_index++; | ||
| 267 | } | ||
| 268 | else{ | ||
| 269 | keyboard_config.encoder_mode_index = ENCODER_MODE_ONE; | ||
| 270 | } | ||
| 271 | set_encoder_mode(keyboard_config.encoder_mode_index); | ||
| 272 | } | ||
| 273 | return false; | ||
| 274 | |||
| 275 | case KC_F23: | ||
| 276 | if(!encoder_direction_start){ | ||
| 277 | if(keyboard_config.encoder_mode_index > ENCODER_MODE_ONE){ | ||
| 278 | keyboard_config.encoder_mode_index--; | ||
| 279 | } | ||
| 280 | else{ | ||
| 281 | keyboard_config.encoder_mode_index = ENCODER_MODE_THREE; | ||
| 282 | } | ||
| 283 | set_encoder_mode(keyboard_config.encoder_mode_index); | ||
| 284 | } | ||
| 285 | return false; | ||
| 286 | |||
| 287 | default: | ||
| 288 | break; | ||
| 289 | } | ||
| 290 | } | ||
| 291 | return process_record_user(keycode, record); | ||
| 292 | } | ||
| 293 | |||
| 294 | |||
| 295 | void matrix_scan_kb(void) { | ||
| 296 | if(encoder_in){ | ||
| 297 | if(timer_elapsed32(encoder_timer) > 5000){ | ||
| 298 | rgblight_mode(previous_rgb_mode); | ||
| 299 | rgblight_sethsv(pre_hue, pre_sat, pre_val); | ||
| 300 | encoder_in = false; | ||
| 301 | } | ||
| 302 | } | ||
| 303 | |||
| 304 | if(encoder_ani_start){ | ||
| 305 | if(timer_elapsed32(encoder_ani_timer) > VOLUME_ANIMATION_TIMER){ | ||
| 306 | encoder_ani_start = false; | ||
| 307 | rgblight_sethsv_noeeprom(0,0,0); | ||
| 308 | } | ||
| 309 | } | ||
| 310 | |||
| 311 | if(encoder_direction_start){ | ||
| 312 | if(timer_elapsed32(encoder_direction_timer) > (VOLUME_ANIMATION_TIMER+1500)){ | ||
| 313 | rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); | ||
| 314 | rgblight_sethsv_noeeprom(dir_hue, dir_sat, pre_val); | ||
| 315 | encoder_direction_start = false; | ||
| 316 | } | ||
| 317 | } | ||
| 318 | matrix_scan_user(); | ||
| 319 | } | ||
| 320 | |||
| 321 | |||
| 322 | void set_volume_animation(bool increase){ | ||
| 323 | if(!encoder_ani_start){ | ||
| 324 | rgblight_snake_restart(dir_hue, dir_sat, pre_val); | ||
| 325 | } | ||
| 326 | |||
| 327 | if(increase){ | ||
| 328 | rgblight_mode_noeeprom(17); | ||
| 329 | } else { | ||
| 330 | rgblight_mode_noeeprom(18); | ||
| 331 | } | ||
| 332 | |||
| 333 | encoder_ani_timer = timer_read32(); | ||
| 334 | encoder_direction_timer = encoder_ani_timer; | ||
| 335 | encoder_ani_start = true; | ||
| 336 | encoder_direction_start = true; | ||
| 337 | } | ||
| 338 | |||
| 339 | |||
| 340 | bool encoder_update_kb(uint8_t index, bool clockwise) { | ||
| 341 | uint8_t layer_now = keyboard_config.encoder_mode_index +1; | ||
| 342 | uint16_t encoder_cw_keycode = keymap_key_to_keycode(layer_now, (keypos_t){.row=2, .col=1 }); | ||
| 343 | uint16_t encoder_ccw_keycode = keymap_key_to_keycode(layer_now, (keypos_t){.row=2, .col=2 }); | ||
| 344 | if (index == 0) { /* First encoder */ | ||
| 345 | if(encoder_in == false){ | ||
| 346 | init_encoder_mode(keyboard_config.encoder_mode_index); | ||
| 347 | } | ||
| 348 | |||
| 349 | if (!clockwise) { | ||
| 350 | switch(encoder_cw_keycode) { | ||
| 351 | |||
| 352 | case KC_F13: | ||
| 353 | rgb_matrix_toggle(); | ||
| 354 | break; | ||
| 355 | |||
| 356 | case KC_F14: | ||
| 357 | rgb_matrix_step(); | ||
| 358 | break; | ||
| 359 | |||
| 360 | case KC_F15: | ||
| 361 | rgb_matrix_step_reverse(); | ||
| 362 | break; | ||
| 363 | |||
| 364 | case KC_F16: | ||
| 365 | rgb_matrix_increase_hue(); //Increase the hue for effect range LEDs | ||
| 366 | break; | ||
| 367 | |||
| 368 | case KC_F17: | ||
| 369 | rgb_matrix_decrease_hue(); //Decrease the hue for effect range LEDs | ||
| 370 | break; | ||
| 371 | |||
| 372 | case KC_F18: | ||
| 373 | rgb_matrix_increase_sat(); //Increase the saturation for effect range LEDs | ||
| 374 | break; | ||
| 375 | |||
| 376 | case KC_F19: | ||
| 377 | rgb_matrix_decrease_sat(); //Decrease the saturation for effect range LEDs | ||
| 378 | break; | ||
| 379 | |||
| 380 | case KC_F20: | ||
| 381 | rgb_matrix_increase_val(); //Increase the value for effect range LEDs | ||
| 382 | break; | ||
| 383 | |||
| 384 | case KC_F21: | ||
| 385 | rgb_matrix_decrease_val();//Decrease the value for effect range LEDs | ||
| 386 | break; | ||
| 387 | |||
| 388 | case KC_VOLU: | ||
| 389 | case KC_VOLD: | ||
| 390 | tap_code(encoder_cw_keycode); | ||
| 391 | break; | ||
| 392 | |||
| 393 | default: | ||
| 394 | tap_code(encoder_cw_keycode); | ||
| 395 | break; | ||
| 396 | } | ||
| 397 | set_volume_animation(true); | ||
| 398 | } else { | ||
| 399 | switch(encoder_ccw_keycode) { | ||
| 400 | |||
| 401 | case KC_F13: | ||
| 402 | rgb_matrix_toggle(); | ||
| 403 | break; | ||
| 404 | |||
| 405 | case KC_F14: | ||
| 406 | rgb_matrix_step(); | ||
| 407 | break; | ||
| 408 | |||
| 409 | case KC_F15: | ||
| 410 | rgb_matrix_step_reverse(); | ||
| 411 | break; | ||
| 412 | |||
| 413 | case KC_F16: | ||
| 414 | rgb_matrix_increase_hue(); //Increase the hue for effect range LEDs | ||
| 415 | break; | ||
| 416 | |||
| 417 | case KC_F17: | ||
| 418 | rgb_matrix_decrease_hue(); //Decrease the hue for effect range LEDs | ||
| 419 | break; | ||
| 420 | |||
| 421 | case KC_F18: | ||
| 422 | rgb_matrix_increase_sat(); //Increase the saturation for effect range LEDs | ||
| 423 | break; | ||
| 424 | |||
| 425 | case KC_F19: | ||
| 426 | rgb_matrix_decrease_sat(); //Decrease the saturation for effect range LEDs | ||
| 427 | break; | ||
| 428 | |||
| 429 | case KC_F20: | ||
| 430 | rgb_matrix_increase_val(); //Increase the value for effect range LEDs | ||
| 431 | break; | ||
| 432 | |||
| 433 | case KC_F21: | ||
| 434 | rgb_matrix_decrease_val();//Decrease the value for effect range LEDs | ||
| 435 | break; | ||
| 436 | |||
| 437 | case KC_VOLU: | ||
| 438 | case KC_VOLD: | ||
| 439 | tap_code(encoder_ccw_keycode); | ||
| 440 | break; | ||
| 441 | |||
| 442 | default: | ||
| 443 | tap_code(encoder_ccw_keycode); | ||
| 444 | break; | ||
| 445 | } | ||
| 446 | set_volume_animation(false); | ||
| 447 | } | ||
| 448 | encoder_timer = timer_read32(); | ||
| 449 | } | ||
| 450 | return true; | ||
| 451 | } | ||
diff --git a/keyboards/owlab/voice65/hotswap/hotswap.h b/keyboards/owlab/voice65/hotswap/hotswap.h new file mode 100644 index 000000000..cae25af59 --- /dev/null +++ b/keyboards/owlab/voice65/hotswap/hotswap.h | |||
| @@ -0,0 +1,46 @@ | |||
| 1 | /* Copyright 2021 kb-elmo<mail@elmo.space> | ||
| 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 | #pragma once | ||
| 18 | |||
| 19 | #include "quantum.h" | ||
| 20 | |||
| 21 | #define ____ KC_NO | ||
| 22 | |||
| 23 | #define LAYOUT( \ | ||
| 24 | K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ | ||
| 25 | K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ | ||
| 26 | K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, \ | ||
| 27 | K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \ | ||
| 28 | K400, K401, K402, K405, K409, K410, K411, K413, K414 \ | ||
| 29 | ) { \ | ||
| 30 | { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ | ||
| 31 | { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \ | ||
| 32 | { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, ____, K214 }, \ | ||
| 33 | { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, ____, K313, K314 }, \ | ||
| 34 | { K400, K401, K402, ____, ____, K405, ____, ____, ____, K409, K410, K411, ____, K413, K414 } \ | ||
| 35 | } | ||
| 36 | |||
| 37 | typedef union { | ||
| 38 | uint32_t raw; | ||
| 39 | struct { | ||
| 40 | uint8_t encoder_mode_index :8; | ||
| 41 | }; | ||
| 42 | } keyboard_config_t; | ||
| 43 | |||
| 44 | extern keyboard_config_t keyboard_config; | ||
| 45 | |||
| 46 | #define VOLUME_ANIMATION_TIMER 580 | ||
diff --git a/keyboards/owlab/voice65/hotswap/info.json b/keyboards/owlab/voice65/hotswap/info.json new file mode 100644 index 000000000..93cc3521c --- /dev/null +++ b/keyboards/owlab/voice65/hotswap/info.json | |||
| @@ -0,0 +1,80 @@ | |||
| 1 | { | ||
| 2 | "keyboard_name": "voice65 hotswap", | ||
| 3 | "url": "https://www.popkeyboard.com/products/67968vn00mzx", | ||
| 4 | "maintainer": "kb-elmo", | ||
| 5 | "width": 16, | ||
| 6 | "height": 5, | ||
| 7 | "layouts": { | ||
| 8 | "LAYOUT": { | ||
| 9 | "layout": [ | ||
| 10 | {"x":0, "y":0}, | ||
| 11 | {"x":1, "y":0}, | ||
| 12 | {"x":2, "y":0}, | ||
| 13 | {"x":3, "y":0}, | ||
| 14 | {"x":4, "y":0}, | ||
| 15 | {"x":5, "y":0}, | ||
| 16 | {"x":6, "y":0}, | ||
| 17 | {"x":7, "y":0}, | ||
| 18 | {"x":8, "y":0}, | ||
| 19 | {"x":9, "y":0}, | ||
| 20 | {"x":10, "y":0}, | ||
| 21 | {"x":11, "y":0}, | ||
| 22 | {"x":12, "y":0}, | ||
| 23 | {"x":13, "y":0, "w":2}, | ||
| 24 | {"x":15, "y":0}, | ||
| 25 | {"x":0, "y":1, "w":1.5}, | ||
| 26 | {"x":1.5, "y":1}, | ||
| 27 | {"x":2.5, "y":1}, | ||
| 28 | {"x":3.5, "y":1}, | ||
| 29 | {"x":4.5, "y":1}, | ||
| 30 | {"x":5.5, "y":1}, | ||
| 31 | {"x":6.5, "y":1}, | ||
| 32 | {"x":7.5, "y":1}, | ||
| 33 | {"x":8.5, "y":1}, | ||
| 34 | {"x":9.5, "y":1}, | ||
| 35 | {"x":10.5, "y":1}, | ||
| 36 | {"x":11.5, "y":1}, | ||
| 37 | {"x":12.5, "y":1}, | ||
| 38 | {"x":13.5, "y":1, "w":1.5}, | ||
| 39 | {"x":15, "y":1}, | ||
| 40 | {"x":0, "y":2, "w":1.75}, | ||
| 41 | {"x":1.75, "y":2}, | ||
| 42 | {"x":2.75, "y":2}, | ||
| 43 | {"x":3.75, "y":2}, | ||
| 44 | {"x":4.75, "y":2}, | ||
| 45 | {"x":5.75, "y":2}, | ||
| 46 | {"x":6.75, "y":2}, | ||
| 47 | {"x":7.75, "y":2}, | ||
| 48 | {"x":8.75, "y":2}, | ||
| 49 | {"x":9.75, "y":2}, | ||
| 50 | {"x":10.75, "y":2}, | ||
| 51 | {"x":11.75, "y":2}, | ||
| 52 | {"x":12.75, "y":2, "w":2.25}, | ||
| 53 | {"x":15, "y":2}, | ||
| 54 | {"x":0, "y":3, "w":2.25}, | ||
| 55 | {"x":2.25, "y":3}, | ||
| 56 | {"x":3.25, "y":3}, | ||
| 57 | {"x":4.25, "y":3}, | ||
| 58 | {"x":5.25, "y":3}, | ||
| 59 | {"x":6.25, "y":3}, | ||
| 60 | {"x":7.25, "y":3}, | ||
| 61 | {"x":8.25, "y":3}, | ||
| 62 | {"x":9.25, "y":3}, | ||
| 63 | {"x":10.25, "y":3}, | ||
| 64 | {"x":11.25, "y":3}, | ||
| 65 | {"x":12.25, "y":3, "w":1.75}, | ||
| 66 | {"x":14, "y":3}, | ||
| 67 | {"x":15, "y":3}, | ||
| 68 | {"x":0, "y":4, "w":1.25}, | ||
| 69 | {"x":1.25, "y":4, "w":1.25}, | ||
| 70 | {"x":2.5, "y":4, "w":1.25}, | ||
| 71 | {"x":3.75, "y":4, "w":6.25}, | ||
| 72 | {"x":10, "y":4, "w":1.25}, | ||
| 73 | {"x":11.25, "y":4, "w":1.25}, | ||
| 74 | {"x":13, "y":4}, | ||
| 75 | {"x":14, "y":4}, | ||
| 76 | {"x":15, "y":4} | ||
| 77 | ] | ||
| 78 | } | ||
| 79 | } | ||
| 80 | } | ||
diff --git a/keyboards/owlab/voice65/hotswap/keymaps/default/keymap.c b/keyboards/owlab/voice65/hotswap/keymaps/default/keymap.c new file mode 100644 index 000000000..406da3d70 --- /dev/null +++ b/keyboards/owlab/voice65/hotswap/keymaps/default/keymap.c | |||
| @@ -0,0 +1,36 @@ | |||
| 1 | /* Copyright 2021 kb-elmo<mail@elmo.space> | ||
| 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 QMK_KEYBOARD_H | ||
| 17 | |||
| 18 | // How long (in ms) to wait between animation steps for the snake mode | ||
| 19 | const uint8_t RGBLED_SNAKE_INTERVALS[] PROGMEM = {100, 35, 20}; | ||
| 20 | |||
| 21 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 22 | [0] = LAYOUT( | ||
| 23 | KC_ESC, 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_DEL, | ||
| 24 | 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_PGUP, | ||
| 25 | 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_PGDN, | ||
| 26 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, MO(1), | ||
| 27 | KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT | ||
| 28 | ), | ||
| 29 | [1] = LAYOUT( | ||
| 30 | KC_GRV, 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_TRNS, RESET, | ||
| 31 | KC_TRNS, RGB_TOG, RGB_MOD, RGB_RMOD,RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_HOME, | ||
| 32 | 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_END, | ||
| 33 | KC_TRNS, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_TRNS, KC_TRNS, KC_F22, KC_TRNS, | ||
| 34 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F23, KC_TRNS | ||
| 35 | ) | ||
| 36 | }; | ||
diff --git a/keyboards/owlab/voice65/hotswap/keymaps/via/keymap.c b/keyboards/owlab/voice65/hotswap/keymaps/via/keymap.c new file mode 100644 index 000000000..c058aad5e --- /dev/null +++ b/keyboards/owlab/voice65/hotswap/keymaps/via/keymap.c | |||
| @@ -0,0 +1,51 @@ | |||
| 1 | /* Copyright 2021 kb-elmo<mail@elmo.space> | ||
| 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 QMK_KEYBOARD_H | ||
| 17 | |||
| 18 | // How long (in ms) to wait between animation steps for the snake mode | ||
| 19 | const uint8_t RGBLED_SNAKE_INTERVALS[] PROGMEM = {100, 35, 20}; | ||
| 20 | |||
| 21 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 22 | [0] = LAYOUT( | ||
| 23 | KC_ESC, 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_DEL, | ||
| 24 | 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_PGUP, | ||
| 25 | 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_PGDN, | ||
| 26 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, MO(1), | ||
| 27 | KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT | ||
| 28 | ), | ||
| 29 | [1] = LAYOUT( | ||
| 30 | KC_GRV, 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_TRNS, RESET, | ||
| 31 | KC_TRNS, RGB_TOG, RGB_MOD, RGB_RMOD,RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_HOME, | ||
| 32 | 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_END, | ||
| 33 | KC_TRNS, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_TRNS, KC_TRNS, KC_F22, KC_TRNS, | ||
| 34 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F23, KC_TRNS | ||
| 35 | ), | ||
| 36 | [2] = LAYOUT( | ||
| 37 | 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, | ||
| 38 | 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, | ||
| 39 | 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, | ||
| 40 | 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, | ||
| 41 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | ||
| 42 | ), | ||
| 43 | [3] = LAYOUT( | ||
| 44 | 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, | ||
| 45 | 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, | ||
| 46 | 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, | ||
| 47 | 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, | ||
| 48 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | ||
| 49 | ) | ||
| 50 | }; | ||
| 51 | |||
diff --git a/keyboards/owlab/voice65/hotswap/keymaps/via/rules.mk b/keyboards/owlab/voice65/hotswap/keymaps/via/rules.mk new file mode 100644 index 000000000..36b7ba9cb --- /dev/null +++ b/keyboards/owlab/voice65/hotswap/keymaps/via/rules.mk | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | VIA_ENABLE = yes | ||
| 2 | LTO_ENABLE = yes | ||
diff --git a/keyboards/owlab/voice65/hotswap/mcuconf.h b/keyboards/owlab/voice65/hotswap/mcuconf.h new file mode 100644 index 000000000..808ff7654 --- /dev/null +++ b/keyboards/owlab/voice65/hotswap/mcuconf.h | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | /* Copyright 2021 kb-elmo<mail@elmo.space> | ||
| 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 | #pragma once | ||
| 18 | |||
| 19 | #include_next <mcuconf.h> | ||
| 20 | |||
| 21 | #undef STM32_I2C_USE_I2C1 | ||
| 22 | #define STM32_I2C_USE_I2C1 TRUE | ||
diff --git a/keyboards/owlab/voice65/hotswap/readme.md b/keyboards/owlab/voice65/hotswap/readme.md new file mode 100644 index 000000000..3eb26792e --- /dev/null +++ b/keyboards/owlab/voice65/hotswap/readme.md | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | # Voice65 - hotswap PCB | ||
| 2 | |||
| 3 |  | ||
| 4 | |||
| 5 | A 65% with an LED strip and a scroll wheel | ||
| 6 | |||
| 7 | * Keyboard Maintainer: [kb-elmo](https://github.com/kb-elmo) | ||
| 8 | * Hardware Supported: Voice65 hotswap PCB | ||
| 9 | * Hardware Availability: Ended groupbuy: https://www.popkeyboard.com/products/67968vn00mzx | ||
| 10 | |||
| 11 | Make example for this keyboard (after setting up your build environment): | ||
| 12 | |||
| 13 | make owlab/voice65/hotswap:default | ||
| 14 | |||
| 15 | Flashing example for this keyboard: | ||
| 16 | |||
| 17 | make owlab/voice65/hotswap:default:flash | ||
| 18 | |||
| 19 | **Bootloader:** Press the physical reset button on the bottom side of the PCB (labeled SW1) or hold down ESC while plugging in the board. | ||
| 20 | |||
| 21 | 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/owlab/voice65/hotswap/rules.mk b/keyboards/owlab/voice65/hotswap/rules.mk new file mode 100644 index 000000000..7f1bc2ed9 --- /dev/null +++ b/keyboards/owlab/voice65/hotswap/rules.mk | |||
| @@ -0,0 +1,26 @@ | |||
| 1 | # MCU name | ||
| 2 | MCU = STM32F303 | ||
| 3 | |||
| 4 | # Bootloader selection | ||
| 5 | BOOTLOADER = stm32-dfu | ||
| 6 | |||
| 7 | # Build Options | ||
| 8 | # change yes to no to disable | ||
| 9 | # | ||
| 10 | BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration | ||
| 11 | MOUSEKEY_ENABLE = yes # Mouse keys | ||
| 12 | EXTRAKEY_ENABLE = yes # Audio control and System control | ||
| 13 | CONSOLE_ENABLE = no # Console for debug | ||
| 14 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
| 15 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
| 16 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
| 17 | # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
| 18 | NKRO_ENABLE = no # USB Nkey Rollover | ||
| 19 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | ||
| 20 | RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow | ||
| 21 | BLUETOOTH_ENABLE = no # Enable Bluetooth | ||
| 22 | AUDIO_ENABLE = no # Audio output | ||
| 23 | ENCODER_ENABLE = yes # Rotary encoder | ||
| 24 | |||
| 25 | RGB_MATRIX_ENABLE = yes | ||
| 26 | RGB_MATRIX_DRIVER = IS31FL3741 | ||
diff --git a/keyboards/owlab/voice65/soldered/config.h b/keyboards/owlab/voice65/soldered/config.h new file mode 100644 index 000000000..bb7ec6102 --- /dev/null +++ b/keyboards/owlab/voice65/soldered/config.h | |||
| @@ -0,0 +1,89 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2021 kb-elmo<mail@elmo.space> | ||
| 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 0x4F53 | ||
| 24 | #define PRODUCT_ID 0x5657 | ||
| 25 | #define DEVICE_VER 0x0001 | ||
| 26 | #define MANUFACTURER Owl Studio | ||
| 27 | #define PRODUCT Voice65 | ||
| 28 | |||
| 29 | /* key matrix size */ | ||
| 30 | #define MATRIX_ROWS 5 | ||
| 31 | #define MATRIX_COLS 15 | ||
| 32 | |||
| 33 | /* Keyboard Matrix Assignments */ | ||
| 34 | #define MATRIX_ROW_PINS { B0, B1, B2, B10, B11 } | ||
| 35 | #define MATRIX_COL_PINS { A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A15, B8, B9, B12, B13 } | ||
| 36 | |||
| 37 | /* COL2ROW, ROW2COL */ | ||
| 38 | #define DIODE_DIRECTION COL2ROW | ||
| 39 | |||
| 40 | /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ | ||
| 41 | #define DEBOUNCE 5 | ||
| 42 | /* NKRO */ | ||
| 43 | #ifdef NKRO_ENABLE | ||
| 44 | # define FORCE_NKRO | ||
| 45 | #endif | ||
| 46 | |||
| 47 | /* RGB stripe */ | ||
| 48 | #define RGB_DI_PIN B15 | ||
| 49 | #ifdef RGB_DI_PIN | ||
| 50 | # define RGBLIGHT_EFFECT_ALTERNATING | ||
| 51 | # define RGBLIGHT_EFFECT_BREATHING | ||
| 52 | # define RGBLIGHT_EFFECT_CHRISTMAS | ||
| 53 | # define RGBLIGHT_EFFECT_KNIGHT | ||
| 54 | # define RGBLIGHT_EFFECT_RAINBOW_MOOD | ||
| 55 | # define RGBLIGHT_EFFECT_RAINBOW_SWIRL | ||
| 56 | # define RGBLIGHT_EFFECT_SNAKE | ||
| 57 | # define RGBLIGHT_EFFECT_STATIC_GRADIENT | ||
| 58 | # define RGBLIGHT_EFFECT_TWINKLE | ||
| 59 | # define RGBLED_NUM 20 | ||
| 60 | # define RGBLIGHT_HUE_STEP 8 | ||
| 61 | # define RGBLIGHT_SAT_STEP 8 | ||
| 62 | # define RGBLIGHT_VAL_STEP 10 | ||
| 63 | # define RGBLIGHT_LIMIT_VAL 180 | ||
| 64 | # define OWL_VOLUME_RANGE 50 | ||
| 65 | #endif | ||
| 66 | |||
| 67 | /* RGB matrix*/ | ||
| 68 | #ifdef RGB_MATRIX_ENABLE | ||
| 69 | # define USE_I2CV2 | ||
| 70 | # define RGB_MATRIX_DISABLE_KEYCODES | ||
| 71 | # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects | ||
| 72 | # define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended | ||
| 73 | # define RGB_MATRIX_KEYPRESSES | ||
| 74 | # define RGB_MATRIX_LED_PROCESS_LIMIT 4 | ||
| 75 | # define RGB_MATRIX_LED_FLUSH_LIMIT 26 | ||
| 76 | # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 | ||
| 77 | # define RGB_MATRIX_STARTUP_VAL 128 | ||
| 78 | # define DRIVER_ADDR_1 0b0110000 | ||
| 79 | # define DRIVER_ADDR_2 0b0110000 | ||
| 80 | # define DRIVER_COUNT 2 | ||
| 81 | # define DRIVER_1_LED_TOTAL 71 | ||
| 82 | # define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL | ||
| 83 | #endif | ||
| 84 | |||
| 85 | /* Encoder */ | ||
| 86 | #define ENCODERS_PAD_A { B4 } | ||
| 87 | #define ENCODERS_PAD_B { B5 } | ||
| 88 | #define ENCODER_RESOLUTION 4 | ||
| 89 | #define TAP_CODE_DELAY 10 | ||
diff --git a/keyboards/owlab/voice65/soldered/halconf.h b/keyboards/owlab/voice65/soldered/halconf.h new file mode 100644 index 000000000..f88be4821 --- /dev/null +++ b/keyboards/owlab/voice65/soldered/halconf.h | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | /* Copyright 2021 kb-elmo<mail@elmo.space> | ||
| 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 | #pragma once | ||
| 18 | |||
| 19 | #define HAL_USE_I2C TRUE | ||
| 20 | |||
| 21 | #include_next <halconf.h> | ||
diff --git a/keyboards/owlab/voice65/soldered/info.json b/keyboards/owlab/voice65/soldered/info.json new file mode 100644 index 000000000..40d49a7a9 --- /dev/null +++ b/keyboards/owlab/voice65/soldered/info.json | |||
| @@ -0,0 +1,442 @@ | |||
| 1 | { | ||
| 2 | "keyboard_name": "voice65 soldered", | ||
| 3 | "url": "https://www.popkeyboard.com/products/67968vn00mzx", | ||
| 4 | "maintainer": "kb-elmo", | ||
| 5 | "width": 16, | ||
| 6 | "height": 5, | ||
| 7 | "layouts": { | ||
| 8 | "LAYOUT_all": { | ||
| 9 | "layout": [ | ||
| 10 | {"x":0, "y":0}, | ||
| 11 | {"x":1, "y":0}, | ||
| 12 | {"x":2, "y":0}, | ||
| 13 | {"x":3, "y":0}, | ||
| 14 | {"x":4, "y":0}, | ||
| 15 | {"x":5, "y":0}, | ||
| 16 | {"x":6, "y":0}, | ||
| 17 | {"x":7, "y":0}, | ||
| 18 | {"x":8, "y":0}, | ||
| 19 | {"x":9, "y":0}, | ||
| 20 | {"x":10, "y":0}, | ||
| 21 | {"x":11, "y":0}, | ||
| 22 | {"x":12, "y":0}, | ||
| 23 | {"x":13, "y":0}, | ||
| 24 | {"x":14, "y":0}, | ||
| 25 | {"x":15, "y":0}, | ||
| 26 | {"x":0, "y":1, "w":1.5}, | ||
| 27 | {"x":1.5, "y":1}, | ||
| 28 | {"x":2.5, "y":1}, | ||
| 29 | {"x":3.5, "y":1}, | ||
| 30 | {"x":4.5, "y":1}, | ||
| 31 | {"x":5.5, "y":1}, | ||
| 32 | {"x":6.5, "y":1}, | ||
| 33 | {"x":7.5, "y":1}, | ||
| 34 | {"x":8.5, "y":1}, | ||
| 35 | {"x":9.5, "y":1}, | ||
| 36 | {"x":10.5, "y":1}, | ||
| 37 | {"x":11.5, "y":1}, | ||
| 38 | {"x":12.5, "y":1}, | ||
| 39 | {"x":13.5, "y":1, "w":1.5}, | ||
| 40 | {"x":15, "y":1}, | ||
| 41 | {"x":0, "y":2, "w":1.75}, | ||
| 42 | {"x":1.75, "y":2}, | ||
| 43 | {"x":2.75, "y":2}, | ||
| 44 | {"x":3.75, "y":2}, | ||
| 45 | {"x":4.75, "y":2}, | ||
| 46 | {"x":5.75, "y":2}, | ||
| 47 | {"x":6.75, "y":2}, | ||
| 48 | {"x":7.75, "y":2}, | ||
| 49 | {"x":8.75, "y":2}, | ||
| 50 | {"x":9.75, "y":2}, | ||
| 51 | {"x":10.75, "y":2}, | ||
| 52 | {"x":11.75, "y":2}, | ||
| 53 | {"x":12.75, "y":2, "w":2.25}, | ||
| 54 | {"x":15, "y":2}, | ||
| 55 | {"x":0, "y":3, "w":1.25}, | ||
| 56 | {"x":1.25, "y":3}, | ||
| 57 | {"x":2.25, "y":3}, | ||
| 58 | {"x":3.25, "y":3}, | ||
| 59 | {"x":4.25, "y":3}, | ||
| 60 | {"x":5.25, "y":3}, | ||
| 61 | {"x":6.25, "y":3}, | ||
| 62 | {"x":7.25, "y":3}, | ||
| 63 | {"x":8.25, "y":3}, | ||
| 64 | {"x":9.25, "y":3}, | ||
| 65 | {"x":10.25, "y":3}, | ||
| 66 | {"x":11.25, "y":3}, | ||
| 67 | {"x":12.25, "y":3, "w":1.75}, | ||
| 68 | {"x":14, "y":3}, | ||
| 69 | {"x":15, "y":3}, | ||
| 70 | {"x":0, "y":4, "w":1.25}, | ||
| 71 | {"x":1.25, "y":4, "w":1.25}, | ||
| 72 | {"x":2.5, "y":4, "w":1.25}, | ||
| 73 | {"x":3.75, "y":4, "w":2.25}, | ||
| 74 | {"x":6, "y":4, "w":1.25}, | ||
| 75 | {"x":7.25, "y":4, "w":2.75}, | ||
| 76 | {"x":10, "y":4, "w":1.25}, | ||
| 77 | {"x":11.25, "y":4, "w":1.25}, | ||
| 78 | {"x":13, "y":4}, | ||
| 79 | {"x":14, "y":4}, | ||
| 80 | {"x":15, "y":4} | ||
| 81 | ] | ||
| 82 | }, | ||
| 83 | "LAYOUT_65_ansi_blocker": { | ||
| 84 | "layout": [ | ||
| 85 | {"x":0, "y":0}, | ||
| 86 | {"x":1, "y":0}, | ||
| 87 | {"x":2, "y":0}, | ||
| 88 | {"x":3, "y":0}, | ||
| 89 | {"x":4, "y":0}, | ||
| 90 | {"x":5, "y":0}, | ||
| 91 | {"x":6, "y":0}, | ||
| 92 | {"x":7, "y":0}, | ||
| 93 | {"x":8, "y":0}, | ||
| 94 | {"x":9, "y":0}, | ||
| 95 | {"x":10, "y":0}, | ||
| 96 | {"x":11, "y":0}, | ||
| 97 | {"x":12, "y":0}, | ||
| 98 | {"x":13, "y":0, "w":2}, | ||
| 99 | {"x":15, "y":0}, | ||
| 100 | {"x":0, "y":1, "w":1.5}, | ||
| 101 | {"x":1.5, "y":1}, | ||
| 102 | {"x":2.5, "y":1}, | ||
| 103 | {"x":3.5, "y":1}, | ||
| 104 | {"x":4.5, "y":1}, | ||
| 105 | {"x":5.5, "y":1}, | ||
| 106 | {"x":6.5, "y":1}, | ||
| 107 | {"x":7.5, "y":1}, | ||
| 108 | {"x":8.5, "y":1}, | ||
| 109 | {"x":9.5, "y":1}, | ||
| 110 | {"x":10.5, "y":1}, | ||
| 111 | {"x":11.5, "y":1}, | ||
| 112 | {"x":12.5, "y":1}, | ||
| 113 | {"x":13.5, "y":1, "w":1.5}, | ||
| 114 | {"x":15, "y":1}, | ||
| 115 | {"x":0, "y":2, "w":1.75}, | ||
| 116 | {"x":1.75, "y":2}, | ||
| 117 | {"x":2.75, "y":2}, | ||
| 118 | {"x":3.75, "y":2}, | ||
| 119 | {"x":4.75, "y":2}, | ||
| 120 | {"x":5.75, "y":2}, | ||
| 121 | {"x":6.75, "y":2}, | ||
| 122 | {"x":7.75, "y":2}, | ||
| 123 | {"x":8.75, "y":2}, | ||
| 124 | {"x":9.75, "y":2}, | ||
| 125 | {"x":10.75, "y":2}, | ||
| 126 | {"x":11.75, "y":2}, | ||
| 127 | {"x":12.75, "y":2, "w":2.25}, | ||
| 128 | {"x":15, "y":2}, | ||
| 129 | {"x":0, "y":3, "w":2.25}, | ||
| 130 | {"x":2.25, "y":3}, | ||
| 131 | {"x":3.25, "y":3}, | ||
| 132 | {"x":4.25, "y":3}, | ||
| 133 | {"x":5.25, "y":3}, | ||
| 134 | {"x":6.25, "y":3}, | ||
| 135 | {"x":7.25, "y":3}, | ||
| 136 | {"x":8.25, "y":3}, | ||
| 137 | {"x":9.25, "y":3}, | ||
| 138 | {"x":10.25, "y":3}, | ||
| 139 | {"x":11.25, "y":3}, | ||
| 140 | {"x":12.25, "y":3, "w":1.75}, | ||
| 141 | {"x":14, "y":3}, | ||
| 142 | {"x":15, "y":3}, | ||
| 143 | {"x":0, "y":4, "w":1.25}, | ||
| 144 | {"x":1.25, "y":4, "w":1.25}, | ||
| 145 | {"x":2.5, "y":4, "w":1.25}, | ||
| 146 | {"x":3.75, "y":4, "w":6.25}, | ||
| 147 | {"x":10, "y":4, "w":1.25}, | ||
| 148 | {"x":11.25, "y":4, "w":1.25}, | ||
| 149 | {"x":13, "y":4}, | ||
| 150 | {"x":14, "y":4}, | ||
| 151 | {"x":15, "y":4} | ||
| 152 | ] | ||
| 153 | }, | ||
| 154 | "LAYOUT_65_ansi_blocker_split_bs": { | ||
| 155 | "layout": [ | ||
| 156 | {"x":0, "y":0}, | ||
| 157 | {"x":1, "y":0}, | ||
| 158 | {"x":2, "y":0}, | ||
| 159 | {"x":3, "y":0}, | ||
| 160 | {"x":4, "y":0}, | ||
| 161 | {"x":5, "y":0}, | ||
| 162 | {"x":6, "y":0}, | ||
| 163 | {"x":7, "y":0}, | ||
| 164 | {"x":8, "y":0}, | ||
| 165 | {"x":9, "y":0}, | ||
| 166 | {"x":10, "y":0}, | ||
| 167 | {"x":11, "y":0}, | ||
| 168 | {"x":12, "y":0}, | ||
| 169 | {"x":13, "y":0}, | ||
| 170 | {"x":14, "y":0}, | ||
| 171 | {"x":15, "y":0}, | ||
| 172 | {"x":0, "y":1, "w":1.5}, | ||
| 173 | {"x":1.5, "y":1}, | ||
| 174 | {"x":2.5, "y":1}, | ||
| 175 | {"x":3.5, "y":1}, | ||
| 176 | {"x":4.5, "y":1}, | ||
| 177 | {"x":5.5, "y":1}, | ||
| 178 | {"x":6.5, "y":1}, | ||
| 179 | {"x":7.5, "y":1}, | ||
| 180 | {"x":8.5, "y":1}, | ||
| 181 | {"x":9.5, "y":1}, | ||
| 182 | {"x":10.5, "y":1}, | ||
| 183 | {"x":11.5, "y":1}, | ||
| 184 | {"x":12.5, "y":1}, | ||
| 185 | {"x":13.5, "y":1, "w":1.5}, | ||
| 186 | {"x":15, "y":1}, | ||
| 187 | {"x":0, "y":2, "w":1.75}, | ||
| 188 | {"x":1.75, "y":2}, | ||
| 189 | {"x":2.75, "y":2}, | ||
| 190 | {"x":3.75, "y":2}, | ||
| 191 | {"x":4.75, "y":2}, | ||
| 192 | {"x":5.75, "y":2}, | ||
| 193 | {"x":6.75, "y":2}, | ||
| 194 | {"x":7.75, "y":2}, | ||
| 195 | {"x":8.75, "y":2}, | ||
| 196 | {"x":9.75, "y":2}, | ||
| 197 | {"x":10.75, "y":2}, | ||
| 198 | {"x":11.75, "y":2}, | ||
| 199 | {"x":12.75, "y":2, "w":2.25}, | ||
| 200 | {"x":15, "y":2}, | ||
| 201 | {"x":0, "y":3, "w":2.25}, | ||
| 202 | {"x":2.25, "y":3}, | ||
| 203 | {"x":3.25, "y":3}, | ||
| 204 | {"x":4.25, "y":3}, | ||
| 205 | {"x":5.25, "y":3}, | ||
| 206 | {"x":6.25, "y":3}, | ||
| 207 | {"x":7.25, "y":3}, | ||
| 208 | {"x":8.25, "y":3}, | ||
| 209 | {"x":9.25, "y":3}, | ||
| 210 | {"x":10.25, "y":3}, | ||
| 211 | {"x":11.25, "y":3}, | ||
| 212 | {"x":12.25, "y":3, "w":1.75}, | ||
| 213 | {"x":14, "y":3}, | ||
| 214 | {"x":15, "y":3}, | ||
| 215 | {"x":0, "y":4, "w":1.25}, | ||
| 216 | {"x":1.25, "y":4, "w":1.25}, | ||
| 217 | {"x":2.5, "y":4, "w":1.25}, | ||
| 218 | {"x":3.75, "y":4, "w":6.25}, | ||
| 219 | {"x":10, "y":4, "w":1.25}, | ||
| 220 | {"x":11.25, "y":4, "w":1.25}, | ||
| 221 | {"x":13, "y":4}, | ||
| 222 | {"x":14, "y":4}, | ||
| 223 | {"x":15, "y":4} | ||
| 224 | ] | ||
| 225 | }, | ||
| 226 | "LAYOUT_65_ansi_blocker_tsangan": { | ||
| 227 | "layout": [ | ||
| 228 | {"x":0, "y":0}, | ||
| 229 | {"x":1, "y":0}, | ||
| 230 | {"x":2, "y":0}, | ||
| 231 | {"x":3, "y":0}, | ||
| 232 | {"x":4, "y":0}, | ||
| 233 | {"x":5, "y":0}, | ||
| 234 | {"x":6, "y":0}, | ||
| 235 | {"x":7, "y":0}, | ||
| 236 | {"x":8, "y":0}, | ||
| 237 | {"x":9, "y":0}, | ||
| 238 | {"x":10, "y":0}, | ||
| 239 | {"x":11, "y":0}, | ||
| 240 | {"x":12, "y":0}, | ||
| 241 | {"x":13, "y":0, "w":2}, | ||
| 242 | {"x":15, "y":0}, | ||
| 243 | {"x":0, "y":1, "w":1.5}, | ||
| 244 | {"x":1.5, "y":1}, | ||
| 245 | {"x":2.5, "y":1}, | ||
| 246 | {"x":3.5, "y":1}, | ||
| 247 | {"x":4.5, "y":1}, | ||
| 248 | {"x":5.5, "y":1}, | ||
| 249 | {"x":6.5, "y":1}, | ||
| 250 | {"x":7.5, "y":1}, | ||
| 251 | {"x":8.5, "y":1}, | ||
| 252 | {"x":9.5, "y":1}, | ||
| 253 | {"x":10.5, "y":1}, | ||
| 254 | {"x":11.5, "y":1}, | ||
| 255 | {"x":12.5, "y":1}, | ||
| 256 | {"x":13.5, "y":1, "w":1.5}, | ||
| 257 | {"x":15, "y":1}, | ||
| 258 | {"x":0, "y":2, "w":1.75}, | ||
| 259 | {"x":1.75, "y":2}, | ||
| 260 | {"x":2.75, "y":2}, | ||
| 261 | {"x":3.75, "y":2}, | ||
| 262 | {"x":4.75, "y":2}, | ||
| 263 | {"x":5.75, "y":2}, | ||
| 264 | {"x":6.75, "y":2}, | ||
| 265 | {"x":7.75, "y":2}, | ||
| 266 | {"x":8.75, "y":2}, | ||
| 267 | {"x":9.75, "y":2}, | ||
| 268 | {"x":10.75, "y":2}, | ||
| 269 | {"x":11.75, "y":2}, | ||
| 270 | {"x":12.75, "y":2, "w":2.25}, | ||
| 271 | {"x":15, "y":2}, | ||
| 272 | {"x":0, "y":3, "w":2.25}, | ||
| 273 | {"x":2.25, "y":3}, | ||
| 274 | {"x":3.25, "y":3}, | ||
| 275 | {"x":4.25, "y":3}, | ||
| 276 | {"x":5.25, "y":3}, | ||
| 277 | {"x":6.25, "y":3}, | ||
| 278 | {"x":7.25, "y":3}, | ||
| 279 | {"x":8.25, "y":3}, | ||
| 280 | {"x":9.25, "y":3}, | ||
| 281 | {"x":10.25, "y":3}, | ||
| 282 | {"x":11.25, "y":3}, | ||
| 283 | {"x":12.25, "y":3, "w":1.75}, | ||
| 284 | {"x":14, "y":3}, | ||
| 285 | {"x":15, "y":3}, | ||
| 286 | {"x":0, "y":4, "w":1.5}, | ||
| 287 | {"x":1.5, "y":4}, | ||
| 288 | {"x":2.5, "y":4, "w":1.5}, | ||
| 289 | {"x":4, "y":4, "w":7}, | ||
| 290 | {"x":11, "y":4, "w":1.5}, | ||
| 291 | {"x":13, "y":4}, | ||
| 292 | {"x":14, "y":4}, | ||
| 293 | {"x":15, "y":4} | ||
| 294 | ] | ||
| 295 | }, | ||
| 296 | "LAYOUT_65_iso_blocker": { | ||
| 297 | "layout": [ | ||
| 298 | {"x":0, "y":0}, | ||
| 299 | {"x":1, "y":0}, | ||
| 300 | {"x":2, "y":0}, | ||
| 301 | {"x":3, "y":0}, | ||
| 302 | {"x":4, "y":0}, | ||
| 303 | {"x":5, "y":0}, | ||
| 304 | {"x":6, "y":0}, | ||
| 305 | {"x":7, "y":0}, | ||
| 306 | {"x":8, "y":0}, | ||
| 307 | {"x":9, "y":0}, | ||
| 308 | {"x":10, "y":0}, | ||
| 309 | {"x":11, "y":0}, | ||
| 310 | {"x":12, "y":0}, | ||
| 311 | {"x":13, "y":0, "w":2}, | ||
| 312 | {"x":15, "y":0}, | ||
| 313 | {"x":0, "y":1, "w":1.5}, | ||
| 314 | {"x":1.5, "y":1}, | ||
| 315 | {"x":2.5, "y":1}, | ||
| 316 | {"x":3.5, "y":1}, | ||
| 317 | {"x":4.5, "y":1}, | ||
| 318 | {"x":5.5, "y":1}, | ||
| 319 | {"x":6.5, "y":1}, | ||
| 320 | {"x":7.5, "y":1}, | ||
| 321 | {"x":8.5, "y":1}, | ||
| 322 | {"x":9.5, "y":1}, | ||
| 323 | {"x":10.5, "y":1}, | ||
| 324 | {"x":11.5, "y":1}, | ||
| 325 | {"x":12.5, "y":1}, | ||
| 326 | {"x":15, "y":1}, | ||
| 327 | {"x":0, "y":2, "w":1.75}, | ||
| 328 | {"x":1.75, "y":2}, | ||
| 329 | {"x":2.75, "y":2}, | ||
| 330 | {"x":3.75, "y":2}, | ||
| 331 | {"x":4.75, "y":2}, | ||
| 332 | {"x":5.75, "y":2}, | ||
| 333 | {"x":6.75, "y":2}, | ||
| 334 | {"x":7.75, "y":2}, | ||
| 335 | {"x":8.75, "y":2}, | ||
| 336 | {"x":9.75, "y":2}, | ||
| 337 | {"x":10.75, "y":2}, | ||
| 338 | {"x":11.75, "y":2}, | ||
| 339 | {"x":12.75, "y":2}, | ||
| 340 | {"x":13.75, "y":1, "w":1.25, "h":2}, | ||
| 341 | {"x":15, "y":2}, | ||
| 342 | {"x":0, "y":3, "w":1.25}, | ||
| 343 | {"x":1.25, "y":3}, | ||
| 344 | {"x":2.25, "y":3}, | ||
| 345 | {"x":3.25, "y":3}, | ||
| 346 | {"x":4.25, "y":3}, | ||
| 347 | {"x":5.25, "y":3}, | ||
| 348 | {"x":6.25, "y":3}, | ||
| 349 | {"x":7.25, "y":3}, | ||
| 350 | {"x":8.25, "y":3}, | ||
| 351 | {"x":9.25, "y":3}, | ||
| 352 | {"x":10.25, "y":3}, | ||
| 353 | {"x":11.25, "y":3}, | ||
| 354 | {"x":12.25, "y":3, "w":1.75}, | ||
| 355 | {"x":14, "y":3}, | ||
| 356 | {"x":15, "y":3}, | ||
| 357 | {"x":0, "y":4, "w":1.25}, | ||
| 358 | {"x":1.25, "y":4, "w":1.25}, | ||
| 359 | {"x":2.5, "y":4, "w":1.25}, | ||
| 360 | {"x":3.75, "y":4, "w":6.25}, | ||
| 361 | {"x":10, "y":4, "w":1.25}, | ||
| 362 | {"x":11.25, "y":4, "w":1.25}, | ||
| 363 | {"x":13, "y":4}, | ||
| 364 | {"x":14, "y":4}, | ||
| 365 | {"x":15, "y":4} | ||
| 366 | ] | ||
| 367 | }, | ||
| 368 | "LAYOUT_65_iso_blocker_split_bs": { | ||
| 369 | "layout": [ | ||
| 370 | {"x":0, "y":0}, | ||
| 371 | {"x":1, "y":0}, | ||
| 372 | {"x":2, "y":0}, | ||
| 373 | {"x":3, "y":0}, | ||
| 374 | {"x":4, "y":0}, | ||
| 375 | {"x":5, "y":0}, | ||
| 376 | {"x":6, "y":0}, | ||
| 377 | {"x":7, "y":0}, | ||
| 378 | {"x":8, "y":0}, | ||
| 379 | {"x":9, "y":0}, | ||
| 380 | {"x":10, "y":0}, | ||
| 381 | {"x":11, "y":0}, | ||
| 382 | {"x":12, "y":0}, | ||
| 383 | {"x":13, "y":0}, | ||
| 384 | {"x":14, "y":0}, | ||
| 385 | {"x":15, "y":0}, | ||
| 386 | {"x":0, "y":1, "w":1.5}, | ||
| 387 | {"x":1.5, "y":1}, | ||
| 388 | {"x":2.5, "y":1}, | ||
| 389 | {"x":3.5, "y":1}, | ||
| 390 | {"x":4.5, "y":1}, | ||
| 391 | {"x":5.5, "y":1}, | ||
| 392 | {"x":6.5, "y":1}, | ||
| 393 | {"x":7.5, "y":1}, | ||
| 394 | {"x":8.5, "y":1}, | ||
| 395 | {"x":9.5, "y":1}, | ||
| 396 | {"x":10.5, "y":1}, | ||
| 397 | {"x":11.5, "y":1}, | ||
| 398 | {"x":12.5, "y":1}, | ||
| 399 | {"x":15, "y":1}, | ||
| 400 | {"x":0, "y":2, "w":1.75}, | ||
| 401 | {"x":1.75, "y":2}, | ||
| 402 | {"x":2.75, "y":2}, | ||
| 403 | {"x":3.75, "y":2}, | ||
| 404 | {"x":4.75, "y":2}, | ||
| 405 | {"x":5.75, "y":2}, | ||
| 406 | {"x":6.75, "y":2}, | ||
| 407 | {"x":7.75, "y":2}, | ||
| 408 | {"x":8.75, "y":2}, | ||
| 409 | {"x":9.75, "y":2}, | ||
| 410 | {"x":10.75, "y":2}, | ||
| 411 | {"x":11.75, "y":2}, | ||
| 412 | {"x":12.75, "y":2}, | ||
| 413 | {"x":13.75, "y":1, "w":1.25, "h":2}, | ||
| 414 | {"x":15, "y":2}, | ||
| 415 | {"x":0, "y":3, "w":1.25}, | ||
| 416 | {"x":1.25, "y":3}, | ||
| 417 | {"x":2.25, "y":3}, | ||
| 418 | {"x":3.25, "y":3}, | ||
| 419 | {"x":4.25, "y":3}, | ||
| 420 | {"x":5.25, "y":3}, | ||
| 421 | {"x":6.25, "y":3}, | ||
| 422 | {"x":7.25, "y":3}, | ||
| 423 | {"x":8.25, "y":3}, | ||
| 424 | {"x":9.25, "y":3}, | ||
| 425 | {"x":10.25, "y":3}, | ||
| 426 | {"x":11.25, "y":3}, | ||
| 427 | {"x":12.25, "y":3, "w":1.75}, | ||
| 428 | {"x":14, "y":3}, | ||
| 429 | {"x":15, "y":3}, | ||
| 430 | {"x":0, "y":4, "w":1.25}, | ||
| 431 | {"x":1.25, "y":4, "w":1.25}, | ||
| 432 | {"x":2.5, "y":4, "w":1.25}, | ||
| 433 | {"x":3.75, "y":4, "w":6.25}, | ||
| 434 | {"x":10, "y":4, "w":1.25}, | ||
| 435 | {"x":11.25, "y":4, "w":1.25}, | ||
| 436 | {"x":13, "y":4}, | ||
| 437 | {"x":14, "y":4}, | ||
| 438 | {"x":15, "y":4} | ||
| 439 | ] | ||
| 440 | } | ||
| 441 | } | ||
| 442 | } | ||
diff --git a/keyboards/owlab/voice65/soldered/keymaps/default/keymap.c b/keyboards/owlab/voice65/soldered/keymaps/default/keymap.c new file mode 100644 index 000000000..617b60dcf --- /dev/null +++ b/keyboards/owlab/voice65/soldered/keymaps/default/keymap.c | |||
| @@ -0,0 +1,36 @@ | |||
| 1 | /* Copyright 2021 kb-elmo<mail@elmo.space> | ||
| 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 QMK_KEYBOARD_H | ||
| 17 | |||
| 18 | // How long (in ms) to wait between animation steps for the snake mode | ||
| 19 | const uint8_t RGBLED_SNAKE_INTERVALS[] PROGMEM = {100, 35, 20}; | ||
| 20 | |||
| 21 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 22 | [0] = LAYOUT_65_ansi_blocker( | ||
| 23 | KC_ESC, 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_DEL, | ||
| 24 | 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_PGUP, | ||
| 25 | 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_PGDN, | ||
| 26 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, MO(1), | ||
| 27 | KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT | ||
| 28 | ), | ||
| 29 | [1] = LAYOUT_65_ansi_blocker( | ||
| 30 | KC_GRV, 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_TRNS, RESET, | ||
| 31 | KC_TRNS, RGB_TOG, RGB_MOD, RGB_RMOD,RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_HOME, | ||
| 32 | 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_END, | ||
| 33 | KC_TRNS, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_TRNS, KC_TRNS, KC_F22, KC_TRNS, | ||
| 34 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F23, KC_TRNS | ||
| 35 | ) | ||
| 36 | }; | ||
diff --git a/keyboards/owlab/voice65/soldered/keymaps/via/keymap.c b/keyboards/owlab/voice65/soldered/keymaps/via/keymap.c new file mode 100644 index 000000000..9b3715e11 --- /dev/null +++ b/keyboards/owlab/voice65/soldered/keymaps/via/keymap.c | |||
| @@ -0,0 +1,50 @@ | |||
| 1 | /* Copyright 2021 kb-elmo<mail@elmo.space> | ||
| 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 QMK_KEYBOARD_H | ||
| 17 | |||
| 18 | // How long (in ms) to wait between animation steps for the snake mode | ||
| 19 | const uint8_t RGBLED_SNAKE_INTERVALS[] PROGMEM = {100, 35, 20}; | ||
| 20 | |||
| 21 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 22 | [0] = LAYOUT_all( | ||
| 23 | KC_ESC, 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_BSPC, KC_DEL, | ||
| 24 | 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_PGUP, | ||
| 25 | 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_PGDN, | ||
| 26 | KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, MO(1), | ||
| 27 | KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT | ||
| 28 | ), | ||
| 29 | [1] = LAYOUT_all( | ||
| 30 | KC_GRV, 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_TRNS, KC_TRNS, RESET, | ||
| 31 | KC_TRNS, RGB_TOG, RGB_MOD, RGB_RMOD,RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_HOME, | ||
| 32 | 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_END, | ||
| 33 | KC_TRNS, KC_TRNS, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_TRNS, KC_TRNS, KC_F22, KC_TRNS, | ||
| 34 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F23, KC_TRNS | ||
| 35 | ), | ||
| 36 | [2] = LAYOUT_all( | ||
| 37 | 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, | ||
| 38 | 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, | ||
| 39 | 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, | ||
| 40 | 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, | ||
| 41 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | ||
| 42 | ), | ||
| 43 | [3] = LAYOUT_all( | ||
| 44 | 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, | ||
| 45 | 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, | ||
| 46 | 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, | ||
| 47 | 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, | ||
| 48 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | ||
| 49 | ) | ||
| 50 | }; | ||
diff --git a/keyboards/owlab/voice65/soldered/keymaps/via/rules.mk b/keyboards/owlab/voice65/soldered/keymaps/via/rules.mk new file mode 100644 index 000000000..36b7ba9cb --- /dev/null +++ b/keyboards/owlab/voice65/soldered/keymaps/via/rules.mk | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | VIA_ENABLE = yes | ||
| 2 | LTO_ENABLE = yes | ||
diff --git a/keyboards/owlab/voice65/soldered/mcuconf.h b/keyboards/owlab/voice65/soldered/mcuconf.h new file mode 100644 index 000000000..808ff7654 --- /dev/null +++ b/keyboards/owlab/voice65/soldered/mcuconf.h | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | /* Copyright 2021 kb-elmo<mail@elmo.space> | ||
| 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 | #pragma once | ||
| 18 | |||
| 19 | #include_next <mcuconf.h> | ||
| 20 | |||
| 21 | #undef STM32_I2C_USE_I2C1 | ||
| 22 | #define STM32_I2C_USE_I2C1 TRUE | ||
diff --git a/keyboards/owlab/voice65/soldered/readme.md b/keyboards/owlab/voice65/soldered/readme.md new file mode 100644 index 000000000..6299c905e --- /dev/null +++ b/keyboards/owlab/voice65/soldered/readme.md | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | # Voice65 - soldered PCB | ||
| 2 | |||
| 3 |  | ||
| 4 | |||
| 5 | A 65% with an LED strip and a scroll wheel | ||
| 6 | |||
| 7 | * Keyboard Maintainer: [kb-elmo](https://github.com/kb-elmo) | ||
| 8 | * Hardware Supported: Voice65 soldered PCB | ||
| 9 | * Hardware Availability: Ended groupbuy: https://www.popkeyboard.com/products/67968vn00mzx | ||
| 10 | |||
| 11 | Make example for this keyboard (after setting up your build environment): | ||
| 12 | |||
| 13 | make owlab/voice65/soldered:default | ||
| 14 | |||
| 15 | Flashing example for this keyboard: | ||
| 16 | |||
| 17 | make owlab/voice65/soldered:default:flash | ||
| 18 | |||
| 19 | **Bootloader:** Press the physical reset button on the bottom side of the PCB (labeled SW1) or hold down ESC while plugging in the board. | ||
| 20 | |||
| 21 | 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/owlab/voice65/soldered/rules.mk b/keyboards/owlab/voice65/soldered/rules.mk new file mode 100644 index 000000000..dba1a7a65 --- /dev/null +++ b/keyboards/owlab/voice65/soldered/rules.mk | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | # MCU name | ||
| 2 | MCU = STM32F303 | ||
| 3 | |||
| 4 | # Bootloader selection | ||
| 5 | BOOTLOADER = stm32-dfu | ||
| 6 | |||
| 7 | # Build Options | ||
| 8 | # change yes to no to disable | ||
| 9 | # | ||
| 10 | BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration | ||
| 11 | MOUSEKEY_ENABLE = yes # Mouse keys | ||
| 12 | EXTRAKEY_ENABLE = yes # Audio control and System control | ||
| 13 | CONSOLE_ENABLE = no # Console for debug | ||
| 14 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
| 15 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
| 16 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
| 17 | # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
| 18 | NKRO_ENABLE = no # USB Nkey Rollover | ||
| 19 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | ||
| 20 | RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow | ||
| 21 | BLUETOOTH_ENABLE = no # Enable Bluetooth | ||
| 22 | AUDIO_ENABLE = no # Audio output | ||
| 23 | ENCODER_ENABLE = yes # Rotary encoder | ||
| 24 | |||
| 25 | RGB_MATRIX_ENABLE = yes | ||
| 26 | RGB_MATRIX_DRIVER = IS31FL3741 | ||
| 27 | |||
| 28 | LAYOUTS = 65_ansi_blocker 65_ansi_blocker_split_bs 65_ansi_blocker_tsangan 65_iso_blocker 65_iso_blocker_split_bs | ||
diff --git a/keyboards/owlab/voice65/soldered/soldered.c b/keyboards/owlab/voice65/soldered/soldered.c new file mode 100644 index 000000000..06288eb0a --- /dev/null +++ b/keyboards/owlab/voice65/soldered/soldered.c | |||
| @@ -0,0 +1,455 @@ | |||
| 1 | /* Copyright 2021 kb-elmo<mail@elmo.space> | ||
| 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 "soldered.h" | ||
| 18 | |||
| 19 | #ifdef RGB_MATRIX_ENABLE | ||
| 20 | const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { | ||
| 21 | {0, CS3_SW1, CS2_SW1, CS1_SW1}, /* RGB0-ESC ROW0*/ | ||
| 22 | {0, CS6_SW1, CS5_SW1, CS4_SW1}, /* RGB1-1 */ | ||
| 23 | {0, CS9_SW1, CS8_SW1, CS7_SW1}, /* RGB2-2 */ | ||
| 24 | {0, CS12_SW1, CS11_SW1, CS10_SW1}, /* RGB3-3 */ | ||
| 25 | {0, CS15_SW1, CS14_SW1, CS13_SW1}, /* RGB4-4 */ | ||
| 26 | {0, CS18_SW1, CS17_SW1, CS16_SW1}, /* RGB5-5 */ | ||
| 27 | {0, CS21_SW1, CS20_SW1, CS19_SW1}, /* RGB6-6 */ | ||
| 28 | {0, CS24_SW1, CS23_SW1, CS22_SW1}, /* RGB7-7 */ | ||
| 29 | {0, CS27_SW1, CS26_SW1, CS25_SW1}, /* RGB8-8 */ | ||
| 30 | {0, CS30_SW1, CS29_SW1, CS28_SW1}, /* RGB9-9 */ | ||
| 31 | {0, CS33_SW1, CS32_SW1, CS31_SW1}, /* RGB10-0 */ | ||
| 32 | {0, CS36_SW1, CS35_SW1, CS34_SW1}, /* RGB11--- */ | ||
| 33 | {0, CS39_SW6, CS38_SW6, CS37_SW6}, /* RGB12-+= */ | ||
| 34 | {0, CS36_SW6, CS35_SW6, CS34_SW6}, /* RGB13-BS */ | ||
| 35 | {0, CS27_SW6, CS26_SW6, CS25_SW6}, /* RGB14-BACKSPACE SPLIT */ | ||
| 36 | {0, CS36_SW8, CS35_SW8, CS34_SW8}, /* RGB15-DEL */ | ||
| 37 | {0, CS3_SW2, CS2_SW2, CS1_SW2}, /* RGB16-TAB ----ROW1*/ | ||
| 38 | {0, CS6_SW2, CS5_SW2, CS4_SW2}, /* RGB17-Q */ | ||
| 39 | {0, CS9_SW2, CS8_SW2, CS7_SW2}, /* RGB18-W */ | ||
| 40 | {0, CS12_SW2, CS11_SW2, CS10_SW2}, /* RGB19-E */ | ||
| 41 | {0, CS15_SW2, CS14_SW2, CS13_SW2}, /* RGB20-R */ | ||
| 42 | {0, CS18_SW2, CS17_SW2, CS16_SW2}, /* RGB21-T */ | ||
| 43 | {0, CS21_SW2, CS20_SW2, CS19_SW2}, /* RGB22-Y */ | ||
| 44 | {0, CS24_SW2, CS23_SW2, CS22_SW2}, /* RGB23-U */ | ||
| 45 | {0, CS27_SW2, CS26_SW2, CS25_SW2}, /* RGB24-I */ | ||
| 46 | {0, CS30_SW2, CS29_SW2, CS28_SW2}, /* RGB25-O */ | ||
| 47 | {0, CS33_SW2, CS32_SW2, CS31_SW2}, /* RGB26-P */ | ||
| 48 | {0, CS36_SW2, CS35_SW2, CS34_SW2}, /* RGB27-[ */ | ||
| 49 | {0, CS39_SW7, CS38_SW7, CS37_SW7}, /* RGB28-] */ | ||
| 50 | {0, CS36_SW7, CS35_SW7, CS34_SW7}, /* RGB29-\ */ | ||
| 51 | {0, CS27_SW7, CS26_SW7, CS25_SW7}, /* RGB30-PGUP */ | ||
| 52 | {0, CS3_SW3, CS2_SW3, CS1_SW3}, /* RGB31-CAPS---ROW2*/ | ||
| 53 | {0, CS6_SW3, CS5_SW3, CS4_SW3}, /* RGB32-A-- */ | ||
| 54 | {0, CS9_SW3, CS8_SW3, CS7_SW3}, /* RGB33-S-- */ | ||
| 55 | {0, CS12_SW3, CS11_SW3, CS10_SW3}, /* RGB34-D-- */ | ||
| 56 | {0, CS15_SW3, CS14_SW3, CS13_SW3}, /* RGB35-F-- */ | ||
| 57 | {0, CS18_SW3, CS17_SW3, CS16_SW3}, /* RGB36-G-- */ | ||
| 58 | {0, CS21_SW3, CS20_SW3, CS19_SW3}, /* RGB37-H-- */ | ||
| 59 | {0, CS24_SW3, CS23_SW3, CS22_SW3}, /* RGB38-J-- */ | ||
| 60 | {0, CS27_SW3, CS26_SW3, CS25_SW3}, /* RGB39-K-- */ | ||
| 61 | {0, CS30_SW3, CS29_SW3, CS28_SW3}, /* RGB40-L-- */ | ||
| 62 | {0, CS33_SW3, CS32_SW3, CS31_SW3}, /* RGB41-;:- */ | ||
| 63 | {0, CS36_SW3, CS35_SW3, CS34_SW3}, /* RGB42-''- */ | ||
| 64 | {0, CS39_SW8, CS38_SW8, CS37_SW8}, /* RGB43-ENTER- */ | ||
| 65 | {0, CS27_SW8, CS26_SW8, CS25_SW8}, /* RGB44-PGDN */ | ||
| 66 | {0, CS3_SW4, CS2_SW4, CS1_SW4}, /* RGB45-LSF --ROW3*/ | ||
| 67 | {0, CS6_SW4, CS5_SW4, CS4_SW4}, /* RGB46-LSF split -*/ | ||
| 68 | {0, CS9_SW4, CS8_SW4, CS7_SW4}, /* RGB47-Z -*/ | ||
| 69 | {0, CS12_SW4, CS11_SW4, CS10_SW4}, /* RGB48-X -*/ | ||
| 70 | {0, CS15_SW4, CS14_SW4, CS13_SW4}, /* RGB49-C -*/ | ||
| 71 | {0, CS18_SW4, CS17_SW4, CS16_SW4}, /* RGB50-V -*/ | ||
| 72 | {0, CS21_SW4, CS20_SW4, CS19_SW4}, /* RGB51-B -*/ | ||
| 73 | {0, CS24_SW4, CS23_SW4, CS22_SW4}, /* RGB52-N -*/ | ||
| 74 | {0, CS27_SW4, CS26_SW4, CS25_SW4}, /* RGB53-M -*/ | ||
| 75 | {0, CS30_SW4, CS29_SW4, CS28_SW4}, /* RGB54-<, -*/ | ||
| 76 | {0, CS33_SW4, CS32_SW4, CS31_SW4}, /* RGB55->. -*/ | ||
| 77 | {0, CS36_SW4, CS35_SW4, CS34_SW4}, /* RGB56-?/ -*/ | ||
| 78 | {0, CS39_SW9, CS38_SW9, CS37_SW9}, /* RGB57-RSF -*/ | ||
| 79 | {0, CS36_SW9, CS35_SW9, CS34_SW9}, /* RGB58-UP -*/ | ||
| 80 | {0, CS27_SW9, CS26_SW9, CS25_SW9}, /* RGB59--MO-- */ | ||
| 81 | {0, CS3_SW5, CS2_SW5, CS1_SW5}, /* RGB60-lct-- row4*/ | ||
| 82 | {0, CS6_SW5, CS5_SW5, CS4_SW5}, /* RGB61-lwin- */ | ||
| 83 | {0, CS9_SW5, CS8_SW5, CS7_SW5}, /* RGB62-lalt- */ | ||
| 84 | {0, CS12_SW5, CS11_SW5, CS10_SW5}, /* RGB63-sp2.25- */ | ||
| 85 | {0, CS15_SW5, CS14_SW5, CS13_SW5}, /* RGB64-sp7U6.25U1.25U- */ | ||
| 86 | {0, CS21_SW5, CS20_SW5, CS19_SW5}, /* RGB65-sp2.75U- */ | ||
| 87 | {0, CS30_SW5, CS29_SW5, CS28_SW5}, /* RGB66-ralt- */ | ||
| 88 | {0, CS33_SW5, CS32_SW5, CS31_SW5}, /* RGB67-rctrl- */ | ||
| 89 | {0, CS36_SW5, CS35_SW5, CS34_SW5}, /* RGB68-left- */ | ||
| 90 | {0, CS39_SW5, CS38_SW5, CS37_SW5}, /* RGB69-dn- */ | ||
| 91 | {0, CS27_SW5, CS26_SW5, CS25_SW5}, /* RGB70-right- */ | ||
| 92 | }; | ||
| 93 | |||
| 94 | led_config_t g_led_config = { { | ||
| 95 | { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 }, | ||
| 96 | { 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30 }, | ||
| 97 | { 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 15, 44 }, | ||
| 98 | { 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59 }, | ||
| 99 | { 60, 61, 62, 63, 64, NO_LED, 65, NO_LED, NO_LED, 66, 67, 68, 69, NO_LED, 70 } | ||
| 100 | }, { | ||
| 101 | { 0, 0 }, { 15, 0 }, { 30, 0 }, { 45, 0 }, { 60, 0 }, { 75, 0 }, { 90, 0 }, { 105, 0 }, { 120, 0 }, { 135, 0 }, { 150, 0 }, { 165, 0}, { 180, 0}, { 195, 0 }, { 209, 0 }, { 224, 0 }, | ||
| 102 | { 2, 16 }, { 18, 16 }, { 34, 16 }, { 50, 16 }, { 66, 16 }, { 82, 16 }, { 98, 16 }, { 114, 16 }, { 130, 16 }, { 146, 16 }, { 162, 16 }, { 178, 16 }, { 194, 16 }, { 208, 16 }, { 224, 16 }, | ||
| 103 | { 2, 32 }, { 20, 32 }, { 36, 32 }, { 52, 32 }, { 68, 32 }, { 84, 32 }, { 100, 32 }, { 116, 32 }, { 132, 32 }, { 148, 32 }, { 164, 32 }, { 180, 32 }, { 202, 32 }, { 224, 32 }, | ||
| 104 | { 0, 48 }, { 16, 48 }, { 32, 48 }, { 48, 48 }, { 64, 48 }, { 80, 48 }, { 96, 48 }, { 112, 48 }, { 128, 48 }, { 144, 48 }, { 160, 48 }, { 176, 48 }, { 192, 48 }, { 208, 48 }, { 224, 48 }, | ||
| 105 | { 0, 64 }, { 20, 64 }, { 40, 64 }, { 60, 64 }, { 95, 64 }, { 132, 64 }, { 152, 64 }, { 172, 64 }, { 192, 64 }, { 208, 64 }, { 224, 64 } | ||
| 106 | }, { | ||
| 107 | 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, | ||
| 108 | 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, | ||
| 109 | 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, | ||
| 110 | 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, | ||
| 111 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 | ||
| 112 | } | ||
| 113 | }; | ||
| 114 | |||
| 115 | |||
| 116 | #endif | ||
| 117 | |||
| 118 | __attribute__ ((weak)) | ||
| 119 | void rgb_matrix_indicators_user(void) | ||
| 120 | { | ||
| 121 | if (host_keyboard_led_state().caps_lock) | ||
| 122 | { | ||
| 123 | rgb_matrix_set_color(31, 255, 255, 255); | ||
| 124 | } else { | ||
| 125 | rgb_matrix_set_color(31, 0, 0, 0); | ||
| 126 | } | ||
| 127 | } | ||
| 128 | |||
| 129 | enum encoder_modes{ | ||
| 130 | ENCODER_MODE_ONE = 0, | ||
| 131 | ENCODER_MODE_TWO, | ||
| 132 | ENCODER_MODE_THREE, | ||
| 133 | }; | ||
| 134 | |||
| 135 | keyboard_config_t keyboard_config; | ||
| 136 | rgblight_config_t rgblight_config; | ||
| 137 | |||
| 138 | uint8_t pre_hue, pre_sat, pre_val; | ||
| 139 | uint8_t previous_rgb_mode = 0; | ||
| 140 | uint8_t dir_hue, dir_sat; | ||
| 141 | |||
| 142 | bool encoder_in = false; | ||
| 143 | uint32_t encoder_timer; | ||
| 144 | |||
| 145 | bool encoder_ani_start= false; | ||
| 146 | uint32_t encoder_ani_timer = 0; | ||
| 147 | |||
| 148 | bool encoder_direction_start = false; | ||
| 149 | uint32_t encoder_direction_timer = 0; | ||
| 150 | |||
| 151 | |||
| 152 | bool lizm_restart_snake = false; | ||
| 153 | void rgblight_snake_restart(uint8_t hue, uint8_t sat, uint8_t val){ | ||
| 154 | lizm_restart_snake = true; // restart signal to local each effect | ||
| 155 | rgblight_config.hue = hue; | ||
| 156 | rgblight_config.sat = sat; | ||
| 157 | rgblight_config.val = val; | ||
| 158 | } | ||
| 159 | |||
| 160 | |||
| 161 | void keyboard_post_init_kb(void){ | ||
| 162 | keyboard_config.raw = eeconfig_read_kb(); | ||
| 163 | if( keyboard_config.encoder_mode_index > ENCODER_MODE_THREE ){ | ||
| 164 | keyboard_config.encoder_mode_index = ENCODER_MODE_ONE; | ||
| 165 | eeconfig_update_kb(keyboard_config.raw); | ||
| 166 | } | ||
| 167 | } | ||
| 168 | |||
| 169 | void switch_encoder_mode(uint8_t mode){ | ||
| 170 | switch(mode){ | ||
| 171 | case ENCODER_MODE_ONE: | ||
| 172 | dir_hue = 88; | ||
| 173 | dir_sat = 255; | ||
| 174 | break; | ||
| 175 | |||
| 176 | case ENCODER_MODE_TWO: | ||
| 177 | dir_hue = 0; | ||
| 178 | dir_sat = 240; | ||
| 179 | break; | ||
| 180 | |||
| 181 | case ENCODER_MODE_THREE: | ||
| 182 | dir_hue = 176; | ||
| 183 | dir_sat = 255; | ||
| 184 | break; | ||
| 185 | } | ||
| 186 | rgblight_sethsv_noeeprom(dir_hue,dir_sat,pre_val); | ||
| 187 | } | ||
| 188 | |||
| 189 | |||
| 190 | void init_encoder_mode(uint8_t mode){ | ||
| 191 | previous_rgb_mode = rgblight_get_mode(); | ||
| 192 | pre_hue = rgblight_get_hue(); | ||
| 193 | pre_sat = rgblight_get_sat(); | ||
| 194 | pre_val = rgblight_get_val(); | ||
| 195 | encoder_in = true; | ||
| 196 | |||
| 197 | rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); | ||
| 198 | |||
| 199 | switch_encoder_mode(mode); | ||
| 200 | } | ||
| 201 | |||
| 202 | |||
| 203 | void set_encoder_mode(uint8_t mode){ | ||
| 204 | if(encoder_in == false){ | ||
| 205 | init_encoder_mode(mode); | ||
| 206 | }else{ | ||
| 207 | switch_encoder_mode(mode); | ||
| 208 | } | ||
| 209 | eeconfig_update_kb(keyboard_config.raw); | ||
| 210 | encoder_timer = timer_read32(); | ||
| 211 | } | ||
| 212 | |||
| 213 | bool process_record_kb(uint16_t keycode, keyrecord_t *record) { | ||
| 214 | if (record->event.pressed) { | ||
| 215 | switch(keycode) { | ||
| 216 | case RGB_MOD: | ||
| 217 | case RGB_RMOD: | ||
| 218 | case RGB_HUI: | ||
| 219 | case RGB_HUD: | ||
| 220 | case RGB_SAI: | ||
| 221 | case RGB_SAD: | ||
| 222 | case RGB_VAI: | ||
| 223 | case RGB_VAD: | ||
| 224 | |||
| 225 | if(encoder_in){ | ||
| 226 | return false; | ||
| 227 | } | ||
| 228 | break; | ||
| 229 | |||
| 230 | case KC_F13: | ||
| 231 | rgb_matrix_toggle(); | ||
| 232 | break; | ||
| 233 | |||
| 234 | case KC_F14: | ||
| 235 | rgb_matrix_step(); | ||
| 236 | break; | ||
| 237 | |||
| 238 | case KC_F15: | ||
| 239 | rgb_matrix_step_reverse(); | ||
| 240 | break; | ||
| 241 | |||
| 242 | case KC_F16: | ||
| 243 | rgb_matrix_increase_hue(); //Increase the hue for effect range LEDs | ||
| 244 | break; | ||
| 245 | |||
| 246 | case KC_F17: | ||
| 247 | rgb_matrix_decrease_hue(); //Decrease the hue for effect range LEDs | ||
| 248 | break; | ||
| 249 | |||
| 250 | case KC_F18: | ||
| 251 | rgb_matrix_increase_sat(); //Increase the saturation for effect range LEDs | ||
| 252 | break; | ||
| 253 | |||
| 254 | case KC_F19: | ||
| 255 | rgb_matrix_decrease_sat(); //Decrease the saturation for effect range LEDs | ||
| 256 | break; | ||
| 257 | |||
| 258 | case KC_F20: | ||
| 259 | rgb_matrix_increase_val(); //Increase the value for effect range LEDs | ||
| 260 | break; | ||
| 261 | |||
| 262 | case KC_F21: | ||
| 263 | rgb_matrix_decrease_val();//Decrease the value for effect range LEDs | ||
| 264 | break; | ||
| 265 | |||
| 266 | case KC_F22: //change encoder mode upward | ||
| 267 | |||
| 268 | if(!encoder_direction_start){ | ||
| 269 | if(keyboard_config.encoder_mode_index < ENCODER_MODE_THREE){ | ||
| 270 | keyboard_config.encoder_mode_index++; | ||
| 271 | } | ||
| 272 | else{ | ||
| 273 | keyboard_config.encoder_mode_index = ENCODER_MODE_ONE; | ||
| 274 | } | ||
| 275 | set_encoder_mode(keyboard_config.encoder_mode_index); | ||
| 276 | } | ||
| 277 | return false; | ||
| 278 | |||
| 279 | case KC_F23: | ||
| 280 | if(!encoder_direction_start){ | ||
| 281 | if(keyboard_config.encoder_mode_index > ENCODER_MODE_ONE){ | ||
| 282 | keyboard_config.encoder_mode_index--; | ||
| 283 | } | ||
| 284 | else{ | ||
| 285 | keyboard_config.encoder_mode_index = ENCODER_MODE_THREE; | ||
| 286 | } | ||
| 287 | set_encoder_mode(keyboard_config.encoder_mode_index); | ||
| 288 | } | ||
| 289 | return false; | ||
| 290 | |||
| 291 | default: | ||
| 292 | break; | ||
| 293 | } | ||
| 294 | } | ||
| 295 | return process_record_user(keycode, record); | ||
| 296 | } | ||
| 297 | |||
| 298 | |||
| 299 | void matrix_scan_kb(void) { | ||
| 300 | if(encoder_in){ | ||
| 301 | if(timer_elapsed32(encoder_timer) > 5000){ | ||
| 302 | rgblight_mode(previous_rgb_mode); | ||
| 303 | rgblight_sethsv(pre_hue, pre_sat, pre_val); | ||
| 304 | encoder_in = false; | ||
| 305 | } | ||
| 306 | } | ||
| 307 | |||
| 308 | if(encoder_ani_start){ | ||
| 309 | if(timer_elapsed32(encoder_ani_timer) > VOLUME_ANIMATION_TIMER){ | ||
| 310 | encoder_ani_start = false; | ||
| 311 | rgblight_sethsv_noeeprom(0,0,0); | ||
| 312 | } | ||
| 313 | } | ||
| 314 | |||
| 315 | if(encoder_direction_start){ | ||
| 316 | if(timer_elapsed32(encoder_direction_timer) > (VOLUME_ANIMATION_TIMER+1500)){ | ||
| 317 | rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); | ||
| 318 | rgblight_sethsv_noeeprom(dir_hue, dir_sat, pre_val); | ||
| 319 | encoder_direction_start = false; | ||
| 320 | } | ||
| 321 | } | ||
| 322 | matrix_scan_user(); | ||
| 323 | } | ||
| 324 | |||
| 325 | |||
| 326 | void set_volume_animation(bool increase){ | ||
| 327 | if(!encoder_ani_start){ | ||
| 328 | rgblight_snake_restart(dir_hue, dir_sat, pre_val); | ||
| 329 | } | ||
| 330 | |||
| 331 | if(increase){ | ||
| 332 | rgblight_mode_noeeprom(17); | ||
| 333 | } else { | ||
| 334 | rgblight_mode_noeeprom(18); | ||
| 335 | } | ||
| 336 | |||
| 337 | encoder_ani_timer = timer_read32(); | ||
| 338 | encoder_direction_timer = encoder_ani_timer; | ||
| 339 | encoder_ani_start = true; | ||
| 340 | encoder_direction_start = true; | ||
| 341 | } | ||
| 342 | |||
| 343 | |||
| 344 | bool encoder_update_kb(uint8_t index, bool clockwise) { | ||
| 345 | uint8_t layer_now = keyboard_config.encoder_mode_index +1; | ||
| 346 | uint16_t encoder_cw_keycode = keymap_key_to_keycode(layer_now, (keypos_t){.row=2, .col=1 }); | ||
| 347 | uint16_t encoder_ccw_keycode = keymap_key_to_keycode(layer_now, (keypos_t){.row=2, .col=2 }); | ||
| 348 | if (index == 0) { /* First encoder */ | ||
| 349 | if(encoder_in == false){ | ||
| 350 | init_encoder_mode(keyboard_config.encoder_mode_index); | ||
| 351 | } | ||
| 352 | |||
| 353 | if (!clockwise) { | ||
| 354 | switch(encoder_cw_keycode) { | ||
| 355 | |||
| 356 | case KC_F13: | ||
| 357 | rgb_matrix_toggle(); | ||
| 358 | break; | ||
| 359 | |||
| 360 | case KC_F14: | ||
| 361 | rgb_matrix_step(); | ||
| 362 | break; | ||
| 363 | |||
| 364 | case KC_F15: | ||
| 365 | rgb_matrix_step_reverse(); | ||
| 366 | break; | ||
| 367 | |||
| 368 | case KC_F16: | ||
| 369 | rgb_matrix_increase_hue(); //Increase the hue for effect range LEDs | ||
| 370 | break; | ||
| 371 | |||
| 372 | case KC_F17: | ||
| 373 | rgb_matrix_decrease_hue(); //Decrease the hue for effect range LEDs | ||
| 374 | break; | ||
| 375 | |||
| 376 | case KC_F18: | ||
| 377 | rgb_matrix_increase_sat(); //Increase the saturation for effect range LEDs | ||
| 378 | break; | ||
| 379 | |||
| 380 | case KC_F19: | ||
| 381 | rgb_matrix_decrease_sat(); //Decrease the saturation for effect range LEDs | ||
| 382 | break; | ||
| 383 | |||
| 384 | case KC_F20: | ||
| 385 | rgb_matrix_increase_val(); //Increase the value for effect range LEDs | ||
| 386 | break; | ||
| 387 | |||
| 388 | case KC_F21: | ||
| 389 | rgb_matrix_decrease_val();//Decrease the value for effect range LEDs | ||
| 390 | break; | ||
| 391 | |||
| 392 | case KC_VOLU: | ||
| 393 | case KC_VOLD: | ||
| 394 | tap_code(encoder_cw_keycode); | ||
| 395 | break; | ||
| 396 | |||
| 397 | default: | ||
| 398 | tap_code(encoder_cw_keycode); | ||
| 399 | break; | ||
| 400 | } | ||
| 401 | set_volume_animation(true); | ||
| 402 | } else { | ||
| 403 | switch(encoder_ccw_keycode) { | ||
| 404 | |||
| 405 | case KC_F13: | ||
| 406 | rgb_matrix_toggle(); | ||
| 407 | break; | ||
| 408 | |||
| 409 | case KC_F14: | ||
| 410 | rgb_matrix_step(); | ||
| 411 | break; | ||
| 412 | |||
| 413 | case KC_F15: | ||
| 414 | rgb_matrix_step_reverse(); | ||
| 415 | break; | ||
| 416 | |||
| 417 | case KC_F16: | ||
| 418 | rgb_matrix_increase_hue(); //Increase the hue for effect range LEDs | ||
| 419 | break; | ||
| 420 | |||
| 421 | case KC_F17: | ||
| 422 | rgb_matrix_decrease_hue(); //Decrease the hue for effect range LEDs | ||
| 423 | break; | ||
| 424 | |||
| 425 | case KC_F18: | ||
| 426 | rgb_matrix_increase_sat(); //Increase the saturation for effect range LEDs | ||
| 427 | break; | ||
| 428 | |||
| 429 | case KC_F19: | ||
| 430 | rgb_matrix_decrease_sat(); //Decrease the saturation for effect range LEDs | ||
| 431 | break; | ||
| 432 | |||
| 433 | case KC_F20: | ||
| 434 | rgb_matrix_increase_val(); //Increase the value for effect range LEDs | ||
| 435 | break; | ||
| 436 | |||
| 437 | case KC_F21: | ||
| 438 | rgb_matrix_decrease_val();//Decrease the value for effect range LEDs | ||
| 439 | break; | ||
| 440 | |||
| 441 | case KC_VOLU: | ||
| 442 | case KC_VOLD: | ||
| 443 | tap_code(encoder_ccw_keycode); | ||
| 444 | break; | ||
| 445 | |||
| 446 | default: | ||
| 447 | tap_code(encoder_ccw_keycode); | ||
| 448 | break; | ||
| 449 | } | ||
| 450 | set_volume_animation(false); | ||
| 451 | } | ||
| 452 | encoder_timer = timer_read32(); | ||
| 453 | } | ||
| 454 | return true; | ||
| 455 | } | ||
diff --git a/keyboards/owlab/voice65/soldered/soldered.h b/keyboards/owlab/voice65/soldered/soldered.h new file mode 100644 index 000000000..0d5005600 --- /dev/null +++ b/keyboards/owlab/voice65/soldered/soldered.h | |||
| @@ -0,0 +1,116 @@ | |||
| 1 | /* Copyright 2021 kb-elmo<mail@elmo.space> | ||
| 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 | #pragma once | ||
| 18 | |||
| 19 | #include "quantum.h" | ||
| 20 | |||
| 21 | #define ____ KC_NO | ||
| 22 | |||
| 23 | #define LAYOUT_all( \ | ||
| 24 | K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K213, \ | ||
| 25 | K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ | ||
| 26 | K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, \ | ||
| 27 | K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, \ | ||
| 28 | K400, K401, K402, K403, K404, K406, K409, K410, K411, K412, K414 \ | ||
| 29 | ) { \ | ||
| 30 | { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ | ||
| 31 | { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \ | ||
| 32 | { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214 }, \ | ||
| 33 | { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314 }, \ | ||
| 34 | { K400, K401, K402, K403, K404, ____, K406, ____, ____, K409, K410, K411, K412, ____, K414 } \ | ||
| 35 | } | ||
| 36 | |||
| 37 | #define LAYOUT_65_ansi_blocker( \ | ||
| 38 | K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K213, \ | ||
| 39 | K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ | ||
| 40 | K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, \ | ||
| 41 | K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, \ | ||
| 42 | K400, K401, K402, K404, K409, K410, K411, K412, K414 \ | ||
| 43 | ) { \ | ||
| 44 | { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, ____ }, \ | ||
| 45 | { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \ | ||
| 46 | { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214 }, \ | ||
| 47 | { K300, ____, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314 }, \ | ||
| 48 | { K400, K401, K402, ____, K404, ____, ____, ____, ____, K409, K410, K411, K412, ____, K414 } \ | ||
| 49 | } | ||
| 50 | |||
| 51 | #define LAYOUT_65_ansi_blocker_split_bs( \ | ||
| 52 | K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K213, \ | ||
| 53 | K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ | ||
| 54 | K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, \ | ||
| 55 | K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, \ | ||
| 56 | K400, K401, K402, K404, K409, K410, K411, K412, K414 \ | ||
| 57 | ) { \ | ||
| 58 | { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ | ||
| 59 | { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \ | ||
| 60 | { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214 }, \ | ||
| 61 | { K300, ____, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314 }, \ | ||
| 62 | { K400, K401, K402, ____, K404, ____, ____, ____, ____, K409, K410, K411, K412, ____, K414 } \ | ||
| 63 | } | ||
| 64 | |||
| 65 | #define LAYOUT_65_ansi_blocker_tsangan( \ | ||
| 66 | K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K213, \ | ||
| 67 | K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ | ||
| 68 | K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, \ | ||
| 69 | K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, \ | ||
| 70 | K400, K401, K402, K404, K410, K411, K412, K414 \ | ||
| 71 | ) { \ | ||
| 72 | { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ | ||
| 73 | { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \ | ||
| 74 | { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214 }, \ | ||
| 75 | { K300, ____, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314 }, \ | ||
| 76 | { K400, K401, K402, ____, K404, ____, ____, ____, ____, ____, K410, K411, K412, ____, K414 } \ | ||
| 77 | } | ||
| 78 | |||
| 79 | #define LAYOUT_65_iso_blocker( \ | ||
| 80 | K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K213, \ | ||
| 81 | K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, \ | ||
| 82 | K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K113, K212, K214, \ | ||
| 83 | K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, \ | ||
| 84 | K400, K401, K402, K404, K409, K410, K411, K412, K414 \ | ||
| 85 | ) { \ | ||
| 86 | { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, ____ }, \ | ||
| 87 | { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \ | ||
| 88 | { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214 }, \ | ||
| 89 | { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314 }, \ | ||
| 90 | { K400, K401, K402, ____, K404, ____, ____, ____, ____, K409, K410, K411, K412, ____, K414 } \ | ||
| 91 | } | ||
| 92 | |||
| 93 | #define LAYOUT_65_iso_blocker_split_bs( \ | ||
| 94 | K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K213, \ | ||
| 95 | K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, \ | ||
| 96 | K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K113, K212, K214, \ | ||
| 97 | K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, \ | ||
| 98 | K400, K401, K402, K404, K409, K410, K411, K412, K414 \ | ||
| 99 | ) { \ | ||
| 100 | { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ | ||
| 101 | { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \ | ||
| 102 | { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214 }, \ | ||
| 103 | { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314 }, \ | ||
| 104 | { K400, K401, K402, ____, K404, ____, ____, ____, ____, K409, K410, K411, K412, ____, K414 } \ | ||
| 105 | } | ||
| 106 | |||
| 107 | typedef union { | ||
| 108 | uint32_t raw; | ||
| 109 | struct { | ||
| 110 | uint8_t encoder_mode_index :8; | ||
| 111 | }; | ||
| 112 | } keyboard_config_t; | ||
| 113 | |||
| 114 | extern keyboard_config_t keyboard_config; | ||
| 115 | |||
| 116 | #define VOLUME_ANIMATION_TIMER 580 | ||
diff --git a/keyboards/planck/keymaps/ajp10304/readme.md b/keyboards/planck/keymaps/ajp10304/readme.md index 6ea8f0061..97f0a0093 100644 --- a/keyboards/planck/keymaps/ajp10304/readme.md +++ b/keyboards/planck/keymaps/ajp10304/readme.md | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | # AJP10304 Custom Planck Layout | 1 | # AJP10304 Custom Planck Layout |
| 2 | # Also available for the Shark, JJ40 and Atreus50 | 2 | # Also available for the Shark, Quark, JJ40 and Atreus50 |
| 3 | 3 | ||
| 4 | **Note:** In the tables below where there are two characters on a key, | 4 | **Note:** In the tables below where there are two characters on a key, |
| 5 | the second is the output when shift is applied. | 5 | the second is the output when shift is applied. |
diff --git a/keyboards/quark/keymaps/ajp10304/keymap.c b/keyboards/quark/keymaps/ajp10304/keymap.c new file mode 100644 index 000000000..c55e99af7 --- /dev/null +++ b/keyboards/quark/keymaps/ajp10304/keymap.c | |||
| @@ -0,0 +1,201 @@ | |||
| 1 | /* Copyright 2021 Alan Pocklington | ||
| 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 "ajp10304.h" | ||
| 18 | #include "keymap_uk.h" | ||
| 19 | |||
| 20 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 21 | |||
| 22 | /* Qwerty | ||
| 23 | * ,-----------------------------------------------------------------------------------. | ||
| 24 | * | Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp | | ||
| 25 | * |------+------+------+------+------+-------------+------+------+------+------+------| | ||
| 26 | * | Tab | A | S | D | F | G | H | J | K | L | ;: | Enter| | ||
| 27 | * |------+------+------+------+------+------|------+------+------+------+------+------| | ||
| 28 | * | Shft | Z | X | C | V | B | N | M | ,< | .> | /? | Shft | | ||
| 29 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 30 | * | Fn | Ctrl | Alt | GUI |Lower | Bksp |Space |Raise | Shift| MENU | Ctrl | Fn2 | | ||
| 31 | * `-----------------------------------------------------------------------------------' | ||
| 32 | */ | ||
| 33 | [_QWERTY] = LAYOUT_ortho_4x12( | ||
| 34 | LT(_NUMPAD, KC_ESC), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC , | ||
| 35 | MT(MOD_LSFT, KC_TAB), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, MT(MOD_RSFT, KC_ENT) , | ||
| 36 | KC_LSHIFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSHIFT , | ||
| 37 | MO(_FUNC), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_BSPC, KC_SPC, RAISE, KC_LSHIFT, KC_BTN2, KC_RCTL, MO(_FUNC2) | ||
| 38 | ), | ||
| 39 | |||
| 40 | /* Function | ||
| 41 | * ,-----------------------------------------------------------------------------------. | ||
| 42 | * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | | ||
| 43 | * |------+------+------+------+------+-------------+------+------+------+------+------| | ||
| 44 | * | 1! | 2" | 3£ | 4$ | 5% | 6^ | 7& | 8* | 9( | 0) | ~ |INSERT| | ||
| 45 | * |------+------+------+------+------+------|------+------+------+------+------+------| | ||
| 46 | * | Shift| \| | `¬ | #~ | * | -_ | =+ | \| | [{ | ]} | '@ |Shift | | ||
| 47 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 48 | * | Fn | Ctrl | Alt | GUI |Lower | Bksp |Space |Mouse | MENU | Alt | Ctrl | Fn | | ||
| 49 | * `-----------------------------------------------------------------------------------' | ||
| 50 | */ | ||
| 51 | [_FUNC] = LAYOUT_ortho_4x12( | ||
| 52 | KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12 , | ||
| 53 | KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, UK_TILD, KC_INSERT , | ||
| 54 | KC_LSHIFT, KC_NONUS_BSLASH, KC_GRAVE, KC_NONUS_HASH, KC_PAST, KC_MINS, KC_EQL, KC_BSLASH, KC_LBRC, KC_RBRC, KC_QUOT, MT(MOD_RSFT, KC_ENT) , | ||
| 55 | _______, _______, _______, _______, _______, _______, _______, MO(_MOUSE), _______, _______, _______, _______ | ||
| 56 | ), | ||
| 57 | |||
| 58 | /* Lower | ||
| 59 | * ,-----------------------------------------------------------------------------------. | ||
| 60 | * | 1! | 2" | 3£ | 4$ | 5% | 6^ | 7& | 8* | 9( | 0) | DEL | Bksp | | ||
| 61 | * |------+------+------+------+------+-------------+------+------+------+------+------| | ||
| 62 | * | ! | " | £ | $ | % | ^ | & | * | ( | ) |WrdDel|WrdBks| | ||
| 63 | * |------+------+------+------+------+------|------+------+------+------+------+------| | ||
| 64 | * | Shift| \| | `¬ | #~ | '@ | -_ | =+ | #~ | [{ | ]} | '@ |Shift | | ||
| 65 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 66 | * | | | | |Lower | Del |Space | | Next | Vol- | Vol+ | Play | | ||
| 67 | * `-----------------------------------------------------------------------------------' | ||
| 68 | */ | ||
| 69 | [_LOWER] = LAYOUT_ortho_4x12( | ||
| 70 | KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, KC_BSPC , | ||
| 71 | LSFT(KC_1), LSFT(KC_2), LSFT(KC_3), LSFT(KC_4), LSFT(KC_5), LSFT(KC_6), LSFT(KC_7), LSFT(KC_8), LSFT(KC_9), LSFT(KC_0), LCTL(KC_DEL), LCTL(KC_BSPC) , | ||
| 72 | KC_LSPO, KC_NONUS_BSLASH, KC_GRAVE, KC_NONUS_HASH, KC_QUOT, KC_MINS, KC_EQL, KC_NONUS_HASH, KC_LBRC, KC_RBRC, KC_QUOT, MT(MOD_RSFT, KC_ENT) , | ||
| 73 | _______, _______, _______, _______, _______, KC_DEL, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY | ||
| 74 | ), | ||
| 75 | |||
| 76 | /* Raise | ||
| 77 | * ,-----------------------------------------------------------------------------------. | ||
| 78 | * | ` | |WRDSEL| [ | ] | | | PGUP | HOME |PGDOWN| |PRNTSC| | ||
| 79 | * |------+------+------+------+------+-------------+------+------+------+------+------| | ||
| 80 | * | ` | | | ( | ) | | | HOME | UP | END | |ZOOM +| | ||
| 81 | * |------+------+------+------+------+------|------+------+------+------+------+------| | ||
| 82 | * | | | | { | } | | |< | LEFT | DOWN |RIGHT | >| |ZOOM -| | ||
| 83 | * |------+------+------+------+------+------|------+------+------+------+------+------| | ||
| 84 | * | Mouse| | | | | Alt | Enter|Raise | | | | | | ||
| 85 | * `-----------------------------------------------------------------------------------' | ||
| 86 | */ | ||
| 87 | [_RAISE] = LAYOUT_ortho_4x12( | ||
| 88 | KC_GRV, XXXXXXX, M_WORD_SEL, KC_LBRC, KC_RBRC, XXXXXXX, XXXXXXX, KC_PGUP, KC_HOME, KC_PGDOWN, XXXXXXX, KC_PSCREEN , | ||
| 89 | KC_GRV, XXXXXXX, XXXXXXX, LSFT(KC_9), LSFT(KC_0), XXXXXXX, XXXXXXX, KC_HOME, KC_UP, KC_END, XXXXXXX, LCTL(LSFT(KC_EQL)) , | ||
| 90 | _______, XXXXXXX, XXXXXXX, LSFT(KC_LBRC), LSFT(KC_RBRC), XXXXXXX, LCTL(KC_LEFT), KC_LEFT, KC_DOWN, KC_RIGHT, LCTL(KC_RIGHT), LCTL(KC_MINS) , | ||
| 91 | MO(_MOUSE), _______, _______, _______, _______, KC_LALT, KC_ENT, _______, XXXXXXX, _______, _______, _______ | ||
| 92 | ), | ||
| 93 | |||
| 94 | /* Adjust (Lower + Raise) | ||
| 95 | * ,-----------------------------------------------------------------------------------. | ||
| 96 | * | ???? | Reset|Qwerty| | | REC1 | REC2 | | | | | Del | | ||
| 97 | * |------+------+------+------+------+-------------+------+------+------+------+------| | ||
| 98 | * | CAPS | | | | | PLAY1| PLAY2| Mute | Vol+ | Play | | | | ||
| 99 | * |------+------+------+------+------+------|------+------+------+------+------+------| | ||
| 100 | * | PC/MC| | | | | STOP | STOP | Prev | Vol- | Next | | | | ||
| 101 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 102 | * | | | | | | | | | | | | | ||
| 103 | * `-----------------------------------------------------------------------------------' | ||
| 104 | */ | ||
| 105 | [_ADJUST] = LAYOUT_ortho_4x12( | ||
| 106 | M_CUSTOM, RESET, QWERTY, BL_ON, BL_OFF, DYN_REC_START1, DYN_REC_START2, _______, _______, _______, _______, KC_DEL , | ||
| 107 | KC_CAPS, RGB_TOG, RGB_MOD, RGB_VAD, RGB_VAI, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, KC_AUDIO_MUTE, KC_AUDIO_VOL_UP, KC_MEDIA_PLAY_PAUSE, _______, _______ , | ||
| 108 | TG(_MAC), RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, DYN_REC_STOP, DYN_REC_STOP, KC_MEDIA_PREV_TRACK, KC_AUDIO_VOL_DOWN, KC_MEDIA_NEXT_TRACK, _______, _______ , | ||
| 109 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | ||
| 110 | ), | ||
| 111 | |||
| 112 | /* Mouse | ||
| 113 | * ,-----------------------------------------------------------------------------------. | ||
| 114 | * | ESC | | | | | | | | BTN3 | | | | | ||
| 115 | * |------+------+------+------+------+-------------+------+------+------+------+------| | ||
| 116 | * | ACC0 | ACC1 | ACC2 | | | | | BTN1 | UP | BTN2 | | | | ||
| 117 | * |------+------+------+------+------+------|------+------+------+------+------+------| | ||
| 118 | * | ACC0 | ACC1 | ACC2 | | | | | LEFT | DOWN |RIGHT | | | | ||
| 119 | * |------+------+------+------+------+------|------+------+------+------+------+------| | ||
| 120 | * | | | | | | | | | | | | | | ||
| 121 | * `-----------------------------------------------------------------------------------' | ||
| 122 | */ | ||
| 123 | [_MOUSE] = LAYOUT_ortho_4x12( | ||
| 124 | KC_ESC , _______, _______, _______, _______, _______, _______, _______, KC_MS_BTN3, _______, _______, _______, | ||
| 125 | KC_MS_ACCEL0, KC_MS_ACCEL1, KC_MS_ACCEL2, _______, _______, _______, _______, KC_MS_BTN1, KC_MS_UP, KC_MS_BTN2, _______, _______, | ||
| 126 | KC_MS_ACCEL0, KC_MS_ACCEL1, KC_MS_ACCEL2, _______, _______, _______, _______, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, _______, _______, | ||
| 127 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | ||
| 128 | ), | ||
| 129 | |||
| 130 | /* Num Pad | ||
| 131 | * ,-----------------------------------------------------------------------------------. | ||
| 132 | * | ESC | | | | | |NMLOCK| 7 | 8 | 9 | / | | | ||
| 133 | * |------+------+------+------+------+-------------+------+------+------+------+------| | ||
| 134 | * | | | | | | | | 4 | 5 | 6 | * | | | ||
| 135 | * |------+------+------+------+------+------|------+------+------+------+------+------| | ||
| 136 | * | | | | | | | | 1 | 2 | 3 | + | | | ||
| 137 | * |------+------+------+------+------+------|------+------+------+------+------+------| | ||
| 138 | * | | | | | | | | 0 | . | , | - | | | ||
| 139 | * `-----------------------------------------------------------------------------------' | ||
| 140 | */ | ||
| 141 | [_NUMPAD] = LAYOUT_ortho_4x12( | ||
| 142 | _______, _______, _______, _______, _______, _______, KC_NLCK, KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_SLASH, _______, | ||
| 143 | _______, _______, _______, _______, _______, _______, _______, KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_ASTERISK, _______, | ||
| 144 | _______, _______, _______, _______, _______, _______, _______, KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_PLUS, _______, | ||
| 145 | _______, _______, _______, _______, _______, _______, _______, KC_KP_0, KC_KP_DOT, KC_COMM, KC_KP_MINUS, _______ | ||
| 146 | ), | ||
| 147 | |||
| 148 | /* Function 2 (Right hand side) | ||
| 149 | * ,-----------------------------------------------------------------------------------. | ||
| 150 | * | | |WRDSEL| | | | LNDEL| | | | | | | ||
| 151 | * |------+------+------+------+------+-------------+------+------+------+------+------| | ||
| 152 | * | | | LNSEL| DUP | | | | |LNJOIN| | | | | ||
| 153 | * |------+------+------+------+------+------|------+------+------+------+------+------| | ||
| 154 | * | | UNDO | CUT | COPY | PASTE| | | | | | | MODE | | ||
| 155 | * |------+------+------+------+------+------|------+------+------+------+------+------| | ||
| 156 | * | | | | | | | | | | | | | | ||
| 157 | * `-----------------------------------------------------------------------------------' | ||
| 158 | */ | ||
| 159 | [_FUNC2] = LAYOUT_ortho_4x12( | ||
| 160 | _______, _______, M_WORD_SEL, _______, _______, _______, M_LINE_DEL, _______, _______, _______, _______, _______, | ||
| 161 | _______, _______, M_LINE_SEL, M_DUP, _______, _______, _______, M_JOIN, _______, _______, _______, _______, | ||
| 162 | _______, LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), _______, _______, _______, _______, _______, _______, M_MODE, | ||
| 163 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | ||
| 164 | ), | ||
| 165 | |||
| 166 | [_MAC]= LAYOUT_ortho_4x12( | ||
| 167 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 168 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 169 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 170 | MFNC, _______, _______, _______, MLWR, _______, _______, MRSE, _______, _______, _______, MFNC2 | ||
| 171 | ), | ||
| 172 | |||
| 173 | [_MLWR] = LAYOUT_ortho_4x12( | ||
| 174 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 175 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 176 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 177 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | ||
| 178 | ), | ||
| 179 | |||
| 180 | [_MRSE] = LAYOUT_ortho_4x12( | ||
| 181 | _______, _______, M_WORD_SEL_MAC, _______, _______, _______, _______, _______, _______, _______, _______, _______ , | ||
| 182 | _______, _______, _______, _______, _______, _______, _______, LCTL(KC_A), _______, LCTL(KC_E), _______, LGUI(KC_EQL) , | ||
| 183 | _______, _______, _______, _______, _______, _______, LALT(KC_LEFT), _______, _______, _______, LALT(KC_RIGHT), LGUI(KC_MINS) , | ||
| 184 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | ||
| 185 | ), | ||
| 186 | |||
| 187 | [_MFNC]= LAYOUT_ortho_4x12( | ||
| 188 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ , | ||
| 189 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, LGUI(KC_PENT) , | ||
| 190 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ , | ||
| 191 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | ||
| 192 | ), | ||
| 193 | |||
| 194 | [_MFNC2] = LAYOUT_ortho_4x12( | ||
| 195 | _______, _______, M_WORD_SEL_MAC, _______, _______, _______, M_LINE_DEL_MAC, _______, _______, _______, _______, _______, | ||
| 196 | _______, _______, M_LINE_SEL_MAC, M_DUP_MAC, _______, _______, _______, M_JOIN_MAC, _______, _______, _______, _______, | ||
| 197 | _______, LGUI(KC_Z), LGUI(KC_X), LGUI(KC_C), LGUI(KC_V), _______, _______, _______, _______, _______, _______, M_MODE_MAC, | ||
| 198 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | ||
| 199 | ) | ||
| 200 | |||
| 201 | }; | ||
diff --git a/keyboards/quark/keymaps/ajp10304/readme.md b/keyboards/quark/keymaps/ajp10304/readme.md new file mode 100644 index 000000000..12090ccd4 --- /dev/null +++ b/keyboards/quark/keymaps/ajp10304/readme.md | |||
| @@ -0,0 +1,118 @@ | |||
| 1 | # AJP10304 Custom Quark Layout | ||
| 2 | # Also available for the Planck, JJ40 and Atreus50 | ||
| 3 | |||
| 4 | **Note:** In the tables below where there are two characters on a key, | ||
| 5 | the second is the output when shift is applied. | ||
| 6 | |||
| 7 | **Note:** The below tables assume a UK layout. | ||
| 8 | |||
| 9 | #### Flashing | ||
| 10 | |||
| 11 | `make quark:ajp10304:flash` | ||
| 12 | |||
| 13 | ##### Main Qwerty Layer | ||
| 14 | |||
| 15 | * Tab: when held, operates as shift. | ||
| 16 | * Enter: when held, operates as shift. | ||
| 17 | * MENU: perform right-click | ||
| 18 | |||
| 19 | | | | | | | | | | | | | | | ||
| 20 | | ---- |:----:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| ----:| | ||
| 21 | | Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp | | ||
| 22 | | Tab | A | S | D | F | G | H | J | K | L | ;: | Enter| | ||
| 23 | | Shft | Z | X | C | V | B | N | M | ,< | .> | /? | Shft | | ||
| 24 | | Fn | Ctrl | Alt | GUI |Lower | Bksp |Space |Raise | Shift| MENU | Ctrl | Fn2 | | ||
| 25 | |||
| 26 | ##### Function Layer | ||
| 27 | Activated when `fn` held in the above `qwerty` layer. | ||
| 28 | |||
| 29 | | | | | | | | | | | | | | | ||
| 30 | | :---: |:----:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| | ||
| 31 | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | | ||
| 32 | | 1! | 2" | 3£ | 4$ | 5% | 6^ | 7& | 8* | 9( | 0) | ~ |INSERT| | ||
| 33 | | Shift | \| | `¬ | #~ | * | -_ | =+ | \| | [{ | ]} | '@ |Shift | | ||
| 34 | | Fn | Ctrl | Alt | GUI |Lower | Bksp |Space |Mouse | MENU | Alt | Ctrl | Fn2 | | ||
| 35 | |||
| 36 | ##### Lower Layer | ||
| 37 | Activated when `Lower` is held in the above `qwerty` layer. | ||
| 38 | |||
| 39 | * Numbers are along the top row, their shifted counterparts are on row 2. | ||
| 40 | * WrdBks: `backspace` with `ctrl` applied. I.e. delete a word. | ||
| 41 | * WrdDel: `delete` with `ctrl` applied. I.e. forward delete a word. | ||
| 42 | |||
| 43 | | | | | | | | | | | | | | | ||
| 44 | | :---: |:----:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| | ||
| 45 | | 1! | 2" | 3£ | 4$ | 5% | 6^ | 7& | 8* | 9( | 0) | DEL | Bksp | | ||
| 46 | | ! | " | £ | $ | % | ^ | & | * | ( | ) |WrdDel|WrdBks| | ||
| 47 | | Shift | \| | `¬ | #~ | '@ | -_ | =+ | #~ | [{ | ]} | '@ |Shift | | ||
| 48 | | | | | |Lower | Del |Space | | Next | Vol- | Vol+ | Play | | ||
| 49 | |||
| 50 | ##### Raise Layer | ||
| 51 | Activated when `Raise` is held in the above `qwerty` layer. | ||
| 52 | |||
| 53 | * Preferred layer for typing brackets. | ||
| 54 | * Allows for cursor navigation to be used solely with the right hand. | ||
| 55 | * WRDSEL: Select the word where the cursor is. | ||
| 56 | * |< and >|: Apply `ctrl` to `left` and `right` respectively for word jumping. | ||
| 57 | |||
| 58 | | | | | | | | | | | | | | | ||
| 59 | | :---: |:----:| :---:| :---:| :---:| :---:| :---: | :---:| :---:| :---:| :---: | :---:| | ||
| 60 | | ` | |WRDSEL| [ | ] | | | PGUP | HOME |PGDOWN| |PRNTSC| | ||
| 61 | | ` | | | ( | ) | | | HOME | UP | END | |ZOOM +| | ||
| 62 | | | | | { | } | ||<| LEFT | DOWN |RIGHT |>||ZOOM -| | ||
| 63 | | Mouse | | | | | Alt | Enter |Raise | | | | | | ||
| 64 | |||
| 65 | ##### Lower + Raise | ||
| 66 | Activated when `Lower` and `Raise` are held together in the above `qwerty` layer. | ||
| 67 | |||
| 68 | * Audio controls in the same position as cursor keys from the `Raise` layer. | ||
| 69 | * ????: Runs a macro for outputting a text string. Do not use this store passwords. | ||
| 70 | * Reset: Enter bootloader for flashing firmware to the keyboard. | ||
| 71 | * CAPS: Toggle caps lock. | ||
| 72 | * Macro functions: Allows recording of macros. To start recording the macro, press either REC1 or REC2. | ||
| 73 | To finish the recording, press STOP. To replay the macro, press either PLAY1 or PLAY2. | ||
| 74 | * MAC: Toggle MAC OS extensions to layers. This allows MLWR to be enabled with LOWER, | ||
| 75 | MRSE with RAISE, MFNC with FUNC and MFNC2 with FUNC2 respectively. | ||
| 76 | |||
| 77 | | | | | | | | | | | | | | | ||
| 78 | | :---: |:----:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| | ||
| 79 | | ???? | Reset|Qwerty| | | REC1 | REC2 | | | | | Del | | ||
| 80 | | CAPS | | | | | PLAY1|PLAY2 | Mute | Vol+ | Play | | | | ||
| 81 | | MAC | | | | | STOP1|STOP2 | Prev | Vol- | Next | | | | ||
| 82 | | | | | | | | | | DYN | | | | | ||
| 83 | |||
| 84 | ##### Function 2 Layer | ||
| 85 | Activated when `fn` held in the above `qwerty` layer. | ||
| 86 | * WRDSEL: Select the word where the cursor is. | ||
| 87 | * LNDEL: Delete the line where the cursor is. | ||
| 88 | * LNSEL: Select the line where the cursor is. | ||
| 89 | * DUP: Duplicate the selected text. | ||
| 90 | * LNJOIN: Join the line where the cursor is with the following line. | ||
| 91 | * MODE: Print either `PC` or `OSX` depending on what layer mode is active. | ||
| 92 | |||
| 93 | | | | | | | | | | | | | | | ||
| 94 | | :---: | :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| | ||
| 95 | | | |WRDSEL| | | | LNDEL| | | | | | | ||
| 96 | | | | LNSEL| DUP | | | | |LNJOIN| | | | | ||
| 97 | | | UNDO | CUT | COPY | PASTE| | | | | | | MODE | | ||
| 98 | | | | | | | | | | | | | | | ||
| 99 | |||
| 100 | ##### Mouse Layer | ||
| 101 | Activated when `fn` and `raise` held together. | ||
| 102 | |||
| 103 | | | | | | | | | | | | | | | ||
| 104 | | :---: | :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| | ||
| 105 | | ESC | | | | | | | | BTN3 | | | | | ||
| 106 | | ACC0 | ACC1 | ACC2 | | | | | BTN1 | UP | BTN2 | | | | ||
| 107 | | ACC0 | ACC1 | ACC2 | | | | | LEFT | DOWN | RIGHT| | | | ||
| 108 | | | | | | | | | | | | | | | ||
| 109 | |||
| 110 | ##### Number Pad Layout | ||
| 111 | Activated when holding `Esc` key. | ||
| 112 | |||
| 113 | | | | | | | | | | | | | | | ||
| 114 | | :---: | :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| | ||
| 115 | | | | | | | |NMLOCK| 7 | 8 | 9 | / | | | ||
| 116 | | | | | | | | | 4 | 5 | 6 | * | | | ||
| 117 | | | | | | | | | 1 | 2 | 3 | + | | | ||
| 118 | | | | | | | | | 0 | . | , | - | | | ||
diff --git a/keyboards/quark/keymaps/ajp10304/rules.mk b/keyboards/quark/keymaps/ajp10304/rules.mk new file mode 100644 index 000000000..6c605daec --- /dev/null +++ b/keyboards/quark/keymaps/ajp10304/rules.mk | |||
| @@ -0,0 +1 @@ | |||
| MOUSEKEY_ENABLE = yes | |||
diff --git a/keyboards/space_space/readme.md b/keyboards/space_space/readme.md index c0d254faa..08fa640f2 100644 --- a/keyboards/space_space/readme.md +++ b/keyboards/space_space/readme.md | |||
| @@ -1,18 +1,18 @@ | |||
| 1 | # space_space | 1 | # space_space |
| 2 | 2 | ||
| 3 |  | 3 |  |
| 4 | 4 | ||
| 5 | Give your space some space | 5 | Give your space some space |
| 6 | 6 | ||
| 7 | * Keyboard Maintainer: https://github.com/qpockets | 7 | * Keyboard Maintainer: https://github.com/qpockets |
| 8 | * Hardware Availability: | 8 | * Hardware Availability: [p3dstore](https://p3dstore.com/products/space-space-acrylic-case?_pos=21&_sid=c75de6a78&_ss=r&variant=39907740844216) |
| 9 | 9 | ||
| 10 | Make example for this keyboard (after setting up your build environment): | 10 | Make example for this keyboard (after setting up your build environment): |
| 11 | 11 | ||
| 12 | make space_space:default | 12 | make space_space/rev2:default |
| 13 | 13 | ||
| 14 | Flashing example for this keyboard: | 14 | Flashing example for this keyboard: |
| 15 | 15 | ||
| 16 | make space_space:default:flash | 16 | make space_space/rev2:default:flash |
| 17 | 17 | ||
| 18 | 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). | 18 | 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/space_space/config.h b/keyboards/space_space/rev1/config.h index 20b1180d3..d52aad4c2 100644 --- a/keyboards/space_space/config.h +++ b/keyboards/space_space/rev1/config.h | |||
| @@ -13,7 +13,7 @@ | |||
| 13 | * You should have received a copy of the GNU General Public License | 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/>. | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 15 | */ | 15 | */ |
| 16 | 16 | ||
| 17 | #pragma once | 17 | #pragma once |
| 18 | 18 | ||
| 19 | #include "config_common.h" | 19 | #include "config_common.h" |
| @@ -28,9 +28,11 @@ | |||
| 28 | /* key matrix size */ | 28 | /* key matrix size */ |
| 29 | #define MATRIX_ROWS 4 | 29 | #define MATRIX_ROWS 4 |
| 30 | #define MATRIX_COLS 11 | 30 | #define MATRIX_COLS 11 |
| 31 | 31 | ||
| 32 | #define MATRIX_ROW_PINS { F1, F4, F5, C7 } | 32 | #define MATRIX_ROW_PINS \ |
| 33 | #define MATRIX_COL_PINS { D4, B4, B5, B6, C6, F7, F6, F0, B0, E6, B1 } | 33 | { F1, F4, F5, C7 } |
| 34 | #define MATRIX_COL_PINS \ | ||
| 35 | { D4, B4, B5, B6, C6, F7, F6, F0, B0, E6, B1 } | ||
| 34 | 36 | ||
| 35 | #define UNUSED_PINS | 37 | #define UNUSED_PINS |
| 36 | 38 | ||
| @@ -38,13 +40,15 @@ | |||
| 38 | #define DIODE_DIRECTION COL2ROW | 40 | #define DIODE_DIRECTION COL2ROW |
| 39 | 41 | ||
| 40 | /* ROTARY ENCODERS */ | 42 | /* ROTARY ENCODERS */ |
| 41 | #define ENCODERS_PAD_A { B3, D6 } | 43 | #define ENCODERS_PAD_A \ |
| 42 | #define ENCODERS_PAD_B { B2, D7 } | 44 | { B3, D6 } |
| 45 | #define ENCODERS_PAD_B \ | ||
| 46 | { B2, D7 } | ||
| 43 | 47 | ||
| 44 | #define ENCODER_RESOLUTIONS { 3, 4 } | 48 | #define ENCODER_RESOLUTIONS \ |
| 49 | { 3, 4 } | ||
| 45 | //#define ENCODER_DIRECTION_FLIP | 50 | //#define ENCODER_DIRECTION_FLIP |
| 46 | 51 | ||
| 47 | |||
| 48 | #define DEBOUNCE 7 | 52 | #define DEBOUNCE 7 |
| 49 | 53 | ||
| 50 | #define LOCKING_SUPPORT_ENABLE | 54 | #define LOCKING_SUPPORT_ENABLE |
diff --git a/keyboards/space_space/info.json b/keyboards/space_space/rev1/info.json index b0dcdc859..b0dcdc859 100644 --- a/keyboards/space_space/info.json +++ b/keyboards/space_space/rev1/info.json | |||
diff --git a/keyboards/space_space/keymaps/big_space/config.h b/keyboards/space_space/rev1/keymaps/big_space/config.h index ffc2124e1..ffc2124e1 100644 --- a/keyboards/space_space/keymaps/big_space/config.h +++ b/keyboards/space_space/rev1/keymaps/big_space/config.h | |||
diff --git a/keyboards/space_space/keymaps/big_space/keymap.c b/keyboards/space_space/rev1/keymaps/big_space/keymap.c index f99925971..62241532e 100644 --- a/keyboards/space_space/keymaps/big_space/keymap.c +++ b/keyboards/space_space/rev1/keymaps/big_space/keymap.c | |||
| @@ -13,7 +13,6 @@ | |||
| 13 | * You should have received a copy of the GNU General Public License | 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/>. | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 15 | */ | 15 | */ |
| 16 | |||
| 17 | #include QMK_KEYBOARD_H | 16 | #include QMK_KEYBOARD_H |
| 18 | 17 | ||
| 19 | enum layers{ | 18 | enum layers{ |
| @@ -94,7 +93,6 @@ bool encoder_update_user(uint8_t index, bool clockwise) { | |||
| 94 | } | 93 | } |
| 95 | } else if (index == 0) { /* right encoder */ | 94 | } else if (index == 0) { /* right encoder */ |
| 96 | switch(get_highest_layer(layer_state)){ | 95 | switch(get_highest_layer(layer_state)){ |
| 97 | |||
| 98 | case _SYM: | 96 | case _SYM: |
| 99 | if (clockwise) { | 97 | if (clockwise) { |
| 100 | tap_code(KC_MPRV); | 98 | tap_code(KC_MPRV); |
diff --git a/keyboards/space_space/keymaps/big_space/rules.mk b/keyboards/space_space/rev1/keymaps/big_space/rules.mk index ff681299e..ff681299e 100644 --- a/keyboards/space_space/keymaps/big_space/rules.mk +++ b/keyboards/space_space/rev1/keymaps/big_space/rules.mk | |||
diff --git a/keyboards/space_space/keymaps/default/config.h b/keyboards/space_space/rev1/keymaps/default/config.h index ffc2124e1..ffc2124e1 100644 --- a/keyboards/space_space/keymaps/default/config.h +++ b/keyboards/space_space/rev1/keymaps/default/config.h | |||
diff --git a/keyboards/space_space/keymaps/default/keymap.c b/keyboards/space_space/rev1/keymaps/default/keymap.c index 3de82fa92..6b4219b28 100644 --- a/keyboards/space_space/keymaps/default/keymap.c +++ b/keyboards/space_space/rev1/keymaps/default/keymap.c | |||
| @@ -13,7 +13,6 @@ | |||
| 13 | * You should have received a copy of the GNU General Public License | 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/>. | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 15 | */ | 15 | */ |
| 16 | |||
| 17 | #include QMK_KEYBOARD_H | 16 | #include QMK_KEYBOARD_H |
| 18 | 17 | ||
| 19 | enum layers{ | 18 | enum layers{ |
| @@ -96,7 +95,6 @@ bool encoder_update_user(uint8_t index, bool clockwise) { | |||
| 96 | } | 95 | } |
| 97 | } else if (index == 0) { /* right encoder */ | 96 | } else if (index == 0) { /* right encoder */ |
| 98 | switch(get_highest_layer(layer_state)){ | 97 | switch(get_highest_layer(layer_state)){ |
| 99 | |||
| 100 | case _SYM: | 98 | case _SYM: |
| 101 | if (clockwise) { | 99 | if (clockwise) { |
| 102 | tap_code(KC_MPRV); | 100 | tap_code(KC_MPRV); |
diff --git a/keyboards/space_space/keymaps/default/rules.mk b/keyboards/space_space/rev1/keymaps/default/rules.mk index ff681299e..ff681299e 100644 --- a/keyboards/space_space/keymaps/default/rules.mk +++ b/keyboards/space_space/rev1/keymaps/default/rules.mk | |||
diff --git a/keyboards/space_space/keymaps/readme.md b/keyboards/space_space/rev1/keymaps/readme.md index 79e944c71..79e944c71 100644 --- a/keyboards/space_space/keymaps/readme.md +++ b/keyboards/space_space/rev1/keymaps/readme.md | |||
diff --git a/keyboards/space_space/rev1/readme.md b/keyboards/space_space/rev1/readme.md new file mode 100644 index 000000000..4b170612e --- /dev/null +++ b/keyboards/space_space/rev1/readme.md | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | # space_space | ||
| 2 | |||
| 3 |  | ||
| 4 | |||
| 5 | Give your space some space | ||
| 6 | |||
| 7 | * Keyboard Maintainer: https://github.com/qpockets | ||
| 8 | * Hardware Availability: limited | ||
| 9 | |||
| 10 | Make example for this keyboard (after setting up your build environment): | ||
| 11 | |||
| 12 | make space_space/rev1:default | ||
| 13 | |||
| 14 | Flashing example for this keyboard: | ||
| 15 | |||
| 16 | make space_space/rev1:default:flash | ||
| 17 | |||
| 18 | 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/space_space/rev1/rules.mk b/keyboards/space_space/rev1/rules.mk new file mode 100644 index 000000000..96823dca6 --- /dev/null +++ b/keyboards/space_space/rev1/rules.mk | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | # MCU name | ||
| 2 | MCU = atmega32u4 | ||
| 3 | |||
| 4 | # Bootloader selection | ||
| 5 | BOOTLOADER = atmel-dfu | ||
| 6 | |||
| 7 | # Build Options | ||
| 8 | # change yes to no to disable | ||
| 9 | # | ||
| 10 | BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite | ||
| 11 | MOUSEKEY_ENABLE = yes # Mouse keys | ||
| 12 | EXTRAKEY_ENABLE = yes # Audio control and System control | ||
| 13 | CONSOLE_ENABLE = no # Console for debug | ||
| 14 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
| 15 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
| 16 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
| 17 | # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
| 18 | NKRO_ENABLE = yes # USB Nkey Rollover | ||
| 19 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | ||
| 20 | RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow | ||
| 21 | BLUETOOTH_ENABLE = no # Enable Bluetooth | ||
| 22 | AUDIO_ENABLE = no # Audio output | ||
| 23 | ENCODER_ENABLE = yes | ||
diff --git a/keyboards/space_space/space_space.c b/keyboards/space_space/rev1/space_space.c index 5fb853a01..5fb853a01 100644 --- a/keyboards/space_space/space_space.c +++ b/keyboards/space_space/rev1/space_space.c | |||
diff --git a/keyboards/space_space/rev1/space_space.h b/keyboards/space_space/rev1/space_space.h new file mode 100644 index 000000000..e56068ec4 --- /dev/null +++ b/keyboards/space_space/rev1/space_space.h | |||
| @@ -0,0 +1,45 @@ | |||
| 1 | /* Copyright 2020 qpockets | ||
| 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 | #pragma once | ||
| 18 | |||
| 19 | #include "quantum.h" | ||
| 20 | |||
| 21 | #define XXX KC_NO | ||
| 22 | |||
| 23 | #define LAYOUT_default( \ | ||
| 24 | K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K50, \ | ||
| 25 | K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K51, \ | ||
| 26 | K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K52, \ | ||
| 27 | K32, K33, K34, K36, K37, K38 \ | ||
| 28 | ) { \ | ||
| 29 | {K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K50}, \ | ||
| 30 | {K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K51}, \ | ||
| 31 | {K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K52}, \ | ||
| 32 | {XXX, XXX, K32, K33, K34, XXX, K36, K37, K38, XXX, XXX} \ | ||
| 33 | } | ||
| 34 | |||
| 35 | #define LAYOUT_big_space( \ | ||
| 36 | K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K50, \ | ||
| 37 | K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K51, \ | ||
| 38 | K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K52, \ | ||
| 39 | K32, K35, K38 \ | ||
| 40 | ) { \ | ||
| 41 | {K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K50}, \ | ||
| 42 | {K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K51}, \ | ||
| 43 | {K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K52}, \ | ||
| 44 | {XXX, XXX, K32, XXX, XXX, K35, XXX, XXX, K38, XXX, XXX} \ | ||
| 45 | } | ||
diff --git a/keyboards/space_space/rev2/config.h b/keyboards/space_space/rev2/config.h new file mode 100644 index 000000000..66f8f6add --- /dev/null +++ b/keyboards/space_space/rev2/config.h | |||
| @@ -0,0 +1,59 @@ | |||
| 1 | /* Copyright 2021 qpockets | ||
| 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 | #pragma once | ||
| 18 | |||
| 19 | #include "config_common.h" | ||
| 20 | |||
| 21 | /* USB Device descriptor parameter */ | ||
| 22 | #define VENDOR_ID 0x7170 | ||
| 23 | #define PRODUCT_ID 0x7373 | ||
| 24 | #define DEVICE_VER 0x3002 | ||
| 25 | #define MANUFACTURER qpockets | ||
| 26 | #define PRODUCT space_space | ||
| 27 | |||
| 28 | /* key matrix size */ | ||
| 29 | #define MATRIX_ROWS 4 | ||
| 30 | #define MATRIX_COLS 11 | ||
| 31 | |||
| 32 | #define MATRIX_ROW_PINS \ | ||
| 33 | { B1, B0, D5, B6 } | ||
| 34 | #define MATRIX_COL_PINS \ | ||
| 35 | { C6, F6, F1, F4, F5, E6, D6, B2, B5, D3, D2 } | ||
| 36 | |||
| 37 | #define UNUSED_PINS | ||
| 38 | |||
| 39 | /* COL2ROW, ROW2COL*/ | ||
| 40 | #define DIODE_DIRECTION COL2ROW | ||
| 41 | |||
| 42 | /* ROTARY ENCODERS */ | ||
| 43 | #define ENCODERS_PAD_A \ | ||
| 44 | { D7, F7 } | ||
| 45 | #define ENCODERS_PAD_B \ | ||
| 46 | { B4, C7 } | ||
| 47 | |||
| 48 | #define ENCODER_RESOLUTION 3 | ||
| 49 | #define ENCODER_DIRECTION_FLIP | ||
| 50 | |||
| 51 | #define DEBOUNCE 5 | ||
| 52 | |||
| 53 | #define LOCKING_SUPPORT_ENABLE | ||
| 54 | |||
| 55 | #define RGB_DI_PIN F0 | ||
| 56 | #define RGBLED_NUM 4 | ||
| 57 | |||
| 58 | #define DRIVER_LED_TOTAL RGBLED_NUM | ||
| 59 | #define RGBLIGHT_DEFAULT_HUE 130 | ||
diff --git a/keyboards/space_space/rev2/info.json b/keyboards/space_space/rev2/info.json new file mode 100644 index 000000000..b0dcdc859 --- /dev/null +++ b/keyboards/space_space/rev2/info.json | |||
| @@ -0,0 +1,92 @@ | |||
| 1 | { | ||
| 2 | "keyboard_name": "space_space", | ||
| 3 | "url": "", | ||
| 4 | "maintainer": "qpockets", | ||
| 5 | "width": 11.5, | ||
| 6 | "height": 4.35, | ||
| 7 | "layouts": { | ||
| 8 | "LAYOUT_default": { | ||
| 9 | "layout": [ | ||
| 10 | {"label":"Q", "x":0, "y":0}, | ||
| 11 | {"label":"W", "x":1, "y":0}, | ||
| 12 | {"label":"E", "x":2, "y":0}, | ||
| 13 | {"label":"R", "x":3, "y":0}, | ||
| 14 | {"label":"T", "x":4, "y":0}, | ||
| 15 | {"label":"Delete", "x":5, "y":0, "w":1.5}, | ||
| 16 | {"label":"Y", "x":6.5, "y":0}, | ||
| 17 | {"label":"U", "x":7.5, "y":0}, | ||
| 18 | {"label":"I", "x":8.5, "y":0}, | ||
| 19 | {"label":"O", "x":9.5, "y":0}, | ||
| 20 | {"label":"P", "x":10.5, "y":0}, | ||
| 21 | {"label":"A", "x":0, "y":1}, | ||
| 22 | {"label":"S", "x":1, "y":1}, | ||
| 23 | {"label":"D", "x":2, "y":1}, | ||
| 24 | {"label":"F", "x":3, "y":1}, | ||
| 25 | {"label":"G", "x":4, "y":1}, | ||
| 26 | {"label":"Tab", "x":5, "y":1, "w":1.5}, | ||
| 27 | {"label":"H", "x":6.5, "y":1}, | ||
| 28 | {"label":"J", "x":7.5, "y":1}, | ||
| 29 | {"label":"K", "x":8.5, "y":1}, | ||
| 30 | {"label":"L", "x":9.5, "y":1}, | ||
| 31 | {"label":"\"", "x":10.5, "y":1}, | ||
| 32 | {"label":"Z", "x":0, "y":2}, | ||
| 33 | {"label":"X", "x":1, "y":2}, | ||
| 34 | {"label":"C", "x":2, "y":2}, | ||
| 35 | {"label":"V", "x":3, "y":2}, | ||
| 36 | {"label":"B", "x":4, "y":2}, | ||
| 37 | {"label":"Shift", "x":5, "y":2, "w":1.5}, | ||
| 38 | {"label":"N", "x":6.5, "y":2}, | ||
| 39 | {"label":"M", "x":7.5, "y":2}, | ||
| 40 | {"label":"<", "x":8.5, "y":2}, | ||
| 41 | {"label":">", "x":9.5, "y":2}, | ||
| 42 | {"label":"?", "x":10.5, "y":2}, | ||
| 43 | {"label":"Ctrl", "x":1.25, "y":3.35, "w":1.25}, | ||
| 44 | {"label":"Fn", "x":2.5, "y":3.35}, | ||
| 45 | {"label":"Backspace", "x":3.5, "y":3.35, "w":2}, | ||
| 46 | {"label":"Space", "x":5.5, "y":3.35, "w":2.25}, | ||
| 47 | {"label":"Gui", "x":7.75, "y":3.35}, | ||
| 48 | {"label":"Alt", "x":8.75, "y":3.35, "w":1.25} | ||
| 49 | ] | ||
| 50 | }, | ||
| 51 | "LAYOUT_big_space": { | ||
| 52 | "layout": [ | ||
| 53 | {"label":"Q", "x":0, "y":0}, | ||
| 54 | {"label":"W", "x":1, "y":0}, | ||
| 55 | {"label":"E", "x":2, "y":0}, | ||
| 56 | {"label":"R", "x":3, "y":0}, | ||
| 57 | {"label":"T", "x":4, "y":0}, | ||
| 58 | {"label":"Delete", "x":5, "y":0, "w":1.5}, | ||
| 59 | {"label":"Y", "x":6.5, "y":0}, | ||
| 60 | {"label":"U", "x":7.5, "y":0}, | ||
| 61 | {"label":"I", "x":8.5, "y":0}, | ||
| 62 | {"label":"O", "x":9.5, "y":0}, | ||
| 63 | {"label":"P", "x":10.5, "y":0}, | ||
| 64 | {"label":"A", "x":0, "y":1}, | ||
| 65 | {"label":"S", "x":1, "y":1}, | ||
| 66 | {"label":"D", "x":2, "y":1}, | ||
| 67 | {"label":"F", "x":3, "y":1}, | ||
| 68 | {"label":"G", "x":4, "y":1}, | ||
| 69 | {"label":"Tab", "x":5, "y":1, "w":1.5}, | ||
| 70 | {"label":"H", "x":6.5, "y":1}, | ||
| 71 | {"label":"J", "x":7.5, "y":1}, | ||
| 72 | {"label":"K", "x":8.5, "y":1}, | ||
| 73 | {"label":"L", "x":9.5, "y":1}, | ||
| 74 | {"label":"\"", "x":10.5, "y":1}, | ||
| 75 | {"label":"Z", "x":0, "y":2}, | ||
| 76 | {"label":"X", "x":1, "y":2}, | ||
| 77 | {"label":"C", "x":2, "y":2}, | ||
| 78 | {"label":"V", "x":3, "y":2}, | ||
| 79 | {"label":"B", "x":4, "y":2}, | ||
| 80 | {"label":"Shift", "x":5, "y":2, "w":1.5}, | ||
| 81 | {"label":"N", "x":6.5, "y":2}, | ||
| 82 | {"label":"M", "x":7.5, "y":2}, | ||
| 83 | {"label":"<", "x":8.5, "y":2}, | ||
| 84 | {"label":">", "x":9.5, "y":2}, | ||
| 85 | {"label":"?", "x":10.5, "y":2}, | ||
| 86 | {"label":"Ctrl", "x":1.25, "y":3.35, "w":1.25}, | ||
| 87 | {"label":"Space", "x":2.5, "y":3.35, "w":6.25}, | ||
| 88 | {"label":"Alt", "x":8.75, "y":3.35, "w":1.25} | ||
| 89 | ] | ||
| 90 | } | ||
| 91 | } | ||
| 92 | } | ||
diff --git a/keyboards/space_space/rev2/keymaps/big_space/config.h b/keyboards/space_space/rev2/keymaps/big_space/config.h new file mode 100644 index 000000000..ffc2124e1 --- /dev/null +++ b/keyboards/space_space/rev2/keymaps/big_space/config.h | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | /* Copyright 2021 qpockets | ||
| 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 | #pragma once | ||
| 18 | |||
| 19 | /*Modtaps*/ | ||
| 20 | #define TAPPING_TERM 175 | ||
| 21 | #define IGNORE_MOD_TAP_INTERRUPT | ||
| 22 | |||
| 23 | /*Combos*/ | ||
| 24 | #ifdef COMBO_ENABLE | ||
| 25 | # define COMBO_COUNT 5 | ||
| 26 | # define COMBO_TERM 50 | ||
| 27 | #endif \ No newline at end of file | ||
diff --git a/keyboards/space_space/rev2/keymaps/big_space/keymap.c b/keyboards/space_space/rev2/keymaps/big_space/keymap.c new file mode 100644 index 000000000..a272c001b --- /dev/null +++ b/keyboards/space_space/rev2/keymaps/big_space/keymap.c | |||
| @@ -0,0 +1,81 @@ | |||
| 1 | /* Copyright 2020 qpockets | ||
| 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 | enum layers{ | ||
| 20 | _BASE, | ||
| 21 | _SYM, | ||
| 22 | _NUM, | ||
| 23 | _NAV | ||
| 24 | }; | ||
| 25 | |||
| 26 | enum combo_events { | ||
| 27 | COMBO_BSPC, | ||
| 28 | COMBO_ENT, | ||
| 29 | COMBO_TAB, | ||
| 30 | COMBO_ESC, | ||
| 31 | COMBO_DEL | ||
| 32 | }; | ||
| 33 | #define KC_UP_SPC LT(_SYM, KC_SPC) | ||
| 34 | #define KC_GZ LGUI_T(KC_Z) | ||
| 35 | #define KC_AA LALT_T(KC_A) | ||
| 36 | #define KC_CC LCTL_T(KC_C) | ||
| 37 | #define KC_SF LSFT_T(KC_F) | ||
| 38 | #define KC_SJ RSFT_T(KC_J) | ||
| 39 | #define KC_CCOMM RCTL_T(KC_COMM) | ||
| 40 | #define KC_AQUOT RALT_T(KC_QUOT) | ||
| 41 | #define KC_GSLSH RGUI_T(KC_SLSH) | ||
| 42 | |||
| 43 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 44 | [_BASE] = LAYOUT_big_space( | ||
| 45 | KC_Q, KC_W, KC_E, KC_R, KC_T, KC_DEL, KC_Y, KC_U, KC_I, KC_O, KC_P, | ||
| 46 | KC_AA, KC_S, KC_D, KC_SF, KC_G, KC_BSPC, KC_H, KC_SJ, KC_K, KC_L, KC_AQUOT, | ||
| 47 | KC_GZ, KC_X, KC_CC, KC_V, KC_B, KC_LSFT, KC_N, KC_M, KC_CCOMM, KC_DOT, KC_GSLSH, | ||
| 48 | MO(_NAV), KC_UP_SPC, KC_RALT | ||
| 49 | ), | ||
| 50 | |||
| 51 | [_SYM] = LAYOUT_big_space( | ||
| 52 | KC_1, KC_2, KC_3, KC_4, KC_5, KC_TRNS, KC_6, KC_7, KC_8, KC_9, KC_0, | ||
| 53 | KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_TRNS, KC_CIRC, KC_AMPR, KC_ASTR, KC_EQUAL, KC_MINS, | ||
| 54 | KC_PIPE, KC_BSLS, KC_LPRN, KC_LBRC, KC_SCLN, KC_TRNS, KC_COLN, KC_RBRC, KC_RPRN, KC_PLUS, KC_UNDS, | ||
| 55 | KC_TRNS, KC_TRNS, KC_TRNS | ||
| 56 | ), | ||
| 57 | |||
| 58 | [_NAV] = LAYOUT_big_space( | ||
| 59 | KC_HOME, KC_UP, KC_END, KC_PGUP, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSPC, | ||
| 60 | KC_LEFT, KC_DOWN, KC_RIGHT, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TAB, | ||
| 61 | KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_ENT, | ||
| 62 | KC_TRNS, KC_TRNS, KC_TRNS | ||
| 63 | ), | ||
| 64 | }; | ||
| 65 | |||
| 66 | |||
| 67 | #ifdef COMBO_ENABLE | ||
| 68 | const uint16_t PROGMEM combo_bspc[] = {KC_O, KC_P, COMBO_END}; | ||
| 69 | const uint16_t PROGMEM combo_ent[] = {KC_K, KC_L, COMBO_END}; | ||
| 70 | const uint16_t PROGMEM combo_tab[] = {KC_S, KC_D, COMBO_END}; | ||
| 71 | const uint16_t PROGMEM combo_esc[] = {KC_T, KC_Y, COMBO_END}; | ||
| 72 | const uint16_t PROGMEM combo_del[] = {KC_Q, KC_W, COMBO_END}; | ||
| 73 | |||
| 74 | combo_t key_combos[COMBO_COUNT] = { | ||
| 75 | [COMBO_BSPC] = COMBO(combo_bspc,KC_BSPC), | ||
| 76 | [COMBO_ENT] = COMBO(combo_ent,KC_ENT), | ||
| 77 | [COMBO_TAB] = COMBO(combo_tab,KC_TAB), | ||
| 78 | [COMBO_ESC] = COMBO(combo_esc,KC_ESC), | ||
| 79 | [COMBO_DEL] = COMBO(combo_del,KC_DEL) | ||
| 80 | }; | ||
| 81 | #endif | ||
diff --git a/keyboards/space_space/rev2/keymaps/big_space/rules.mk b/keyboards/space_space/rev2/keymaps/big_space/rules.mk new file mode 100644 index 000000000..ff681299e --- /dev/null +++ b/keyboards/space_space/rev2/keymaps/big_space/rules.mk | |||
| @@ -0,0 +1 @@ | |||
| COMBO_ENABLE = yes \ No newline at end of file | |||
diff --git a/keyboards/space_space/rev2/keymaps/default/config.h b/keyboards/space_space/rev2/keymaps/default/config.h new file mode 100644 index 000000000..0b0e89fa1 --- /dev/null +++ b/keyboards/space_space/rev2/keymaps/default/config.h | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | /* Copyright 2021 qpockets | ||
| 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 | #pragma once | ||
| 18 | |||
| 19 | /*Modtaps*/ | ||
| 20 | #define TAPPING_TERM 165 | ||
| 21 | #define IGNORE_MOD_TAP_INTERRUPT | ||
| 22 | |||
| 23 | /*Combos*/ | ||
| 24 | #ifdef COMBO_ENABLE | ||
| 25 | # define COMBO_COUNT 5 | ||
| 26 | # define COMBO_TERM 50 | ||
| 27 | #endif \ No newline at end of file | ||
diff --git a/keyboards/space_space/rev2/keymaps/default/keymap.c b/keyboards/space_space/rev2/keymaps/default/keymap.c new file mode 100644 index 000000000..64f34c829 --- /dev/null +++ b/keyboards/space_space/rev2/keymaps/default/keymap.c | |||
| @@ -0,0 +1,77 @@ | |||
| 1 | /* Copyright 2021 qpockets | ||
| 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 | enum layers{ | ||
| 20 | _BASE, | ||
| 21 | _SYM, | ||
| 22 | _NAV | ||
| 23 | }; | ||
| 24 | |||
| 25 | enum combo_events { | ||
| 26 | COMBO_BSPC, | ||
| 27 | COMBO_ENT, | ||
| 28 | COMBO_TAB, | ||
| 29 | COMBO_ESC, | ||
| 30 | COMBO_DEL | ||
| 31 | }; | ||
| 32 | #define KC_DN_BSPC LT(_NAV, KC_BSPC) | ||
| 33 | #define KC_UP_SPC LT(_SYM, KC_SPC) | ||
| 34 | #define KC_SF LSFT_T(KC_F) | ||
| 35 | #define KC_SJ RSFT_T(KC_J) | ||
| 36 | |||
| 37 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 38 | [_BASE] = LAYOUT_default( | ||
| 39 | KC_Q, KC_W, KC_E, KC_R, KC_T, KC_DEL, KC_Y, KC_U, KC_I, KC_O, KC_P, | ||
| 40 | KC_A, KC_S, KC_D, KC_SF, KC_G, KC_TAB, KC_H, KC_SJ, KC_K, KC_L, KC_QUOT, | ||
| 41 | KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LSFT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, | ||
| 42 | KC_LGUI, KC_LCTL, KC_DN_BSPC, KC_UP_SPC, KC_RALT, KC_MPLY | ||
| 43 | ), | ||
| 44 | |||
| 45 | [_SYM] = LAYOUT_default( | ||
| 46 | KC_1, KC_2, KC_3, KC_4, KC_5, KC_TRNS, KC_6, KC_7, KC_8, KC_9, KC_0, | ||
| 47 | KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_TRNS, KC_CIRC, KC_AMPR, KC_ASTR, KC_EQUAL, KC_MINS, | ||
| 48 | KC_PIPE, KC_BSLS, KC_LPRN, KC_LBRC, KC_SCLN, KC_TRNS, KC_COLN, KC_RBRC, KC_RPRN, KC_PLUS, KC_UNDS, | ||
| 49 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | ||
| 50 | ), | ||
| 51 | |||
| 52 | [_NAV] = LAYOUT_default( | ||
| 53 | KC_TRNS, KC_HOME, KC_UP, KC_END, KC_PGUP, RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_BSPC, | ||
| 54 | KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_PGDN, KC_TRNS, KC_F4, KC_F5, KC_F6, KC_F7, KC_TAB, | ||
| 55 | KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_LCAP, KC_F9, KC_F10, KC_F11, KC_F12, KC_ENT, | ||
| 56 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | ||
| 57 | ), | ||
| 58 | }; | ||
| 59 | |||
| 60 | |||
| 61 | |||
| 62 | |||
| 63 | #ifdef COMBO_ENABLE | ||
| 64 | const uint16_t PROGMEM combo_bspc[] = {KC_O, KC_P, COMBO_END}; | ||
| 65 | const uint16_t PROGMEM combo_ent[] = {KC_K, KC_L, COMBO_END}; | ||
| 66 | const uint16_t PROGMEM combo_tab[] = {KC_S, KC_D, COMBO_END}; | ||
| 67 | const uint16_t PROGMEM combo_esc[] = {KC_T, KC_Y, COMBO_END}; | ||
| 68 | const uint16_t PROGMEM combo_del[] = {KC_Q, KC_W, COMBO_END}; | ||
| 69 | |||
| 70 | combo_t key_combos[COMBO_COUNT] = { | ||
| 71 | [COMBO_BSPC] = COMBO(combo_bspc,KC_BSPC), | ||
| 72 | [COMBO_ENT] = COMBO(combo_ent,KC_ENT), | ||
| 73 | [COMBO_TAB] = COMBO(combo_tab,KC_TAB), | ||
| 74 | [COMBO_ESC] = COMBO(combo_esc,KC_ESC), | ||
| 75 | [COMBO_DEL] = COMBO(combo_del,KC_DEL) | ||
| 76 | }; | ||
| 77 | #endif | ||
diff --git a/keyboards/space_space/rev2/keymaps/default/rules.mk b/keyboards/space_space/rev2/keymaps/default/rules.mk new file mode 100644 index 000000000..ab1e43818 --- /dev/null +++ b/keyboards/space_space/rev2/keymaps/default/rules.mk | |||
| @@ -0,0 +1 @@ | |||
| COMBO_ENABLE = yes | |||
diff --git a/keyboards/space_space/rev2/keymaps/qpockets/config.h b/keyboards/space_space/rev2/keymaps/qpockets/config.h new file mode 100644 index 000000000..bf8c47eb3 --- /dev/null +++ b/keyboards/space_space/rev2/keymaps/qpockets/config.h | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | /* Copyright 2021 qpockets | ||
| 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 | #pragma once | ||
| 18 | |||
| 19 | /*Modtaps*/ | ||
| 20 | #define TAPPING_TERM 145 | ||
| 21 | #define IGNORE_MOD_TAP_INTERRUPT | ||
| 22 | |||
| 23 | /*Combos*/ | ||
| 24 | #ifdef COMBO_ENABLE | ||
| 25 | # define COMBO_COUNT 5 | ||
| 26 | # define COMBO_TERM 25 | ||
| 27 | #endif | ||
diff --git a/keyboards/space_space/rev2/keymaps/qpockets/keymap.c b/keyboards/space_space/rev2/keymaps/qpockets/keymap.c new file mode 100644 index 000000000..986e43595 --- /dev/null +++ b/keyboards/space_space/rev2/keymaps/qpockets/keymap.c | |||
| @@ -0,0 +1,75 @@ | |||
| 1 | /* Copyright 2021 qpockets | ||
| 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 | enum layers{ | ||
| 20 | _BASE, | ||
| 21 | _SYM, | ||
| 22 | _NAV | ||
| 23 | }; | ||
| 24 | |||
| 25 | enum combo_events { | ||
| 26 | COMBO_BSPC, | ||
| 27 | COMBO_ENT, | ||
| 28 | COMBO_TAB, | ||
| 29 | COMBO_ESC, | ||
| 30 | COMBO_DEL | ||
| 31 | }; | ||
| 32 | #define KC_DN_BSPC LT(_NAV, KC_BSPC) | ||
| 33 | #define KC_UP_SPC LT(_SYM, KC_SPC) | ||
| 34 | #define KC_SF LSFT_T(KC_F) | ||
| 35 | #define KC_SJ RSFT_T(KC_J) | ||
| 36 | |||
| 37 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 38 | [_BASE] = LAYOUT_default( | ||
| 39 | KC_Q, KC_W, KC_E, KC_R, KC_T, KC_DEL, KC_Y, KC_U, KC_I, KC_O, KC_P, | ||
| 40 | KC_A, KC_S, KC_D, KC_SF, KC_G, KC_LGUI, KC_H, KC_SJ, KC_K, KC_L, KC_QUOT, | ||
| 41 | KC_Z, KC_X, KC_C, KC_V, KC_B, KC_ENT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, | ||
| 42 | KC_PSCR, KC_LCTL, KC_DN_BSPC, KC_UP_SPC, KC_RALT, KC_MPLY | ||
| 43 | ), | ||
| 44 | |||
| 45 | [_SYM] = LAYOUT_default( | ||
| 46 | KC_1, KC_2, KC_3, KC_4, KC_5, KC_TRNS, KC_6, KC_7, KC_8, KC_9, KC_0, | ||
| 47 | KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_TRNS, KC_CIRC, KC_AMPR, KC_ASTR, KC_EQUAL, KC_MINS, | ||
| 48 | KC_PIPE, KC_BSLS, KC_LPRN, KC_LBRC, KC_SCLN, KC_TRNS, KC_COLN, KC_RBRC, KC_RPRN, KC_PLUS, KC_UNDS, | ||
| 49 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | ||
| 50 | ), | ||
| 51 | |||
| 52 | [_NAV] = LAYOUT_default( | ||
| 53 | KC_TRNS, KC_HOME, KC_UP, KC_END, KC_PGUP, RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_BSPC, | ||
| 54 | KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_PGDN, KC_TRNS, KC_F5, KC_F6, KC_F7, KC_F8, KC_TAB, | ||
| 55 | KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_CAPS, KC_F9, KC_F10, KC_F11, KC_F12, KC_ENT, | ||
| 56 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | ||
| 57 | ), | ||
| 58 | }; | ||
| 59 | |||
| 60 | |||
| 61 | #ifdef COMBO_ENABLE | ||
| 62 | const uint16_t PROGMEM combo_bspc[] = {KC_O, KC_P, COMBO_END}; | ||
| 63 | const uint16_t PROGMEM combo_ent[] = {KC_K, KC_L, COMBO_END}; | ||
| 64 | const uint16_t PROGMEM combo_tab[] = {KC_S, KC_D, COMBO_END}; | ||
| 65 | const uint16_t PROGMEM combo_esc[] = {KC_T, KC_Y, COMBO_END}; | ||
| 66 | const uint16_t PROGMEM combo_del[] = {KC_Q, KC_W, COMBO_END}; | ||
| 67 | |||
| 68 | combo_t key_combos[COMBO_COUNT] = { | ||
| 69 | [COMBO_BSPC] = COMBO(combo_bspc,KC_BSPC), | ||
| 70 | [COMBO_ENT] = COMBO(combo_ent,KC_ENT), | ||
| 71 | [COMBO_TAB] = COMBO(combo_tab,KC_TAB), | ||
| 72 | [COMBO_ESC] = COMBO(combo_esc,KC_ESC), | ||
| 73 | [COMBO_DEL] = COMBO(combo_del,KC_DEL) | ||
| 74 | }; | ||
| 75 | #endif | ||
diff --git a/keyboards/space_space/rev2/keymaps/qpockets/rules.mk b/keyboards/space_space/rev2/keymaps/qpockets/rules.mk new file mode 100644 index 000000000..ff681299e --- /dev/null +++ b/keyboards/space_space/rev2/keymaps/qpockets/rules.mk | |||
| @@ -0,0 +1 @@ | |||
| COMBO_ENABLE = yes \ No newline at end of file | |||
diff --git a/keyboards/space_space/rev2/readme.md b/keyboards/space_space/rev2/readme.md new file mode 100644 index 000000000..d8391a21a --- /dev/null +++ b/keyboards/space_space/rev2/readme.md | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | # space_space | ||
| 2 | |||
| 3 |  | ||
| 4 | |||
| 5 | Give your space some space | ||
| 6 | |||
| 7 | * Keyboard Maintainer: https://github.com/qpockets | ||
| 8 | * Hardware Availability: https://p3dstore.com/products/space-space-acrylic-case?_pos=21&_sid=c75de6a78&_ss=r&variant=39907740844216 | ||
| 9 | |||
| 10 | Make example for this keyboard (after setting up your build environment): | ||
| 11 | |||
| 12 | make space_space/rev2:default | ||
| 13 | |||
| 14 | Flashing example for this keyboard: | ||
| 15 | |||
| 16 | make space_space/rev2:default:flash | ||
| 17 | |||
| 18 | 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/space_space/rev2/rev2.c b/keyboards/space_space/rev2/rev2.c new file mode 100644 index 000000000..07b93b36a --- /dev/null +++ b/keyboards/space_space/rev2/rev2.c | |||
| @@ -0,0 +1,35 @@ | |||
| 1 | |||
| 2 | /* Copyright 2021 qpockets | ||
| 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 | #include "rev2.h" | ||
| 18 | |||
| 19 | bool encoder_update_kb(uint8_t index, bool clockwise) { | ||
| 20 | if (!encoder_update_user(index, clockwise)) { return false; } | ||
| 21 | if (index == 1) { /* left encoder*/ | ||
| 22 | if (clockwise){ | ||
| 23 | tap_code(KC_WH_U); | ||
| 24 | } else { | ||
| 25 | tap_code(KC_WH_D); | ||
| 26 | } | ||
| 27 | } else if (index == 0) { /* right encoder */ | ||
| 28 | if (clockwise){ | ||
| 29 | tap_code(KC_VOLU); | ||
| 30 | } else { | ||
| 31 | tap_code(KC_VOLD); | ||
| 32 | } | ||
| 33 | } | ||
| 34 | return true; | ||
| 35 | } | ||
diff --git a/keyboards/space_space/rev2/rev2.h b/keyboards/space_space/rev2/rev2.h new file mode 100644 index 000000000..99362b900 --- /dev/null +++ b/keyboards/space_space/rev2/rev2.h | |||
| @@ -0,0 +1,49 @@ | |||
| 1 | /* Copyright 2021 qpockets | ||
| 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 | #pragma once | ||
| 18 | |||
| 19 | #include "quantum.h" | ||
| 20 | |||
| 21 | #define XXX KC_NO | ||
| 22 | |||
| 23 | #define LAYOUT_default( \ | ||
| 24 | K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K50, \ | ||
| 25 | K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K51, \ | ||
| 26 | K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K52, \ | ||
| 27 | K32, K33, K34, K36, K37, K38 \ | ||
| 28 | ) \ | ||
| 29 | { \ | ||
| 30 | {K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K50}, \ | ||
| 31 | {K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K51}, \ | ||
| 32 | {K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K52}, \ | ||
| 33 | {XXX, XXX, K32, K33, K34, XXX, K36, K37, K38, XXX, XXX} \ | ||
| 34 | } \ | ||
| 35 | |||
| 36 | #define LAYOUT_big_space( \ | ||
| 37 | K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K50, \ | ||
| 38 | K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K51, \ | ||
| 39 | K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K52, \ | ||
| 40 | K32, K35, K38 \ | ||
| 41 | ) \ | ||
| 42 | { \ | ||
| 43 | {K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K50}, \ | ||
| 44 | {K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K51}, \ | ||
| 45 | {K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K52}, \ | ||
| 46 | {XXX, XXX, K32, XXX, XXX, K35, XXX, XXX, K38, XXX, XXX} \ | ||
| 47 | } | ||
| 48 | |||
| 49 | |||
diff --git a/keyboards/space_space/rev2/rules.mk b/keyboards/space_space/rev2/rules.mk new file mode 100644 index 000000000..e302272b3 --- /dev/null +++ b/keyboards/space_space/rev2/rules.mk | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | # MCU name | ||
| 2 | MCU = atmega32u4 | ||
| 3 | |||
| 4 | # Bootloader selection | ||
| 5 | BOOTLOADER = atmel-dfu | ||
| 6 | |||
| 7 | # Build Options | ||
| 8 | # change yes to no to disable | ||
| 9 | # | ||
| 10 | BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite | ||
| 11 | MOUSEKEY_ENABLE = yes # Mouse keys | ||
| 12 | EXTRAKEY_ENABLE = yes # Audio control and System control | ||
| 13 | CONSOLE_ENABLE = no # Console for debug | ||
| 14 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
| 15 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
| 16 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
| 17 | # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
| 18 | NKRO_ENABLE = yes # USB Nkey Rollover | ||
| 19 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | ||
| 20 | RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow | ||
| 21 | BLUETOOTH_ENABLE = no # Enable Bluetooth | ||
| 22 | AUDIO_ENABLE = no # Audio output | ||
| 23 | ENCODER_ENABLE = yes | ||
diff --git a/keyboards/space_space/rules.mk b/keyboards/space_space/rules.mk index 96823dca6..2ca04be44 100644 --- a/keyboards/space_space/rules.mk +++ b/keyboards/space_space/rules.mk | |||
| @@ -1,23 +1 @@ | |||
| 1 | # MCU name | DEFAULT_FOLDER = space_space/rev2 | |
| 2 | MCU = atmega32u4 | ||
| 3 | |||
| 4 | # Bootloader selection | ||
| 5 | BOOTLOADER = atmel-dfu | ||
| 6 | |||
| 7 | # Build Options | ||
| 8 | # change yes to no to disable | ||
| 9 | # | ||
| 10 | BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite | ||
| 11 | MOUSEKEY_ENABLE = yes # Mouse keys | ||
| 12 | EXTRAKEY_ENABLE = yes # Audio control and System control | ||
| 13 | CONSOLE_ENABLE = no # Console for debug | ||
| 14 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
| 15 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
| 16 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
| 17 | # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
| 18 | NKRO_ENABLE = yes # USB Nkey Rollover | ||
| 19 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | ||
| 20 | RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow | ||
| 21 | BLUETOOTH_ENABLE = no # Enable Bluetooth | ||
| 22 | AUDIO_ENABLE = no # Audio output | ||
| 23 | ENCODER_ENABLE = yes | ||
diff --git a/keyboards/space_space/space_space.h b/keyboards/space_space/space_space.h deleted file mode 100644 index 25e9a083d..000000000 --- a/keyboards/space_space/space_space.h +++ /dev/null | |||
| @@ -1,48 +0,0 @@ | |||
| 1 | /* Copyright 2020 qpockets | ||
| 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 | #pragma once | ||
| 18 | |||
| 19 | #include "quantum.h" | ||
| 20 | |||
| 21 | #define XXX KC_NO | ||
| 22 | |||
| 23 | #define LAYOUT_default( \ | ||
| 24 | K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K50, \ | ||
| 25 | K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K51, \ | ||
| 26 | K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K52, \ | ||
| 27 | K32, K33, K34, K36, K37, K38 \ | ||
| 28 | ) \ | ||
| 29 | { \ | ||
| 30 | { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K50 }, \ | ||
| 31 | { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K51 }, \ | ||
| 32 | { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K52 }, \ | ||
| 33 | { XXX, XXX, K32, K33, K34, XXX, K36, K37, K38, XXX, XXX } \ | ||
| 34 | } | ||
| 35 | |||
| 36 | #define LAYOUT_big_space( \ | ||
| 37 | K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K50, \ | ||
| 38 | K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K51, \ | ||
| 39 | K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K52, \ | ||
| 40 | K32, K35, K38 \ | ||
| 41 | ) \ | ||
| 42 | { \ | ||
| 43 | { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K50 }, \ | ||
| 44 | { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K51 }, \ | ||
| 45 | { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K52 }, \ | ||
| 46 | { XXX, XXX, K32, XXX, XXX, K35, XXX, XXX, K38, XXX, XXX } \ | ||
| 47 | } | ||
| 48 | |||
diff --git a/keyboards/wuque/mammoth20x/config.h b/keyboards/wuque/mammoth20x/config.h new file mode 100644 index 000000000..a29ab2cb2 --- /dev/null +++ b/keyboards/wuque/mammoth20x/config.h | |||
| @@ -0,0 +1,54 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2021 wuquestudio | ||
| 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 0xB06B | ||
| 24 | #define PRODUCT_ID 0x0005 | ||
| 25 | #define DEVICE_VER 0x0001 | ||
| 26 | #define MANUFACTURER wuque studio | ||
| 27 | #define PRODUCT mammoth20x | ||
| 28 | |||
| 29 | /* key matrix size */ | ||
| 30 | #define MATRIX_ROWS 6 | ||
| 31 | #define MATRIX_COLS 4 | ||
| 32 | |||
| 33 | #define MATRIX_ROW_PINS { D5, F0, F1, F4, F5, F6 } | ||
| 34 | #define MATRIX_COL_PINS { B0, B1, E6, F7 } | ||
| 35 | |||
| 36 | #define DIODE_DIRECTION COL2ROW | ||
| 37 | |||
| 38 | /* Set 0 if debouncing isn't needed */ | ||
| 39 | #define DEBOUNCE 5 | ||
| 40 | |||
| 41 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | ||
| 42 | #define LOCKING_SUPPORT_ENABLE | ||
| 43 | |||
| 44 | /* Locking resynchronize hack */ | ||
| 45 | #define LOCKING_RESYNC_ENABLE | ||
| 46 | |||
| 47 | /* Enable encoder */ | ||
| 48 | #define ENCODERS_PAD_A { D3 } | ||
| 49 | #define ENCODERS_PAD_B { D2 } | ||
| 50 | |||
| 51 | #define ENCODERS 1 | ||
| 52 | // Note: array is { col, row ) | ||
| 53 | #define ENCODERS_CW_KEY { { 3, 2 } } | ||
| 54 | #define ENCODERS_CCW_KEY { { 3, 4 } } | ||
diff --git a/keyboards/wuque/mammoth20x/info.json b/keyboards/wuque/mammoth20x/info.json new file mode 100644 index 000000000..c889aa36b --- /dev/null +++ b/keyboards/wuque/mammoth20x/info.json | |||
| @@ -0,0 +1,41 @@ | |||
| 1 | { | ||
| 2 | "keyboard_name": "mammoth20x", | ||
| 3 | "url": "https://shop.wuquestudio.com/", | ||
| 4 | "maintainer": "spbgzh", | ||
| 5 | "width": 4, | ||
| 6 | "height": 6, | ||
| 7 | "layouts": { | ||
| 8 | "LAYOUT_default": { | ||
| 9 | "layout": [ | ||
| 10 | { "label": "Esc", "x": 0, "y": 0 }, | ||
| 11 | { "label": "Pause", "x": 1, "y": 0 }, | ||
| 12 | { "label": "Delete", "x": 2, "y": 0 }, | ||
| 13 | { "label": "E", "x": 3.5, "y": 0 }, | ||
| 14 | |||
| 15 | { "label": "Num", "x": 0, "y": 1 }, | ||
| 16 | { "label": "/", "x": 1, "y": 1 }, | ||
| 17 | { "label": "*", "x": 2, "y": 1 }, | ||
| 18 | { "label": "-", "x": 3, "y": 1 }, | ||
| 19 | |||
| 20 | { "label": "7", "x": 0, "y": 2 }, | ||
| 21 | { "label": "8", "x": 1, "y": 2 }, | ||
| 22 | { "label": "9", "x": 2, "y": 2 }, | ||
| 23 | { "label": "LeftEncode", "x": 3, "y": 0, "w": 0.5 }, | ||
| 24 | |||
| 25 | { "label": "4", "x": 0, "y": 3 }, | ||
| 26 | { "label": "5", "x": 1, "y": 3 }, | ||
| 27 | { "label": "6", "x": 2, "y": 3 }, | ||
| 28 | { "label": "+", "x": 3, "y": 2, "h": 2 }, | ||
| 29 | |||
| 30 | { "label": "1", "x": 0, "y": 4 }, | ||
| 31 | { "label": "2", "x": 1, "y": 4 }, | ||
| 32 | { "label": "3", "x": 2, "y": 4 }, | ||
| 33 | { "label": "RightEncode", "x": 4.5, "y": 0, "w" : 0.25 }, | ||
| 34 | |||
| 35 | { "label": "0", "x": 0, "y": 5, "w": 2 }, | ||
| 36 | { "label": ".", "x": 2, "y": 5 }, | ||
| 37 | { "label": "Enter", "x": 3, "y": 4,"h":2 } | ||
| 38 | ] | ||
| 39 | } | ||
| 40 | } | ||
| 41 | } | ||
diff --git a/keyboards/wuque/mammoth20x/keymaps/default/keymap.c b/keyboards/wuque/mammoth20x/keymaps/default/keymap.c new file mode 100644 index 000000000..77946f373 --- /dev/null +++ b/keyboards/wuque/mammoth20x/keymaps/default/keymap.c | |||
| @@ -0,0 +1,36 @@ | |||
| 1 | /* Copyright 2021 wuquestudio | ||
| 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 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 20 | [0] = LAYOUT_default( | ||
| 21 | KC_ESC, KC_PAUS, KC_DEL, KC_MUTE, | ||
| 22 | KC_LNUM, KC_PSLS, KC_PAST, KC_PMNS, | ||
| 23 | KC_P7, KC_P8, KC_P9, KC_VOLU, | ||
| 24 | KC_P4, KC_P5, KC_P6, KC_PPLS, | ||
| 25 | KC_P1, KC_P2, KC_P3, KC_VOLD, | ||
| 26 | KC_P0, KC_PDOT, KC_PENT | ||
| 27 | ), | ||
| 28 | [1] = LAYOUT_default( | ||
| 29 | _______, _______, _______, _______, | ||
| 30 | _______, _______, _______, _______, | ||
| 31 | _______, _______, _______, _______, | ||
| 32 | _______, _______, _______, _______, | ||
| 33 | _______, _______, _______, _______, | ||
| 34 | _______, _______, _______ | ||
| 35 | ), | ||
| 36 | }; | ||
diff --git a/keyboards/wuque/mammoth20x/keymaps/default/readme.md b/keyboards/wuque/mammoth20x/keymaps/default/readme.md new file mode 100644 index 000000000..5bad9b455 --- /dev/null +++ b/keyboards/wuque/mammoth20x/keymaps/default/readme.md | |||
| @@ -0,0 +1 @@ | |||
| # The default keymap for mammoth20x | |||
diff --git a/keyboards/wuque/mammoth20x/keymaps/via/keymap.c b/keyboards/wuque/mammoth20x/keymaps/via/keymap.c new file mode 100644 index 000000000..c8c434a60 --- /dev/null +++ b/keyboards/wuque/mammoth20x/keymaps/via/keymap.c | |||
| @@ -0,0 +1,52 @@ | |||
| 1 | /* Copyright 2021 wuquestudio | ||
| 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 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 20 | [0] = LAYOUT_default( | ||
| 21 | KC_ESC, KC_PAUS, KC_DEL, KC_MUTE, | ||
| 22 | KC_LNUM, KC_PSLS, KC_PAST, KC_PMNS, | ||
| 23 | KC_P7, KC_P8, KC_P9, KC_VOLU, | ||
| 24 | KC_P4, KC_P5, KC_P6, KC_PPLS, | ||
| 25 | KC_P1, KC_P2, KC_P3, KC_VOLD, | ||
| 26 | KC_P0, KC_PDOT, KC_PENT | ||
| 27 | ), | ||
| 28 | [1] = LAYOUT_default( | ||
| 29 | _______, _______, _______, _______, | ||
| 30 | _______, _______, _______, _______, | ||
| 31 | _______, _______, _______, _______, | ||
| 32 | _______, _______, _______, _______, | ||
| 33 | _______, _______, _______, _______, | ||
| 34 | _______, _______, _______ | ||
| 35 | ), | ||
| 36 | [2] = LAYOUT_default( | ||
| 37 | _______, _______, _______, _______, | ||
| 38 | _______, _______, _______, _______, | ||
| 39 | _______, _______, _______, _______, | ||
| 40 | _______, _______, _______, _______, | ||
| 41 | _______, _______, _______, _______, | ||
| 42 | _______, _______, _______ | ||
| 43 | ), | ||
| 44 | [3] = LAYOUT_default( | ||
| 45 | _______, _______, _______, _______, | ||
| 46 | _______, _______, _______, _______, | ||
| 47 | _______, _______, _______, _______, | ||
| 48 | _______, _______, _______, _______, | ||
| 49 | _______, _______, _______, _______, | ||
| 50 | _______, _______, _______ | ||
| 51 | ), | ||
| 52 | }; | ||
diff --git a/keyboards/wuque/mammoth20x/keymaps/via/readme.md b/keyboards/wuque/mammoth20x/keymaps/via/readme.md new file mode 100644 index 000000000..fcd4ba857 --- /dev/null +++ b/keyboards/wuque/mammoth20x/keymaps/via/readme.md | |||
| @@ -0,0 +1 @@ | |||
| # The via keymap for mammoth20x | |||
diff --git a/keyboards/wuque/mammoth20x/keymaps/via/rules.mk b/keyboards/wuque/mammoth20x/keymaps/via/rules.mk new file mode 100644 index 000000000..36b7ba9cb --- /dev/null +++ b/keyboards/wuque/mammoth20x/keymaps/via/rules.mk | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | VIA_ENABLE = yes | ||
| 2 | LTO_ENABLE = yes | ||
diff --git a/keyboards/wuque/mammoth20x/mammoth20x.c b/keyboards/wuque/mammoth20x/mammoth20x.c new file mode 100644 index 000000000..da6ccecd3 --- /dev/null +++ b/keyboards/wuque/mammoth20x/mammoth20x.c | |||
| @@ -0,0 +1,59 @@ | |||
| 1 | /* Copyright 2021 wuquestudio | ||
| 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 "mammoth20x.h" | ||
| 18 | |||
| 19 | |||
| 20 | static uint8_t encoder_state[ENCODERS] = {0}; | ||
| 21 | static keypos_t encoder_cw[ENCODERS] = ENCODERS_CW_KEY; | ||
| 22 | static keypos_t encoder_ccw[ENCODERS] = ENCODERS_CCW_KEY; | ||
| 23 | |||
| 24 | void encoder_action_unregister(void) | ||
| 25 | { | ||
| 26 | for (int index = 0; index < ENCODERS; ++index) | ||
| 27 | { | ||
| 28 | if (encoder_state[index]) | ||
| 29 | { | ||
| 30 | keyevent_t encoder_event = (keyevent_t){ | ||
| 31 | .key = encoder_state[index] >> 1 ? encoder_cw[index] : encoder_ccw[index], | ||
| 32 | .pressed = false, | ||
| 33 | .time = (timer_read() | 1)}; | ||
| 34 | encoder_state[index] = 0; | ||
| 35 | action_exec(encoder_event); | ||
| 36 | } | ||
| 37 | } | ||
| 38 | } | ||
| 39 | void encoder_action_register(uint8_t index, bool clockwise) | ||
| 40 | { | ||
| 41 | keyevent_t encoder_event = (keyevent_t){ | ||
| 42 | .key = clockwise ? encoder_cw[index] : encoder_ccw[index], | ||
| 43 | .pressed = true, | ||
| 44 | .time = (timer_read() | 1)}; | ||
| 45 | encoder_state[index] = (clockwise ^ 1) | (clockwise << 1); | ||
| 46 | action_exec(encoder_event); | ||
| 47 | } | ||
| 48 | |||
| 49 | void matrix_scan_kb(void) | ||
| 50 | { | ||
| 51 | encoder_action_unregister(); | ||
| 52 | matrix_scan_user(); | ||
| 53 | } | ||
| 54 | |||
| 55 | bool encoder_update_kb(uint8_t index, bool clockwise) | ||
| 56 | { | ||
| 57 | encoder_action_register(index, clockwise); | ||
| 58 | return true; | ||
| 59 | }; | ||
diff --git a/keyboards/wuque/mammoth20x/mammoth20x.h b/keyboards/wuque/mammoth20x/mammoth20x.h new file mode 100644 index 000000000..cd0d8d478 --- /dev/null +++ b/keyboards/wuque/mammoth20x/mammoth20x.h | |||
| @@ -0,0 +1,36 @@ | |||
| 1 | /* Copyright 2021 wuquestudio | ||
| 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 | #pragma once | ||
| 18 | |||
| 19 | #include "quantum.h" | ||
| 20 | |||
| 21 | #define LAYOUT_default( \ | ||
| 22 | K00, K01, K02, K03, \ | ||
| 23 | K10, K11, K12, K13, \ | ||
| 24 | K20, K21, K22, K23, \ | ||
| 25 | K30, K31, K32, K33, \ | ||
| 26 | K40, K41, K42, K43, \ | ||
| 27 | K50, K52, K53 \ | ||
| 28 | ) { \ | ||
| 29 | { K00, K01, K02, K03 }, \ | ||
| 30 | { K10, K11, K12, K13 }, \ | ||
| 31 | { K20, K21, K22, K23 }, \ | ||
| 32 | { K30, K31, K32, K33 }, \ | ||
| 33 | { K40, K41, K42, K43 }, \ | ||
| 34 | { K50, KC_NO, K52, K53 }, \ | ||
| 35 | } | ||
| 36 | |||
diff --git a/keyboards/wuque/mammoth20x/readme.md b/keyboards/wuque/mammoth20x/readme.md new file mode 100644 index 000000000..4b731a159 --- /dev/null +++ b/keyboards/wuque/mammoth20x/readme.md | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | # mammoth20x | ||
| 2 | | ||
| 3 | More Info at[wuquestudio](https://shop.wuquestudio.com/). | ||
| 4 | | ||
| 5 | * Keyboard Maintainer: [spbgzh](https://github.com/spbgzh) | ||
| 6 | * Hardware Supported: mammoth20x Standard | ||
| 7 | * Hardware Availability: [mammoth20x](https://shop.wuquestudio.com/) | ||
| 8 | | ||
| 9 | Make example for this keyboard (after setting up your build environment): | ||
| 10 | |||
| 11 | make wuque/mammoth20x:default | ||
| 12 | |||
| 13 | Flashing example for this keyboard: | ||
| 14 | |||
| 15 | make wuque/mammoth20x:default:flash | ||
| 16 | |||
| 17 | To reset the board into bootloader mode, do one of the following: | ||
| 18 | |||
| 19 | * Tap the Reset switch mounted on the PCB | ||
| 20 | * Hold the Esc key while connecting the USB cable (also erases persistent settings) | ||
| 21 | |||
| 22 | 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/wuque/mammoth20x/rules.mk b/keyboards/wuque/mammoth20x/rules.mk new file mode 100644 index 000000000..8431b9817 --- /dev/null +++ b/keyboards/wuque/mammoth20x/rules.mk | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | # MCU name | ||
| 2 | MCU = atmega32u4 | ||
| 3 | |||
| 4 | # Bootloader selection | ||
| 5 | BOOTLOADER = atmel-dfu | ||
| 6 | |||
| 7 | # Build Options | ||
| 8 | # change yes to no to disable | ||
| 9 | # | ||
| 10 | BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration | ||
| 11 | MOUSEKEY_ENABLE = yes # Mouse keys | ||
| 12 | EXTRAKEY_ENABLE = yes # Audio control and System control | ||
| 13 | CONSOLE_ENABLE = yes # Console for debug | ||
| 14 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
| 15 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
| 16 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
| 17 | # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
| 18 | NKRO_ENABLE = yes # USB Nkey Rollover | ||
| 19 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | ||
| 20 | RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow | ||
| 21 | BLUETOOTH_ENABLE = no # Enable Bluetooth | ||
| 22 | AUDIO_ENABLE = no # Audio output | ||
| 23 | ENCODER_ENABLE = yes # Enable Encoder | ||
| 24 | |||
diff --git a/layouts/community/ortho_4x12/ajp10304/keymap.c b/layouts/community/ortho_4x12/ajp10304/keymap.c index 3badce2ea..c55e99af7 100644 --- a/layouts/community/ortho_4x12/ajp10304/keymap.c +++ b/layouts/community/ortho_4x12/ajp10304/keymap.c | |||
| @@ -1,3 +1,19 @@ | |||
| 1 | /* Copyright 2021 Alan Pocklington | ||
| 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 | |||
| 1 | #include "ajp10304.h" | 17 | #include "ajp10304.h" |
| 2 | #include "keymap_uk.h" | 18 | #include "keymap_uk.h" |
| 3 | 19 | ||
diff --git a/layouts/community/ortho_4x12/ajp10304/readme.md b/layouts/community/ortho_4x12/ajp10304/readme.md index 6f2330f94..be6afa6fe 100644 --- a/layouts/community/ortho_4x12/ajp10304/readme.md +++ b/layouts/community/ortho_4x12/ajp10304/readme.md | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | # AJP10304 Ortho 4x12 Layout | 1 | # AJP10304 Ortho 4x12 Layout |
| 2 | # For Planck, Shark, JJ40 and Atreus50 | 2 | # For Planck, Shark, Quark, JJ40 and Atreus50 |
| 3 | 3 | ||
| 4 | **Note:** In the tables below where there are two characters on a key, | 4 | **Note:** In the tables below where there are two characters on a key, |
| 5 | the second is the output when shift is applied. | 5 | the second is the output when shift is applied. |
diff --git a/users/ajp10304/ajp10304.c b/users/ajp10304/ajp10304.c index 9cae65d5c..dd13787d6 100644 --- a/users/ajp10304/ajp10304.c +++ b/users/ajp10304/ajp10304.c | |||
| @@ -1,3 +1,19 @@ | |||
| 1 | /* Copyright 2021 Alan Pocklington | ||
| 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 | |||
| 1 | #include "ajp10304.h" | 17 | #include "ajp10304.h" |
| 2 | 18 | ||
| 3 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | 19 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { |
diff --git a/users/ajp10304/ajp10304.h b/users/ajp10304/ajp10304.h index b96e00fc4..ec1ed11c0 100644 --- a/users/ajp10304/ajp10304.h +++ b/users/ajp10304/ajp10304.h | |||
| @@ -1,3 +1,19 @@ | |||
| 1 | /* Copyright 2021 Alan Pocklington | ||
| 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 | |||
| 1 | #include QMK_KEYBOARD_H | 17 | #include QMK_KEYBOARD_H |
| 2 | 18 | ||
| 3 | enum ajp10304_layers { | 19 | enum ajp10304_layers { |
diff --git a/users/ajp10304/readme.md b/users/ajp10304/readme.md index 8e1a438aa..2ac0a6996 100644 --- a/users/ajp10304/readme.md +++ b/users/ajp10304/readme.md | |||
| @@ -14,7 +14,7 @@ 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/>. | 14 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 15 | 15 | ||
| 16 | # AJP10304 Custom 40% Layout | 16 | # AJP10304 Custom 40% Layout |
| 17 | # For the Planck, Shark, JJ40 and Atreus50 | 17 | # For the Planck, Shark, Quark, JJ40 and Atreus50 |
| 18 | 18 | ||
| 19 | **Note:** In the tables below where there are two characters on a key, | 19 | **Note:** In the tables below where there are two characters on a key, |
| 20 | the second is the output when shift is applied. | 20 | the second is the output when shift is applied. |
diff --git a/users/jonavin/config.h b/users/jonavin/config.h new file mode 100644 index 000000000..4f4568f70 --- /dev/null +++ b/users/jonavin/config.h | |||
| @@ -0,0 +1,30 @@ | |||
| 1 | /* Copyright 2021 Jonavin Eng | ||
| 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 | #pragma once | ||
| 18 | |||
| 19 | #define TAPPING_TOGGLE 2 // TT () set to two taps | ||
| 20 | |||
| 21 | /* Handle GRAVESC combo keys */ | ||
| 22 | #define GRAVE_ESC_ALT_OVERRIDE // Always send Escape if Alt is pressed | ||
| 23 | #define GRAVE_ESC_CTRL_OVERRIDE // Always send Escape if Control is pressed | ||
| 24 | |||
| 25 | #define TAPPING_TERM 180 | ||
| 26 | |||
| 27 | #ifdef RGB_MATRIX_ENABLE | ||
| 28 | #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR | ||
| 29 | #define RGB_DISABLE_WHEN_USB_SUSPENDED true | ||
| 30 | #endif | ||
diff --git a/users/jonavin/jonavin.c b/users/jonavin/jonavin.c new file mode 100644 index 000000000..d5fdb2a1e --- /dev/null +++ b/users/jonavin/jonavin.c | |||
| @@ -0,0 +1,231 @@ | |||
| 1 | |||
| 2 | /* Copyright 2021 Jonavin Eng @Jonavin | ||
| 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 | |||
| 19 | #include QMK_KEYBOARD_H | ||
| 20 | #include "jonavin.h" | ||
| 21 | |||
| 22 | |||
| 23 | #ifdef TD_LSFT_CAPSLOCK_ENABLE | ||
| 24 | // Tap once for shift, twice for Caps Lock but only if Win Key in not disabled | ||
| 25 | void dance_LSFT_finished(qk_tap_dance_state_t *state, void *user_data) { | ||
| 26 | if (state->count == 1 || keymap_config.no_gui) { | ||
| 27 | register_code16(KC_LSFT); | ||
| 28 | } else { | ||
| 29 | register_code(KC_CAPS); | ||
| 30 | } | ||
| 31 | } | ||
| 32 | |||
| 33 | void dance_LSFT_reset(qk_tap_dance_state_t *state, void *user_data) { | ||
| 34 | if (state->count == 1 || keymap_config.no_gui) { | ||
| 35 | unregister_code16(KC_LSFT); | ||
| 36 | } else { | ||
| 37 | unregister_code(KC_CAPS); | ||
| 38 | } | ||
| 39 | } | ||
| 40 | |||
| 41 | qk_tap_dance_action_t tap_dance_actions[] = { | ||
| 42 | // Tap once for shift, twice for Caps Lock | ||
| 43 | [TD_LSFT_CAPSLOCK] = ACTION_TAP_DANCE_DOUBLE(KC_LSFT, KC_CAPS), | ||
| 44 | [TD_LSFT_CAPS_WIN] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_LSFT_finished, dance_LSFT_reset), | ||
| 45 | }; | ||
| 46 | #endif // TD_LSFT_CAPSLOCK_ENABLE | ||
| 47 | |||
| 48 | // TIMEOUTS | ||
| 49 | #ifdef IDLE_TIMEOUT_ENABLE | ||
| 50 | static uint16_t timeout_timer = 0; | ||
| 51 | static uint16_t timeout_counter = 0; //in minute intervals | ||
| 52 | static uint16_t timeout_threshold = TIMEOUT_THRESHOLD_DEFAULT; | ||
| 53 | |||
| 54 | uint16_t get_timeout_threshold(void) { | ||
| 55 | return timeout_threshold; | ||
| 56 | } | ||
| 57 | |||
| 58 | void timeout_reset_timer(void) { | ||
| 59 | timeout_timer = timer_read(); | ||
| 60 | timeout_counter = 0; | ||
| 61 | }; | ||
| 62 | |||
| 63 | void timeout_update_threshold(bool increase) { | ||
| 64 | if (increase && timeout_threshold < TIMEOUT_THRESHOLD_MAX) timeout_threshold++; | ||
| 65 | if (!increase && timeout_threshold > 0) timeout_threshold--; | ||
| 66 | }; | ||
| 67 | |||
| 68 | void timeout_tick_timer(void) { | ||
| 69 | if (timeout_threshold > 0) { | ||
| 70 | if (timer_elapsed(timeout_timer) >= 60000) { // 1 minute tick | ||
| 71 | timeout_counter++; | ||
| 72 | timeout_timer = timer_read(); | ||
| 73 | } | ||
| 74 | #ifdef RGB_MATRIX_ENABLE | ||
| 75 | if (timeout_threshold > 0 && timeout_counter >= timeout_threshold) { | ||
| 76 | rgb_matrix_disable_noeeprom(); | ||
| 77 | } | ||
| 78 | #endif | ||
| 79 | } // timeout_threshold = 0 will disable timeout | ||
| 80 | } | ||
| 81 | |||
| 82 | __attribute__((weak)) void matrix_scan_keymap(void) {} | ||
| 83 | |||
| 84 | void matrix_scan_user(void) { | ||
| 85 | timeout_tick_timer(); | ||
| 86 | matrix_scan_keymap(); | ||
| 87 | } | ||
| 88 | #endif // IDLE_TIMEOUT_ENABLE | ||
| 89 | |||
| 90 | |||
| 91 | #if defined(ENCODER_ENABLE) && defined(ENCODER_DEFAULTACTIONS_ENABLE) // Encoder Functionality | ||
| 92 | #ifndef DYNAMIC_KEYMAP_LAYER_COUNT | ||
| 93 | #define DYNAMIC_KEYMAP_LAYER_COUNT 4 //default in case this is not already defined elsewhere | ||
| 94 | #endif | ||
| 95 | #ifndef ENCODER_DEFAULTACTIONS_INDEX | ||
| 96 | #define ENCODER_DEFAULTACTIONS_INDEX 0 // can select encoder index if there are multiple encoders | ||
| 97 | #endif | ||
| 98 | |||
| 99 | uint8_t selected_layer = 0; | ||
| 100 | |||
| 101 | __attribute__((weak)) bool encoder_update_keymap(uint8_t index, bool clockwise) { return true; } | ||
| 102 | |||
| 103 | bool encoder_update_user(uint8_t index, bool clockwise) { | ||
| 104 | if (!encoder_update_keymap(index, clockwise)) { return false; } | ||
| 105 | if (index != ENCODER_DEFAULTACTIONS_INDEX) {return true;} // exit if the index doesn't match | ||
| 106 | if ( clockwise ) { | ||
| 107 | if (keyboard_report->mods & MOD_BIT(KC_LSFT) ) { // If you are holding L shift, encoder changes layers | ||
| 108 | if(selected_layer < (DYNAMIC_KEYMAP_LAYER_COUNT - 1)) { | ||
| 109 | selected_layer ++; | ||
| 110 | layer_move(selected_layer); | ||
| 111 | } | ||
| 112 | } else if (keyboard_report->mods & MOD_BIT(KC_RSFT) ) { // If you are holding R shift, Page up | ||
| 113 | unregister_mods(MOD_BIT(KC_RSFT)); | ||
| 114 | register_code(KC_PGDN); | ||
| 115 | register_mods(MOD_BIT(KC_RSFT)); | ||
| 116 | } else if (keyboard_report->mods & MOD_BIT(KC_LCTL)) { // if holding Left Ctrl, navigate next word | ||
| 117 | tap_code16(LCTL(KC_RGHT)); | ||
| 118 | } else if (keyboard_report->mods & MOD_BIT(KC_LALT)) { // if holding Left Alt, change media next track | ||
| 119 | tap_code(KC_MEDIA_NEXT_TRACK); | ||
| 120 | } else { | ||
| 121 | switch (selected_layer) { | ||
| 122 | case _FN1: | ||
| 123 | #ifdef IDLE_TIMEOUT_ENABLE | ||
| 124 | timeout_update_threshold(true); | ||
| 125 | #endif | ||
| 126 | break; | ||
| 127 | default: | ||
| 128 | tap_code(KC_VOLU); // Otherwise it just changes volume | ||
| 129 | break; | ||
| 130 | } | ||
| 131 | } | ||
| 132 | } else { | ||
| 133 | if (keyboard_report->mods & MOD_BIT(KC_LSFT) ) { | ||
| 134 | if (selected_layer > 0) { | ||
| 135 | selected_layer --; | ||
| 136 | layer_move(selected_layer); | ||
| 137 | } | ||
| 138 | } else if (keyboard_report->mods & MOD_BIT(KC_RSFT) ) { | ||
| 139 | unregister_mods(MOD_BIT(KC_RSFT)); | ||
| 140 | register_code(KC_PGUP); | ||
| 141 | register_mods(MOD_BIT(KC_RSFT)); | ||
| 142 | } else if (keyboard_report->mods & MOD_BIT(KC_LCTL)) { // if holding Left Ctrl, navigate previous word | ||
| 143 | tap_code16(LCTL(KC_LEFT)); | ||
| 144 | } else if (keyboard_report->mods & MOD_BIT(KC_LALT)) { // if holding Left Alt, change media previous track | ||
| 145 | tap_code(KC_MEDIA_PREV_TRACK); | ||
| 146 | } else { | ||
| 147 | switch (selected_layer) { | ||
| 148 | case _FN1: | ||
| 149 | #ifdef IDLE_TIMEOUT_ENABLE | ||
| 150 | timeout_update_threshold(false); | ||
| 151 | #endif | ||
| 152 | break; | ||
| 153 | default: | ||
| 154 | tap_code(KC_VOLD); | ||
| 155 | break; | ||
| 156 | } | ||
| 157 | } | ||
| 158 | } | ||
| 159 | |||
| 160 | return true; | ||
| 161 | } | ||
| 162 | #endif // ENCODER_ENABLE | ||
| 163 | |||
| 164 | |||
| 165 | // PROCESS KEY CODES | ||
| 166 | __attribute__ ((weak)) bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { return true; } | ||
| 167 | |||
| 168 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
| 169 | if (!process_record_keymap(keycode, record)) { return false; } | ||
| 170 | switch (keycode) { | ||
| 171 | case KC_00: | ||
| 172 | if (record->event.pressed) { | ||
| 173 | // when keycode KC_00 is pressed | ||
| 174 | SEND_STRING("00"); | ||
| 175 | } else unregister_code16(keycode); | ||
| 176 | break; | ||
| 177 | case KC_WINLCK: | ||
| 178 | if (record->event.pressed) { | ||
| 179 | keymap_config.no_gui = !keymap_config.no_gui; //toggle status | ||
| 180 | } else unregister_code16(keycode); | ||
| 181 | break; | ||
| 182 | |||
| 183 | #ifdef IDLE_TIMEOUT_ENABLE | ||
| 184 | case RGB_TOI: | ||
| 185 | if(record->event.pressed) { | ||
| 186 | timeout_update_threshold(true); | ||
| 187 | } else unregister_code16(keycode); | ||
| 188 | break; | ||
| 189 | case RGB_TOD: | ||
| 190 | if(record->event.pressed) { | ||
| 191 | timeout_update_threshold(false); //decrease timeout | ||
| 192 | } else unregister_code16(keycode); | ||
| 193 | break; | ||
| 194 | #endif // IDLE_TIMEOUT_ENABLE | ||
| 195 | |||
| 196 | default: | ||
| 197 | if (record->event.pressed) { | ||
| 198 | #ifdef RGB_MATRIX_ENABLE | ||
| 199 | rgb_matrix_enable(); | ||
| 200 | #endif | ||
| 201 | #ifdef IDLE_TIMEOUT_ENABLE | ||
| 202 | timeout_reset_timer(); //reset activity timer | ||
| 203 | #endif | ||
| 204 | } | ||
| 205 | break; | ||
| 206 | } | ||
| 207 | return true; | ||
| 208 | }; | ||
| 209 | |||
| 210 | |||
| 211 | // Turn on/off NUM LOCK if current state is different | ||
| 212 | void activate_numlock(bool turn_on) { | ||
| 213 | if (IS_HOST_LED_ON(USB_LED_NUM_LOCK) != turn_on) { | ||
| 214 | tap_code(KC_NUMLOCK); | ||
| 215 | } | ||
| 216 | } | ||
| 217 | |||
| 218 | |||
| 219 | // INITIAL STARTUP | ||
| 220 | |||
| 221 | __attribute__ ((weak)) void keyboard_post_init_keymap(void) {} | ||
| 222 | |||
| 223 | void keyboard_post_init_user(void) { | ||
| 224 | keyboard_post_init_keymap(); | ||
| 225 | #ifdef STARTUP_NUMLOCK_ON | ||
| 226 | activate_numlock(true); // turn on Num lock by default so that the numpad layer always has predictable results | ||
| 227 | #endif // STARTUP_NUMLOC_ON | ||
| 228 | #ifdef IDLE_TIMEOUT_ENABLE | ||
| 229 | timeout_timer = timer_read(); // set inital time for ide timeout | ||
| 230 | #endif | ||
| 231 | } | ||
diff --git a/users/jonavin/jonavin.h b/users/jonavin/jonavin.h new file mode 100644 index 000000000..894feddfd --- /dev/null +++ b/users/jonavin/jonavin.h | |||
| @@ -0,0 +1,82 @@ | |||
| 1 | |||
| 2 | /* Copyright 2021 Jonavin Eng @Jonavin | ||
| 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 | // DEFINE MACROS | ||
| 21 | #define ARRAYSIZE(arr) sizeof(arr)/sizeof(arr[0]) | ||
| 22 | |||
| 23 | |||
| 24 | // LAYERS | ||
| 25 | enum custom_user_layers { | ||
| 26 | _BASE, | ||
| 27 | _FN1, | ||
| 28 | _LOWER, | ||
| 29 | _RAISE, | ||
| 30 | }; | ||
| 31 | |||
| 32 | // KEYCODES | ||
| 33 | enum custom_user_keycodes { | ||
| 34 | KC_00 = SAFE_RANGE, | ||
| 35 | ENCFUNC, | ||
| 36 | KC_WINLCK, //Toggles Win key on and off | ||
| 37 | RGB_TOI, // Timeout idle time up | ||
| 38 | RGB_TOD, // Timeout idle time down | ||
| 39 | }; | ||
| 40 | |||
| 41 | #define KC_CAD LALT(LCTL(KC_DEL)) | ||
| 42 | #define KC_AF4 LALT(KC_F4) | ||
| 43 | #define KC_TASK LCTL(LSFT(KC_ESC)) | ||
| 44 | |||
| 45 | |||
| 46 | #ifdef TD_LSFT_CAPSLOCK_ENABLE | ||
| 47 | // Tap Dance Definitions | ||
| 48 | enum custom_tapdance { | ||
| 49 | TD_LSFT_CAPSLOCK, | ||
| 50 | TD_LSFT_CAPS_WIN | ||
| 51 | }; | ||
| 52 | |||
| 53 | #define KC_LSFTCAPS TD(TD_LSFT_CAPSLOCK) | ||
| 54 | #define KC_LSFTCAPSWIN TD(TD_LSFT_CAPS_WIN) | ||
| 55 | #else // regular Shift | ||
| 56 | #define KC_LSFTCAPS KC_LSFT | ||
| 57 | #endif // TD_LSFT_CAPSLOCK_ENABLE | ||
| 58 | |||
| 59 | |||
| 60 | |||
| 61 | #ifdef RGB_MATRIX_ENABLE | ||
| 62 | //RGB custom colours | ||
| 63 | #define RGB_GODSPEED 0x00, 0xE4, 0xFF // colour for matching keycaps | ||
| 64 | #define RGB_NAUTILUS 0x00, 0xA4, 0xA9 // Nautilus Font colours | ||
| 65 | #endif | ||
| 66 | |||
| 67 | |||
| 68 | // IDLE TIMEOUTS | ||
| 69 | #ifdef IDLE_TIMEOUT_ENABLE | ||
| 70 | #define TIMEOUT_THRESHOLD_DEFAULT 5 // default timeout minutes | ||
| 71 | #define TIMEOUT_THRESHOLD_MAX 140 // upper limits (2 hours and 10 minutes -- no rgb indicators above this value) | ||
| 72 | |||
| 73 | //prototype functions | ||
| 74 | uint16_t get_timeout_threshold(void); | ||
| 75 | void timeout_reset_timer(void); | ||
| 76 | void timeout_update_threshold(bool increase); | ||
| 77 | void timeout_tick_timer(void); | ||
| 78 | #endif //IDLE_TIMEOUT_ENABLE | ||
| 79 | |||
| 80 | |||
| 81 | // OTHER FUNCTION PROTOTYPE | ||
| 82 | void activate_numlock(bool turn_on); | ||
diff --git a/users/jonavin/readme.md b/users/jonavin/readme.md new file mode 100644 index 000000000..97fff6520 --- /dev/null +++ b/users/jonavin/readme.md | |||
| @@ -0,0 +1,76 @@ | |||
| 1 | Copyright 2021 Jonavin Eng @Jonavin | ||
| 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 | LAYERS: | ||
| 17 | 0 = _BASE | ||
| 18 | 1 = _FN1 | ||
| 19 | 2 = _LOWER | ||
| 20 | 3 = _RAISE | ||
| 21 | |||
| 22 | KEYCODES: | ||
| 23 | KC_CAD Ctrl-Alt-Del | ||
| 24 | KC_AF4 Alt-F4 | ||
| 25 | KC_TASK Windows Task Manager (Ctrl-Shift-Esc) | ||
| 26 | LSFT_CAPSLOCK When LSFT_CAPSLOCK_ENABLE is defined, hold for Shift double tap for CAPSLOCK; otherwise, just Shift | ||
| 27 | KC_00 double zero "00" | ||
| 28 | KC_WINLCK toggles LGui/Win key lock | ||
| 29 | RGB_TOI Increase Timeout idle time threshold | ||
| 30 | RGB_TOD Decrease Timeout idle time threshold | ||
| 31 | |||
| 32 | ENABLE FEATURES your keymap rules.mk | ||
| 33 | |||
| 34 | STARTUP_NUMLOCK_ON = yes | ||
| 35 | turns on NUMLOCK by default | ||
| 36 | |||
| 37 | ENCODER_DEFAULTACTIONS_ENABLE = yes | ||
| 38 | Enabled default encoder funtions | ||
| 39 | When enabled, use this in the keymap for an additional encoder processing | ||
| 40 | bool encoder_update_keymap(uint8_t index, bool clockwise) | ||
| 41 | |||
| 42 | OPTION: set ENCODER_DEFAULTACTIONS_INDEX to the encoder number if the encoder is not index 0 | ||
| 43 | |||
| 44 | TD_LSFT_CAPSLOCK_ENABLE = yes | ||
| 45 | This will enable double tap on Left Shift to toggle CAPSLOCK | ||
| 46 | KC_LSFTCAPS to bind to left Shift to enable feature | ||
| 47 | KC_LSFTCAPSWIN does the same thing but will not turn on CAPS when Win Lkey is disabled | ||
| 48 | |||
| 49 | IDLE_TIMEOUT_ENABLE = yes | ||
| 50 | Enables Timer functionality; for RGB idle timeouts that can be changed dynamically | ||
| 51 | When enabled, use this in the keymap for an additional matrix processing | ||
| 52 | void matrix_scan_keymap(void) | ||
| 53 | |||
| 54 | Functions: | ||
| 55 | u16int_t get_timeout_threshold(void) // returns the current timeout threshold | ||
| 56 | void timeout_update_threshold(bool increase) // change threshold: true = increase, false = decrease | ||
| 57 | void timeout_reset_timer(void) // resets timer (put in process_record_user if you override it) | ||
| 58 | void timeout_tick_timer(void) // registers time ticks (put in maxtrix_scan_user if you override it) | ||
| 59 | |||
| 60 | Other Functions: | ||
| 61 | - activate_numlock(bool turn_on) // true = turn on NUM LOCK, false = off | ||
| 62 | |||
| 63 | KEYMAP LEVEL ADDITIONAL PROCESSING FUNCTIONS | ||
| 64 | bool process_record_keymap(uint16_t keycode, keyrecord_t *record) | ||
| 65 | void keyboard_post_init_keymap(void) | ||
| 66 | |||
| 67 | LIST OF COMPATIBLE KEYMAPS | ||
| 68 | - gmmk/pro | ||
| 69 | - gmmk/pro/ansi | ||
| 70 | - keebio/quefrency/rev3 | ||
| 71 | - mechwild/mercutio | ||
| 72 | - mechwild/murphpad (*) | ||
| 73 | - mechwild/OBE (*) | ||
| 74 | - nopunin10did/kastenwagen (*) | ||
| 75 | |||
| 76 | (*) coming soon | ||
diff --git a/users/jonavin/rules.mk b/users/jonavin/rules.mk new file mode 100644 index 000000000..4e9ee08ff --- /dev/null +++ b/users/jonavin/rules.mk | |||
| @@ -0,0 +1,13 @@ | |||
| 1 | SRC += jonavin.c | ||
| 2 | ifeq ($(strip $(ENCODER_DEFAULTACTIONS_ENABLE)), yes) | ||
| 3 | OPT_DEFS += -DENCODER_DEFAULTACTIONS_ENABLE | ||
| 4 | endif | ||
| 5 | ifeq ($(strip $(TD_LSFT_CAPSLOCK_ENABLE)), yes) | ||
| 6 | OPT_DEFS += -DTD_LSFT_CAPSLOCK_ENABLE | ||
| 7 | endif | ||
| 8 | ifeq ($(strip $(IDLE_TIMEOUT_ENABLE)), yes) | ||
| 9 | OPT_DEFS += -DIDLE_TIMEOUT_ENABLE | ||
| 10 | endif | ||
| 11 | ifeq ($(strip $(STARTUP_NUMLOCK_ON)), yes) | ||
| 12 | OPT_DEFS += -DSTARTUP_NUMLOCK_ON | ||
| 13 | endif | ||
