diff options
author | Sam Hudson <samsamm777@users.noreply.github.com> | 2021-02-05 11:31:15 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-05 03:31:15 -0800 |
commit | 18babeae49dc933f7a07e123241ae2a78a75f168 (patch) | |
tree | 733e4f51eb0b6e45abfe3346c007ca8a07ef1cb8 /keyboards | |
parent | 59bf018e9fb50f20400d012f09558ad4ffe6d4a4 (diff) |
[Keyboard] add shk9 macropad (#11505)
* added shk9 macropad
* updated readme
* removed json file
* updated config
* removed commented config
* fixed website address
* added bootloader mode info to readme
* remove midi enable rule
* fixed comment
* fixed default keymap
* changed layout to ortho
* fixed typo
* fixed broken layout
* pr changes
* added keymap spacing
Diffstat (limited to 'keyboards')
-rw-r--r-- | keyboards/shk9/config.h | 51 | ||||
-rw-r--r-- | keyboards/shk9/info.json | 23 | ||||
-rw-r--r-- | keyboards/shk9/keymaps/default/keymap.c | 24 | ||||
-rw-r--r-- | keyboards/shk9/keymaps/via/keymap.c | 39 | ||||
-rw-r--r-- | keyboards/shk9/keymaps/via/rules.mk | 2 | ||||
-rw-r--r-- | keyboards/shk9/readme.md | 23 | ||||
-rw-r--r-- | keyboards/shk9/rules.mk | 24 | ||||
-rw-r--r-- | keyboards/shk9/shk9.c | 17 | ||||
-rw-r--r-- | keyboards/shk9/shk9.h | 37 |
9 files changed, 240 insertions, 0 deletions
diff --git a/keyboards/shk9/config.h b/keyboards/shk9/config.h new file mode 100644 index 0000000000..a8ddd3f870 --- /dev/null +++ b/keyboards/shk9/config.h @@ -0,0 +1,51 @@ +/* +Copyright 2020 Sam Hudson + +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 0x5348 +#define PRODUCT_ID 0x4B39 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Superhuman +#define PRODUCT SHK9 + +/* key matrix size */ +#define MATRIX_ROWS 3 +#define MATRIX_COLS 3 + +/* Keyboard Matrix Assignments */ +#define MATRIX_ROW_PINS { B0, B1, B2 } +#define MATRIX_COL_PINS { B3, B4, B5 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not 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 + +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION
\ No newline at end of file diff --git a/keyboards/shk9/info.json b/keyboards/shk9/info.json new file mode 100644 index 0000000000..c3122bd1ee --- /dev/null +++ b/keyboards/shk9/info.json @@ -0,0 +1,23 @@ +{ + "keyboard_name": "SHK9", + "url": "http://superhuman.website", + "maintainer": "Sam Hudson", + "width": 3, + "height": 3, + "lighting": "none", + "layouts": { + "LAYOUT_ortho_3x3": { + "layout": [ + {"label":"7", "x":0, "y":0}, + {"label":"8", "x":1, "y":0}, + {"label":"9", "x":2, "y":0}, + {"label":"4", "x":0, "y":1}, + {"label":"5", "x":1, "y":1}, + {"label":"6", "x":2, "y":1}, + {"label":"1", "x":0, "y":2}, + {"label":"2", "x":1, "y":2}, + {"label":"3", "x":2, "y":2} + ] + } + } +} diff --git a/keyboards/shk9/keymaps/default/keymap.c b/keyboards/shk9/keymaps/default/keymap.c new file mode 100644 index 0000000000..cdff8a74be --- /dev/null +++ b/keyboards/shk9/keymaps/default/keymap.c @@ -0,0 +1,24 @@ +/* Copyright 2020 Sam Hudson + * + * 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] = { + [0] = LAYOUT_ortho_3x3( /* Base */ + KC_1, KC_2, KC_3, + KC_4, KC_5, KC_6, + KC_7, KC_8, KC_9 + ) +};
\ No newline at end of file diff --git a/keyboards/shk9/keymaps/via/keymap.c b/keyboards/shk9/keymaps/via/keymap.c new file mode 100644 index 0000000000..ff780b3cf7 --- /dev/null +++ b/keyboards/shk9/keymaps/via/keymap.c @@ -0,0 +1,39 @@ +/* Copyright 2020 Sam Hudson + * + * 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] = { + [0] = LAYOUT_ortho_3x3( /* Base */ + KC_1, KC_2, KC_3, + KC_4, KC_5, KC_6, + KC_7, KC_8, KC_9 + ), + [1] = LAYOUT_ortho_3x3( + _______, _______, _______, + _______, _______, _______, + _______, _______, _______ + ), + [2] = LAYOUT_ortho_3x3( + _______, _______, _______, + _______, _______, _______, + _______, _______, _______ + ), + [3] = LAYOUT_ortho_3x3( + _______, _______, _______, + _______, _______, _______, + _______, _______, _______ + ), +};
\ No newline at end of file diff --git a/keyboards/shk9/keymaps/via/rules.mk b/keyboards/shk9/keymaps/via/rules.mk new file mode 100644 index 0000000000..43061db1dd --- /dev/null +++ b/keyboards/shk9/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes
\ No newline at end of file diff --git a/keyboards/shk9/readme.md b/keyboards/shk9/readme.md new file mode 100644 index 0000000000..1fab42a1ac --- /dev/null +++ b/keyboards/shk9/readme.md @@ -0,0 +1,23 @@ +# shk9 + +![shk9](https://i.imgur.com/FluRgiHl.jpg) + +The SHK9 is a tiny 3x3 macropad! Fully configurable with via. + +* Keyboard Maintainer: [Sam Hudson](https://github.com/samsamm777) +* Hardware Supported: SHK9 PCB (ATmega32u4) +* Hardware Availability: http://superhuman.website + +Make example for this keyboard (after setting up your build environment): + + make shk9:default + +Flashing example for this keyboard: + + make shk9:default:flash + +## Bootloader Mode + +To reset the board into bootloader mode, remove the pcb from the case buy removing keycaps, and unscrewing the 3 screws. Then (while plugged in) press the switch on the underside of the PCB for a few seconds. The board is now in bootloader mode. + +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).
\ No newline at end of file diff --git a/keyboards/shk9/rules.mk b/keyboards/shk9/rules.mk new file mode 100644 index 0000000000..8d356cbd1a --- /dev/null +++ b/keyboards/shk9/rules.mk @@ -0,0 +1,24 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +LAYOUTS = ortho_3x3
\ No newline at end of file diff --git a/keyboards/shk9/shk9.c b/keyboards/shk9/shk9.c new file mode 100644 index 0000000000..7608dcd424 --- /dev/null +++ b/keyboards/shk9/shk9.c @@ -0,0 +1,17 @@ +/* Copyright 2020 Sam Hudson + * + * 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 "shk9.h" diff --git a/keyboards/shk9/shk9.h b/keyboards/shk9/shk9.h new file mode 100644 index 0000000000..d2c63a49c1 --- /dev/null +++ b/keyboards/shk9/shk9.h @@ -0,0 +1,37 @@ +/* Copyright 2020 Sam Hudson + * + * 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" + +/* This is a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_ortho_3x3( \ + K00, K01, K02, \ + K10, K11, K12, \ + K20, K21, K22 \ +) { \ + { K00, K01, K02 }, \ + { K10, K11, K12 }, \ + { K20, K21, K22 } \ +} |