From f3b518ae4082bd49335c1b60d2cfe89a500ad878 Mon Sep 17 00:00:00 2001 From: Kyle <12398294+hartk1213@users.noreply.github.com> Date: Fri, 31 Jul 2020 16:18:06 -0700 Subject: [Keyboard] Added a new handwired 2x3,2x4,2x5 keyboard called the Stream_cheap (#9871) * Added a new handwired 2x3,2x4,2x5 keyboard called the Stream_cheap stream cheap is a diy version of the El Gato Stream deck minus the LCD keys but you can always get relegendable keycaps to change the icon if you want * added missing commas in info.json files * update config to change pin definition * changed keymap.c for 2x4 was trying to add macros and multi key commands to the keymap, i added 2 ctrl commands that have more than one key i.e. ctrl-k-c (visual studio comment hot key) and i added a test string to see how type out a string with the press of a button * testing more changes to the keymap to the 2x5 * Update keyboards/handwired/stream_cheap/2x3/2x3.c * Update keyboards/handwired/stream_cheap/2x3/config.h * Update keyboards/handwired/stream_cheap/2x3/rules.mk * Update keyboards/handwired/stream_cheap/2x5/config.h * Update keyboards/handwired/stream_cheap/2x5/info.json * Update keyboards/handwired/stream_cheap/2x3/config.h * Update keyboards/handwired/stream_cheap/2x3/info.json * Update keyboards/handwired/stream_cheap/2x4/config.h * Update keyboards/handwired/stream_cheap/2x4/info.json * Update keyboards/handwired/stream_cheap/2x4/keymaps/default/keymap.c * Update keyboards/handwired/stream_cheap/2x5/info.json * Update keyboards/handwired/stream_cheap/2x5/config.h * Update keyboards/handwired/stream_cheap/2x5/rules.mk * Update keyboards/handwired/stream_cheap/2x4/2x4.c * Update keyboards/handwired/stream_cheap/2x4/config.h * Update keyboards/handwired/stream_cheap/2x4/info.json * Update keyboards/handwired/stream_cheap/2x5/2x5.c * Update keyboards/handwired/stream_cheap/2x4/rules.mk * removed file as per request of user zvecr * removed line in rules.mk for 2x5 * Update keyboards/handwired/stream_cheap/2x5/keymaps/default/keymap.c * Apply suggestions from code review changes suggested in code review --- keyboards/handwired/stream_cheap/2x4/2x4.c | 1 + keyboards/handwired/stream_cheap/2x4/2x4.h | 12 ++++++ keyboards/handwired/stream_cheap/2x4/config.h | 27 +++++++++++++ keyboards/handwired/stream_cheap/2x4/info.json | 21 ++++++++++ .../stream_cheap/2x4/keymaps/default/keymap.c | 46 ++++++++++++++++++++++ keyboards/handwired/stream_cheap/2x4/rules.mk | 22 +++++++++++ 6 files changed, 129 insertions(+) create mode 100644 keyboards/handwired/stream_cheap/2x4/2x4.c create mode 100644 keyboards/handwired/stream_cheap/2x4/2x4.h create mode 100644 keyboards/handwired/stream_cheap/2x4/config.h create mode 100644 keyboards/handwired/stream_cheap/2x4/info.json create mode 100644 keyboards/handwired/stream_cheap/2x4/keymaps/default/keymap.c create mode 100644 keyboards/handwired/stream_cheap/2x4/rules.mk (limited to 'keyboards/handwired/stream_cheap/2x4') diff --git a/keyboards/handwired/stream_cheap/2x4/2x4.c b/keyboards/handwired/stream_cheap/2x4/2x4.c new file mode 100644 index 0000000000..a0519d21b7 --- /dev/null +++ b/keyboards/handwired/stream_cheap/2x4/2x4.c @@ -0,0 +1 @@ +#include "2x4.h" diff --git a/keyboards/handwired/stream_cheap/2x4/2x4.h b/keyboards/handwired/stream_cheap/2x4/2x4.h new file mode 100644 index 0000000000..07856044f2 --- /dev/null +++ b/keyboards/handwired/stream_cheap/2x4/2x4.h @@ -0,0 +1,12 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT_ortho_2x4(\ + K00, K01, K02,K03, \ + K04, K05, K06,K07 \ +) \ + { \ + { K00,K01,K02,K03}, \ + { K04,K05,K06,K07} \ +} diff --git a/keyboards/handwired/stream_cheap/2x4/config.h b/keyboards/handwired/stream_cheap/2x4/config.h new file mode 100644 index 0000000000..14b4d9e368 --- /dev/null +++ b/keyboards/handwired/stream_cheap/2x4/config.h @@ -0,0 +1,27 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x1214 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Kyle Hart +#define PRODUCT Stream Cheap 2x4 + +/* key matrix size */ +#define MATRIX_ROWS 2 +#define MATRIX_COLS 4 + +/* define direct pins used */ +#define DIRECT_PINS { { B5,D7,C6,D1}, { B4,E6,D4,D0} } + + +/* 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 diff --git a/keyboards/handwired/stream_cheap/2x4/info.json b/keyboards/handwired/stream_cheap/2x4/info.json new file mode 100644 index 0000000000..ef495dbf6f --- /dev/null +++ b/keyboards/handwired/stream_cheap/2x4/info.json @@ -0,0 +1,21 @@ +{ + "keyboard_name": "Stream Cheap 2x4", + "url": "https://www.thingiverse.com/thing:4497991", + "maintainer": "qmk", + "width": 4, + "height": 2, + "layouts": { + "LAYOUT_ortho_2x4": { + "layout": [ + {"label":"K00", "x":0, "y":0}, + {"label":"K01", "x":1, "y":0}, + {"label":"K02", "x":2, "y":0}, + {"label":"K03", "x":3, "y":0}, + {"label":"K04", "x":0, "y":1}, + {"label":"K05", "x":1, "y":1}, + {"label":"K06", "x":2, "y":1}, + {"label":"K07", "x":3, "y":1} + ] + } + } +} diff --git a/keyboards/handwired/stream_cheap/2x4/keymaps/default/keymap.c b/keyboards/handwired/stream_cheap/2x4/keymaps/default/keymap.c new file mode 100644 index 0000000000..541642f959 --- /dev/null +++ b/keyboards/handwired/stream_cheap/2x4/keymaps/default/keymap.c @@ -0,0 +1,46 @@ +#include QMK_KEYBOARD_H + + +enum layers { + NORMAL_LAYER = 0, + SECOND_LAYER +}; + +enum custom_keycode { + VS_COMMENT = SAFE_RANGE, + VS_UNCOMMENT, + TST_STRING +}; + + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case VS_COMMENT: + if (record->event.pressed) { + SEND_STRING(SS_LCTL("kc")); + } + break; + case VS_UNCOMMENT: + if (record->event.pressed) { + SEND_STRING(SS_LCTL("ku")); + } + break; + case TST_STRING: + if (record->event.pressed) { + SEND_STRING("12345\n"); + } + break; + + } + return true; +} +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [NORMAL_LAYER] = LAYOUT_ortho_2x4( + VS_COMMENT, VS_UNCOMMENT, TST_STRING, KC_4, + KC_5, KC_6, KC_7, TO(1) + ), + [SECOND_LAYER] = LAYOUT_ortho_2x4( + KC_A, KC_B, KC_C, KC_D, + KC_E, KC_F, KC_G, TO(0) + ) +}; diff --git a/keyboards/handwired/stream_cheap/2x4/rules.mk b/keyboards/handwired/stream_cheap/2x4/rules.mk new file mode 100644 index 0000000000..e4ffb10d04 --- /dev/null +++ b/keyboards/handwired/stream_cheap/2x4/rules.mk @@ -0,0 +1,22 @@ +# 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 = yes # 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 = 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 -- cgit v1.2.3