From f5fae744e6ccd6f43dd967b679c6f80c006e8d8b Mon Sep 17 00:00:00 2001 From: Josh Channings Date: Thu, 14 Oct 2021 23:55:56 +0100 Subject: [PATCH] Add rotated numpad variant of Keeb.io Viterbi This is just the right-hand side of a Viterbi rev2 used as a numpad with a few media & special keys. You could apply the same concept to the left-hand side, but you would have to use a 1U enter, since the 2U space would be on the wrong side. --- keyboards/keebio/viterbi_numpad/.noci | 0 keyboards/keebio/viterbi_numpad/config.h | 20 +++++++ keyboards/keebio/viterbi_numpad/info.json | 52 +++++++++++++++++ .../viterbi_numpad/keymaps/default/config.h | 32 +++++++++++ .../viterbi_numpad/keymaps/default/keymap.c | 35 ++++++++++++ .../viterbi_numpad/keymaps/default/rules.mk | 1 + keyboards/keebio/viterbi_numpad/readme.md | 23 ++++++++ keyboards/keebio/viterbi_numpad/rev2/config.h | 56 +++++++++++++++++++ keyboards/keebio/viterbi_numpad/rev2/rev2.c | 18 ++++++ keyboards/keebio/viterbi_numpad/rev2/rev2.h | 34 +++++++++++ keyboards/keebio/viterbi_numpad/rev2/rules.mk | 5 ++ keyboards/keebio/viterbi_numpad/rules.mk | 26 +++++++++ keyboards/keebio/viterbi_numpad/viterbi.c | 1 + keyboards/keebio/viterbi_numpad/viterbi.h | 8 +++ 14 files changed, 311 insertions(+) create mode 100644 keyboards/keebio/viterbi_numpad/.noci create mode 100644 keyboards/keebio/viterbi_numpad/config.h create mode 100644 keyboards/keebio/viterbi_numpad/info.json create mode 100644 keyboards/keebio/viterbi_numpad/keymaps/default/config.h create mode 100644 keyboards/keebio/viterbi_numpad/keymaps/default/keymap.c create mode 100644 keyboards/keebio/viterbi_numpad/keymaps/default/rules.mk create mode 100644 keyboards/keebio/viterbi_numpad/readme.md create mode 100644 keyboards/keebio/viterbi_numpad/rev2/config.h create mode 100644 keyboards/keebio/viterbi_numpad/rev2/rev2.c create mode 100644 keyboards/keebio/viterbi_numpad/rev2/rev2.h create mode 100644 keyboards/keebio/viterbi_numpad/rev2/rules.mk create mode 100644 keyboards/keebio/viterbi_numpad/rules.mk create mode 100644 keyboards/keebio/viterbi_numpad/viterbi.c create mode 100644 keyboards/keebio/viterbi_numpad/viterbi.h diff --git a/keyboards/keebio/viterbi_numpad/.noci b/keyboards/keebio/viterbi_numpad/.noci new file mode 100644 index 00000000000..e69de29bb2d diff --git a/keyboards/keebio/viterbi_numpad/config.h b/keyboards/keebio/viterbi_numpad/config.h new file mode 100644 index 00000000000..97f4d12c728 --- /dev/null +++ b/keyboards/keebio/viterbi_numpad/config.h @@ -0,0 +1,20 @@ +/* +Copyright 2021 Josh Channings + +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 . +*/ + +#pragma once + +#include "config_common.h" diff --git a/keyboards/keebio/viterbi_numpad/info.json b/keyboards/keebio/viterbi_numpad/info.json new file mode 100644 index 00000000000..70ceb2144f3 --- /dev/null +++ b/keyboards/keebio/viterbi_numpad/info.json @@ -0,0 +1,52 @@ +{ + "keyboard_name": "Viterbi Numpad", + "url": "https://keeb.io", + "maintainer": "joshch", + "layouts": { + "LAYOUT": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + + {"x":0, "y":1}, + {"x":1, "y":1}, + {"x":2, "y":1}, + {"x":3, "y":1}, + {"x":4, "y":1}, + + {"x":0, "y":2}, + {"x":1, "y":2}, + {"x":2, "y":2}, + {"x":3, "y":2}, + {"x":4, "y":2}, + + {"x":0, "y":3}, + {"x":1, "y":3}, + {"x":2, "y":3}, + {"x":3, "y":3}, + {"x":4, "y":3}, + + {"x":0, "y":4}, + {"x":1, "y":4}, + {"x":2, "y":4}, + {"x":3, "y":4}, + {"x":4, "y":4}, + + {"x":0, "y":5}, + {"x":1, "y":5}, + {"x":2, "y":5}, + {"x":3, "y":5}, + {"x":4, "y":5}, + + {"x":0, "y":6}, + {"x":1, "y":6}, + {"x":2, "y":6}, + {"x":3, "y":6}, + {"x":4, "y":6} + ] + } + } +} diff --git a/keyboards/keebio/viterbi_numpad/keymaps/default/config.h b/keyboards/keebio/viterbi_numpad/keymaps/default/config.h new file mode 100644 index 00000000000..cd49321fddf --- /dev/null +++ b/keyboards/keebio/viterbi_numpad/keymaps/default/config.h @@ -0,0 +1,32 @@ +/* +Copyright 2021 Josh Channings + +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 . +*/ + +#pragma once + +// #define USE_I2C + +/* Select hand configuration */ + +// #define MASTER_RIGHT +// #define EE_HANDS + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 12 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 diff --git a/keyboards/keebio/viterbi_numpad/keymaps/default/keymap.c b/keyboards/keebio/viterbi_numpad/keymaps/default/keymap.c new file mode 100644 index 00000000000..8de624392b5 --- /dev/null +++ b/keyboards/keebio/viterbi_numpad/keymaps/default/keymap.c @@ -0,0 +1,35 @@ +#include QMK_KEYBOARD_H + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _NUMPAD 0 + +enum custom_keycodes { + NUMPAD = SAFE_RANGE, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* NUMPAD + * ,----------------------------------. + * |PPause|SkpBk |SkpFwd| |Power | + * | Esc | Home | End |Eject |Sleep | + * | Bksp | Del | / | * | = | + * | Tab | 7 | 8 | 9 | - | + * |Pg Up | 4 | 5 | 6 | + | + * |Pg Dn | 1 | 2 | 3 |XXXXXX| + * |Space | 0 | Cmd | . |Enter | + * `----------------------------------' + */ + [_NUMPAD] = LAYOUT_ortho_7x5( + KC_MPLY, KC_MRWD, KC_MFFD, KC_INS, KC_POWER, + KC_ESC, KC_HOME, KC_END, KC_EJCT, KC_SLEP, + KC_BSPC, KC_DEL, KC_PSLS, KC_PAST, KC_PEQL, + KC_TAB, KC_P7, KC_P8, KC_P9, KC_PMNS, + KC_PGUP, KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_PGDN, KC_P1, KC_P2, KC_P3, XXXXXXX, + KC_SPC, KC_P0, KC_RCMD, KC_PDOT, KC_PENT + ), +}; diff --git a/keyboards/keebio/viterbi_numpad/keymaps/default/rules.mk b/keyboards/keebio/viterbi_numpad/keymaps/default/rules.mk new file mode 100644 index 00000000000..1e3cebb1451 --- /dev/null +++ b/keyboards/keebio/viterbi_numpad/keymaps/default/rules.mk @@ -0,0 +1 @@ +RGBLIGHT_ENABLE = yes diff --git a/keyboards/keebio/viterbi_numpad/readme.md b/keyboards/keebio/viterbi_numpad/readme.md new file mode 100644 index 00000000000..9dae7b31ae8 --- /dev/null +++ b/keyboards/keebio/viterbi_numpad/readme.md @@ -0,0 +1,23 @@ +Viterbi (numpad variant) +======================== + +A repurposing of the right half of a regular Viterbi (rotated) for use as a numpad with a few extra keys. +This is probably not useful for anybody apart from me, but I have a spare right PCB and need a numpad. + +I haven't included a rev1 version, since I only have a rev2. + +Keyboard Maintainer: [Josh Channings](https://github.com/joshch) +Hardware Supported: Elite C +Hardware Availability: [Keebio](https://keeb.io) + +Make example for this keyboard (after setting up your build environment): + + make keebio/viterbi_numpad/rev2:default + +Example of flashing this keyboard: + + make keebio/viterbi_numpad/rev2:default:avrdude + +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. + +A build guide for this keyboard can be found here: [Viterbi Build Guide](https://docs.keeb.io) diff --git a/keyboards/keebio/viterbi_numpad/rev2/config.h b/keyboards/keebio/viterbi_numpad/rev2/config.h new file mode 100644 index 00000000000..ff0ba5a68f1 --- /dev/null +++ b/keyboards/keebio/viterbi_numpad/rev2/config.h @@ -0,0 +1,56 @@ +/* +Copyright 2021 Josh Channings + +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 . +*/ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xCB10 +#define PRODUCT_ID 0x2157 +#define DEVICE_VER 0x0200 +#define MANUFACTURER Keebio +#define PRODUCT (half of) The Viterbi Keyboard + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 7 +#define MATRIX_COLS 5 + +// wiring of each half +#define MATRIX_ROW_PINS { F4, F5, F6, F7, B1, B3, B2 } +#define MATRIX_COL_PINS { D4, D7, E6, B4, B5 } +#define SPLIT_HAND_PIN D2 +#define SOFT_SERIAL_PIN D0 + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION ROW2COL + +/* 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 + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D3 +#define RGBLED_NUM 14 +#define RGBLED_SPLIT { 7, 7 } + +/* Backlight LEDs */ +#define BACKLIGHT_PIN B6 +#define BACKLIGHT_LEVELS 7 diff --git a/keyboards/keebio/viterbi_numpad/rev2/rev2.c b/keyboards/keebio/viterbi_numpad/rev2/rev2.c new file mode 100644 index 00000000000..dbf584f99ea --- /dev/null +++ b/keyboards/keebio/viterbi_numpad/rev2/rev2.c @@ -0,0 +1,18 @@ +#include "viterbi.h" + +void eeconfig_init_kb(void) { +#ifdef BACKLIGHT_ENABLE + backlight_enable(); + backlight_level(5); +#endif +#ifdef RGBLIGHT_ENABLE + rgblight_enable(); // Enable RGB by default + rgblight_sethsv(0, 255, 255); // Set default HSV - red hue, full saturation, full brightness +#ifdef RGBLIGHT_ANIMATIONS + rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 2); // set to RGB_RAINBOW_SWIRL by default +#endif +#endif + + eeconfig_update_kb(0); + eeconfig_init_user(); +} diff --git a/keyboards/keebio/viterbi_numpad/rev2/rev2.h b/keyboards/keebio/viterbi_numpad/rev2/rev2.h new file mode 100644 index 00000000000..776ce2a02b5 --- /dev/null +++ b/keyboards/keebio/viterbi_numpad/rev2/rev2.h @@ -0,0 +1,34 @@ +#pragma once + +#include "viterbi.h" +#include "quantum.h" + + +#ifdef USE_I2C +#include +#ifdef __AVR__ + #include + #include +#endif +#endif + +#define LAYOUT( \ + R00, R01, R02, R03, R04, \ + R10, R11, R12, R13, R14, \ + R20, R21, R22, R23, R24, \ + R30, R31, R32, R33, R34, \ + R40, R41, R42, R43, R44, \ + R50, R51, R52, R53, R54, \ + R60, R61, R62, R63, R64 \ + ) \ + { \ + { R00, R01, R02, R03, R04}, \ + { R10, R11, R12, R13, R14}, \ + { R20, R21, R22, R23, R24}, \ + { R30, R31, R32, R33, R34}, \ + { R40, R41, R42, R43, R44}, \ + { R50, R51, R52, R53, R54}, \ + { R60, R61, R62, R63, R64}, \ + } + +#define LAYOUT_ortho_7x5 LAYOUT diff --git a/keyboards/keebio/viterbi_numpad/rev2/rules.mk b/keyboards/keebio/viterbi_numpad/rev2/rules.mk new file mode 100644 index 00000000000..5fb4d1a123d --- /dev/null +++ b/keyboards/keebio/viterbi_numpad/rev2/rules.mk @@ -0,0 +1,5 @@ +BACKLIGHT_ENABLE = yes + +LAYOUTS = ortho_7x5 + +LTO_ENABLE = yes \ No newline at end of file diff --git a/keyboards/keebio/viterbi_numpad/rules.mk b/keyboards/keebio/viterbi_numpad/rules.mk new file mode 100644 index 00000000000..91cc1ab7ee3 --- /dev/null +++ b/keyboards/keebio/viterbi_numpad/rules.mk @@ -0,0 +1,26 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = caterina + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite +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 +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +AUDIO_ENABLE = no # Audio output +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +SPLIT_KEYBOARD = no + +DEFAULT_FOLDER = keebio/viterbi/rev2 +LAYOUTS = ortho_7x5 diff --git a/keyboards/keebio/viterbi_numpad/viterbi.c b/keyboards/keebio/viterbi_numpad/viterbi.c new file mode 100644 index 00000000000..509e42dc515 --- /dev/null +++ b/keyboards/keebio/viterbi_numpad/viterbi.c @@ -0,0 +1 @@ +#include "viterbi.h" diff --git a/keyboards/keebio/viterbi_numpad/viterbi.h b/keyboards/keebio/viterbi_numpad/viterbi.h new file mode 100644 index 00000000000..6324becdf35 --- /dev/null +++ b/keyboards/keebio/viterbi_numpad/viterbi.h @@ -0,0 +1,8 @@ +#pragma once + +#include "quantum.h" + +#include "rev2.h" + +#define LAYOUT_ortho_7x5 LAYOUT +