diff options
Diffstat (limited to 'keyboards/handwired/stream_cheap/2x5')
-rw-r--r-- | keyboards/handwired/stream_cheap/2x5/2x5.c | 1 | ||||
-rw-r--r-- | keyboards/handwired/stream_cheap/2x5/2x5.h | 11 | ||||
-rw-r--r-- | keyboards/handwired/stream_cheap/2x5/config.h | 26 | ||||
-rw-r--r-- | keyboards/handwired/stream_cheap/2x5/info.json | 23 | ||||
-rw-r--r-- | keyboards/handwired/stream_cheap/2x5/keymaps/default/keymap.c | 60 | ||||
-rw-r--r-- | keyboards/handwired/stream_cheap/2x5/rules.mk | 22 |
6 files changed, 143 insertions, 0 deletions
diff --git a/keyboards/handwired/stream_cheap/2x5/2x5.c b/keyboards/handwired/stream_cheap/2x5/2x5.c new file mode 100644 index 0000000000..70969a316a --- /dev/null +++ b/keyboards/handwired/stream_cheap/2x5/2x5.c @@ -0,0 +1 @@ +#include "2x5.h" diff --git a/keyboards/handwired/stream_cheap/2x5/2x5.h b/keyboards/handwired/stream_cheap/2x5/2x5.h new file mode 100644 index 0000000000..f01c8302a2 --- /dev/null +++ b/keyboards/handwired/stream_cheap/2x5/2x5.h @@ -0,0 +1,11 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT_ortho_2x5( \ + K00, K01, K02, K03, K04, \ + K10, K11, K12, K13, K14 \ +) { \ + { K00, K01, K02, K03, K04 }, \ + { K10, K11, K12, K13, K14 } \ +} diff --git a/keyboards/handwired/stream_cheap/2x5/config.h b/keyboards/handwired/stream_cheap/2x5/config.h new file mode 100644 index 0000000000..cd69c632f1 --- /dev/null +++ b/keyboards/handwired/stream_cheap/2x5/config.h @@ -0,0 +1,26 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x1215 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Kyle Hart +#define PRODUCT Stream Cheap 2x5 + +/* key matrix size */ +#define MATRIX_ROWS 2 +#define MATRIX_COLS 5 + +/* define direct pins used */ +#define DIRECT_PINS { { D1,C6,B4,B5,B2}, { D0,D4,D7,E6,B6} } +//#define DIRECT_PINS { { D1, C6, B4, B6, D0}, { D7, D4, B2, B5, E6} } +/* 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/2x5/info.json b/keyboards/handwired/stream_cheap/2x5/info.json new file mode 100644 index 0000000000..9fd4b054fd --- /dev/null +++ b/keyboards/handwired/stream_cheap/2x5/info.json @@ -0,0 +1,23 @@ +{ + "keyboard_name": "Stream Cheap 2x5", + "url": "https://www.thingiverse.com/thing:4497991", + "maintainer": "qmk", + "width": 5, + "height": 2, + "layouts": { + "LAYOUT_ortho_2x5": { + "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":4, "y":0}, + {"label":"K10", "x":0, "y":1}, + {"label":"K11", "x":1, "y":1}, + {"label":"K12", "x":2, "y":1}, + {"label":"K13", "x":3, "y":1}, + {"label":"K14", "x":4, "y":1} + ] + } + } +} diff --git a/keyboards/handwired/stream_cheap/2x5/keymaps/default/keymap.c b/keyboards/handwired/stream_cheap/2x5/keymaps/default/keymap.c new file mode 100644 index 0000000000..6d140a8780 --- /dev/null +++ b/keyboards/handwired/stream_cheap/2x5/keymaps/default/keymap.c @@ -0,0 +1,60 @@ +#include QMK_KEYBOARD_H + + +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; +} + +#define LOCK LGUI(KC_L) +#define CUT LCTL(KC_X) +#define COPY LCTL(KC_C) +#define PASTE LCTL(KC_V) +#define FIND LCTL(KC_F) + +enum layers { + NORMAL_LAYER = 0, + SECOND_LAYER + // , + // THIRD_LAYER +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [NORMAL_LAYER] = LAYOUT_ortho_2x5( + VS_COMMENT, VS_UNCOMMENT, LOCK, TST_STRING, KC_F5, + KC_F9, KC_F10, KC_F11, KC_F12, TO(1) + ), + [SECOND_LAYER] = LAYOUT_ortho_2x5( + KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY, KC_MSTP, + CUT, COPY, PASTE, FIND, TO(0) + ) + // , + // [THIRD_LAYER] = LAYOUT_ortho_2x5( + // KC_Q, KC_W, KC_E, KC_R, KC_T, + // KC_Y, KC_U, KC_L, KC_P, TO(0) + // ) +}; diff --git a/keyboards/handwired/stream_cheap/2x5/rules.mk b/keyboards/handwired/stream_cheap/2x5/rules.mk new file mode 100644 index 0000000000..e4ffb10d04 --- /dev/null +++ b/keyboards/handwired/stream_cheap/2x5/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 |