diff --git a/keyboards/idank/spankbd/config.h b/keyboards/idank/spankbd/config.h new file mode 100644 index 00000000000..e926de7f5f8 --- /dev/null +++ b/keyboards/idank/spankbd/config.h @@ -0,0 +1,6 @@ +// Copyright 2023 Idan Kamara (@idank) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#define MASTER_RIGHT diff --git a/keyboards/idank/spankbd/info.json b/keyboards/idank/spankbd/info.json new file mode 100644 index 00000000000..fc9dce46313 --- /dev/null +++ b/keyboards/idank/spankbd/info.json @@ -0,0 +1,76 @@ +{ + "url": "https://github.com/idank/spankbd", + "maintainer": "idank", + "keyboard_name": "Span", + "manufacturer": "holykeebs", + "development_board": "promicro", + "usb": { + "vid": "0xC3AC", + "pid": "0x3140", + "device_version": "0.0.1" + }, + "features": { + "bootmagic": true, + "extrakey": true, + "mousekey": true, + "nkro": true + }, + "matrix_pins": { + "cols": [ "F4", "F5", "F6", "F7", "B1" ], + "rows": [ "D4", "C6", "D7", "E6" ] + }, + "diode_direction": "COL2ROW", + "split": { + "enabled": true, + "soft_serial_pin": "D2" + }, + "layouts": { + "LAYOUT_split_3x5_3": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0.25}, + {"matrix": [0, 1], "x": 1, "y": 0.125}, + {"matrix": [0, 2], "x": 2, "y": 0}, + {"matrix": [0, 3], "x": 3, "y": 0.125}, + {"matrix": [0, 4], "x": 4, "y": 0.375}, + + {"matrix": [4, 4], "x": 8, "y": 0.375}, + {"matrix": [4, 3], "x": 9, "y": 0.125}, + {"matrix": [4, 2], "x": 10, "y": 0}, + {"matrix": [4, 1], "x": 11, "y": 0.125}, + {"matrix": [4, 0], "x": 12, "y": 0.25}, + + {"matrix": [1, 0], "x": 0, "y": 1.25}, + {"matrix": [1, 1], "x": 1, "y": 1.125}, + {"matrix": [1, 2], "x": 2, "y": 1}, + {"matrix": [1, 3], "x": 3, "y": 1.125}, + {"matrix": [1, 4], "x": 4, "y": 1.375}, + + {"matrix": [5, 4], "x": 8, "y": 1.375}, + {"matrix": [5, 3], "x": 9, "y": 1.125}, + {"matrix": [5, 2], "x": 10, "y": 1}, + {"matrix": [5, 1], "x": 11, "y": 1.125}, + {"matrix": [5, 0], "x": 12, "y": 1.25}, + + {"matrix": [2, 0], "x": 0, "y": 2.25}, + {"matrix": [2, 1], "x": 1, "y": 2.125}, + {"matrix": [2, 2], "x": 2, "y": 2}, + {"matrix": [2, 3], "x": 3, "y": 2.125}, + {"matrix": [2, 4], "x": 4, "y": 2.375}, + + {"matrix": [6, 4], "x": 8, "y": 2.375}, + {"matrix": [6, 3], "x": 9, "y": 2.125}, + {"matrix": [6, 2], "x": 10, "y": 2}, + {"matrix": [6, 1], "x": 11, "y": 2.125}, + {"matrix": [6, 0], "x": 12, "y": 2.25}, + + {"matrix": [3, 2], "x": 2, "y": 3.5}, + {"matrix": [3, 3], "x": 3.25, "y": 3.625, "w": 1.5}, + {"matrix": [3, 4], "x": 5, "y": 3.125, "h": 2}, + + {"matrix": [7, 4], "x": 7, "y": 3.125, "h": 2}, + {"matrix": [7, 3], "x": 8.25, "y": 3.625, "w": 1.5}, + {"matrix": [7, 2], "x": 10, "y": 3.5} + ] + } + } +} diff --git a/keyboards/idank/spankbd/keymaps/default/keymap.json b/keyboards/idank/spankbd/keymaps/default/keymap.json new file mode 100644 index 00000000000..10bb42e1089 --- /dev/null +++ b/keyboards/idank/spankbd/keymaps/default/keymap.json @@ -0,0 +1,125 @@ +{ + "version": 1, + "notes": "Span default keymap", + "documentation": "\"This file is a QMK Configurator export. You can import this at . It can also be used directly with QMK's source code.\n\nTo setup your QMK environment check out the tutorial: \n\nYou can convert this file to a keymap.c using this command: `qmk json2c {keymap}`\n\nYou can compile this keymap using this command: `qmk compile {keymap}`\"\n", + "keyboard": "idank/spankbd", + "keymap": "default", + "layout": "LAYOUT_split_3x5_3", + "layers": [ + [ + "KC_Q", + "KC_W", + "KC_E", + "KC_R", + "KC_T", + "KC_Y", + "KC_U", + "KC_I", + "KC_O", + "KC_P", + "LCTL_T(KC_A)", + "KC_S", + "KC_D", + "KC_F", + "KC_G", + "KC_H", + "KC_J", + "KC_K", + "KC_L", + "LCTL_T(KC_SCLN)", + "RSFT_T(KC_Z)", + "KC_X", + "KC_C", + "KC_V", + "KC_B", + "KC_N", + "KC_M", + "KC_COMM", + "KC_DOT", + "RSFT_T(KC_SLSH)", + "LGUI_T(KC_ESC)", + "LALT_T(KC_ENT)", + "LT(1,KC_SPC)", + "LT(2,KC_SPC)", + "KC_LSFT", + "RSFT_T(KC_TAB)" + ], + [ + "KC_EXLM", + "KC_AT", + "KC_LCBR", + "KC_RCBR", + "KC_PIPE", + "KC_GRV", + "KC_TILD", + "KC_TRNS", + "KC_TRNS", + "KC_BSLS", + "KC_HASH", + "KC_DLR", + "KC_LPRN", + "KC_RPRN", + "KC_BTN2", + "KC_PPLS", + "KC_MINS", + "KC_SLSH", + "KC_ASTR", + "KC_QUOT", + "KC_PERC", + "KC_CIRC", + "KC_LBRC", + "KC_RBRC", + "KC_BTN1", + "KC_AMPR", + "KC_EQL", + "KC_COMM", + "KC_DOT", + "KC_MINS", + "KC_BSPC", + "KC_SCLN", + "KC_TRNS", + "KC_TRNS", + "KC_SCLN", + "KC_DEL" + ], + [ + "KC_1", + "KC_2", + "KC_3", + "KC_4", + "KC_5", + "KC_6", + "KC_7", + "KC_8", + "KC_9", + "KC_0", + "KC_F1", + "KC_F2", + "KC_F3", + "KC_F4", + "KC_F5", + "KC_LEFT", + "KC_DOWN", + "KC_UP", + "KC_RGHT", + "KC_VOLU", + "KC_F6", + "KC_F7", + "KC_F8", + "KC_F9", + "KC_F10", + "KC_MS_L", + "KC_MS_D", + "KC_MS_U", + "KC_MS_R", + "KC_VOLD", + "KC_F11", + "KC_F12", + "KC_TRNS", + "KC_TRNS", + "KC_MPLY", + "KC_MNXT" + ] + ], + "author": "idank" +} diff --git a/keyboards/idank/spankbd/keymaps/via/keymap.c b/keyboards/idank/spankbd/keymaps/via/keymap.c new file mode 100644 index 00000000000..763631f59de --- /dev/null +++ b/keyboards/idank/spankbd/keymaps/via/keymap.c @@ -0,0 +1,81 @@ +// Copyright 2023 Idan Kamara (@idank) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +enum { + _ALPHA, // default + _SPECIAL, // special characters + _NUMBERS // numbers/function/motion +}; + +#define KC_CTL_A MT(MOD_LCTL, KC_A) // Tap for A, hold for Control +#define KC_CTL_CL MT(MOD_LCTL, KC_SCLN) // Tap for colon, hold for Control +#define KC_SFT_Z MT(MOD_RSFT, KC_Z) // Tap for Z, hold for Shift +#define KC_SFT_SL MT(MOD_RSFT, KC_SLSH) // Tap for slash, hold for Shift + +#define KC_GUI_ESC MT(MOD_LGUI, KC_ESC) // Tap for Esc, hold for GUI (Meta, Command, Win) +#define KC_ALT_ENT MT(MOD_LALT, KC_ENT) // Tap for Enter, hold for Alt (Option) +#define KC_SPE_SPC LT(_SPECIAL, KC_SPC) // Tap for Space, hold for Special layer +#define KC_NUM_SPC LT(_NUMBERS, KC_SPC) // Tap for Space, hold for Numbers layer +#define KC_SFT_TAB MT(MOD_RSFT, KC_TAB) // Tap for Tab, hold for Right Shift + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap 0: Alpha layer + * + * ,-------------------------------. ,-------------------------------. + * | Q | W | E | R | T | | Y | U | I | O | P | + * |-------+-----+-----+-----+-----| |-----+-----+-----+-----+-------| + * | CTRL A| S | D | F | G | | H | J | K | L |CTRL ; | + * |-------+-----+-----+-----+-----| |-----+-----+-----+-----+-------| + * | SHFT Z| X | C | V | B | | N | M | < | > |SHFT / | + * `-------------------------------' `-------------------------------' + * .------------------------------. .----------------------. + * | ESC META | ENT ALT | SPC SPE | | SPC NUM | SHFT | TAB | + * '------------------------------' '----------------------' + */ + [_ALPHA] = LAYOUT_split_3x5_3( + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + KC_CTL_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_CTL_CL, + KC_SFT_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SFT_SL, + KC_GUI_ESC, KC_ALT_ENT, KC_SPE_SPC, KC_NUM_SPC, KC_LSFT, KC_SFT_TAB), + + /* Keymap 1: Special characters layer + * + * ,-------------------------------. ,-------------------------------. + * | ! | @ | { | } | | | | ` | ~ | | | \ | + * |-------+-----+-----+-----+-----| |-----+-----+-----+-----+-------| + * | # | $ | ( | ) | RMB | | + | - | / | * | ' | + * |-------+-----+-----+-----+-----| |-----+-----+-----+-----+-------| + * | % | ^ | [ | ] | LMB | | & | = | , | . | - | + * `-------------------------------' `-------------------------------' + * .------------------. .-----------------. + * | BSPC | ; | = | | = | ; | DEL | + * '------------------' '-----------------' + */ + [_SPECIAL] = LAYOUT_split_3x5_3( + KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_GRV, KC_TILD, KC_TRNS, KC_TRNS, KC_BSLS, + KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_BTN2, KC_PLUS, KC_MINS, KC_SLSH, KC_ASTR, KC_QUOT, + KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_BTN1, KC_AMPR, KC_EQL, KC_COMM, KC_DOT, KC_MINS, + KC_BSPC, KC_SCLN, KC_EQL, KC_EQL, KC_SCLN, KC_DEL), + + /* Keymap 2: Numbers/Function/Motion layer + * + * ,-------------------------------. ,-------------------------------. + * | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | + * |-------+-----+-----+-----+-----| |-----+-----+-----+-----+-------| + * | F1 | F2 | F3 | F4 | F5 | | LFT | DWN | UP | RGT | VOLUP | + * |-------+-----+-----+-----+-----| |-----+-----+-----+-----+-------| + * | F6 | F7 | F8 | F9 | F10 | | MLFT| MDWN| MUP | MRGT| VOLDN | + * `-------------------------------' `-------------------------------' + * .-----------------. .-----------------. + * | F11 | F12 | | | | PLY | SKP | + * '-----------------' '-----------------' + */ + [_NUMBERS] = LAYOUT_split_3x5_3( + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_VOLU, + KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_VOLD, + KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_MPLY, KC_MNXT) +}; + diff --git a/keyboards/idank/spankbd/keymaps/via/rules.mk b/keyboards/idank/spankbd/keymaps/via/rules.mk new file mode 100644 index 00000000000..36b7ba9cbc9 --- /dev/null +++ b/keyboards/idank/spankbd/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/idank/spankbd/readme.md b/keyboards/idank/spankbd/readme.md new file mode 100644 index 00000000000..3d09ccbe42d --- /dev/null +++ b/keyboards/idank/spankbd/readme.md @@ -0,0 +1,28 @@ +# Span + +*Span is a 3x5+3 split keyboard, with 2u, 1.5u, 1u thumb clusters.* + +The keyboard layout Span uses is derived from GergoPlex, a keyboard that was originally available on gboards.ca +(now defunct). + +* Keyboard Maintainer: [@idank](https://github.com/idank) +* Hardware Supported: [spankbd](https://github.com/idank/spankbd) +* Hardware Availability: *[holykeebs](https://holykeebs.com)* + +Make example for this keyboard (after setting up your build environment): + + make idank/spankbd:default + +Flashing example for this keyboard: + + make idank/spankbd: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). + +## Bootloader + +Enter the bootloader in 3 ways: + +* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard. +* **Physical reset button**: Briefly press the button on the front of the PCB. Double tap for pro micro, 1 second press for Sea Picro / RP2040s. +* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available. diff --git a/keyboards/idank/spankbd/rules.mk b/keyboards/idank/spankbd/rules.mk new file mode 100644 index 00000000000..6e7633bfe01 --- /dev/null +++ b/keyboards/idank/spankbd/rules.mk @@ -0,0 +1 @@ +# This file intentionally left blank diff --git a/keyboards/idank/spankbd/spankbd.c b/keyboards/idank/spankbd/spankbd.c new file mode 100644 index 00000000000..7bfd41d2d83 --- /dev/null +++ b/keyboards/idank/spankbd/spankbd.c @@ -0,0 +1,29 @@ +// Copyright 2023 Idan Kamara (@idank) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "quantum.h" + +#ifdef OLED_ENABLE + +__attribute__((weak)) void oled_render_logo(void) { + // [span) logo + static const char PROGMEM raw_logo[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,192,192,192,192,192,192,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,192,192,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,255, 1, 1, 1, 64,240,248,248,248,184, 56,120,120, 0, 0, 0,248,248,248,248, 56, 56,120,248,240,240,192, 0, 0, 24,120, 56, 56, 56,120,248,248,240,224, 0, 0,248,248,248,248, 56, 56,120,248,248,240,192, 0, 1, 7,127,255,255,252,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,255, 0, 0, 0, 96,121,123,115,119,119,127,127, 63, 30, 0, 0,255,255,255,255,112,112,120,127,127, 63, 15, 0, 28, 62,127,127,127,115,115,127,127,127,127, 0, 0,127,127,127,127, 0, 0, 0,127,127,127,127, 0, 0,192,252,255,255,127, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 7, 7, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 7, 7, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }; + oled_write_raw_P(raw_logo, sizeof(raw_logo)); +} + +bool oled_task_kb(void) { + if (!oled_task_user()) { + return false; + } + + oled_render_logo(); + + return false; +} + +#endif