diff options
Diffstat (limited to 'keyboards/rainkeebs/rainkeeb')
-rw-r--r-- | keyboards/rainkeebs/rainkeeb/config.h | 51 | ||||
-rw-r--r-- | keyboards/rainkeebs/rainkeeb/info.json | 52 | ||||
-rw-r--r-- | keyboards/rainkeebs/rainkeeb/keymaps/default/keymap.c | 117 | ||||
-rw-r--r-- | keyboards/rainkeebs/rainkeeb/keymaps/via/keymap.c | 117 | ||||
-rw-r--r-- | keyboards/rainkeebs/rainkeeb/keymaps/via/rules.mk | 1 | ||||
-rw-r--r-- | keyboards/rainkeebs/rainkeeb/rainkeeb.c | 16 | ||||
-rw-r--r-- | keyboards/rainkeebs/rainkeeb/rainkeeb.h | 34 | ||||
-rw-r--r-- | keyboards/rainkeebs/rainkeeb/readme.md | 24 | ||||
-rw-r--r-- | keyboards/rainkeebs/rainkeeb/rules.mk | 28 |
9 files changed, 440 insertions, 0 deletions
diff --git a/keyboards/rainkeebs/rainkeeb/config.h b/keyboards/rainkeebs/rainkeeb/config.h new file mode 100644 index 0000000000..36c3a5d5bf --- /dev/null +++ b/keyboards/rainkeebs/rainkeeb/config.h @@ -0,0 +1,51 @@ +/* Copyright 2020 Regan Palmer + * + * 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 0x726B // rk - "rainkeebs" +#define PRODUCT_ID 0x726B // rk - "rainkeeb" +#define DEVICE_VER 0x0001 +#define MANUFACTURER rainkeebs +#define PRODUCT rainkeeb + +/* key matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 6 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { D3, D2, D4, C6, D7, E6, B4, B5 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* 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 + +/* encoder pads */ +#define ENCODERS_PAD_A { B2 } +#define ENCODERS_PAD_B { B6 } +#define ENCODER_RESOLUTION 4 diff --git a/keyboards/rainkeebs/rainkeeb/info.json b/keyboards/rainkeebs/rainkeeb/info.json new file mode 100644 index 0000000000..b704d2d43b --- /dev/null +++ b/keyboards/rainkeebs/rainkeeb/info.json @@ -0,0 +1,52 @@ +{ + "keyboard_name": "rainkeeb", + "url": "", + "maintainer": "rain", + "layouts": { + "LAYOUT": { + "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":"k05", "x":7, "y":0}, + {"label":"k06", "x":8, "y":0}, + {"label":"k07", "x":9, "y":0}, + {"label":"k08", "x":10, "y":0}, + {"label":"k09", "x":11, "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}, + {"label":"k15", "x":5.5, "y":1}, + {"label":"k16", "x":7, "y":1}, + {"label":"k17", "x":8, "y":1}, + {"label":"k18", "x":9, "y":1}, + {"label":"k19", "x":10, "y":1}, + {"label":"k1a", "x":11, "y":1}, + {"label":"k20", "x":0, "y":2}, + {"label":"k21", "x":1, "y":2}, + {"label":"k22", "x":2, "y":2}, + {"label":"k23", "x":3, "y":2}, + {"label":"k24", "x":4, "y":2}, + {"label":"k25", "x":5.5, "y":2}, + {"label":"k26", "x":7, "y":2}, + {"label":"k27", "x":8, "y":2}, + {"label":"k28", "x":9, "y":2}, + {"label":"k29", "x":10, "y":2}, + {"label":"k2a", "x":11, "y":2}, + {"label":"k30", "x":0, "y":3}, + {"label":"k31", "x":1, "y":3}, + {"label":"k32", "x":2, "y":3}, + {"label":"k33", "x":3, "y":3, "w":2}, + {"label":"k34", "x":5, "y":3, "w":2}, + {"label":"k35", "x":7, "y":3, "w":2}, + {"label":"k36", "x":9, "y":3}, + {"label":"k37", "x":10, "y":3}, + {"label":"k38", "x":11, "y":3} + ] + } + } +} diff --git a/keyboards/rainkeebs/rainkeeb/keymaps/default/keymap.c b/keyboards/rainkeebs/rainkeeb/keymaps/default/keymap.c new file mode 100644 index 0000000000..08cf7462c3 --- /dev/null +++ b/keyboards/rainkeebs/rainkeeb/keymaps/default/keymap.c @@ -0,0 +1,117 @@ +/* Copyright 2020 Regan Palmer + * + * 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 + +enum layers { + _BASE, + _RAISE, + _ADJUST, + _GAME, +}; + +#define RAISE MO(_RAISE) +#define ADJUST MO(_ADJUST) +#define GAME TG(_GAME) +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT( + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + KC_A, KC_S, KC_D, KC_F, KC_G, KC_MPLY, KC_H, KC_J, KC_K, KC_L, KC_ENT, + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_PSCR, KC_N, KC_M, KC_COMM, KC_DOT, KC_BSPC, + KC_LCTL, KC_LALT, KC_LGUI, KC_LSFT, RAISE, KC_SPC, KC_RGUI, KC_RALT, KC_RCTL), + + [_RAISE] = LAYOUT( + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, + KC_ESC, KC_GRV, KC_BSLS, KC_UP, KC_MINS, KC_TRNS, KC_LBRC, KC_RBRC, KC_SCLN, KC_QUOT, KC_TRNS, + KC_TAB, KC_CAPS, KC_LEFT, KC_DOWN, KC_RGHT, ADJUST, KC_EQL, KC_SLSH, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + [_ADJUST] = LAYOUT( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, + KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, GAME, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_TRNS, + RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_DEL, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + [_GAME] = LAYOUT( + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + KC_A, KC_S, KC_D, KC_F, KC_G, GAME, KC_H, KC_J, KC_K, KC_L, KC_ENT, + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_PSCR, KC_N, KC_M, KC_COMM, KC_DOT, KC_BSPC, + KC_LCTL, KC_LALT, KC_LGUI, KC_LSFT, KC_NO, KC_SPC, KC_RGUI, KC_RALT, KC_RCTL) +}; + +bool encoder_update_user(uint8_t index, bool clockwise) { + switch (get_highest_layer(layer_state)) { + case _BASE: + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + break; + case _RAISE: + if (clockwise) { + tap_code(KC_MS_WH_DOWN); + } else { + tap_code(KC_MS_WH_UP); + } + break; + case _ADJUST: + if (clockwise) { + tap_code(KC_MS_WH_RIGHT); + } else { + tap_code(KC_MS_WH_LEFT); + } + break; + case _GAME: + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + break; + } + return true; +} + +char wpm[10]; + +bool oled_task_user(void) { + sprintf(wpm, "WPM: %03d", get_current_wpm()); + + // Host Keyboard Layer Status + oled_write_P(PSTR(" rainkeeb \n"), false); + oled_write_P(PSTR(" Layer: "), false); + + switch (get_highest_layer(layer_state)) { + case _BASE: + oled_write_P(PSTR("Default\n"), false); + break; + case _RAISE: + oled_write_P(PSTR("Raise\n"), false); + break; + case _ADJUST: + oled_write_P(PSTR("Adjust\n"), false); + break; + case _GAME: + oled_write_P(PSTR("Game\n"), false); + break; + default: + // Or use the write_ln shortcut over adding '\n' to the end of your string + oled_write_ln_P(PSTR("Undefined"), false); + } + oled_write_P(PSTR(" "), false); + oled_write(wpm, false); + return false; +} diff --git a/keyboards/rainkeebs/rainkeeb/keymaps/via/keymap.c b/keyboards/rainkeebs/rainkeeb/keymaps/via/keymap.c new file mode 100644 index 0000000000..08cf7462c3 --- /dev/null +++ b/keyboards/rainkeebs/rainkeeb/keymaps/via/keymap.c @@ -0,0 +1,117 @@ +/* Copyright 2020 Regan Palmer + * + * 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 + +enum layers { + _BASE, + _RAISE, + _ADJUST, + _GAME, +}; + +#define RAISE MO(_RAISE) +#define ADJUST MO(_ADJUST) +#define GAME TG(_GAME) +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT( + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + KC_A, KC_S, KC_D, KC_F, KC_G, KC_MPLY, KC_H, KC_J, KC_K, KC_L, KC_ENT, + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_PSCR, KC_N, KC_M, KC_COMM, KC_DOT, KC_BSPC, + KC_LCTL, KC_LALT, KC_LGUI, KC_LSFT, RAISE, KC_SPC, KC_RGUI, KC_RALT, KC_RCTL), + + [_RAISE] = LAYOUT( + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, + KC_ESC, KC_GRV, KC_BSLS, KC_UP, KC_MINS, KC_TRNS, KC_LBRC, KC_RBRC, KC_SCLN, KC_QUOT, KC_TRNS, + KC_TAB, KC_CAPS, KC_LEFT, KC_DOWN, KC_RGHT, ADJUST, KC_EQL, KC_SLSH, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + [_ADJUST] = LAYOUT( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, + KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, GAME, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_TRNS, + RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_DEL, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + [_GAME] = LAYOUT( + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + KC_A, KC_S, KC_D, KC_F, KC_G, GAME, KC_H, KC_J, KC_K, KC_L, KC_ENT, + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_PSCR, KC_N, KC_M, KC_COMM, KC_DOT, KC_BSPC, + KC_LCTL, KC_LALT, KC_LGUI, KC_LSFT, KC_NO, KC_SPC, KC_RGUI, KC_RALT, KC_RCTL) +}; + +bool encoder_update_user(uint8_t index, bool clockwise) { + switch (get_highest_layer(layer_state)) { + case _BASE: + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + break; + case _RAISE: + if (clockwise) { + tap_code(KC_MS_WH_DOWN); + } else { + tap_code(KC_MS_WH_UP); + } + break; + case _ADJUST: + if (clockwise) { + tap_code(KC_MS_WH_RIGHT); + } else { + tap_code(KC_MS_WH_LEFT); + } + break; + case _GAME: + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + break; + } + return true; +} + +char wpm[10]; + +bool oled_task_user(void) { + sprintf(wpm, "WPM: %03d", get_current_wpm()); + + // Host Keyboard Layer Status + oled_write_P(PSTR(" rainkeeb \n"), false); + oled_write_P(PSTR(" Layer: "), false); + + switch (get_highest_layer(layer_state)) { + case _BASE: + oled_write_P(PSTR("Default\n"), false); + break; + case _RAISE: + oled_write_P(PSTR("Raise\n"), false); + break; + case _ADJUST: + oled_write_P(PSTR("Adjust\n"), false); + break; + case _GAME: + oled_write_P(PSTR("Game\n"), false); + break; + default: + // Or use the write_ln shortcut over adding '\n' to the end of your string + oled_write_ln_P(PSTR("Undefined"), false); + } + oled_write_P(PSTR(" "), false); + oled_write(wpm, false); + return false; +} diff --git a/keyboards/rainkeebs/rainkeeb/keymaps/via/rules.mk b/keyboards/rainkeebs/rainkeeb/keymaps/via/rules.mk new file mode 100644 index 0000000000..036bd6d1c3 --- /dev/null +++ b/keyboards/rainkeebs/rainkeeb/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes
\ No newline at end of file diff --git a/keyboards/rainkeebs/rainkeeb/rainkeeb.c b/keyboards/rainkeebs/rainkeeb/rainkeeb.c new file mode 100644 index 0000000000..b13ecb2483 --- /dev/null +++ b/keyboards/rainkeebs/rainkeeb/rainkeeb.c @@ -0,0 +1,16 @@ +/* Copyright 2020 Regan Palmer + * + * 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 "rainkeeb.h"
\ No newline at end of file diff --git a/keyboards/rainkeebs/rainkeeb/rainkeeb.h b/keyboards/rainkeebs/rainkeeb/rainkeeb.h new file mode 100644 index 0000000000..f0179f087c --- /dev/null +++ b/keyboards/rainkeebs/rainkeeb/rainkeeb.h @@ -0,0 +1,34 @@ +/* Copyright 2020 Regan Palmer + * + * 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" + +#define LAYOUT( \ + K00, K10, K01, K11, K02, K13, K03, K14, K04, K15, \ + K20, K30, K21, K31, K22, K32, K23, K33, K24, K34, K25, \ + K40, K50, K41, K51, K42, K52, K43, K53, K44, K54, K45, \ + K60, K70, K61, K72, K62, K73, K64, K74, K65 \ +) { \ + { K00, K01, K02, K03, K04, KC_NO }, \ + { K10, K11, KC_NO, K13, K14, K15 }, \ + { K20, K21, K22, K23, K24, K25 }, \ + { K30, K31, K32, K33, K34, KC_NO }, \ + { K40, K41, K42, K43, K44, K45 }, \ + { K50, K51, K52, K53, K54, KC_NO }, \ + { K60, K61, K62, KC_NO, K64, K65 }, \ + { K70, KC_NO, K72, K73, K74, KC_NO } \ +} diff --git a/keyboards/rainkeebs/rainkeeb/readme.md b/keyboards/rainkeebs/rainkeeb/readme.md new file mode 100644 index 0000000000..6d82df0283 --- /dev/null +++ b/keyboards/rainkeebs/rainkeeb/readme.md @@ -0,0 +1,24 @@ +# rainkeeb + +![rainkeeb](https://i.imgur.com/GpVBRMw.jpg) + +My first custom mech design. 4x10(ish), pro micro based, unibody, split, ortho (any more adjectives?), with OLED and (optional) rotary encoder. + +![Default layout](https://i.imgur.com/rCOwsoy.png) +This is the default layout, at least the base layer. By default the OLED displays "rainkeeb" at the top in case you forget what you're typing on, a layer indicator below that (Default, Raised, Alt), and a WPM counter below that. Encoder toggles Play/Pause on click on the Default and Raised layers, and is supposed to RESET into flash-mode on the Alt layer but that's not working for some reason. Clockwise turn increases volume, scrolls down, and scrolls right on the Default, Raise, and Alt layers respectively. Counterclockwise does the opposite of the clockwise turns, you get the picture. + +* Keyboard Maintainer: [rain](https://github.com/rainsff) +* Hardware Supported: rainkeeb PCB v1 +* Hardware Availability: GB soon + +Make example for this keyboard (after setting up your build environment): + + make rainkeebs/rainkeeb:default + +To put reset into bootloader mode just push the reset button from the left side of the board using a pair of tweezers or similar object. + +Install example for this keyboard: + + make rainkeebs/rainkeeb:default:flash + +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/rainkeebs/rainkeeb/rules.mk b/keyboards/rainkeebs/rainkeeb/rules.mk new file mode 100644 index 0000000000..a4b7fca0d1 --- /dev/null +++ b/keyboards/rainkeebs/rainkeeb/rules.mk @@ -0,0 +1,28 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # 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 = yes # Enable N-Key Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +AUDIO_ENABLE = no +RGBLIGHT_ENABLE = no + +# OLED enable +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 + +# Encoder enable +ENCODER_ENABLE = yes + +# WPM counter enable +WPM_ENABLE = yes |