summaryrefslogtreecommitdiff
path: root/keyboards/keysofkings
diff options
context:
space:
mode:
authorKeys of Kings <keysofkings@gmail.com>2020-11-01 12:53:17 -0600
committerGitHub <noreply@github.com>2020-11-01 10:53:17 -0800
commit76bc23550857badaa35ae68c62875dd8b1fad0ce (patch)
tree42252f3f4c2f6b7d32ddf9dd9b565b6f6e2c662d /keyboards/keysofkings
parentfed9c97ddbd714c3a6981cfeb4534f286b969079 (diff)
downloadqmk_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>
Diffstat (limited to 'keyboards/keysofkings')
-rwxr-xr-xkeyboards/keysofkings/twokey/config.h68
-rw-r--r--keyboards/keysofkings/twokey/info.json16
-rw-r--r--keyboards/keysofkings/twokey/keymaps/default/keymap.c79
-rw-r--r--keyboards/keysofkings/twokey/readme.md16
-rwxr-xr-xkeyboards/keysofkings/twokey/rules.mk23
-rwxr-xr-xkeyboards/keysofkings/twokey/twokey.c17
-rwxr-xr-xkeyboards/keysofkings/twokey/twokey.h28
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 0000000000..d7f4c3cf0a
--- /dev/null
+++ b/keyboards/keysofkings/twokey/config.h
@@ -0,0 +1,68 @@
+ /* Copyright 2020 Keys of Kings
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xFEED
+#define PRODUCT_ID 0xAE12
+#define DEVICE_VER 0x0001
+#define MANUFACTURER Keys of Kings
+#define PRODUCT Twokey
+
+/* key matrix size */
+#define MATRIX_ROWS 2
+#define MATRIX_COLS 2
+
+/* key matrix pins */
+#define MATRIX_ROW_PINS { B4, B5 }
+#define MATRIX_COL_PINS { B3, B2 }
+#define UNUSED_PINS
+
+
+#define ENCODERS_PAD_A { E6 }
+#define ENCODERS_PAD_B { D7 }
+#define ENCODER_RESOLUTION 1
+#define ENCODER_DIRECTION_FLIP
+
+/* COL2ROW or ROW2COL */
+#define DIODE_DIRECTION COL2ROW
+
+/* Set 0 if debouncing isn't needed */
+#define DEBOUNCE 5
+
+/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
+#define LOCKING_SUPPORT_ENABLE
+
+/* Locking resynchronize hack */
+#define LOCKING_RESYNC_ENABLE
+
+#ifdef RGBLIGHT_ENABLE
+#define RGB_DI_PIN D3
+#define RGBLIGHT_ANIMATIONS
+#define RGBLED_NUM 5
+#define RGBLIGHT_HUE_STEP 4
+#define RGBLIGHT_SAT_STEP 4
+#define RGBLIGHT_VAL_STEP 4
+#define B6_AUDIO
+#define AUDIO_CLICKY
+#endif
+
+#ifdef AUDIO_ENABLE
+#define STARTUP_SONG SONG(MAJOR_SOUND)
+#endif
diff --git a/keyboards/keysofkings/twokey/info.json b/keyboards/keysofkings/twokey/info.json
new file mode 100644
index 0000000000..d7dabbc946
--- /dev/null
+++ b/keyboards/keysofkings/twokey/info.json
@@ -0,0 +1,16 @@
+{
+ "keyboard_name": "Twokey",
+ "url": "",
+ "maintainer": "Keys of Kings",
+ "width": 2,
+ "height": 2.5,
+ "layouts": {
+ "LAYOUT": {
+ "layout": [
+ {"x": 0.5, "y": 0},
+ {"x": 0, "y": 1.5},
+ {"x": 1, "y": 1.5}
+ ]
+ }
+ }
+}
diff --git a/keyboards/keysofkings/twokey/keymaps/default/keymap.c b/keyboards/keysofkings/twokey/keymaps/default/keymap.c
new file mode 100644
index 0000000000..eaa4f88de5
--- /dev/null
+++ b/keyboards/keysofkings/twokey/keymaps/default/keymap.c
@@ -0,0 +1,79 @@
+ /* Copyright 2020 Keys of Kings
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include QMK_KEYBOARD_H
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ LAYOUT(
+ LT(1, KC_MUTE),
+ LT(4, KC_MPLY), LT(7, KC_MNXT)),
+
+ LAYOUT(
+ KC_TRNS,
+ TO(2), TO(3)),
+
+ LAYOUT(
+ TO(0),
+ RGB_TOG, RGB_MOD),
+
+ LAYOUT(
+ TO(0),
+ RGB_VAI, RGB_VAD),
+
+ LAYOUT(
+ TO(0),
+ RGB_HUI, RGB_HUD),
+
+ LAYOUT(
+ TO(5),
+ KC_TRNS, TO(6)),
+
+ LAYOUT(
+ TO(0),
+ RGB_SAI, RGB_SAD),
+
+ LAYOUT(
+ TO(8),
+ TO(9), KC_TRNS),
+
+ LAYOUT(
+ TO(0),
+ CK_TOGG, MU_TOG),
+
+ LAYOUT(
+ TO(0),
+ RESET, EEPROM_RESET),
+};
+
+void matrix_init_user(void) {
+ debug_config.matrix = 1;
+ debug_config.keyboard = 1;
+ debug_config.enable = 1;
+}
+
+void encoder_update_user(int8_t index, bool clockwise) {
+ if (index == 0) {
+ if (clockwise) {
+ tap_code(KC_VOLD);
+ } else {
+ tap_code(KC_VOLU);
+ }
+ # ifdef AUDIO_CLICKY
+ clockwise ? clicky_freq_up() : clicky_freq_down();
+# endif
+ }
+}
+
diff --git a/keyboards/keysofkings/twokey/readme.md b/keyboards/keysofkings/twokey/readme.md
new file mode 100644
index 0000000000..18394f8f80
--- /dev/null
+++ b/keyboards/keysofkings/twokey/readme.md
@@ -0,0 +1,16 @@
+# TWOKEY
+
+![Twokey](https://i.imgur.com/UiLwPldl.jpeg)
+
+A Two Key mini keyboard with Rotary Encoder/Switch along with Backlight keys, RGB Underglow, and Piezo Buzzer. Supports Cherry, Choc, Matias switches.
+
+* Keyboard Maintainer: Keys of Kings
+* Keyboard Designer: King Icewind
+* Hardware Supported: Twokey PCB, Pro Micro
+* Hardware Availability: www.keysofkings.com
+
+Make example for this keyboard (after setting up your build environment):
+
+ make keysofkings/twokey:default
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/keysofkings/twokey/rules.mk b/keyboards/keysofkings/twokey/rules.mk
new file mode 100755
index 0000000000..d892fd2b7b
--- /dev/null
+++ b/keyboards/keysofkings/twokey/rules.mk
@@ -0,0 +1,23 @@
+# MCU name
+MCU = atmega32u4
+
+# Bootloader selection
+BOOTLOADER = caterina
+
+# Build Options
+# change yes to no to disable
+#
+BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
+MOUSEKEY_ENABLE = no # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+CONSOLE_ENABLE = no # Console for debug
+COMMAND_ENABLE = no # Commands for debug and configuration
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+NKRO_ENABLE = no # USB Nkey Rollover
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
+RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
+BLUETOOTH_ENABLE = no # Enable Bluetooth
+AUDIO_ENABLE = yes # Audio output
+ENCODER_ENABLE = yes
diff --git a/keyboards/keysofkings/twokey/twokey.c b/keyboards/keysofkings/twokey/twokey.c
new file mode 100755
index 0000000000..1668092bf4
--- /dev/null
+++ b/keyboards/keysofkings/twokey/twokey.c
@@ -0,0 +1,17 @@
+ /* Copyright 2020 Keys of Kings
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "twokey.h"
diff --git a/keyboards/keysofkings/twokey/twokey.h b/keyboards/keysofkings/twokey/twokey.h
new file mode 100755
index 0000000000..169bc9eb11
--- /dev/null
+++ b/keyboards/keysofkings/twokey/twokey.h
@@ -0,0 +1,28 @@
+ /* Copyright 2020 Keys of Kings
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#pragma once
+
+#include "quantum.h"
+
+#define LAYOUT( \
+ K00, \
+ K10, K11 \
+) { \
+ { K00, KC_NO }, \
+ { K10, K11 } \
+}
+