diff options
| author | Keys of Kings <keysofkings@gmail.com> | 2020-11-01 12:53:17 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-01 10:53:17 -0800 |
| commit | 76bc23550857badaa35ae68c62875dd8b1fad0ce (patch) | |
| tree | 42252f3f4c2f6b7d32ddf9dd9b565b6f6e2c662d | |
| parent | fed9c97ddbd714c3a6981cfeb4534f286b969079 (diff) | |
| download | qmk_firmware-76bc23550857badaa35ae68c62875dd8b1fad0ce.tar.gz qmk_firmware-76bc23550857badaa35ae68c62875dd8b1fad0ce.zip | |
[Keyboard] Add keysofkings folder and twokey keyboard (#10754)
* Add keysofkings folder and twokey keyboard
* Update readme.md
* Update readme.md
* Update config.h
* Update config.h
* Update keymap.c
* Update twokey.c
* Update twokey.h
* Update keyboards/keysofkings/twokey/config.h
Co-authored-by: Ryan <fauxpark@gmail.com>
* Update keyboards/keysofkings/twokey/readme.md
Co-authored-by: Ryan <fauxpark@gmail.com>
* Update keyboards/keysofkings/twokey/rules.mk
Co-authored-by: Ryan <fauxpark@gmail.com>
* Update keyboards/keysofkings/twokey/rules.mk
Co-authored-by: Ryan <fauxpark@gmail.com>
* Update keyboards/keysofkings/twokey/readme.md
Co-authored-by: Ryan <fauxpark@gmail.com>
* Update info.json
* Update keymap.c
* Update keyboards/keysofkings/twokey/info.json
Co-authored-by: Ryan <fauxpark@gmail.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
| -rwxr-xr-x | keyboards/keysofkings/twokey/config.h | 68 | ||||
| -rw-r--r-- | keyboards/keysofkings/twokey/info.json | 16 | ||||
| -rw-r--r-- | keyboards/keysofkings/twokey/keymaps/default/keymap.c | 79 | ||||
| -rw-r--r-- | keyboards/keysofkings/twokey/readme.md | 16 | ||||
| -rwxr-xr-x | keyboards/keysofkings/twokey/rules.mk | 23 | ||||
| -rwxr-xr-x | keyboards/keysofkings/twokey/twokey.c | 17 | ||||
| -rwxr-xr-x | keyboards/keysofkings/twokey/twokey.h | 28 |
7 files changed, 247 insertions, 0 deletions
diff --git a/keyboards/keysofkings/twokey/config.h b/keyboards/keysofkings/twokey/config.h new file mode 100755 index 000000000..d7f4c3cf0 --- /dev/null +++ b/keyboards/keysofkings/twokey/config.h | |||
| @@ -0,0 +1,68 @@ | |||
| 1 | /* Copyright 2020 Keys of Kings | ||
| 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 0xFEED | ||
| 23 | #define PRODUCT_ID 0xAE12 | ||
| 24 | #define DEVICE_VER 0x0001 | ||
| 25 | #define MANUFACTURER Keys of Kings | ||
| 26 | #define PRODUCT Twokey | ||
| 27 | |||
| 28 | /* key matrix size */ | ||
| 29 | #define MATRIX_ROWS 2 | ||
| 30 | #define MATRIX_COLS 2 | ||
| 31 | |||
| 32 | /* key matrix pins */ | ||
| 33 | #define MATRIX_ROW_PINS { B4, B5 } | ||
| 34 | #define MATRIX_COL_PINS { B3, B2 } | ||
| 35 | #define UNUSED_PINS | ||
| 36 | |||
| 37 | |||
| 38 | #define ENCODERS_PAD_A { E6 } | ||
| 39 | #define ENCODERS_PAD_B { D7 } | ||
| 40 | #define ENCODER_RESOLUTION 1 | ||
| 41 | #define ENCODER_DIRECTION_FLIP | ||
| 42 | |||
| 43 | /* COL2ROW or ROW2COL */ | ||
| 44 | #define DIODE_DIRECTION COL2ROW | ||
| 45 | |||
| 46 | /* Set 0 if debouncing isn't needed */ | ||
| 47 | #define DEBOUNCE 5 | ||
| 48 | |||
| 49 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | ||
| 50 | #define LOCKING_SUPPORT_ENABLE | ||
| 51 | |||
| 52 | /* Locking resynchronize hack */ | ||
| 53 | #define LOCKING_RESYNC_ENABLE | ||
| 54 | |||
| 55 | #ifdef RGBLIGHT_ENABLE | ||
| 56 | #define RGB_DI_PIN D3 | ||
| 57 | #define RGBLIGHT_ANIMATIONS | ||
| 58 | #define RGBLED_NUM 5 | ||
| 59 | #define RGBLIGHT_HUE_STEP 4 | ||
| 60 | #define RGBLIGHT_SAT_STEP 4 | ||
| 61 | #define RGBLIGHT_VAL_STEP 4 | ||
| 62 | #define B6_AUDIO | ||
| 63 | #define AUDIO_CLICKY | ||
| 64 | #endif | ||
| 65 | |||
| 66 | #ifdef AUDIO_ENABLE | ||
| 67 | #define STARTUP_SONG SONG(MAJOR_SOUND) | ||
| 68 | #endif | ||
diff --git a/keyboards/keysofkings/twokey/info.json b/keyboards/keysofkings/twokey/info.json new file mode 100644 index 000000000..d7dabbc94 --- /dev/null +++ b/keyboards/keysofkings/twokey/info.json | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | { | ||
| 2 | "keyboard_name": "Twokey", | ||
| 3 | "url": "", | ||
| 4 | "maintainer": "Keys of Kings", | ||
| 5 | "width": 2, | ||
| 6 | "height": 2.5, | ||
| 7 | "layouts": { | ||
| 8 | "LAYOUT": { | ||
| 9 | "layout": [ | ||
| 10 | {"x": 0.5, "y": 0}, | ||
| 11 | {"x": 0, "y": 1.5}, | ||
| 12 | {"x": 1, "y": 1.5} | ||
| 13 | ] | ||
| 14 | } | ||
| 15 | } | ||
| 16 | } | ||
diff --git a/keyboards/keysofkings/twokey/keymaps/default/keymap.c b/keyboards/keysofkings/twokey/keymaps/default/keymap.c new file mode 100644 index 000000000..eaa4f88de --- /dev/null +++ b/keyboards/keysofkings/twokey/keymaps/default/keymap.c | |||
| @@ -0,0 +1,79 @@ | |||
| 1 | /* Copyright 2020 Keys of Kings | ||
| 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 | LAYOUT( | ||
| 21 | LT(1, KC_MUTE), | ||
| 22 | LT(4, KC_MPLY), LT(7, KC_MNXT)), | ||
| 23 | |||
| 24 | LAYOUT( | ||
| 25 | KC_TRNS, | ||
| 26 | TO(2), TO(3)), | ||
| 27 | |||
| 28 | LAYOUT( | ||
| 29 | TO(0), | ||
| 30 | RGB_TOG, RGB_MOD), | ||
| 31 | |||
| 32 | LAYOUT( | ||
| 33 | TO(0), | ||
| 34 | RGB_VAI, RGB_VAD), | ||
| 35 | |||
| 36 | LAYOUT( | ||
| 37 | TO(0), | ||
| 38 | RGB_HUI, RGB_HUD), | ||
| 39 | |||
| 40 | LAYOUT( | ||
| 41 | TO(5), | ||
| 42 | KC_TRNS, TO(6)), | ||
| 43 | |||
| 44 | LAYOUT( | ||
| 45 | TO(0), | ||
| 46 | RGB_SAI, RGB_SAD), | ||
| 47 | |||
| 48 | LAYOUT( | ||
| 49 | TO(8), | ||
| 50 | TO(9), KC_TRNS), | ||
| 51 | |||
| 52 | LAYOUT( | ||
| 53 | TO(0), | ||
| 54 | CK_TOGG, MU_TOG), | ||
| 55 | |||
| 56 | LAYOUT( | ||
| 57 | TO(0), | ||
| 58 | RESET, EEPROM_RESET), | ||
| 59 | }; | ||
| 60 | |||
| 61 | void matrix_init_user(void) { | ||
| 62 | debug_config.matrix = 1; | ||
| 63 | debug_config.keyboard = 1; | ||
| 64 | debug_config.enable = 1; | ||
| 65 | } | ||
| 66 | |||
| 67 | void encoder_update_user(int8_t index, bool clockwise) { | ||
| 68 | if (index == 0) { | ||
| 69 | if (clockwise) { | ||
| 70 | tap_code(KC_VOLD); | ||
| 71 | } else { | ||
| 72 | tap_code(KC_VOLU); | ||
| 73 | } | ||
| 74 | # ifdef AUDIO_CLICKY | ||
| 75 | clockwise ? clicky_freq_up() : clicky_freq_down(); | ||
| 76 | # endif | ||
| 77 | } | ||
| 78 | } | ||
| 79 | |||
diff --git a/keyboards/keysofkings/twokey/readme.md b/keyboards/keysofkings/twokey/readme.md new file mode 100644 index 000000000..18394f8f8 --- /dev/null +++ b/keyboards/keysofkings/twokey/readme.md | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | # TWOKEY | ||
| 2 | |||
| 3 |  | ||
| 4 | |||
| 5 | A Two Key mini keyboard with Rotary Encoder/Switch along with Backlight keys, RGB Underglow, and Piezo Buzzer. Supports Cherry, Choc, Matias switches. | ||
| 6 | |||
| 7 | * Keyboard Maintainer: Keys of Kings | ||
| 8 | * Keyboard Designer: King Icewind | ||
| 9 | * Hardware Supported: Twokey PCB, Pro Micro | ||
| 10 | * Hardware Availability: www.keysofkings.com | ||
| 11 | |||
| 12 | Make example for this keyboard (after setting up your build environment): | ||
| 13 | |||
| 14 | make keysofkings/twokey:default | ||
| 15 | |||
| 16 | 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/keysofkings/twokey/rules.mk b/keyboards/keysofkings/twokey/rules.mk new file mode 100755 index 000000000..d892fd2b7 --- /dev/null +++ b/keyboards/keysofkings/twokey/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 = no # 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 = yes # Audio output | ||
| 23 | ENCODER_ENABLE = yes | ||
diff --git a/keyboards/keysofkings/twokey/twokey.c b/keyboards/keysofkings/twokey/twokey.c new file mode 100755 index 000000000..1668092bf --- /dev/null +++ b/keyboards/keysofkings/twokey/twokey.c | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | /* Copyright 2020 Keys of Kings | ||
| 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 "twokey.h" | ||
diff --git a/keyboards/keysofkings/twokey/twokey.h b/keyboards/keysofkings/twokey/twokey.h new file mode 100755 index 000000000..169bc9eb1 --- /dev/null +++ b/keyboards/keysofkings/twokey/twokey.h | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | /* Copyright 2020 Keys of Kings | ||
| 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( \ | ||
| 22 | K00, \ | ||
| 23 | K10, K11 \ | ||
| 24 | ) { \ | ||
| 25 | { K00, KC_NO }, \ | ||
| 26 | { K10, K11 } \ | ||
| 27 | } | ||
| 28 | |||
