mirror of
https://github.com/qmk/qmk_firmware.git
synced 2024-11-24 20:32:58 +00:00
Compare commits
26 Commits
aa6462a56e
...
7b787fcd45
Author | SHA1 | Date | |
---|---|---|---|
|
7b787fcd45 | ||
|
9bea332a21 | ||
|
8cbcdcac62 | ||
|
d7f856ebdd | ||
|
cfd24c2c79 | ||
|
52c2ed4c9d | ||
|
339e3f9c2b | ||
|
2f5d377444 | ||
|
8c93d5a78b | ||
|
a8a6f7b7e3 | ||
|
cd173c714e | ||
|
ee20c8b721 | ||
|
181920e4d4 | ||
|
c96449b48f | ||
|
8eeb55a337 | ||
|
99ec7f9161 | ||
|
4660f77763 | ||
|
7891abb01a | ||
|
1df17d909d | ||
|
6d45ffbcc0 | ||
|
8dcdbfbb68 | ||
|
64d9dbe0d7 | ||
|
17f7f21016 | ||
|
26aa0b5f5e | ||
|
3f56cc609d | ||
|
532ba769e0 |
112
keyboards/sepsepkbd/yubino_hara/keyboard.json
Normal file
112
keyboards/sepsepkbd/yubino_hara/keyboard.json
Normal file
@ -0,0 +1,112 @@
|
||||
{
|
||||
"manufacturer": "t-ando",
|
||||
"keyboard_name": "yubino_hara",
|
||||
"maintainer": "nagmeal",
|
||||
"bootloader": "rp2040",
|
||||
"diode_direction": "COL2ROW",
|
||||
"features": {
|
||||
"rgblight": true,
|
||||
"bootmagic": true,
|
||||
"extrakey": true,
|
||||
"mousekey": true,
|
||||
"nkro": true
|
||||
},
|
||||
"split": {
|
||||
"enabled": true,
|
||||
"soft_serial_pin": "GP0",
|
||||
"serial": {
|
||||
"driver": "vendor",
|
||||
"pin": "GP0"
|
||||
},
|
||||
"transport": {
|
||||
"sync": {
|
||||
"matrix_state": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"matrix_pins": {
|
||||
"cols": ["GP1", "GP2", "GP3", "GP4", "GP5", "GP6", "GP7"],
|
||||
"rows": ["GP29", "GP28", "GP27", "GP26"]
|
||||
},
|
||||
"processor": "RP2040",
|
||||
"url": "",
|
||||
"usb": {
|
||||
"device_version": "1.0.0",
|
||||
"pid": "0x0000",
|
||||
"vid": "0x7A93"
|
||||
},
|
||||
"ws2812": {
|
||||
"driver": "vendor",
|
||||
"pin": "GP14"
|
||||
},
|
||||
"rgblight": {
|
||||
"led_count": 44,
|
||||
"split": true,
|
||||
"split_count": [22, 22],
|
||||
"sleep": true,
|
||||
"default": {
|
||||
"hue": 0,
|
||||
"sat": 0,
|
||||
"val": 50
|
||||
}
|
||||
},
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"layout": [
|
||||
{"matrix": [0, 0], "label":"0,0", "x":0, "y":0},
|
||||
{"matrix": [0, 1], "label":"0,1", "x":1, "y":0},
|
||||
{"matrix": [0, 2], "label":"0,2", "x":2, "y":0},
|
||||
{"matrix": [0, 3], "label":"0,3", "x":3, "y":0},
|
||||
{"matrix": [0, 4], "label":"0,4", "x":4, "y":0},
|
||||
{"matrix": [0, 5], "label":"0,5", "x":5, "y":0},
|
||||
|
||||
{"matrix": [4, 5], "label":"0,8", "x":9.25, "y":0},
|
||||
{"matrix": [4, 4], "label":"0,9", "x":10.25, "y":0},
|
||||
{"matrix": [4, 3], "label":"0,10", "x":11.25, "y":0},
|
||||
{"matrix": [4, 2], "label":"0,11", "x":12.25, "y":0},
|
||||
{"matrix": [4, 1], "label":"0,12", "x":13.25, "y":0},
|
||||
{"matrix": [4, 0], "label":"0,13", "x":14.25, "y":0},
|
||||
|
||||
{"matrix": [1, 0], "label":"1,0", "x":0, "y":1},
|
||||
{"matrix": [1, 1], "label":"1,1", "x":1.25, "y":1},
|
||||
{"matrix": [1, 2], "label":"1,2", "x":2.25, "y":1},
|
||||
{"matrix": [1, 3], "label":"1,3", "x":3.25, "y":1},
|
||||
{"matrix": [1, 4], "label":"1,4", "x":4.25, "y":1},
|
||||
{"matrix": [1, 5], "label":"1,5", "x":5.25, "y":1},
|
||||
|
||||
|
||||
{"matrix": [5, 5], "label":"1,8", "x":9, "y":1},
|
||||
{"matrix": [5, 4], "label":"1,9", "x":10, "y":1},
|
||||
{"matrix": [5, 3], "label":"1,10", "x":11, "y":1},
|
||||
{"matrix": [5, 2], "label":"1,11", "x":12, "y":1},
|
||||
{"matrix": [5, 1], "label":"1,12", "x":13, "y":1},
|
||||
{"matrix": [5, 0], "label":"1,13", "x":14.25, "y":1},
|
||||
|
||||
{"matrix": [2, 0], "label":"2,0", "x":0, "y":2},
|
||||
{"matrix": [2, 1], "label":"2,1", "x":1, "y":2},
|
||||
{"matrix": [2, 2], "label":"2,2", "x":2, "y":2},
|
||||
{"matrix": [2, 3], "label":"2,3", "x":3, "y":2},
|
||||
{"matrix": [2, 4], "label":"2,4", "x":4, "y":2},
|
||||
{"matrix": [2, 5], "label":"2,5", "x":5, "y":2},
|
||||
{"matrix": [2, 6], "label":"2,6", "x":6.25, "y":1, "h":2},
|
||||
|
||||
{"matrix": [6, 6], "label":"2,7", "x":8, "y":1, "h":2},
|
||||
{"matrix": [6, 5], "label":"2,8", "x":9.25, "y":2},
|
||||
{"matrix": [6, 4], "label":"2,9", "x":10.25, "y":2},
|
||||
{"matrix": [6, 3], "label":"2,10", "x":11.25, "y":2},
|
||||
{"matrix": [6, 2], "label":"2,11", "x":12.25, "y":2},
|
||||
{"matrix": [6, 1], "label":"2,12", "x":13.25, "y":2},
|
||||
{"matrix": [6, 0], "label":"2,13", "x":14.25, "y":2},
|
||||
|
||||
|
||||
{"matrix": [3, 4], "label":"3,4", "x":4.25, "y":3.25},
|
||||
{"matrix": [3, 5], "label":"3,5", "x":5.25, "y":3},
|
||||
{"matrix": [3, 6], "label":"3,6", "x":6.25, "y":3.25},
|
||||
|
||||
{"matrix": [7, 6], "label":"3,7", "x":8, "y":3.25},
|
||||
{"matrix": [7, 5], "label":"3,8", "x":9, "y":3},
|
||||
{"matrix": [7, 4], "label":"3,9", "x":10, "y":3.25}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
31
keyboards/sepsepkbd/yubino_hara/keymaps/default/keymap.c
Normal file
31
keyboards/sepsepkbd/yubino_hara/keymaps/default/keymap.c
Normal file
@ -0,0 +1,31 @@
|
||||
// Copyright 2023 QMK
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = 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_MINS,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_BTN1, KC_BTN2, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ESC,
|
||||
KC_LGUI, MO(1), KC_SPC, KC_ENT, MO(2), KC_RALT
|
||||
),
|
||||
[1] = LAYOUT(
|
||||
KC_TAB, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_ASTR, KC_AMPR, KC_LPRN, KC_RPRN, KC_CIRC, KC_BSPC,
|
||||
KC_LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, LGUI(KC_SPC), KC_QUOT, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, KC_GRV,
|
||||
KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LNG2, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, KC_TILD,
|
||||
_______, _______, _______, _______, MO(3), _______
|
||||
),
|
||||
[2] = LAYOUT(
|
||||
KC_TAB, XXXXXXX, KC_7, KC_8, KC_9, XXXXXXX, XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
KC_LCTL, XXXXXXX, KC_4, KC_5, KC_6, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX,
|
||||
KC_LSFT, KC_LALT, KC_1, KC_2, KC_3, KC_0, _______, _______, KC_LNG1, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
_______, MO(3), _______, _______, _______, _______
|
||||
),
|
||||
[3] = 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_LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
KC_LSFT, XXXXXXX, XXXXXXX, RGB_HUI, RGB_SAI, RGB_VAI, RGB_TOG, _______, RGB_VAD, RGB_SAD, RGB_HUD, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
_______, _______, _______, _______, _______, _______
|
||||
),
|
||||
};
|
32
keyboards/sepsepkbd/yubino_hara/readme.md
Normal file
32
keyboards/sepsepkbd/yubino_hara/readme.md
Normal file
@ -0,0 +1,32 @@
|
||||
# yubino_hara
|
||||
|
||||
![yubino_hara](https://i.imgur.com/WtB6bMy.jpeg)
|
||||
|
||||
- Split
|
||||
- Reverse tilt (tilted from front to back)
|
||||
- Symmetrical staggered
|
||||
|
||||
|
||||
|
||||
* Keyboard Maintainer: [t-ando](https://github.com/nagmeal)
|
||||
* Hardware Supported: *YUBINO-HARA PCB, RP2040-zero*
|
||||
* Hardware Availability: *[PCB & Case Data](https://github.com/nagmeal/sep-sep-kbd/tree/main/yubino-hara)*
|
||||
|
||||
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make sepsepkbd/yubino_hara:default
|
||||
|
||||
Flashing example for this keyboard:
|
||||
|
||||
make sepsepkbd/yubino_hara: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**: Connect to PC while holding down the "BOOT" button on the RP2040-zero.
|
||||
* **Physical reset button**: Press the "RESET" button on RP2040-zero.
|
@ -1,5 +1,6 @@
|
||||
"""This script automates the copying of the default keymap into your own keymap.
|
||||
"""
|
||||
import re
|
||||
import shutil
|
||||
|
||||
from milc import cli
|
||||
@ -13,6 +14,13 @@ from qmk.keyboard import keyboard_completer, keyboard_folder
|
||||
from qmk.userspace import UserspaceDefs
|
||||
|
||||
|
||||
def validate_keymap_name(name):
|
||||
"""Returns True if the given keymap name contains only a-z, 0-9 and underscore characters.
|
||||
"""
|
||||
regex = re.compile(r'^[a-zA-Z0-9][a-zA-Z0-9_]+$')
|
||||
return bool(regex.match(name))
|
||||
|
||||
|
||||
def prompt_keyboard():
|
||||
prompt = """{fg_yellow}Select Keyboard{style_reset_all}
|
||||
If you`re unsure you can view a full list of supported keyboards with {fg_yellow}qmk list-keyboards{style_reset_all}.
|
||||
@ -60,6 +68,10 @@ def new_keymap(cli):
|
||||
cli.log.error(f'Default keymap {{fg_cyan}}{keymap_path_default}{{fg_reset}} does not exist!')
|
||||
return False
|
||||
|
||||
if not validate_keymap_name(user_name):
|
||||
cli.log.error('Keymap names must contain only {fg_cyan}a-z{fg_reset}, {fg_cyan}0-9{fg_reset} and {fg_cyan}_{fg_reset}! Please choose a different name.')
|
||||
return False
|
||||
|
||||
if keymap_path_new.exists():
|
||||
cli.log.error(f'Keymap {{fg_cyan}}{user_name}{{fg_reset}} already exists! Please choose a different name.')
|
||||
return False
|
||||
|
@ -29,6 +29,7 @@ def _convert_macros(via_macros):
|
||||
if len(via_macros) == 0:
|
||||
return list()
|
||||
split_regex = re.compile(r'(}\,)|(\,{)')
|
||||
macro_group_regex = re.compile(r'({.+?})')
|
||||
macros = list()
|
||||
for via_macro in via_macros:
|
||||
# Split VIA macro to its elements
|
||||
@ -38,13 +39,28 @@ def _convert_macros(via_macros):
|
||||
macro_data = list()
|
||||
for m in macro:
|
||||
if '{' in m or '}' in m:
|
||||
# Found keycode(s)
|
||||
keycodes = m.split(',')
|
||||
# Remove whitespaces and curly braces from around keycodes
|
||||
keycodes = list(map(lambda s: s.strip(' {}'), keycodes))
|
||||
# Remove the KC prefix
|
||||
keycodes = list(map(lambda s: s.replace('KC_', ''), keycodes))
|
||||
macro_data.append({"action": "tap", "keycodes": keycodes})
|
||||
# Split macro groups
|
||||
macro_groups = macro_group_regex.findall(m)
|
||||
for macro_group in macro_groups:
|
||||
# Remove whitespaces and curly braces from around group
|
||||
macro_group = macro_group.strip(' {}')
|
||||
|
||||
macro_action = 'tap'
|
||||
macro_keycodes = []
|
||||
|
||||
if macro_group[0] == '+':
|
||||
macro_action = 'down'
|
||||
macro_keycodes.append(macro_group[1:])
|
||||
elif macro_group[0] == '-':
|
||||
macro_action = 'up'
|
||||
macro_keycodes.append(macro_group[1:])
|
||||
else:
|
||||
macro_keycodes.extend(macro_group.split(',') if ',' in macro_group else [macro_group])
|
||||
|
||||
# Remove the KC prefixes
|
||||
macro_keycodes = list(map(lambda s: s.replace('KC_', ''), macro_keycodes))
|
||||
|
||||
macro_data.append({"action": macro_action, "keycodes": macro_keycodes})
|
||||
else:
|
||||
# Found text
|
||||
macro_data.append(m)
|
||||
@ -54,13 +70,13 @@ def _convert_macros(via_macros):
|
||||
|
||||
|
||||
def _fix_macro_keys(keymap_data):
|
||||
macro_no = re.compile(r'MACRO0?([0-9]{1,2})')
|
||||
macro_no = re.compile(r'MACRO0?\(([0-9]{1,2})\)')
|
||||
for i in range(0, len(keymap_data)):
|
||||
for j in range(0, len(keymap_data[i])):
|
||||
kc = keymap_data[i][j]
|
||||
m = macro_no.match(kc)
|
||||
if m:
|
||||
keymap_data[i][j] = f'MACRO_{m.group(1)}'
|
||||
keymap_data[i][j] = f'MC_{m.group(1)}'
|
||||
return keymap_data
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user