diff options
| author | J.Flanagan <jrfhoutx@comcast.net> | 2019-09-14 16:03:14 -0500 |
|---|---|---|
| committer | noroadsleft <18669334+noroadsleft@users.noreply.github.com> | 2019-09-14 14:03:14 -0700 |
| commit | 0cbe1eb433726f32885433835cd633c65199393a (patch) | |
| tree | 89529dfcfcfcfc67e2135232fb17895bf4e19a58 | |
| parent | 969dd8be562ad8d52822673e065f5d9947eb809d (diff) | |
| download | qmk_firmware-0cbe1eb433726f32885433835cd633c65199393a.tar.gz qmk_firmware-0cbe1eb433726f32885433835cd633c65199393a.zip | |
[Keyboard] Add 2key2crawl (#6727)
* adding working 2key2crawl
Adding working 2key2crawl files
edited files in accordance with original PR comments
* Changes
Changes and updates
* Update readme.md
* Update config.h
removed IS_COMMAND block that was missed in previous commit
* Changes to vol/keymap.c
Removed unneccesary function
| -rw-r--r-- | keyboards/2key2crawl/2key2crawl.c | 1 | ||||
| -rw-r--r-- | keyboards/2key2crawl/2key2crawl.h | 12 | ||||
| -rw-r--r-- | keyboards/2key2crawl/config.h | 44 | ||||
| -rw-r--r-- | keyboards/2key2crawl/keymaps/default/keymap.c | 28 | ||||
| -rw-r--r-- | keyboards/2key2crawl/keymaps/tabs/keymap.c | 26 | ||||
| -rw-r--r-- | keyboards/2key2crawl/keymaps/vol/keymap.c | 25 | ||||
| -rw-r--r-- | keyboards/2key2crawl/readme.md | 16 | ||||
| -rw-r--r-- | keyboards/2key2crawl/rules.mk | 29 |
8 files changed, 181 insertions, 0 deletions
diff --git a/keyboards/2key2crawl/2key2crawl.c b/keyboards/2key2crawl/2key2crawl.c new file mode 100644 index 000000000..fe2161bef --- /dev/null +++ b/keyboards/2key2crawl/2key2crawl.c | |||
| @@ -0,0 +1 @@ | |||
| #include "2key2crawl.h" | |||
diff --git a/keyboards/2key2crawl/2key2crawl.h b/keyboards/2key2crawl/2key2crawl.h new file mode 100644 index 000000000..6e8ee6420 --- /dev/null +++ b/keyboards/2key2crawl/2key2crawl.h | |||
| @@ -0,0 +1,12 @@ | |||
| 1 | #pragma once | ||
| 2 | |||
| 3 | #include "quantum.h" | ||
| 4 | |||
| 5 | #define LAYOUT( \ | ||
| 6 | K00, K01, K02, K03, K15, \ | ||
| 7 | K10, K11, K12, K13, K14, K16 \ | ||
| 8 | ) { \ | ||
| 9 | { K00, K01, K02, K03, KC_NO, KC_NO, KC_NO }, \ | ||
| 10 | { K10, K11, K12, K13, K14, K15, K16 }, \ | ||
| 11 | } | ||
| 12 | |||
diff --git a/keyboards/2key2crawl/config.h b/keyboards/2key2crawl/config.h new file mode 100644 index 000000000..b93dcc7fa --- /dev/null +++ b/keyboards/2key2crawl/config.h | |||
| @@ -0,0 +1,44 @@ | |||
| 1 | #pragma once | ||
| 2 | |||
| 3 | #include "config_common.h" | ||
| 4 | |||
| 5 | /* USB Device descriptor parameter */ | ||
| 6 | #define VENDOR_ID 0xFEED | ||
| 7 | #define PRODUCT_ID 0x6090 | ||
| 8 | #define DEVICE_VER 0x0002 | ||
| 9 | #define MANUFACTURER WoodKeys.click | ||
| 10 | #define PRODUCT 2Key2Crawl | ||
| 11 | #define DESCRIPTION ATX Keycrawl 2018 | ||
| 12 | |||
| 13 | /* key matrix size */ | ||
| 14 | #define MATRIX_ROWS 2 | ||
| 15 | #define MATRIX_COLS 7 | ||
| 16 | |||
| 17 | /* key matrix pins */ | ||
| 18 | #define MATRIX_ROW_PINS { C4, C5 } | ||
| 19 | #define MATRIX_COL_PINS { B3, B4, B5, B6, B7, C7, B2 } | ||
| 20 | #define UNUSED_PINS | ||
| 21 | |||
| 22 | |||
| 23 | #define ENCODERS_PAD_A { D0 } | ||
| 24 | #define ENCODERS_PAD_B { D1 } | ||
| 25 | #define ENCODER_RESOLUTION 1 | ||
| 26 | |||
| 27 | /* COL2ROW or ROW2COL */ | ||
| 28 | #define DIODE_DIRECTION COL2ROW | ||
| 29 | |||
| 30 | /* Set 0 if debouncing isn't needed */ | ||
| 31 | #define DEBOUNCE 5 | ||
| 32 | |||
| 33 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | ||
| 34 | #define LOCKING_SUPPORT_ENABLE | ||
| 35 | |||
| 36 | /* Locking resynchronize hack */ | ||
| 37 | #define LOCKING_RESYNC_ENABLE | ||
| 38 | |||
| 39 | |||
| 40 | #ifdef RGBLIGHT_ENABLE | ||
| 41 | #define RGB_DI_PIN C6 | ||
| 42 | #define RGBLIGHT_ANIMATIONS | ||
| 43 | #define RGBLED_NUM 3 | ||
| 44 | #endif | ||
diff --git a/keyboards/2key2crawl/keymaps/default/keymap.c b/keyboards/2key2crawl/keymaps/default/keymap.c new file mode 100644 index 000000000..71222d40f --- /dev/null +++ b/keyboards/2key2crawl/keymaps/default/keymap.c | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | #include QMK_KEYBOARD_H | ||
| 2 | |||
| 3 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 4 | |||
| 5 | LAYOUT( | ||
| 6 | KC_1, KC_2, KC_3, KC_4, KC_5, | ||
| 7 | KC_6, KC_7, KC_8, KC_9, KC_0, KC_ENTER), | ||
| 8 | |||
| 9 | }; | ||
| 10 | |||
| 11 | void matrix_init_user(void) { | ||
| 12 | debug_config.matrix = 1; | ||
| 13 | debug_config.keyboard = 1; | ||
| 14 | debug_config.enable = 1; | ||
| 15 | } | ||
| 16 | |||
| 17 | |||
| 18 | |||
| 19 | void encoder_update_user(int8_t index, bool clockwise) { | ||
| 20 | if (index == 0) { | ||
| 21 | if (clockwise) { | ||
| 22 | tap_code(KC_PGUP); | ||
| 23 | } else { | ||
| 24 | tap_code(KC_PGDN); | ||
| 25 | } | ||
| 26 | } | ||
| 27 | } | ||
| 28 | |||
diff --git a/keyboards/2key2crawl/keymaps/tabs/keymap.c b/keyboards/2key2crawl/keymaps/tabs/keymap.c new file mode 100644 index 000000000..fcf4a2af8 --- /dev/null +++ b/keyboards/2key2crawl/keymaps/tabs/keymap.c | |||
| @@ -0,0 +1,26 @@ | |||
| 1 | #include QMK_KEYBOARD_H | ||
| 2 | |||
| 3 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 4 | |||
| 5 | LAYOUT( | ||
| 6 | KC_1, KC_2, KC_3, KC_4, KC_5, | ||
| 7 | KC_6, KC_7, KC_8, KC_9, KC_0, KC_ENTER), | ||
| 8 | |||
| 9 | }; | ||
| 10 | |||
| 11 | void matrix_init_user(void) { | ||
| 12 | debug_config.matrix = 1; | ||
| 13 | debug_config.keyboard = 1; | ||
| 14 | debug_config.enable = 1; | ||
| 15 | } | ||
| 16 | |||
| 17 | void encoder_update_user(int8_t index, bool clockwise) { | ||
| 18 | if (index == 0) { | ||
| 19 | if (clockwise) { | ||
| 20 | tap_code16(C(KC_T)); | ||
| 21 | } else { | ||
| 22 | tap_code16(C(KC_W)); | ||
| 23 | } | ||
| 24 | } | ||
| 25 | } | ||
| 26 | |||
diff --git a/keyboards/2key2crawl/keymaps/vol/keymap.c b/keyboards/2key2crawl/keymaps/vol/keymap.c new file mode 100644 index 000000000..8ffd3f58c --- /dev/null +++ b/keyboards/2key2crawl/keymaps/vol/keymap.c | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | #include QMK_KEYBOARD_H | ||
| 2 | |||
| 3 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 4 | |||
| 5 | LAYOUT( | ||
| 6 | KC_1, KC_2, KC_3, KC_4, KC_5, | ||
| 7 | KC_6, KC_7, KC_8, KC_9, KC_0, KC_ENTER), | ||
| 8 | |||
| 9 | }; | ||
| 10 | |||
| 11 | void matrix_init_user(void) { | ||
| 12 | debug_config.matrix = 1; | ||
| 13 | debug_config.keyboard = 1; | ||
| 14 | debug_config.enable = 1; | ||
| 15 | } | ||
| 16 | |||
| 17 | void encoder_update_user(int8_t index, bool clockwise) { | ||
| 18 | if (index == 0) { | ||
| 19 | if (clockwise) { | ||
| 20 | tap_code(KC_VOLU); | ||
| 21 | } else { | ||
| 22 | tap_code(KC_VOLD); | ||
| 23 | } | ||
| 24 | } | ||
| 25 | } | ||
diff --git a/keyboards/2key2crawl/readme.md b/keyboards/2key2crawl/readme.md new file mode 100644 index 000000000..7651f4025 --- /dev/null +++ b/keyboards/2key2crawl/readme.md | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | # 2Key2CrawlPad | ||
| 2 | |||
| 3 |  | ||
| 4 | |||
| 5 | A 2x5 macropad/numpad with a rotary encoder, exclusively available at Austin Keycrawl 2018 (12-01-2018). | ||
| 6 | |||
| 7 | Keyboard Maintainer: QMK Community | ||
| 8 | Keyboard Designer: [Cole Markham](https://github.com/colemarkham) | ||
| 9 | Hardware Supported: Crawlpad | ||
| 10 | Hardware Availability: Exclusive to Keycrawl events, contact [awwwwwwyeaahhhhhh](https://www.reddit.com/user/awwwwwwyeaahhhhhh) for more details. | ||
| 11 | |||
| 12 | Make example for this keyboard (after setting up your build environment): | ||
| 13 | |||
| 14 | make 2key2crawl: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/2key2crawl/rules.mk b/keyboards/2key2crawl/rules.mk new file mode 100644 index 000000000..feff75b1f --- /dev/null +++ b/keyboards/2key2crawl/rules.mk | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | # MCU name | ||
| 2 | MCU = atmega32u2 | ||
| 3 | |||
| 4 | |||
| 5 | # Bootloader selection | ||
| 6 | # Teensy halfkay | ||
| 7 | # Pro Micro caterina | ||
| 8 | # Atmel DFU atmel-dfu | ||
| 9 | # LUFA DFU lufa-dfu | ||
| 10 | # QMK DFU qmk-dfu | ||
| 11 | # atmega32a bootloadHID | ||
| 12 | BOOTLOADER = atmel-dfu | ||
| 13 | |||
| 14 | |||
| 15 | |||
| 16 | # Build Options | ||
| 17 | # comment out to disable the options. | ||
| 18 | # | ||
| 19 | BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) | ||
| 20 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) | ||
| 21 | EXTRAKEY_ENABLE = no # Audio control and System control(+450) | ||
| 22 | CONSOLE_ENABLE = yes # Console for debug(+400) | ||
| 23 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
| 24 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
| 25 | NKRO_ENABLE = no # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
| 26 | BACKLIGHT_ENABLE = no # [Crawlpad] Custom backlighting code is used, so this should not be enabled | ||
| 27 | AUDIO_ENABLE = no # [Crawlpad] This can be enabled if a speaker is connected to the expansion port. Not compatible with RGBLIGHT below | ||
| 28 | RGBLIGHT_ENABLE = no # [Crawlpad] This can be enabled if a ws2812 strip is connected to the expansion port. | ||
| 29 | ENCODER_ENABLE = yes # [2Key2crawl] Make the knobs turn | ||
