mirror of
https://github.com/qmk/qmk_firmware.git
synced 2024-11-25 04:43:02 +00:00
Compare commits
12 Commits
a1a50a60a5
...
91ef545623
Author | SHA1 | Date | |
---|---|---|---|
|
91ef545623 | ||
|
9bea332a21 | ||
|
8cbcdcac62 | ||
|
98d80dbe2c | ||
|
0841ca4805 | ||
|
410cead821 | ||
|
1708841218 | ||
|
644a8e156e | ||
|
fdd9a01994 | ||
|
dde7174a66 | ||
|
a3b2ffd9d7 | ||
|
4637f7ea30 |
22
keyboards/handwired/dactyl_manuform/5x7_2_6/config.h
Normal file
22
keyboards/handwired/dactyl_manuform/5x7_2_6/config.h
Normal file
@ -0,0 +1,22 @@
|
||||
/*
|
||||
Copyright 2012 Jun Wako <wakojun@gmail.com> Nikolai Grigoriev @ngrigoriev
|
||||
|
||||
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
|
||||
|
||||
|
||||
#define EE_HANDS
|
117
keyboards/handwired/dactyl_manuform/5x7_2_6/keyboard.json
Normal file
117
keyboards/handwired/dactyl_manuform/5x7_2_6/keyboard.json
Normal file
@ -0,0 +1,117 @@
|
||||
{
|
||||
"manufacturer": "Nikolai Grigoriev",
|
||||
"keyboard_name": "Dactyl Manuform 5x7 2-key last row 6-key thumb cluster",
|
||||
"maintainer": "ngrigoriev",
|
||||
"build": {
|
||||
"lto": true
|
||||
},
|
||||
"development_board": "promicro",
|
||||
"diode_direction": "COL2ROW",
|
||||
"features": {
|
||||
"bootmagic": false,
|
||||
"command": false,
|
||||
"console": false,
|
||||
"nkro": true
|
||||
},
|
||||
"matrix_pins": {
|
||||
"cols": ["F5", "F6", "F7", "B1", "B3", "B2", "B6"],
|
||||
"rows": ["D4", "C6", "D7", "E6", "B4", "B5"]
|
||||
},
|
||||
"qmk": {
|
||||
"locking": {
|
||||
"enabled": true,
|
||||
"resync": true
|
||||
}
|
||||
},
|
||||
"split": {
|
||||
"enabled": true,
|
||||
"transport": {
|
||||
"protocol": "i2c"
|
||||
},
|
||||
"usb_detect": {
|
||||
"enabled": true
|
||||
}
|
||||
},
|
||||
"url": "https://github.com/ngrigoriev/dactyl-manuform-5x7_2_6",
|
||||
"usb": {
|
||||
"device_version": "1.0.0",
|
||||
"pid": "0x0000",
|
||||
"vid": "0xFEED"
|
||||
},
|
||||
"layouts": {
|
||||
"LAYOUT_5x7_2_6": {
|
||||
"layout": [
|
||||
{"label": "KC_GRV", "matrix": [0, 0], "x": 0, "y": 0.5, "w": 1.5},
|
||||
{"label": "KC_1", "matrix": [0, 1], "x": 1.5, "y": 0.5},
|
||||
{"label": "KC_2", "matrix": [0, 2], "x": 2.5, "y": 0},
|
||||
{"label": "KC_3", "matrix": [0, 3], "x": 3.5, "y": 0},
|
||||
{"label": "KC_4", "matrix": [0, 4], "x": 4.5, "y": 0},
|
||||
{"label": "KC_5", "matrix": [0, 5], "x": 5.5, "y": 0},
|
||||
{"label": "KC_NO", "matrix": [0, 6], "x": 6.5, "y": 0},
|
||||
{"label": "KC_EQL", "matrix": [6, 0], "x": 12, "y": 0},
|
||||
{"label": "KC_6", "matrix": [6, 1], "x": 13, "y": 0},
|
||||
{"label": "KC_7", "matrix": [6, 2], "x": 14, "y": 0},
|
||||
{"label": "KC_8", "matrix": [6, 3], "x": 15, "y": 0},
|
||||
{"label": "KC_9", "matrix": [6, 4], "x": 16, "y": 0},
|
||||
{"label": "KC_0", "matrix": [6, 5], "x": 17, "y": 0.5},
|
||||
{"label": "KC_BSPC", "matrix": [6, 6], "x": 18, "y": 0.5, "w": 1.5},
|
||||
{"label": "KC_TAB", "matrix": [1, 0], "x": 0, "y": 1.5, "w": 1.5},
|
||||
{"label": "KC_Q", "matrix": [1, 1], "x": 1.5, "y": 1.5},
|
||||
{"label": "KC_W", "matrix": [1, 2], "x": 2.5, "y": 1},
|
||||
{"label": "KC_E", "matrix": [1, 3], "x": 3.5, "y": 1},
|
||||
{"label": "KC_R", "matrix": [1, 4], "x": 4.5, "y": 1},
|
||||
{"label": "KC_T", "matrix": [1, 5], "x": 5.5, "y": 1},
|
||||
{"label": "KC_NO", "matrix": [1, 6], "x": 6.5, "y": 1},
|
||||
{"label": "KC_MINUS", "matrix": [7, 0], "x": 12, "y": 1},
|
||||
{"label": "KC_Y", "matrix": [7, 1], "x": 13, "y": 1},
|
||||
{"label": "KC_U", "matrix": [7, 2], "x": 14, "y": 1},
|
||||
{"label": "KC_I", "matrix": [7, 3], "x": 15, "y": 1},
|
||||
{"label": "KC_O", "matrix": [7, 4], "x": 16, "y": 1},
|
||||
{"label": "KC_P", "matrix": [7, 5], "x": 17, "y": 1.5},
|
||||
{"label": "KC_BSLS", "matrix": [7, 6], "x": 18, "y": 1.5, "w": 1.5},
|
||||
{"label": "KC_LCTL", "matrix": [2, 0], "x": 0, "y": 2.5, "w": 1.5},
|
||||
{"label": "KC_A", "matrix": [2, 1], "x": 1.5, "y": 2.5},
|
||||
{"label": "KC_S", "matrix": [2, 2], "x": 2.5, "y": 2},
|
||||
{"label": "KC_D", "matrix": [2, 3], "x": 3.5, "y": 2},
|
||||
{"label": "KC_F", "matrix": [2, 4], "x": 4.5, "y": 2},
|
||||
{"label": "KC_G", "matrix": [2, 5], "x": 5.5, "y": 2},
|
||||
{"label": "KC_NO", "matrix": [2, 6], "x": 6.5, "y": 2},
|
||||
{"label": "KC_DEL", "matrix": [8, 0], "x": 12, "y": 2},
|
||||
{"label": "KC_H", "matrix": [8, 1], "x": 13, "y": 2},
|
||||
{"label": "KC_J", "matrix": [8, 2], "x": 14, "y": 2},
|
||||
{"label": "KC_K", "matrix": [8, 3], "x": 15, "y": 2},
|
||||
{"label": "KC_L", "matrix": [8, 4], "x": 16, "y": 2},
|
||||
{"label": "KC_SCLN", "matrix": [8, 5], "x": 17, "y": 2.5},
|
||||
{"label": "KC_RSFT", "matrix": [8, 6], "x": 18, "y": 2.5, "w": 1.5},
|
||||
{"label": "KC_LSFT", "matrix": [3, 0], "x": 0, "y": 3.5, "w": 1.5},
|
||||
{"label": "KC_Z", "matrix": [3, 1], "x": 1.5, "y": 3.5},
|
||||
{"label": "KC_X", "matrix": [3, 2], "x": 2.5, "y": 3},
|
||||
{"label": "KC_C", "matrix": [3, 3], "x": 3.5, "y": 3},
|
||||
{"label": "KC_V", "matrix": [3, 4], "x": 4.5, "y": 3},
|
||||
{"label": "KC_B", "matrix": [3, 5], "x": 5.5, "y": 3},
|
||||
{"label": "KC_N", "matrix": [9, 1], "x": 13, "y": 3},
|
||||
{"label": "KC_M", "matrix": [9, 2], "x": 14, "y": 3},
|
||||
{"label": "KC_COMM", "matrix": [9, 3], "x": 15, "y": 3},
|
||||
{"label": "KC_DOT", "matrix": [9, 4], "x": 16, "y": 3},
|
||||
{"label": "KC_SLSH", "matrix": [9, 5], "x": 17, "y": 3.5},
|
||||
{"label": "KC_RSFT", "matrix": [9, 6], "x": 18, "y": 3.5, "w": 1.5},
|
||||
{"label": "KC_PGUP", "matrix": [4, 2], "x": 2.5, "y": 4},
|
||||
{"label": "KC_PGDN", "matrix": [4, 3], "x": 3.5, "y": 4},
|
||||
{"label": "KC_LBRC", "matrix": [10, 3], "x": 15, "y": 4},
|
||||
{"label": "KC_RBRC", "matrix": [10, 4], "x": 16, "y": 4},
|
||||
{"label": "KC_LCTL", "matrix": [4, 4], "x": 5, "y": 5, "h": 1.5, "r": 30},
|
||||
{"label": "KC_ESC", "matrix": [4, 5], "x": 6, "y": 5, "h": 1.5, "r": 30},
|
||||
{"label": "KC_ENTER", "matrix": [10, 1], "x": 12.5, "y": 5, "h": 1.5, "r": -30},
|
||||
{"label": "KC_SPC", "matrix": [10, 2], "x": 13.5, "y": 5, "h": 1.5, "r": -30},
|
||||
{"label": "KC_UP", "matrix": [5, 5], "x": 7.5, "y": 6.5, "r": 45},
|
||||
{"label": "KC_DOWN", "matrix": [5, 3], "x": 8, "y": 7.5, "r": 45},
|
||||
{"label": "KC_LEFT", "matrix": [11, 3], "x": 10.5, "y": 7.5, "r": -45},
|
||||
{"label": "KC_RIGHT", "matrix": [11, 1], "x": 11, "y": 6.5, "r": -45},
|
||||
{"label": "KC_LCMD", "matrix": [5, 4], "x": 6.5, "y": 7, "r": 45},
|
||||
{"label": "KC_LALT", "matrix": [5, 2], "x": 7, "y": 8, "r": 45},
|
||||
{"label": "KC_RCTL", "matrix": [11, 4], "x": 11.5, "y": 8, "r": -45},
|
||||
{"label": "KC_RALT", "matrix": [11, 2], "x": 12, "y": 7, "r": -45}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,74 @@
|
||||
/* vim: noai:ts=4:sw=4:nowrap
|
||||
*/
|
||||
/*
|
||||
Copyright 2012 Jun Wako <wakojun@gmail.com> Nikolai Grigoriev @ngrigoriev
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
enum layers {
|
||||
_BASE,
|
||||
_MAGIC,
|
||||
_NUMPAD,
|
||||
_FN
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_BASE] = LAYOUT_5x7_2_6(
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, MO(_MAGIC), KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, MO(_NUMPAD), KC_MINUS, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
|
||||
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, _______, KC_DEL, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
|
||||
OSM(MOD_LSFT), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, OSM(MOD_RSFT),
|
||||
KC_PGUP, KC_PGDN, KC_LBRC, KC_RBRC,
|
||||
KC_LCTL, LT(_FN, KC_ESC), KC_ENTER,KC_SPC,
|
||||
KC_UP, KC_DOWN, KC_LEFT, KC_RIGHT,
|
||||
KC_LCMD, KC_LALT, KC_RCTL, KC_RALT
|
||||
),
|
||||
|
||||
[_FN] = LAYOUT_5x7_2_6(
|
||||
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, MO(_MAGIC), _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
|
||||
_______, _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_F12,
|
||||
_______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, QK_BOOT, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
KC_MPRV, KC_MNXT, _______, _______,
|
||||
_______, _______, KC_DEL, _______,
|
||||
_______, _______, _______, _______,
|
||||
_______, _______, _______, _______
|
||||
),
|
||||
|
||||
[_NUMPAD] = LAYOUT_5x7_2_6(
|
||||
_______, _______, _______, _______, _______, _______, MO(_MAGIC), _______, _______, KC_NUM, _______, KC_PMNS, KC_PPLS, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_P4, KC_P5, KC_P6, KC_PAST, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, KC_PSLS, _______,
|
||||
_______, _______, KC_P0, KC_PDOT,
|
||||
_______, _______, _______, KC_PENT,
|
||||
_______, _______, _______, _______,
|
||||
_______, _______, _______, _______
|
||||
),
|
||||
|
||||
[_MAGIC] = LAYOUT_5x7_2_6(
|
||||
_______, _______, _______, _______, _______, _______, _______, CG_SWAP, _______, _______, _______, _______, _______, QK_REBOOT,
|
||||
_______, _______, _______, _______, _______, _______, _______, CG_NORM, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, QK_BOOTLOADER,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______,
|
||||
_______, _______, _______, _______,
|
||||
_______, _______, _______, _______,
|
||||
_______, _______, _______, _______
|
||||
)
|
||||
};
|
||||
|
29
keyboards/handwired/dactyl_manuform/5x7_2_6/readme.md
Normal file
29
keyboards/handwired/dactyl_manuform/5x7_2_6/readme.md
Normal file
@ -0,0 +1,29 @@
|
||||
# handwired/dactyl_manuform/5x7_2_6
|
||||
|
||||
![keyboad_image](https://i.ibb.co/09tfjY0/kbpic-small-21.jpg)
|
||||
|
||||
A standard Dactyl Manuform keyboard with 5x7 matrix, 6 thumb cluster keys. Last row has 2 keys only. Index column has 3 rows. The outer keys are 1,5u wide. [More info on https://github.com/ngrigoriev/dactyl-manuform-5x7_2_6](https://github.com/ngrigoriev/dactyl-manuform-5x7_2_6). Based on the original set of Dactyl Manuform keyboards created and maintaied by [Jack Humbert](https://github.com/jackhumbert).
|
||||
|
||||
This keyboard can be generated using one of Dactyl Manuform generators, such as (https://dactyl.mbugert.de/manuform).
|
||||
|
||||
* Keyboard Maintainer: [Nikolai Grigoriev](https://github.com/ngrigoriev)
|
||||
* Hardware Supported: Promicro
|
||||
* Hardware Availability: general DIY
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make handwired/dactyl_manuform/5x7_2_6:default
|
||||
|
||||
Flashing example for this keyboard:
|
||||
|
||||
make handwired/dactyl_manuform/5x7_2_6:default:flash
|
||||
|
||||
See the [build environment setup](getting_started_build_tools) and the [make instructions](getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](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 back of the PCB - some may have pads you must short instead
|
||||
* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available
|
@ -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