mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-07-16 12:51:47 +00:00
Refactor helix/rev3_{4,5}rows
rev3_4rows and rev3_5rows are identical, except for the extra row users can snap off of their PCBs. - Add alias for rev3_4rows - Migrates legacy defines and configuration to keyboard.json - Tidy's keymap and migrates to JSON - Removes RGB Light configuration, enables RGB Matrix - Removes DIP switch configuration, as they do not appear to be present on PCBs - Adds an alternate 4 row layout for snappable PCB - Tidy's up OLED code - Enables standard features (bootmagic, extrakey, etc.)
This commit is contained in:
parent
56ad3a5f43
commit
61b340328a
@ -2308,6 +2308,9 @@
|
||||
"handwired/dygma/raise": {
|
||||
"target": "handwired/dygma/raise/ansi"
|
||||
},
|
||||
"helix/rev3_4rows": {
|
||||
"target": "helix/rev3"
|
||||
},
|
||||
"ibm/model_m/mschwingen": {
|
||||
"target": "ibm/model_m/mschwingen/led_wired"
|
||||
},
|
||||
|
5
keyboards/helix/rev3/config.h
Normal file
5
keyboards/helix/rev3/config.h
Normal file
@ -0,0 +1,5 @@
|
||||
// Copyright 2025 QMK
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
#pragma once
|
||||
|
||||
#define OLED_FONT_H "keyboards/helix/common/glcdfont.c"
|
240
keyboards/helix/rev3/keyboard.json
Normal file
240
keyboards/helix/rev3/keyboard.json
Normal file
@ -0,0 +1,240 @@
|
||||
{
|
||||
"manufacturer": "Yushakobo",
|
||||
"keyboard_name": "Helix rev3",
|
||||
"maintainer": "MakotoKurauchi",
|
||||
"build": {
|
||||
"lto": true
|
||||
},
|
||||
"development_board": "promicro",
|
||||
"diode_direction": "COL2ROW",
|
||||
"encoder": {
|
||||
"rotary": [
|
||||
{"pin_a": "B6", "pin_b": "B5"}
|
||||
]
|
||||
},
|
||||
"features": {
|
||||
"bootmagic": true,
|
||||
"encoder": true,
|
||||
"extrakey": true,
|
||||
"mousekey": true,
|
||||
"oled": true,
|
||||
"rgb_matrix": true
|
||||
},
|
||||
"matrix_pins": {
|
||||
"cols": ["F4", "F5", "F6", "F7", "B1", "B3", "B2"],
|
||||
"rows": ["D4", "C6", "D7", "E6", "B4"]
|
||||
},
|
||||
"rgb_matrix": {
|
||||
"driver": "ws2812",
|
||||
"layout": [
|
||||
{"matrix": [0, 5], "x": 80, "y": 0, "flags": 4},
|
||||
{"matrix": [0, 4], "x": 64, "y": 0, "flags": 4},
|
||||
{"matrix": [0, 3], "x": 48, "y": 0, "flags": 4},
|
||||
{"matrix": [0, 2], "x": 32, "y": 0, "flags": 4},
|
||||
{"matrix": [0, 1], "x": 16, "y": 0, "flags": 4},
|
||||
{"matrix": [0, 0], "x": 0, "y": 0, "flags": 4},
|
||||
{"matrix": [1, 0], "x": 0, "y": 16, "flags": 4},
|
||||
{"matrix": [1, 1], "x": 16, "y": 16, "flags": 4},
|
||||
{"matrix": [1, 2], "x": 32, "y": 16, "flags": 4},
|
||||
{"matrix": [1, 3], "x": 48, "y": 16, "flags": 4},
|
||||
{"matrix": [1, 4], "x": 64, "y": 16, "flags": 4},
|
||||
{"matrix": [1, 5], "x": 80, "y": 16, "flags": 4},
|
||||
{"matrix": [2, 5], "x": 80, "y": 32, "flags": 4},
|
||||
{"matrix": [2, 4], "x": 64, "y": 32, "flags": 4},
|
||||
{"matrix": [2, 3], "x": 48, "y": 32, "flags": 4},
|
||||
{"matrix": [2, 2], "x": 32, "y": 32, "flags": 4},
|
||||
{"matrix": [2, 1], "x": 16, "y": 32, "flags": 4},
|
||||
{"matrix": [2, 0], "x": 0, "y": 32, "flags": 4},
|
||||
{"matrix": [3, 0], "x": 0, "y": 48, "flags": 4},
|
||||
{"matrix": [3, 1], "x": 16, "y": 48, "flags": 4},
|
||||
{"matrix": [3, 2], "x": 32, "y": 48, "flags": 4},
|
||||
{"matrix": [3, 3], "x": 48, "y": 48, "flags": 4},
|
||||
{"matrix": [3, 4], "x": 64, "y": 48, "flags": 4},
|
||||
{"matrix": [3, 5], "x": 80, "y": 48, "flags": 4},
|
||||
{"matrix": [3, 6], "x": 96, "y": 48, "flags": 4},
|
||||
{"matrix": [4, 6], "x": 96, "y": 64, "flags": 4},
|
||||
{"matrix": [4, 5], "x": 80, "y": 64, "flags": 4},
|
||||
{"matrix": [4, 4], "x": 64, "y": 64, "flags": 4},
|
||||
{"matrix": [4, 3], "x": 48, "y": 64, "flags": 4},
|
||||
{"matrix": [4, 2], "x": 32, "y": 64, "flags": 4},
|
||||
{"matrix": [4, 1], "x": 16, "y": 64, "flags": 4},
|
||||
{"matrix": [4, 0], "x": 0, "y": 64, "flags": 4},
|
||||
{"matrix": [5, 5], "x": 144, "y": 0, "flags": 4},
|
||||
{"matrix": [5, 4], "x": 160, "y": 0, "flags": 4},
|
||||
{"matrix": [5, 3], "x": 176, "y": 0, "flags": 4},
|
||||
{"matrix": [5, 2], "x": 192, "y": 0, "flags": 4},
|
||||
{"matrix": [5, 1], "x": 208, "y": 0, "flags": 4},
|
||||
{"matrix": [5, 0], "x": 224, "y": 0, "flags": 4},
|
||||
{"matrix": [6, 0], "x": 224, "y": 16, "flags": 4},
|
||||
{"matrix": [6, 1], "x": 208, "y": 16, "flags": 4},
|
||||
{"matrix": [6, 2], "x": 192, "y": 16, "flags": 4},
|
||||
{"matrix": [6, 3], "x": 176, "y": 16, "flags": 4},
|
||||
{"matrix": [6, 4], "x": 160, "y": 16, "flags": 4},
|
||||
{"matrix": [6, 5], "x": 144, "y": 16, "flags": 4},
|
||||
{"matrix": [7, 5], "x": 144, "y": 32, "flags": 4},
|
||||
{"matrix": [7, 4], "x": 160, "y": 32, "flags": 4},
|
||||
{"matrix": [7, 3], "x": 176, "y": 32, "flags": 4},
|
||||
{"matrix": [7, 2], "x": 192, "y": 32, "flags": 4},
|
||||
{"matrix": [7, 1], "x": 208, "y": 32, "flags": 4},
|
||||
{"matrix": [7, 0], "x": 224, "y": 32, "flags": 4},
|
||||
{"matrix": [8, 0], "x": 224, "y": 48, "flags": 4},
|
||||
{"matrix": [8, 1], "x": 208, "y": 48, "flags": 4},
|
||||
{"matrix": [8, 2], "x": 192, "y": 48, "flags": 4},
|
||||
{"matrix": [8, 3], "x": 176, "y": 48, "flags": 4},
|
||||
{"matrix": [8, 4], "x": 160, "y": 48, "flags": 4},
|
||||
{"matrix": [8, 5], "x": 144, "y": 48, "flags": 4},
|
||||
{"matrix": [8, 6], "x": 128, "y": 48, "flags": 4},
|
||||
{"matrix": [9, 6], "x": 128, "y": 64, "flags": 4},
|
||||
{"matrix": [9, 5], "x": 144, "y": 64, "flags": 4},
|
||||
{"matrix": [9, 4], "x": 160, "y": 64, "flags": 4},
|
||||
{"matrix": [9, 3], "x": 176, "y": 64, "flags": 4},
|
||||
{"matrix": [9, 2], "x": 192, "y": 64, "flags": 4},
|
||||
{"matrix": [9, 1], "x": 208, "y": 64, "flags": 4},
|
||||
{"matrix": [9, 0], "x": 224, "y": 64, "flags": 4}
|
||||
],
|
||||
"max_brightness": 150,
|
||||
"sleep": true,
|
||||
"split_count": [32, 32]
|
||||
},
|
||||
"split": {
|
||||
"enabled": true,
|
||||
"handedness": {
|
||||
"matrix_grid": ["D7", "B2"]
|
||||
},
|
||||
"serial": {
|
||||
"pin": "D2"
|
||||
}
|
||||
},
|
||||
"usb": {
|
||||
"device_version": "0.0.1",
|
||||
"pid": "0x0003",
|
||||
"vid": "0x3265"
|
||||
},
|
||||
"ws2812": {
|
||||
"pin": "D3"
|
||||
},
|
||||
"layouts": {
|
||||
"LAYOUT_4row": {
|
||||
"layout": [
|
||||
{"matrix": [0, 0], "x": 0, "y": 0},
|
||||
{"matrix": [0, 1], "x": 1, "y": 0},
|
||||
{"matrix": [0, 2], "x": 2, "y": 0},
|
||||
{"matrix": [0, 3], "x": 3, "y": 0},
|
||||
{"matrix": [0, 4], "x": 4, "y": 0},
|
||||
{"matrix": [0, 5], "x": 5, "y": 0},
|
||||
{"matrix": [4, 5], "x": 9, "y": 0},
|
||||
{"matrix": [4, 4], "x": 10, "y": 0},
|
||||
{"matrix": [4, 3], "x": 11, "y": 0},
|
||||
{"matrix": [4, 2], "x": 12, "y": 0},
|
||||
{"matrix": [4, 1], "x": 13, "y": 0},
|
||||
{"matrix": [4, 0], "x": 14, "y": 0},
|
||||
{"matrix": [1, 0], "x": 0, "y": 1},
|
||||
{"matrix": [1, 1], "x": 1, "y": 1},
|
||||
{"matrix": [1, 2], "x": 2, "y": 1},
|
||||
{"matrix": [1, 3], "x": 3, "y": 1},
|
||||
{"matrix": [1, 4], "x": 4, "y": 1},
|
||||
{"matrix": [1, 5], "x": 5, "y": 1},
|
||||
{"matrix": [5, 5], "x": 9, "y": 1},
|
||||
{"matrix": [5, 4], "x": 10, "y": 1},
|
||||
{"matrix": [5, 3], "x": 11, "y": 1},
|
||||
{"matrix": [5, 2], "x": 12, "y": 1},
|
||||
{"matrix": [5, 1], "x": 13, "y": 1},
|
||||
{"matrix": [5, 0], "x": 14, "y": 1},
|
||||
{"matrix": [2, 0], "x": 0, "y": 2},
|
||||
{"matrix": [2, 1], "x": 1, "y": 2},
|
||||
{"matrix": [2, 2], "x": 2, "y": 2},
|
||||
{"matrix": [2, 3], "x": 3, "y": 2},
|
||||
{"matrix": [2, 4], "x": 4, "y": 2},
|
||||
{"matrix": [2, 5], "x": 5, "y": 2},
|
||||
{"matrix": [6, 5], "x": 9, "y": 2},
|
||||
{"matrix": [6, 4], "x": 10, "y": 2},
|
||||
{"matrix": [6, 3], "x": 11, "y": 2},
|
||||
{"matrix": [6, 2], "x": 12, "y": 2},
|
||||
{"matrix": [6, 1], "x": 13, "y": 2},
|
||||
{"matrix": [6, 0], "x": 14, "y": 2},
|
||||
{"matrix": [3, 0], "x": 0, "y": 3},
|
||||
{"matrix": [3, 1], "x": 1, "y": 3},
|
||||
{"matrix": [3, 2], "x": 2, "y": 3},
|
||||
{"matrix": [3, 3], "x": 3, "y": 3},
|
||||
{"matrix": [3, 4], "x": 4, "y": 3},
|
||||
{"matrix": [3, 5], "x": 5, "y": 3},
|
||||
{"matrix": [3, 6], "x": 6, "y": 3},
|
||||
{"matrix": [7, 6], "x": 8, "y": 3},
|
||||
{"matrix": [7, 5], "x": 9, "y": 3},
|
||||
{"matrix": [7, 4], "x": 10, "y": 3},
|
||||
{"matrix": [7, 3], "x": 11, "y": 3},
|
||||
{"matrix": [7, 2], "x": 12, "y": 3},
|
||||
{"matrix": [7, 1], "x": 13, "y": 3},
|
||||
{"matrix": [7, 0], "x": 14, "y": 3}
|
||||
]
|
||||
},
|
||||
"LAYOUT_5row": {
|
||||
"layout": [
|
||||
{"matrix": [0, 0], "x": 0, "y": 0},
|
||||
{"matrix": [0, 1], "x": 1, "y": 0},
|
||||
{"matrix": [0, 2], "x": 2, "y": 0},
|
||||
{"matrix": [0, 3], "x": 3, "y": 0},
|
||||
{"matrix": [0, 4], "x": 4, "y": 0},
|
||||
{"matrix": [0, 5], "x": 5, "y": 0},
|
||||
{"matrix": [5, 5], "x": 9, "y": 0},
|
||||
{"matrix": [5, 4], "x": 10, "y": 0},
|
||||
{"matrix": [5, 3], "x": 11, "y": 0},
|
||||
{"matrix": [5, 2], "x": 12, "y": 0},
|
||||
{"matrix": [5, 1], "x": 13, "y": 0},
|
||||
{"matrix": [5, 0], "x": 14, "y": 0},
|
||||
{"matrix": [1, 0], "x": 0, "y": 1},
|
||||
{"matrix": [1, 1], "x": 1, "y": 1},
|
||||
{"matrix": [1, 2], "x": 2, "y": 1},
|
||||
{"matrix": [1, 3], "x": 3, "y": 1},
|
||||
{"matrix": [1, 4], "x": 4, "y": 1},
|
||||
{"matrix": [1, 5], "x": 5, "y": 1},
|
||||
{"matrix": [6, 5], "x": 9, "y": 1},
|
||||
{"matrix": [6, 4], "x": 10, "y": 1},
|
||||
{"matrix": [6, 3], "x": 11, "y": 1},
|
||||
{"matrix": [6, 2], "x": 12, "y": 1},
|
||||
{"matrix": [6, 1], "x": 13, "y": 1},
|
||||
{"matrix": [6, 0], "x": 14, "y": 1},
|
||||
{"matrix": [2, 0], "x": 0, "y": 2},
|
||||
{"matrix": [2, 1], "x": 1, "y": 2},
|
||||
{"matrix": [2, 2], "x": 2, "y": 2},
|
||||
{"matrix": [2, 3], "x": 3, "y": 2},
|
||||
{"matrix": [2, 4], "x": 4, "y": 2},
|
||||
{"matrix": [2, 5], "x": 5, "y": 2},
|
||||
{"matrix": [7, 5], "x": 9, "y": 2},
|
||||
{"matrix": [7, 4], "x": 10, "y": 2},
|
||||
{"matrix": [7, 3], "x": 11, "y": 2},
|
||||
{"matrix": [7, 2], "x": 12, "y": 2},
|
||||
{"matrix": [7, 1], "x": 13, "y": 2},
|
||||
{"matrix": [7, 0], "x": 14, "y": 2},
|
||||
{"matrix": [3, 0], "x": 0, "y": 3},
|
||||
{"matrix": [3, 1], "x": 1, "y": 3},
|
||||
{"matrix": [3, 2], "x": 2, "y": 3},
|
||||
{"matrix": [3, 3], "x": 3, "y": 3},
|
||||
{"matrix": [3, 4], "x": 4, "y": 3},
|
||||
{"matrix": [3, 5], "x": 5, "y": 3},
|
||||
{"matrix": [3, 6], "x": 6, "y": 3},
|
||||
{"matrix": [8, 6], "x": 8, "y": 3},
|
||||
{"matrix": [8, 5], "x": 9, "y": 3},
|
||||
{"matrix": [8, 4], "x": 10, "y": 3},
|
||||
{"matrix": [8, 3], "x": 11, "y": 3},
|
||||
{"matrix": [8, 2], "x": 12, "y": 3},
|
||||
{"matrix": [8, 1], "x": 13, "y": 3},
|
||||
{"matrix": [8, 0], "x": 14, "y": 3},
|
||||
{"matrix": [4, 0], "x": 0, "y": 4},
|
||||
{"matrix": [4, 1], "x": 1, "y": 4},
|
||||
{"matrix": [4, 2], "x": 2, "y": 4},
|
||||
{"matrix": [4, 3], "x": 3, "y": 4},
|
||||
{"matrix": [4, 4], "x": 4, "y": 4},
|
||||
{"matrix": [4, 5], "x": 5, "y": 4},
|
||||
{"matrix": [4, 6], "x": 6, "y": 4},
|
||||
{"matrix": [9, 6], "x": 8, "y": 4},
|
||||
{"matrix": [9, 5], "x": 9, "y": 4},
|
||||
{"matrix": [9, 4], "x": 10, "y": 4},
|
||||
{"matrix": [9, 3], "x": 11, "y": 4},
|
||||
{"matrix": [9, 2], "x": 12, "y": 4},
|
||||
{"matrix": [9, 1], "x": 13, "y": 4},
|
||||
{"matrix": [9, 0], "x": 14, "y": 4}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
38
keyboards/helix/rev3/keymaps/default/keymap.json
Normal file
38
keyboards/helix/rev3/keymaps/default/keymap.json
Normal file
@ -0,0 +1,38 @@
|
||||
{
|
||||
"keyboard": "helix/rev3",
|
||||
"keymap": "default",
|
||||
"layout": "LAYOUT_5row",
|
||||
"config": {
|
||||
"features": {
|
||||
"encoder_map": true
|
||||
}
|
||||
},
|
||||
"layers": [
|
||||
[
|
||||
"KC_GRV", "KC_1", "KC_2", "KC_3", "KC_4", "KC_5", "KC_6", "KC_7", "KC_8", "KC_9", "KC_0", "KC_DEL",
|
||||
"KC_TAB", "KC_Q", "KC_W", "KC_E", "KC_R", "KC_T", "KC_Y", "KC_U", "KC_I", "KC_O", "KC_P", "KC_BSPC",
|
||||
"KC_LCTL", "KC_A", "KC_S", "KC_D", "KC_F", "KC_G", "KC_H", "KC_J", "KC_K", "KC_L", "KC_SCLN", "KC_QUOT",
|
||||
"KC_LSFT", "KC_Z", "KC_X", "KC_C", "KC_V", "KC_B", "KC_LBRC", "KC_RBRC", "KC_N", "KC_M", "KC_COMM", "KC_DOT", "KC_SLSH", "KC_ENT" ,
|
||||
"MO(3)", "KC_ESC", "KC_LALT", "KC_LGUI", "LALT(KC_GRV)", "MO(1)", "KC_SPC", "KC_SPC", "MO(2)", "LALT(KC_GRV)", "KC_LEFT", "KC_DOWN", "KC_UP", "KC_RGHT"
|
||||
],
|
||||
[
|
||||
"_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______",
|
||||
"KC_GRV", "KC_1", "KC_2", "KC_3", "KC_4", "KC_5", "KC_6", "KC_7", "KC_8", "KC_9", "KC_0", "KC_DEL",
|
||||
"_______", "KC_F1", "KC_F2", "KC_F3", "KC_F4", "KC_F5", "KC_F6", "KC_MINS", "KC_EQL", "KC_LBRC", "KC_RBRC", "KC_BSLS",
|
||||
"KC_CAPS", "KC_F7", "KC_F8", "KC_F9", "KC_F10", "KC_F11", "_______", "_______", "KC_F12", "_______", "_______", "KC_PGDN", "KC_PGUP", "_______",
|
||||
"_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "KC_MNXT", "KC_VOLD", "KC_VOLU", "KC_MPLY"
|
||||
],
|
||||
[
|
||||
"_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______",
|
||||
"KC_F1", "KC_F2", "KC_F3", "KC_F4", "KC_F5", "KC_F6", "KC_F7", "KC_F8", "KC_F9", "KC_F10", "KC_F11", "KC_F12",
|
||||
"QK_BOOT", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______",
|
||||
"EE_CLR", "_______", "_______", "_______", "_______", "_______", "AG_NORM", "AG_SWAP", "_______", "_______", "RM_TOGG", "RM_HUEU", "RM_SATU", "RM_VALU",
|
||||
"_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "RM_NEXT", "RM_HUED", "RM_SATD", "RM_VALD"
|
||||
]
|
||||
],
|
||||
"encoders": [
|
||||
[{"ccw": "KC_VOLD", "cw": "KC_VOLU"}, {"ccw": "KC_PGUP", "cw": "KC_PGDN"}],
|
||||
[{"ccw": "_______", "cw": "_______"}, {"ccw": "_______", "cw": "_______"}],
|
||||
[{"ccw": "_______", "cw": "_______"}, {"ccw": "_______", "cw": "_______"}]
|
||||
]
|
||||
}
|
77
keyboards/helix/rev3/rev3.c
Normal file
77
keyboards/helix/rev3/rev3.c
Normal file
@ -0,0 +1,77 @@
|
||||
// Copyright 2020 Yushakobo
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
#include "quantum.h"
|
||||
|
||||
#ifdef OLED_ENABLE
|
||||
void render_status(void) {
|
||||
static const char os_logo[][2][3] PROGMEM = {{{0x95, 0x96, 0}, {0xb5, 0xb6, 0}}, {{0x97, 0x98, 0}, {0xb7, 0xb8, 0}}};
|
||||
if (!keymap_config.swap_lalt_lgui) {
|
||||
oled_write_P(os_logo[0][0], false);
|
||||
oled_write_P(PSTR("\n"), false);
|
||||
oled_write_P(os_logo[0][1], false);
|
||||
} else {
|
||||
oled_write_P(os_logo[1][0], false);
|
||||
oled_write_P(PSTR("\n"), false);
|
||||
oled_write_P(os_logo[1][1], false);
|
||||
}
|
||||
|
||||
oled_write_P(PSTR(" Layer: "), false);
|
||||
switch (get_highest_layer(layer_state)) {
|
||||
case 0:
|
||||
oled_write_ln_P(PSTR("Default"), false);
|
||||
break;
|
||||
case 1:
|
||||
oled_write_ln_P(PSTR("Lower"), false);
|
||||
break;
|
||||
case 2:
|
||||
oled_write_ln_P(PSTR("Raise"), false);
|
||||
break;
|
||||
case 3:
|
||||
oled_write_ln_P(PSTR("Adjust"), false);
|
||||
break;
|
||||
default:
|
||||
oled_write_ln_P(PSTR("Undefined"), false);
|
||||
}
|
||||
oled_write_P(PSTR("\n"), false);
|
||||
|
||||
led_t led_state = host_keyboard_led_state();
|
||||
oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false);
|
||||
oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false);
|
||||
oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false);
|
||||
}
|
||||
|
||||
static void render_logo(void) {
|
||||
static const char PROGMEM qmk_logo[] = {
|
||||
// clang-format off
|
||||
0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x8D, 0x8E, 0x8F, 0x90, 0x91, 0x92, 0x93, 0x94,
|
||||
0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xA8, 0xA9, 0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0xAF, 0xB0, 0xB1, 0xB2, 0xB3, 0xB4,
|
||||
0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0x00
|
||||
// clang-format on
|
||||
};
|
||||
oled_write_P(qmk_logo, false);
|
||||
}
|
||||
|
||||
static void render_rgb_matrix_status(void) {
|
||||
oled_write_P(PSTR(" LED"), false);
|
||||
oled_write(get_u8_str(rgb_matrix_get_mode(), ' '), false);
|
||||
oled_write_char(':', false);
|
||||
oled_write(get_u8_str(rgb_matrix_get_hue() / RGB_MATRIX_HUE_STEP, ' '), false);
|
||||
oled_write_char(',', false);
|
||||
oled_write(get_u8_str(rgb_matrix_get_sat() / RGB_MATRIX_SAT_STEP, ' '), false);
|
||||
oled_write_char(',', false);
|
||||
oled_write(get_u8_str(rgb_matrix_get_val() / RGB_MATRIX_VAL_STEP, ' '), false);
|
||||
}
|
||||
|
||||
bool oled_task_kb(void) {
|
||||
if (!oled_task_user()) {
|
||||
return false;
|
||||
}
|
||||
if (is_keyboard_master()) {
|
||||
render_status();
|
||||
} else {
|
||||
render_logo();
|
||||
render_rgb_matrix_status();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
#endif
|
@ -1,60 +0,0 @@
|
||||
/*
|
||||
Copyright 2020 yushakobo
|
||||
|
||||
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
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 8
|
||||
#define MATRIX_COLS 7
|
||||
|
||||
/*
|
||||
* Keyboard Matrix Assignments
|
||||
*
|
||||
* Change this to how you wired your keyboard
|
||||
* COLS: AVR pins used for columns, left to right
|
||||
* ROWS: AVR pins used for rows, top to bottom
|
||||
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
|
||||
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
|
||||
*
|
||||
*/
|
||||
#define MATRIX_ROW_PINS { D4, C6, D7, E6 }
|
||||
#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 }
|
||||
|
||||
/* COL2ROW, ROW2COL*/
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
/* Split hand configration */
|
||||
#define SPLIT_HAND_MATRIX_GRID D7,B2
|
||||
|
||||
/* Custom font */
|
||||
#define OLED_FONT_H "keyboards/helix/common/glcdfont.c"
|
||||
|
||||
/*
|
||||
* Feature disable options
|
||||
* These options are also useful to firmware size reduction.
|
||||
*/
|
||||
|
||||
/* disable debug print */
|
||||
//#define NO_DEBUG
|
||||
|
||||
/* disable print */
|
||||
//#define NO_PRINT
|
||||
|
||||
/* disable action features */
|
||||
//#define NO_ACTION_LAYER
|
||||
//#define NO_ACTION_TAPPING
|
||||
//#define NO_ACTION_ONESHOT
|
@ -1,118 +0,0 @@
|
||||
{
|
||||
"keyboard_name": "Helix rev3 4rows",
|
||||
"manufacturer": "yushakobo",
|
||||
"maintainer": "yushakobo",
|
||||
"usb": {
|
||||
"vid": "0x3265",
|
||||
"pid": "0x0004",
|
||||
"device_version": "0.0.1"
|
||||
},
|
||||
"qmk": {
|
||||
"locking": {
|
||||
"enabled": true,
|
||||
"resync": true
|
||||
}
|
||||
},
|
||||
"rgb_matrix": {
|
||||
"driver": "ws2812",
|
||||
"sat_steps": 8,
|
||||
"val_steps": 8,
|
||||
"speed_steps": 10,
|
||||
"max_brightness": 150,
|
||||
"split_count": [25, 25],
|
||||
"sleep": true
|
||||
},
|
||||
"dip_switch": {
|
||||
"matrix_grid": [ [0,6], [1,6], [5,6], [6,6] ]
|
||||
},
|
||||
"encoder": {
|
||||
"rotary": [
|
||||
{"pin_a": "B6", "pin_b": "B5"}
|
||||
]
|
||||
},
|
||||
"split": {
|
||||
"enabled": true,
|
||||
"serial": {
|
||||
"pin": "D2"
|
||||
}
|
||||
},
|
||||
"ws2812": {
|
||||
"pin": "D3"
|
||||
},
|
||||
"rgblight": {
|
||||
"led_count": 50,
|
||||
"max_brightness": 120,
|
||||
"split_count": [25, 25],
|
||||
"animations": {
|
||||
"rainbow_mood": true,
|
||||
"rainbow_swirl": true,
|
||||
"static_gradient": true,
|
||||
"rgb_test": true
|
||||
}
|
||||
},
|
||||
"processor": "atmega32u4",
|
||||
"bootloader": "caterina",
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"layout": [
|
||||
{"matrix": [0, 0], "x": 0, "y": 0},
|
||||
{"matrix": [0, 1], "x": 1, "y": 0},
|
||||
{"matrix": [0, 2], "x": 2, "y": 0},
|
||||
{"matrix": [0, 3], "x": 3, "y": 0},
|
||||
{"matrix": [0, 4], "x": 4, "y": 0},
|
||||
{"matrix": [0, 5], "x": 5, "y": 0},
|
||||
|
||||
{"matrix": [4, 5], "x": 9, "y": 0},
|
||||
{"matrix": [4, 4], "x": 10, "y": 0},
|
||||
{"matrix": [4, 3], "x": 11, "y": 0},
|
||||
{"matrix": [4, 2], "x": 12, "y": 0},
|
||||
{"matrix": [4, 1], "x": 13, "y": 0},
|
||||
{"matrix": [4, 0], "x": 14, "y": 0},
|
||||
|
||||
{"matrix": [1, 0], "x": 0, "y": 1},
|
||||
{"matrix": [1, 1], "x": 1, "y": 1},
|
||||
{"matrix": [1, 2], "x": 2, "y": 1},
|
||||
{"matrix": [1, 3], "x": 3, "y": 1},
|
||||
{"matrix": [1, 4], "x": 4, "y": 1},
|
||||
{"matrix": [1, 5], "x": 5, "y": 1},
|
||||
|
||||
{"matrix": [5, 5], "x": 9, "y": 1},
|
||||
{"matrix": [5, 4], "x": 10, "y": 1},
|
||||
{"matrix": [5, 3], "x": 11, "y": 1},
|
||||
{"matrix": [5, 2], "x": 12, "y": 1},
|
||||
{"matrix": [5, 1], "x": 13, "y": 1},
|
||||
{"matrix": [5, 0], "x": 14, "y": 1},
|
||||
|
||||
{"matrix": [2, 0], "x": 0, "y": 2},
|
||||
{"matrix": [2, 1], "x": 1, "y": 2},
|
||||
{"matrix": [2, 2], "x": 2, "y": 2},
|
||||
{"matrix": [2, 3], "x": 3, "y": 2},
|
||||
{"matrix": [2, 4], "x": 4, "y": 2},
|
||||
{"matrix": [2, 5], "x": 5, "y": 2},
|
||||
|
||||
{"matrix": [6, 5], "x": 9, "y": 2},
|
||||
{"matrix": [6, 4], "x": 10, "y": 2},
|
||||
{"matrix": [6, 3], "x": 11, "y": 2},
|
||||
{"matrix": [6, 2], "x": 12, "y": 2},
|
||||
{"matrix": [6, 1], "x": 13, "y": 2},
|
||||
{"matrix": [6, 0], "x": 14, "y": 2},
|
||||
|
||||
{"matrix": [3, 0], "x": 0, "y": 3},
|
||||
{"matrix": [3, 1], "x": 1, "y": 3},
|
||||
{"matrix": [3, 2], "x": 2, "y": 3},
|
||||
{"matrix": [3, 3], "x": 3, "y": 3},
|
||||
{"matrix": [3, 4], "x": 4, "y": 3},
|
||||
{"matrix": [3, 5], "x": 5, "y": 3},
|
||||
{"matrix": [3, 6], "x": 6, "y": 3},
|
||||
|
||||
{"matrix": [7, 6], "x": 8, "y": 3},
|
||||
{"matrix": [7, 5], "x": 9, "y": 3},
|
||||
{"matrix": [7, 4], "x": 10, "y": 3},
|
||||
{"matrix": [7, 3], "x": 11, "y": 3},
|
||||
{"matrix": [7, 2], "x": 12, "y": 3},
|
||||
{"matrix": [7, 1], "x": 13, "y": 3},
|
||||
{"matrix": [7, 0], "x": 14, "y": 3}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
@ -1,180 +0,0 @@
|
||||
/* Copyright 2020 yushakobo
|
||||
*
|
||||
* 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
|
||||
|
||||
|
||||
// Defines names for use in layer keycodes and the keymap
|
||||
enum layer_names {
|
||||
_QWERTY = 0,
|
||||
_LOWER,
|
||||
_RAISE,
|
||||
_ADJUST
|
||||
};
|
||||
|
||||
// Defines the keycodes used by our macros in process_record_user
|
||||
enum custom_keycodes {
|
||||
EISU = SAFE_RANGE,
|
||||
KANA,
|
||||
ADJUST,
|
||||
RGBRST
|
||||
};
|
||||
|
||||
#define LOWER MO(_LOWER)
|
||||
#define RAISE MO(_RAISE)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Qwerty
|
||||
* ,-----------------------------------------. ,-----------------------------------------.
|
||||
* | Tab | Q | W | E | R | T | | Y | U | I | O | P | Bksp |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | Ctrl | A | S | D | F | G | | H | J | K | L | ; | ' |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | | N | M | , | . | / |Enter |
|
||||
* |------+------+------+------+------+------+-------------+------+------+------+------+------+------|
|
||||
* |Adjust| Esc | Alt | GUI | EISU |Lower |Space |Space |Raise | KANA | Left | Down | Up |Right |
|
||||
* `-------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_QWERTY] = LAYOUT(
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
|
||||
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT ,
|
||||
ADJUST, KC_ESC, KC_LALT, KC_LGUI, EISU, LOWER, KC_SPC, KC_SPC, RAISE, KANA, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
|
||||
),
|
||||
|
||||
/* Lower
|
||||
* ,-----------------------------------------. ,-----------------------------------------.
|
||||
* | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | | F1 | F2 | F3 | F4 | F5 | | F6 | _ | + | { | } | | |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | CAPS | F7 | F8 | F9 | F10 | F11 | | F12 | | | Home | End | |
|
||||
* |------+------+------+------+------+------+-------------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||
* `-------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_LOWER] = LAYOUT(
|
||||
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______,
|
||||
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
|
||||
KC_CAPS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, KC_HOME, KC_END, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
|
||||
),
|
||||
|
||||
/* Raise
|
||||
* ,-----------------------------------------. ,-----------------------------------------.
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | | F1 | F2 | F3 | F4 | F5 | | F6 | - | = | [ | ] | \ |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | CAPS | F7 | F8 | F9 | F10 | F11 | | F12 | | |PageDn|PageUp| |
|
||||
* |------+------+------+------+------+------+-------------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||
* `-------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_RAISE] = LAYOUT(
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL,
|
||||
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
|
||||
KC_CAPS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, KC_PGDN, KC_PGUP, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
|
||||
),
|
||||
|
||||
/* Adjust (Lower + Raise)
|
||||
* ,-----------------------------------------. ,-----------------------------------------.
|
||||
* | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | | Reset|RGBRST|EEPRST| | | | | | | | | Del |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | | | | | | Mac | | Win | |RGB ON| HUE+ | SAT+ | VAL+ |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | MODE | HUE- | SAT- | VAL- |
|
||||
* `-------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_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,
|
||||
_______, QK_BOOT, RGBRST, EE_CLR, _______, _______, _______, _______, _______, _______, _______, KC_DEL,
|
||||
_______, _______, _______, _______, _______, AG_NORM, AG_SWAP, _______, UG_TOGG, UG_HUEU, UG_SATU, UG_VALU,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, UG_NEXT, UG_HUED, UG_SATD, UG_VALD
|
||||
)
|
||||
|
||||
};
|
||||
|
||||
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (index == 0) { /* Left side encoder */
|
||||
if (clockwise) {
|
||||
tap_code(KC_PGDN);
|
||||
} else {
|
||||
tap_code(KC_PGUP);
|
||||
}
|
||||
} else if (index == 1) { /* Right side encoder */
|
||||
if (clockwise) {
|
||||
tap_code(KC_DOWN);
|
||||
} else {
|
||||
tap_code(KC_UP);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case EISU:
|
||||
if (record->event.pressed) {
|
||||
if (is_mac_mode()) {
|
||||
register_code(KC_LNG2);
|
||||
}else{
|
||||
tap_code16(LALT(KC_GRAVE));
|
||||
}
|
||||
} else {
|
||||
unregister_code(KC_LNG2);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case KANA:
|
||||
if (record->event.pressed) {
|
||||
if (is_mac_mode()) {
|
||||
register_code(KC_LNG1);
|
||||
}else{
|
||||
tap_code16(LALT(KC_GRAVE));
|
||||
}
|
||||
} else {
|
||||
unregister_code(KC_LNG1);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case ADJUST:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_LOWER);
|
||||
layer_on(_RAISE);
|
||||
} else {
|
||||
layer_off(_LOWER);
|
||||
layer_off(_RAISE);
|
||||
}
|
||||
break;
|
||||
case RGBRST:
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
if (record->event.pressed) {
|
||||
eeconfig_update_rgblight_default();
|
||||
rgblight_enable();
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
@ -1,120 +0,0 @@
|
||||
/* Copyright 2020 yushakobo
|
||||
*
|
||||
* 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
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
// Defines names for use in layer keycodes and the keymap
|
||||
enum layer_names {
|
||||
_QWERTY = 0,
|
||||
_LOWER,
|
||||
_RAISE,
|
||||
_ADJUST
|
||||
};
|
||||
|
||||
#ifdef OLED_ENABLE
|
||||
|
||||
void render_status(void) {
|
||||
|
||||
// Render to mode icon
|
||||
static const char os_logo[][2][3] PROGMEM ={{{0x95,0x96,0},{0xb5,0xb6,0}},{{0x97,0x98,0},{0xb7,0xb8,0}}};
|
||||
if (is_mac_mode()) {
|
||||
oled_write_P(os_logo[0][0], false);
|
||||
oled_write_P(PSTR("\n"), false);
|
||||
oled_write_P(os_logo[0][1], false);
|
||||
}else{
|
||||
oled_write_P(os_logo[1][0], false);
|
||||
oled_write_P(PSTR("\n"), false);
|
||||
oled_write_P(os_logo[1][1], false);
|
||||
}
|
||||
|
||||
oled_write_P(PSTR(" "), false);
|
||||
|
||||
// Host Keyboard Layer Status
|
||||
oled_write_P(PSTR("Layer: "), false);
|
||||
|
||||
switch (get_highest_layer(layer_state)) {
|
||||
case _QWERTY:
|
||||
oled_write_P(PSTR("Default\n"), false);
|
||||
break;
|
||||
case _RAISE:
|
||||
oled_write_P(PSTR("Raise\n"), false);
|
||||
break;
|
||||
case _LOWER:
|
||||
oled_write_P(PSTR("Lower\n"), false);
|
||||
break;
|
||||
case _ADJUST:
|
||||
oled_write_P(PSTR("Adjust\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("\n"), false);
|
||||
|
||||
// Host Keyboard LED Status
|
||||
led_t led_state = host_keyboard_led_state();
|
||||
oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false);
|
||||
oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false);
|
||||
oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false);
|
||||
}
|
||||
|
||||
|
||||
static void render_logo(void) {
|
||||
static const char PROGMEM qmk_logo[] = {
|
||||
0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x8D, 0x8E, 0x8F, 0x90, 0x91, 0x92, 0x93, 0x94,
|
||||
0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xA8, 0xA9, 0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0xAF, 0xB0, 0xB1, 0xB2, 0xB3, 0xB4,
|
||||
0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0x00
|
||||
};
|
||||
|
||||
oled_write_P(qmk_logo, false);
|
||||
}
|
||||
|
||||
static void render_rgbled_status(bool full) {
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
if (RGBLIGHT_MODES > 1 && rgblight_is_enabled()) {
|
||||
if (full) {
|
||||
// " LED %d:%d,%d,%d"
|
||||
oled_write_P(PSTR(" LED"), false);
|
||||
oled_write(get_u8_str(rgblight_get_mode(), ' '), false);
|
||||
oled_write_char(':', false);
|
||||
oled_write(get_u8_str(rgblight_get_hue() / RGBLIGHT_HUE_STEP, ' '), false);
|
||||
oled_write_char(',', false);
|
||||
oled_write(get_u8_str(rgblight_get_sat() / RGBLIGHT_SAT_STEP, ' '), false);
|
||||
oled_write_char(',', false);
|
||||
oled_write(get_u8_str(rgblight_get_val() / RGBLIGHT_VAL_STEP, ' '), false);
|
||||
} else {
|
||||
// "[%2d]"
|
||||
oled_write_char('[', false);
|
||||
oled_write(get_u8_str(rgblight_get_mode(), ' '), false);
|
||||
oled_write_char(']', false);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
bool oled_task_user(void) {
|
||||
if(is_keyboard_master()){
|
||||
render_status();
|
||||
}else{
|
||||
render_logo();
|
||||
render_rgbled_status(true);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
#endif
|
@ -1,66 +0,0 @@
|
||||
# The default keymap for Helix rev3 4rows
|
||||
|
||||
### Qwerty Layer (Base)
|
||||
```
|
||||
,-----------------------------------------. ,-----------------------------------------.
|
||||
| Tab | Q | W | E | R | T | | Y | U | I | O | P | Bksp |
|
||||
|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
| Ctrl | A | S | D | F | G | | H | J | K | L | ; | ' |
|
||||
|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
| Shift| Z | X | C | V | B | | N | M | , | . | / |Enter |
|
||||
|------+------+------+------+------+------+-------------+------+------+------+------+------+------|
|
||||
|Adjust| Esc | Alt | GUI | EISU |Lower |Space |Space |Raise | KANA | Left | Down | Up |Right |
|
||||
`-------------------------------------------------------------------------------------------------'
|
||||
```
|
||||
### Lower Layer
|
||||
```
|
||||
,-----------------------------------------. ,-----------------------------------------.
|
||||
| ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | |
|
||||
|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
| | F1 | F2 | F3 | F4 | F5 | | F6 | _ | + | { | } | | |
|
||||
|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
| CAPS | F7 | F8 | F9 | F10 | F11 | | F12 | | | Home | End | |
|
||||
|------+------+------+------+------+------+-------------+------+------+------+------+------+------|
|
||||
| | | | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||
`-------------------------------------------------------------------------------------------------'
|
||||
```
|
||||
### Raise Layer
|
||||
```
|
||||
,-----------------------------------------. ,-----------------------------------------.
|
||||
| ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del |
|
||||
|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
| | F1 | F2 | F3 | F4 | F5 | | F6 | - | = | [ | ] | \ |
|
||||
|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
| CAPS | F7 | F8 | F9 | F10 | F11 | | F12 | | |PageDn|PageUp| |
|
||||
|------+------+------+------+------+------+-------------+------+------+------+------+------+------|
|
||||
| | | | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||
`-------------------------------------------------------------------------------------------------'
|
||||
```
|
||||
### Adjust Layer (Lower + Raise)
|
||||
```
|
||||
,-----------------------------------------. ,-----------------------------------------.
|
||||
| F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 |
|
||||
|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
| | Reset|RGBRST|EEPRST| | | | | | | | | Del |
|
||||
|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
| | | | | | Mac | | Win | |RGB ON| HUE+ | SAT+ | VAL+ |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| | | | | | | | | | | MODE | HUE- | SAT- | VAL- |
|
||||
`-------------------------------------------------------------------------------------------------'
|
||||
```
|
||||
|
||||
### Rotary Encoder Settings
|
||||
|
||||
|L/R|Clockwise|Counter Clockwise|
|
||||
|---|---|---|
|
||||
|Left|Page Down|Page Up|
|
||||
|Right|Down|Up|
|
||||
|
||||
### DipSW Settings
|
||||
|
||||
|Switch No.||
|
||||
|---|---|
|
||||
|Left 1|Toggle Win/mac|
|
||||
|Left 2|Not assigned|
|
||||
|Right 1|Not assigned|
|
||||
|Right 2|Not assigned|
|
@ -1,9 +0,0 @@
|
||||
/*
|
||||
|
||||
There are several ways to create your own keymap oled code:
|
||||
|
||||
* Add the oled code to your keymaps/<keymap_name>/keymap.c.
|
||||
* Create a new file in your keymaps/<keymap_name>/ directory, add the oled code, and add `SRC + = <filename>` to keymaps/<keymap_name>/rules.mk.
|
||||
* Copy keymaps/default/oled_display.c to your keymaps/<keymap_name>/ directory and modify it.
|
||||
|
||||
*/
|
@ -1,13 +0,0 @@
|
||||
# Helix rev3 4rows
|
||||
|
||||
A compact split ortholinear keyboard.
|
||||
|
||||
* Keyboard Maintainer: [yushakobo](https://github.com/yushakobo)
|
||||
* Hardware Supported: Helix rev3 PCBs, Pro Micro
|
||||
* Hardware Availability: (Under preparation)
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make helix/rev3_4rows: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).
|
@ -1,114 +0,0 @@
|
||||
/* Copyright 2020 yushakobo
|
||||
*
|
||||
* 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 "rev3_4rows.h"
|
||||
|
||||
bool is_mac_mode(void) {
|
||||
return keymap_config.swap_lalt_lgui == false;
|
||||
}
|
||||
|
||||
void set_mac_mode(bool macmode) {
|
||||
/* The result is the same as pressing the AG_NORM(=MAGIC_UNSWAP_ALT_GUI)/AG_SWAP(=MAGIC_SWAP_ALT_GUI) keys.
|
||||
* see
|
||||
* https://github.com/qmk/qmk_firmware/blob/fb4a6ad30ea7a648acd59793ed4a30c3a8d8dc32/quantum/process_keycode/process_magic.c#L123-L124
|
||||
* https://github.com/qmk/qmk_firmware/blob/fb4a6ad30ea7a648acd59793ed4a30c3a8d8dc32/quantum/process_keycode/process_magic.c#L80-L81
|
||||
*/
|
||||
keymap_config.swap_lalt_lgui = keymap_config.swap_ralt_rgui = !macmode;
|
||||
eeconfig_update_keymap(&keymap_config);
|
||||
}
|
||||
|
||||
#ifdef DIP_SWITCH_ENABLE
|
||||
bool dip_switch_update_kb(uint8_t index, bool active) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
if(active) { // Left no.1 Helix rev3 common
|
||||
set_mac_mode(false);
|
||||
} else {
|
||||
set_mac_mode(true);
|
||||
}
|
||||
break;
|
||||
default: // Left no.2 or Right no.1 or Right no.2 for user/keymap
|
||||
dip_switch_update_user(index, active);
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef OLED_ENABLE
|
||||
static char *sprint_decimal(char *buf, int data) {
|
||||
if (data > 9) {
|
||||
buf = sprint_decimal(buf, data/10);
|
||||
}
|
||||
*buf++ = "0123456789"[data%10];
|
||||
*buf = '\0';
|
||||
return buf;
|
||||
}
|
||||
|
||||
char *sprints(char *buf, char *src) {
|
||||
while (*src) {
|
||||
*buf++ = *src++;
|
||||
}
|
||||
*buf = '\0';
|
||||
return buf;
|
||||
}
|
||||
|
||||
char *sprintd(char *buf, char *leadstr, int data) {
|
||||
buf = sprints(buf, leadstr);
|
||||
buf = sprint_decimal(buf, data);
|
||||
return buf;
|
||||
}
|
||||
|
||||
char *sprint2d(char *buf, char *leadstr, int data) {
|
||||
buf = sprints(buf, leadstr);
|
||||
if (data > 99) {
|
||||
return sprint_decimal(buf, data);
|
||||
}
|
||||
if (data < 10) {
|
||||
*buf++ = ' ';
|
||||
}
|
||||
return sprint_decimal(buf, data);
|
||||
}
|
||||
|
||||
bool oled_task_kb(void) {
|
||||
if (!oled_task_user()) { return false; }
|
||||
static const char PROGMEM helix_logo[] = {
|
||||
0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x8D, 0x8E, 0x8F, 0x90, 0x91, 0x92, 0x93, 0x94,
|
||||
0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xA8, 0xA9, 0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0xAF, 0xB0, 0xB1, 0xB2, 0xB3, 0xB4,
|
||||
0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, 0xD0, 0xD1, 0xD2, 0xD3, 0xD4,
|
||||
0x0
|
||||
};
|
||||
static const char os_logo[][2][3] PROGMEM ={{{0x95,0x96,0},{0xb5,0xb6,0}},{{0x97,0x98,0},{0xb7,0xb8,0}}};
|
||||
|
||||
if (is_keyboard_master()) {
|
||||
if (is_mac_mode()) {
|
||||
oled_write_P(os_logo[0][0], false);
|
||||
oled_write_P(PSTR("\n"), false);
|
||||
oled_write_P(os_logo[0][1], false);
|
||||
}else{
|
||||
oled_write_P(os_logo[1][0], false);
|
||||
oled_write_P(PSTR("\n"), false);
|
||||
oled_write_P(os_logo[1][1], false);
|
||||
}
|
||||
char buf[20];
|
||||
sprint2d(buf, " Layer: ", get_highest_layer(layer_state));
|
||||
oled_write(buf, false);
|
||||
} else {
|
||||
oled_write_P(helix_logo, false);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
#endif
|
@ -1,22 +0,0 @@
|
||||
/* Copyright 2020 yushakobo
|
||||
*
|
||||
* 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"
|
||||
|
||||
bool is_mac_mode(void);
|
||||
void set_mac_mode(bool macmode);
|
@ -1,9 +0,0 @@
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
|
||||
RGB_MATRIX_ENABLE = no
|
||||
OLED_ENABLE = yes
|
||||
ENCODER_ENABLE = yes
|
||||
DIP_SWITCH_ENABLE = no
|
||||
LTO_ENABLE = yes
|
||||
|
||||
SRC += oled_display.c
|
@ -1,60 +0,0 @@
|
||||
/*
|
||||
Copyright 2020 yushakobo
|
||||
|
||||
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
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 10
|
||||
#define MATRIX_COLS 7
|
||||
|
||||
/*
|
||||
* Keyboard Matrix Assignments
|
||||
*
|
||||
* Change this to how you wired your keyboard
|
||||
* COLS: AVR pins used for columns, left to right
|
||||
* ROWS: AVR pins used for rows, top to bottom
|
||||
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
|
||||
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
|
||||
*
|
||||
*/
|
||||
#define MATRIX_ROW_PINS { D4, C6, D7, E6, B4 }
|
||||
#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 }
|
||||
|
||||
/* COL2ROW, ROW2COL*/
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
/* Split hand configration */
|
||||
#define SPLIT_HAND_MATRIX_GRID D7,B2
|
||||
|
||||
/* Custom font */
|
||||
#define OLED_FONT_H "keyboards/helix/common/glcdfont.c"
|
||||
|
||||
/*
|
||||
* Feature disable options
|
||||
* These options are also useful to firmware size reduction.
|
||||
*/
|
||||
|
||||
/* disable debug print */
|
||||
//#define NO_DEBUG
|
||||
|
||||
/* disable print */
|
||||
//#define NO_PRINT
|
||||
|
||||
/* disable action features */
|
||||
//#define NO_ACTION_LAYER
|
||||
//#define NO_ACTION_TAPPING
|
||||
//#define NO_ACTION_ONESHOT
|
@ -1,198 +0,0 @@
|
||||
{
|
||||
"keyboard_name": "Helix rev3 5rows",
|
||||
"manufacturer": "yushakobo",
|
||||
"maintainer": "yushakobo",
|
||||
"usb": {
|
||||
"vid": "0x3265",
|
||||
"pid": "0x0003",
|
||||
"device_version": "0.0.1"
|
||||
},
|
||||
"qmk": {
|
||||
"locking": {
|
||||
"enabled": true,
|
||||
"resync": true
|
||||
}
|
||||
},
|
||||
"rgb_matrix": {
|
||||
"driver": "ws2812",
|
||||
"sat_steps": 8,
|
||||
"val_steps": 8,
|
||||
"speed_steps": 10,
|
||||
"layout": [
|
||||
{"matrix": [0, 5], "x": 80, "y": 0, "flags": 4},
|
||||
{"matrix": [0, 4], "x": 64, "y": 0, "flags": 4},
|
||||
{"matrix": [0, 3], "x": 48, "y": 0, "flags": 4},
|
||||
{"matrix": [0, 2], "x": 32, "y": 0, "flags": 4},
|
||||
{"matrix": [0, 1], "x": 16, "y": 0, "flags": 4},
|
||||
{"matrix": [0, 0], "x": 0, "y": 0, "flags": 4},
|
||||
{"matrix": [1, 0], "x": 0, "y": 16, "flags": 4},
|
||||
{"matrix": [1, 1], "x": 16, "y": 16, "flags": 4},
|
||||
{"matrix": [1, 2], "x": 32, "y": 16, "flags": 4},
|
||||
{"matrix": [1, 3], "x": 48, "y": 16, "flags": 4},
|
||||
{"matrix": [1, 4], "x": 64, "y": 16, "flags": 4},
|
||||
{"matrix": [1, 5], "x": 80, "y": 16, "flags": 4},
|
||||
{"matrix": [2, 5], "x": 80, "y": 32, "flags": 4},
|
||||
{"matrix": [2, 4], "x": 64, "y": 32, "flags": 4},
|
||||
{"matrix": [2, 3], "x": 48, "y": 32, "flags": 4},
|
||||
{"matrix": [2, 2], "x": 32, "y": 32, "flags": 4},
|
||||
{"matrix": [2, 1], "x": 16, "y": 32, "flags": 4},
|
||||
{"matrix": [2, 0], "x": 0, "y": 32, "flags": 4},
|
||||
{"matrix": [3, 0], "x": 0, "y": 48, "flags": 4},
|
||||
{"matrix": [3, 1], "x": 16, "y": 48, "flags": 4},
|
||||
{"matrix": [3, 2], "x": 32, "y": 48, "flags": 4},
|
||||
{"matrix": [3, 3], "x": 48, "y": 48, "flags": 4},
|
||||
{"matrix": [3, 4], "x": 64, "y": 48, "flags": 4},
|
||||
{"matrix": [3, 5], "x": 80, "y": 48, "flags": 4},
|
||||
{"matrix": [3, 6], "x": 96, "y": 48, "flags": 4},
|
||||
{"matrix": [4, 6], "x": 96, "y": 64, "flags": 4},
|
||||
{"matrix": [4, 5], "x": 80, "y": 64, "flags": 4},
|
||||
{"matrix": [4, 4], "x": 64, "y": 64, "flags": 4},
|
||||
{"matrix": [4, 3], "x": 48, "y": 64, "flags": 4},
|
||||
{"matrix": [4, 2], "x": 32, "y": 64, "flags": 4},
|
||||
{"matrix": [4, 1], "x": 16, "y": 64, "flags": 4},
|
||||
{"matrix": [4, 0], "x": 0, "y": 64, "flags": 4},
|
||||
{"matrix": [5, 5], "x": 144, "y": 0, "flags": 4},
|
||||
{"matrix": [5, 4], "x": 160, "y": 0, "flags": 4},
|
||||
{"matrix": [5, 3], "x": 176, "y": 0, "flags": 4},
|
||||
{"matrix": [5, 2], "x": 192, "y": 0, "flags": 4},
|
||||
{"matrix": [5, 1], "x": 208, "y": 0, "flags": 4},
|
||||
{"matrix": [5, 0], "x": 224, "y": 0, "flags": 4},
|
||||
{"matrix": [6, 0], "x": 224, "y": 16, "flags": 4},
|
||||
{"matrix": [6, 1], "x": 208, "y": 16, "flags": 4},
|
||||
{"matrix": [6, 2], "x": 192, "y": 16, "flags": 4},
|
||||
{"matrix": [6, 3], "x": 176, "y": 16, "flags": 4},
|
||||
{"matrix": [6, 4], "x": 160, "y": 16, "flags": 4},
|
||||
{"matrix": [6, 5], "x": 144, "y": 16, "flags": 4},
|
||||
{"matrix": [7, 5], "x": 144, "y": 32, "flags": 4},
|
||||
{"matrix": [7, 4], "x": 160, "y": 32, "flags": 4},
|
||||
{"matrix": [7, 3], "x": 176, "y": 32, "flags": 4},
|
||||
{"matrix": [7, 2], "x": 192, "y": 32, "flags": 4},
|
||||
{"matrix": [7, 1], "x": 208, "y": 32, "flags": 4},
|
||||
{"matrix": [7, 0], "x": 224, "y": 32, "flags": 4},
|
||||
{"matrix": [8, 0], "x": 224, "y": 48, "flags": 4},
|
||||
{"matrix": [8, 1], "x": 208, "y": 48, "flags": 4},
|
||||
{"matrix": [8, 2], "x": 192, "y": 48, "flags": 4},
|
||||
{"matrix": [8, 3], "x": 176, "y": 48, "flags": 4},
|
||||
{"matrix": [8, 4], "x": 160, "y": 48, "flags": 4},
|
||||
{"matrix": [8, 5], "x": 144, "y": 48, "flags": 4},
|
||||
{"matrix": [8, 6], "x": 128, "y": 48, "flags": 4},
|
||||
{"matrix": [9, 6], "x": 128, "y": 64, "flags": 4},
|
||||
{"matrix": [9, 5], "x": 144, "y": 64, "flags": 4},
|
||||
{"matrix": [9, 4], "x": 160, "y": 64, "flags": 4},
|
||||
{"matrix": [9, 3], "x": 176, "y": 64, "flags": 4},
|
||||
{"matrix": [9, 2], "x": 192, "y": 64, "flags": 4},
|
||||
{"matrix": [9, 1], "x": 208, "y": 64, "flags": 4},
|
||||
{"matrix": [9, 0], "x": 224, "y": 64, "flags": 4}
|
||||
],
|
||||
"max_brightness": 128,
|
||||
"split_count": [32, 32],
|
||||
"sleep": true
|
||||
},
|
||||
"dip_switch": {
|
||||
"matrix_grid": [ [0,6], [1,6], [5,6], [6,6] ]
|
||||
},
|
||||
"encoder": {
|
||||
"rotary": [
|
||||
{"pin_a": "B6", "pin_b": "B5"}
|
||||
]
|
||||
},
|
||||
"split": {
|
||||
"enabled": true,
|
||||
"serial": {
|
||||
"pin": "D2"
|
||||
}
|
||||
},
|
||||
"ws2812": {
|
||||
"pin": "D3"
|
||||
},
|
||||
"rgblight": {
|
||||
"led_count": 64,
|
||||
"max_brightness": 120,
|
||||
"split_count": [32, 32],
|
||||
"animations": {
|
||||
"rainbow_mood": true,
|
||||
"rainbow_swirl": true
|
||||
}
|
||||
},
|
||||
"processor": "atmega32u4",
|
||||
"bootloader": "caterina",
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"layout": [
|
||||
{"matrix": [0, 0], "x": 0, "y": 0},
|
||||
{"matrix": [0, 1], "x": 1, "y": 0},
|
||||
{"matrix": [0, 2], "x": 2, "y": 0},
|
||||
{"matrix": [0, 3], "x": 3, "y": 0},
|
||||
{"matrix": [0, 4], "x": 4, "y": 0},
|
||||
{"matrix": [0, 5], "x": 5, "y": 0},
|
||||
|
||||
{"matrix": [5, 5], "x": 9, "y": 0},
|
||||
{"matrix": [5, 4], "x": 10, "y": 0},
|
||||
{"matrix": [5, 3], "x": 11, "y": 0},
|
||||
{"matrix": [5, 2], "x": 12, "y": 0},
|
||||
{"matrix": [5, 1], "x": 13, "y": 0},
|
||||
{"matrix": [5, 0], "x": 14, "y": 0},
|
||||
|
||||
{"matrix": [1, 0], "x": 0, "y": 1},
|
||||
{"matrix": [1, 1], "x": 1, "y": 1},
|
||||
{"matrix": [1, 2], "x": 2, "y": 1},
|
||||
{"matrix": [1, 3], "x": 3, "y": 1},
|
||||
{"matrix": [1, 4], "x": 4, "y": 1},
|
||||
{"matrix": [1, 5], "x": 5, "y": 1},
|
||||
|
||||
{"matrix": [6, 5], "x": 9, "y": 1},
|
||||
{"matrix": [6, 4], "x": 10, "y": 1},
|
||||
{"matrix": [6, 3], "x": 11, "y": 1},
|
||||
{"matrix": [6, 2], "x": 12, "y": 1},
|
||||
{"matrix": [6, 1], "x": 13, "y": 1},
|
||||
{"matrix": [6, 0], "x": 14, "y": 1},
|
||||
|
||||
{"matrix": [2, 0], "x": 0, "y": 2},
|
||||
{"matrix": [2, 1], "x": 1, "y": 2},
|
||||
{"matrix": [2, 2], "x": 2, "y": 2},
|
||||
{"matrix": [2, 3], "x": 3, "y": 2},
|
||||
{"matrix": [2, 4], "x": 4, "y": 2},
|
||||
{"matrix": [2, 5], "x": 5, "y": 2},
|
||||
|
||||
{"matrix": [7, 5], "x": 9, "y": 2},
|
||||
{"matrix": [7, 4], "x": 10, "y": 2},
|
||||
{"matrix": [7, 3], "x": 11, "y": 2},
|
||||
{"matrix": [7, 2], "x": 12, "y": 2},
|
||||
{"matrix": [7, 1], "x": 13, "y": 2},
|
||||
{"matrix": [7, 0], "x": 14, "y": 2},
|
||||
|
||||
{"matrix": [3, 0], "x": 0, "y": 3},
|
||||
{"matrix": [3, 1], "x": 1, "y": 3},
|
||||
{"matrix": [3, 2], "x": 2, "y": 3},
|
||||
{"matrix": [3, 3], "x": 3, "y": 3},
|
||||
{"matrix": [3, 4], "x": 4, "y": 3},
|
||||
{"matrix": [3, 5], "x": 5, "y": 3},
|
||||
{"matrix": [3, 6], "x": 6, "y": 3},
|
||||
|
||||
{"matrix": [8, 6], "x": 8, "y": 3},
|
||||
{"matrix": [8, 5], "x": 9, "y": 3},
|
||||
{"matrix": [8, 4], "x": 10, "y": 3},
|
||||
{"matrix": [8, 3], "x": 11, "y": 3},
|
||||
{"matrix": [8, 2], "x": 12, "y": 3},
|
||||
{"matrix": [8, 1], "x": 13, "y": 3},
|
||||
{"matrix": [8, 0], "x": 14, "y": 3},
|
||||
|
||||
{"matrix": [4, 0], "x": 0, "y": 4},
|
||||
{"matrix": [4, 1], "x": 1, "y": 4},
|
||||
{"matrix": [4, 2], "x": 2, "y": 4},
|
||||
{"matrix": [4, 3], "x": 3, "y": 4},
|
||||
{"matrix": [4, 4], "x": 4, "y": 4},
|
||||
{"matrix": [4, 5], "x": 5, "y": 4},
|
||||
{"matrix": [4, 6], "x": 6, "y": 4},
|
||||
|
||||
{"matrix": [9, 6], "x": 8, "y": 4},
|
||||
{"matrix": [9, 5], "x": 9, "y": 4},
|
||||
{"matrix": [9, 4], "x": 10, "y": 4},
|
||||
{"matrix": [9, 3], "x": 11, "y": 4},
|
||||
{"matrix": [9, 2], "x": 12, "y": 4},
|
||||
{"matrix": [9, 1], "x": 13, "y": 4},
|
||||
{"matrix": [9, 0], "x": 14, "y": 4}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
@ -1,120 +0,0 @@
|
||||
/* Copyright 2020 yushakobo
|
||||
*
|
||||
* 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
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
// Defines names for use in layer keycodes and the keymap
|
||||
enum layer_names {
|
||||
_QWERTY = 0,
|
||||
_LOWER,
|
||||
_RAISE,
|
||||
_ADJUST
|
||||
};
|
||||
|
||||
#ifdef OLED_ENABLE
|
||||
|
||||
void render_status(void) {
|
||||
|
||||
// Render to mode icon
|
||||
static const char os_logo[][2][3] PROGMEM ={{{0x95,0x96,0},{0xb5,0xb6,0}},{{0x97,0x98,0},{0xb7,0xb8,0}}};
|
||||
if (is_mac_mode()) {
|
||||
oled_write_P(os_logo[0][0], false);
|
||||
oled_write_P(PSTR("\n"), false);
|
||||
oled_write_P(os_logo[0][1], false);
|
||||
}else{
|
||||
oled_write_P(os_logo[1][0], false);
|
||||
oled_write_P(PSTR("\n"), false);
|
||||
oled_write_P(os_logo[1][1], false);
|
||||
}
|
||||
|
||||
oled_write_P(PSTR(" "), false);
|
||||
|
||||
// Host Keyboard Layer Status
|
||||
oled_write_P(PSTR("Layer: "), false);
|
||||
|
||||
switch (get_highest_layer(layer_state)) {
|
||||
case _QWERTY:
|
||||
oled_write_P(PSTR("Default\n"), false);
|
||||
break;
|
||||
case _RAISE:
|
||||
oled_write_P(PSTR("Raise\n"), false);
|
||||
break;
|
||||
case _LOWER:
|
||||
oled_write_P(PSTR("Lower\n"), false);
|
||||
break;
|
||||
case _ADJUST:
|
||||
oled_write_P(PSTR("Adjust\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("\n"), false);
|
||||
|
||||
// Host Keyboard LED Status
|
||||
led_t led_state = host_keyboard_led_state();
|
||||
oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false);
|
||||
oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false);
|
||||
oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false);
|
||||
}
|
||||
|
||||
|
||||
static void render_logo(void) {
|
||||
static const char PROGMEM qmk_logo[] = {
|
||||
0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x8D, 0x8E, 0x8F, 0x90, 0x91, 0x92, 0x93, 0x94,
|
||||
0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xA8, 0xA9, 0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0xAF, 0xB0, 0xB1, 0xB2, 0xB3, 0xB4,
|
||||
0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0x00
|
||||
};
|
||||
|
||||
oled_write_P(qmk_logo, false);
|
||||
}
|
||||
|
||||
static void render_rgbled_status(bool full) {
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
if (RGBLIGHT_MODES > 1 && rgblight_is_enabled()) {
|
||||
if (full) {
|
||||
// " LED %d:%d,%d,%d"
|
||||
oled_write_P(PSTR(" LED"), false);
|
||||
oled_write(get_u8_str(rgblight_get_mode(), ' '), false);
|
||||
oled_write_char(':', false);
|
||||
oled_write(get_u8_str(rgblight_get_hue() / RGBLIGHT_HUE_STEP, ' '), false);
|
||||
oled_write_char(',', false);
|
||||
oled_write(get_u8_str(rgblight_get_sat() / RGBLIGHT_SAT_STEP, ' '), false);
|
||||
oled_write_char(',', false);
|
||||
oled_write(get_u8_str(rgblight_get_val() / RGBLIGHT_VAL_STEP, ' '), false);
|
||||
} else {
|
||||
// "[%2d]"
|
||||
oled_write_char('[', false);
|
||||
oled_write(get_u8_str(rgblight_get_mode(), ' '), false);
|
||||
oled_write_char(']', false);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
bool oled_task_user(void) {
|
||||
if(is_keyboard_master()){
|
||||
render_status();
|
||||
}else{
|
||||
render_logo();
|
||||
render_rgbled_status(true);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
#endif
|
@ -1,81 +0,0 @@
|
||||
# The default keymap for Helix rev3 5rows
|
||||
|
||||
### Qwerty Layer (Base)
|
||||
```
|
||||
,-----------------------------------------. ,-----------------------------------------.
|
||||
| ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del |
|
||||
|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
| Tab | Q | W | E | R | T | | Y | U | I | O | P | Bksp |
|
||||
|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
| Ctrl | A | S | D | F | G | | H | J | K | L | ; | ' |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| Shift| Z | X | C | V | B | [ | ] | N | M | , | . | / |Enter |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
|Adjust| Esc | Alt | GUI | EISU |Lower |Space |Space |Raise | KANA | Left | Down | Up |Right |
|
||||
`-------------------------------------------------------------------------------------------------'
|
||||
|
||||
```
|
||||
|
||||
### Lower Layer
|
||||
```
|
||||
,-----------------------------------------. ,-----------------------------------------.
|
||||
| | | | | | | | | | | | | |
|
||||
|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
| ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | |
|
||||
|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
| | F1 | F2 | F3 | F4 | F5 | | F6 | _ | + | { | } | | |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| CAPS | F7 | F8 | F9 | F10 | F11 | ( | ) | F12 | | | Home | End | |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| | | | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||
`-------------------------------------------------------------------------------------------------'
|
||||
|
||||
```
|
||||
|
||||
|
||||
### Raise Layer
|
||||
```
|
||||
,-----------------------------------------. ,-----------------------------------------.
|
||||
| | | | | | | | | | | | | Bksp |
|
||||
|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
| ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del |
|
||||
|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
| | F1 | F2 | F3 | F4 | F5 | | F6 | - | = | [ | ] | \ |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| CAPS | F7 | F8 | F9 | F10 | F11 | | | F12 | | |PageDn|PageUp| |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| | | | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||
`-------------------------------------------------------------------------------------------------'
|
||||
|
||||
```
|
||||
|
||||
### Adjust Layer (Lower + Raise)
|
||||
```
|
||||
,-----------------------------------------. ,-----------------------------------------.
|
||||
| F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 |
|
||||
|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
| | Reset|RGBRST|EEPRST| | | | | | | | | Del |
|
||||
|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
| | | | | | Mac | | Win | | | | | |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| | | | | | | | | | |RGB ON| HUE+ | SAT+ | VAL+ |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| | | | | | | | | | | MODE | HUE- | SAT- | VAL- |
|
||||
`-------------------------------------------------------------------------------------------------'
|
||||
```
|
||||
|
||||
### Rotary Encoder Settings
|
||||
|
||||
|L/R|Clockwise|Counter Clockwise|
|
||||
|---|---|---|
|
||||
|Left|Page Down|Page Up|
|
||||
|Right|Down|Up|
|
||||
|
||||
### DipSW Settings
|
||||
|
||||
|Switch No.||
|
||||
|---|---|
|
||||
|Left 1|Toggle Win/mac|
|
||||
|Left 2|Not assigned|
|
||||
|Right 1|Not assigned|
|
||||
|Right 2|Not assigned|
|
@ -1 +0,0 @@
|
||||
ENCODER_MAP_ENABLE = yes
|
@ -1,9 +0,0 @@
|
||||
/*
|
||||
|
||||
There are several ways to create your own keymap oled code:
|
||||
|
||||
* Add the oled code to your keymaps/<keymap_name>/keymap.c.
|
||||
* Create a new file in your keymaps/<keymap_name>/ directory, add the oled code, and add `SRC + = <filename>` to keymaps/<keymap_name>/rules.mk.
|
||||
* Copy keymaps/default/oled_display.c to your keymaps/<keymap_name>/ directory and modify it.
|
||||
|
||||
*/
|
@ -1,13 +0,0 @@
|
||||
# Helix rev3 5rows
|
||||
|
||||
A compact split ortholinear keyboard.
|
||||
|
||||
* Keyboard Maintainer: [yushakobo](https://github.com/yushakobo)
|
||||
* Hardware Supported: Helix rev3 PCBs, Pro Micro
|
||||
* Hardware Availability: (Under preparation)
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make helix/rev3_5rows: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).
|
@ -1,114 +0,0 @@
|
||||
/* Copyright 2020 yushakobo
|
||||
*
|
||||
* 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 "rev3_5rows.h"
|
||||
|
||||
bool is_mac_mode(void) {
|
||||
return keymap_config.swap_lalt_lgui == false;
|
||||
}
|
||||
|
||||
void set_mac_mode(bool macmode) {
|
||||
/* The result is the same as pressing the AG_NORM(=MAGIC_UNSWAP_ALT_GUI)/AG_SWAP(=MAGIC_SWAP_ALT_GUI) keys.
|
||||
* see
|
||||
* https://github.com/qmk/qmk_firmware/blob/fb4a6ad30ea7a648acd59793ed4a30c3a8d8dc32/quantum/process_keycode/process_magic.c#L123-L124
|
||||
* https://github.com/qmk/qmk_firmware/blob/fb4a6ad30ea7a648acd59793ed4a30c3a8d8dc32/quantum/process_keycode/process_magic.c#L80-L81
|
||||
*/
|
||||
keymap_config.swap_lalt_lgui = keymap_config.swap_ralt_rgui = !macmode;
|
||||
eeconfig_update_keymap(&keymap_config);
|
||||
}
|
||||
|
||||
#ifdef DIP_SWITCH_ENABLE
|
||||
bool dip_switch_update_kb(uint8_t index, bool active) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
if(active) { // Left no.1 Helix rev3 common
|
||||
set_mac_mode(false);
|
||||
} else {
|
||||
set_mac_mode(true);
|
||||
}
|
||||
break;
|
||||
default: // Left no.2 or Right no.1 or Right no.2 for user/keymap
|
||||
dip_switch_update_user(index, active);
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef OLED_ENABLE
|
||||
static char *sprint_decimal(char *buf, int data) {
|
||||
if (data > 9) {
|
||||
buf = sprint_decimal(buf, data/10);
|
||||
}
|
||||
*buf++ = "0123456789"[data%10];
|
||||
*buf = '\0';
|
||||
return buf;
|
||||
}
|
||||
|
||||
char *sprints(char *buf, char *src) {
|
||||
while (*src) {
|
||||
*buf++ = *src++;
|
||||
}
|
||||
*buf = '\0';
|
||||
return buf;
|
||||
}
|
||||
|
||||
char *sprintd(char *buf, char *leadstr, int data) {
|
||||
buf = sprints(buf, leadstr);
|
||||
buf = sprint_decimal(buf, data);
|
||||
return buf;
|
||||
}
|
||||
|
||||
char *sprint2d(char *buf, char *leadstr, int data) {
|
||||
buf = sprints(buf, leadstr);
|
||||
if (data > 99) {
|
||||
return sprint_decimal(buf, data);
|
||||
}
|
||||
if (data < 10) {
|
||||
*buf++ = ' ';
|
||||
}
|
||||
return sprint_decimal(buf, data);
|
||||
}
|
||||
|
||||
bool oled_task_kb(void) {
|
||||
if (!oled_task_user()) { return false; }
|
||||
static const char PROGMEM helix_logo[] = {
|
||||
0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x8D, 0x8E, 0x8F, 0x90, 0x91, 0x92, 0x93, 0x94,
|
||||
0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xA8, 0xA9, 0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0xAF, 0xB0, 0xB1, 0xB2, 0xB3, 0xB4,
|
||||
0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, 0xD0, 0xD1, 0xD2, 0xD3, 0xD4,
|
||||
0x0
|
||||
};
|
||||
static const char os_logo[][2][3] PROGMEM ={{{0x95,0x96,0},{0xb5,0xb6,0}},{{0x97,0x98,0},{0xb7,0xb8,0}}};
|
||||
|
||||
if (is_keyboard_master()) {
|
||||
if (is_mac_mode()) {
|
||||
oled_write_P(os_logo[0][0], false);
|
||||
oled_write_P(PSTR("\n"), false);
|
||||
oled_write_P(os_logo[0][1], false);
|
||||
}else{
|
||||
oled_write_P(os_logo[1][0], false);
|
||||
oled_write_P(PSTR("\n"), false);
|
||||
oled_write_P(os_logo[1][1], false);
|
||||
}
|
||||
char buf[20];
|
||||
sprint2d(buf, " Layer: ", get_highest_layer(layer_state));
|
||||
oled_write(buf, false);
|
||||
} else {
|
||||
oled_write_P(helix_logo, false);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
#endif
|
@ -1,22 +0,0 @@
|
||||
/* Copyright 2020 yushakobo
|
||||
*
|
||||
* 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"
|
||||
|
||||
bool is_mac_mode(void);
|
||||
void set_mac_mode(bool macmode);
|
@ -1,10 +0,0 @@
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
|
||||
RGB_MATRIX_ENABLE = no
|
||||
OLED_ENABLE = yes
|
||||
ENCODER_ENABLE = yes
|
||||
DIP_SWITCH_ENABLE = no
|
||||
MOUSEKEY_ENABLE = yes
|
||||
LTO_ENABLE = yes
|
||||
|
||||
SRC += oled_display.c
|
Loading…
Reference in New Issue
Block a user