Skip to content

Commit

Permalink
update layouts of dactyl_manuform/4x5_5 (qmk#21094)
Browse files Browse the repository at this point in the history
  • Loading branch information
dunk2k authored and jesperhellberg committed Sep 9, 2023
1 parent 563df53 commit 03e0f4d
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 297 deletions.
109 changes: 28 additions & 81 deletions keyboards/handwired/dactyl_manuform/4x5_5/info.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"keyboard_name": "Dactyl Manuform 4x5 5 thumb keys",
"keyboard_name": "Dactyl ManuForm 4x5_5",
"manufacturer": "ssedrick",
"url": "https://github.com/qmk/qmk_firmware/tree/master/keyboards/handwired/dactyl_manuform/4x5_5",
"maintainer": "ssedrick",
Expand All @@ -16,9 +16,7 @@
"split": {
"soft_serial_pin": "D0"
},
"processor": "atmega32u4",
"bootloader": "atmel-dfu",
"community_layouts": ["split_3x5_3"],
"development_board": "promicro",
"layouts": {
"LAYOUT": {
"layout": [
Expand All @@ -28,106 +26,55 @@
{"matrix": [0, 3], "x": 3, "y": 0},
{"matrix": [0, 4], "x": 4, "y": 0},

{"matrix": [5, 0], "x": 6, "y": 0},
{"matrix": [5, 1], "x": 7, "y": 0},
{"matrix": [5, 2], "x": 8, "y": 0},
{"matrix": [5, 3], "x": 9, "y": 0},
{"matrix": [5, 4], "x": 10, "y": 0},
{"matrix": [5, 0], "x": 8, "y": 0},
{"matrix": [5, 1], "x": 9, "y": 0},
{"matrix": [5, 2], "x": 10, "y": 0},
{"matrix": [5, 3], "x": 11, "y": 0},
{"matrix": [5, 4], "x": 12, "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": [6, 0], "x": 6, "y": 1},
{"matrix": [6, 1], "x": 7, "y": 1},
{"matrix": [6, 2], "x": 8, "y": 1},
{"matrix": [6, 3], "x": 9, "y": 1},
{"matrix": [6, 4], "x": 10, "y": 1},
{"matrix": [6, 0], "x": 8, "y": 1},
{"matrix": [6, 1], "x": 9, "y": 1},
{"matrix": [6, 2], "x": 10, "y": 1},
{"matrix": [6, 3], "x": 11, "y": 1},
{"matrix": [6, 4], "x": 12, "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": [7, 0], "x": 6, "y": 2},
{"matrix": [7, 1], "x": 7, "y": 2},
{"matrix": [7, 2], "x": 8, "y": 2},
{"matrix": [7, 3], "x": 9, "y": 2},
{"matrix": [7, 4], "x": 10, "y": 2},
{"matrix": [7, 0], "x": 8, "y": 2},
{"matrix": [7, 1], "x": 9, "y": 2},
{"matrix": [7, 2], "x": 10, "y": 2},
{"matrix": [7, 3], "x": 11, "y": 2},
{"matrix": [7, 4], "x": 12, "y": 2},

{"matrix": [3, 1], "x": 1, "y": 3},
{"matrix": [3, 2], "x": 2, "y": 3},

{"matrix": [8, 2], "x": 8, "y": 3},
{"matrix": [8, 3], "x": 9, "y": 3},
{"matrix": [8, 2], "x": 10, "y": 3},
{"matrix": [8, 3], "x": 11, "y": 3},

{"matrix": [3, 3], "x": 3, "y": 4},
{"matrix": [3, 4], "x": 4, "y": 4},
{"matrix": [4, 4], "x": 5, "y": 4},

{"matrix": [8, 1], "x": 7, "y": 4},
{"matrix": [8, 1], "x": 9, "y": 4},
{"matrix": [9, 0], "x": 7, "y": 4},
{"matrix": [8, 0], "x": 8, "y": 4},

{"matrix": [3, 4], "x": 3, "y": 5},
{"matrix": [4, 4], "x": 4, "y": 5},
{"matrix": [4, 2], "x": 4, "y": 5},
{"matrix": [4, 3], "x": 5, "y": 5},

{"matrix": [9, 0], "x": 6, "y": 5},
{"matrix": [8, 0], "x": 7, "y": 5},

{"matrix": [4, 2], "x": 3, "y": 6},
{"matrix": [4, 3], "x": 4, "y": 6},

{"matrix": [9, 1], "x": 6, "y": 6},
{"matrix": [9, 2], "x": 7, "y": 6}
]
},
"LAYOUT_split_3x5_3": {
"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": [5, 0], "x": 6, "y": 0},
{"matrix": [5, 1], "x": 7, "y": 0},
{"matrix": [5, 2], "x": 8, "y": 0},
{"matrix": [5, 3], "x": 9, "y": 0},
{"matrix": [5, 4], "x": 10, "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": [6, 0], "x": 6, "y": 1},
{"matrix": [6, 1], "x": 7, "y": 1},
{"matrix": [6, 2], "x": 8, "y": 1},
{"matrix": [6, 3], "x": 9, "y": 1},
{"matrix": [6, 4], "x": 10, "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": [7, 0], "x": 6, "y": 2},
{"matrix": [7, 1], "x": 7, "y": 2},
{"matrix": [7, 2], "x": 8, "y": 2},
{"matrix": [7, 3], "x": 9, "y": 2},
{"matrix": [7, 4], "x": 10, "y": 2},

{"matrix": [3, 3], "x": 3, "y": 4},

{"matrix": [8, 1], "x": 7, "y": 4},

{"matrix": [3, 4], "x": 3, "y": 5},
{"matrix": [4, 4], "x": 4, "y": 5},

{"matrix": [9, 0], "x": 6, "y": 5},
{"matrix": [8, 0], "x": 7, "y": 5}
{"matrix": [9, 1], "x": 7, "y": 5},
{"matrix": [9, 2], "x": 8, "y": 5}
]
}
}
Expand Down
151 changes: 25 additions & 126 deletions keyboards/handwired/dactyl_manuform/4x5_5/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// SPDX-License-Identifier: GPL-2.0-or-later

#include QMK_KEYBOARD_H
#include "print.h"

enum key_layers {
_BASE,
Expand All @@ -11,145 +10,45 @@ enum key_layers {
_LOWER
};

enum layer_keycodes {
QWERTY = SAFE_RANGE,
COLEMAK,
};

#define RAISE MO(_RAISE)
#define LOWER MO(_LOWER)
#define SH_ESC SFT_T(KC_ESC)
#define ____ KC_TRANSPARENT
#define ____ KC_TRNS

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Base (qwerty)
* ,----------------------------------, ,----------------------------------,
* | q | w | e | r | t | | y | u | i | o | p |
* |------+------+------+------+------| |------+------+------+------+------|
* | a | s | d | f | g | | h | j | k | l | ; |
* |------+------+------+------+------| |------+------+------+------+------|
* | z | x | c | v | b | | n | m | , | . | / |
* '------+------+------+-------------' '------+------+------+------+------'
* | [ | ] | | ' | `~ |
* '-------------+------, ,------|-------------'
* | ESC | | BSPC |
* |-------------, ,------+------|
* | GUI | TAB | | SHIFT| SPACE|
* |------+------| |------+------|
* | RAISE| CTRL | | LOWER| ENTER|
* '-------------' '-------------'
*/
[_BASE] = LAYOUT(
KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,
KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,
KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH,
KC_LBRC, KC_RBRC, KC_QUOT, KC_GRV,
SH_ESC, KC_BSPC,
KC_LGUI, KC_TAB, KC_RSFT, KC_SPC,
RAISE, KC_LCTL, LOWER, KC_ENT
KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,
KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,
KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH,
KC_LBRC, KC_RBRC, KC_QUOT, KC_GRV,
SH_ESC, KC_LGUI, KC_TAB, KC_RSFT, KC_SPC, KC_BSPC,
RAISE, KC_LCTL, LOWER, KC_ENT
),

/* Colemak
* ,----------------------------------, ,----------------------------------,
* | q | w | f | p | g | | j | l | u | y | ; |
* |------+------+------+------+------| |------+------+------+------+------|
* | a | r | s | t | d | | h | n | e | i | o |
* |------+------+------+------+------| |------+------+------+------+------|
* | z | x | c | v | b | | k | m | , | . | / |
* '------+------+------+-------------' '------+------+------+------+------'
* | [ | ] | | ' | `~ |
* '-------------+------, ,------|-------------'
* | ESC | | BSPC |
* |-------------, ,------+------|
* | GUI | TAB | | SHIFT| SPACE|
* |------+------| |------+------|
* | RAISE| CTRL | | LOWER| ENTER|
* '-------------' '-------------'
*/
[_COLEMAK] = LAYOUT(
KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN,
KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O,
KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH,
KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN,
KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O,
KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH,
KC_LBRC, KC_RBRC, KC_QUOT, KC_GRV,
KC_ESC, KC_BSPC,
KC_LGUI, KC_TAB, KC_RSFT, KC_SPC,
RAISE, KC_LCTL, LOWER, KC_ENT
KC_ESC, ____, ____, ____, ____, ____,
____, ____, ____, ____
),
/* RAISE
* ,----------------------------------, ,----------------------------------,
* | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 |
* |------+------+------+------+------| |------+------+------+------+------|
* | ( | ) | { | } | = | | - | 4 | 5 | 6 | ; |
* |------+------+------+------+------| |------+------+------+------+------|
* | QK_BOOT| BOOT | [ | ] | | | | 1 | 2 | 3 | |
* |------+------+------+-------------| |------+------+------+------+------,
* | | | | 0 | . |
* '-------------+------, ,------|-------------'
* | ESC | | BSPC |
* |-------------, ,------+------|
* | GUI | TAB | | SHIFT| SPACE|
* |------+------| |------+------|
* | RAISE| CTRL | | LOWER| ENTER|
* '-------------' '-------------'
*/

[_RAISE] = LAYOUT(
KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,
S(KC_9), S(KC_0), KC_LCBR, KC_RCBR, KC_EQL, KC_MINS, KC_4, KC_5, KC_6, KC_QUOT,
QK_RBT, QK_BOOT, KC_LBRC, KC_RBRC, ____, ____, KC_1, KC_2, KC_3, ____,
____, ____, KC_0, KC_DOT,
____, ____,
____, ____, ____, ____,
____, ____, ____, ____
KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,
S(KC_9), S(KC_0), KC_LCBR, KC_RCBR, KC_EQL, KC_MINS, KC_4, KC_5, KC_6, KC_QUOT,
QK_RBT, QK_BOOT, KC_LBRC, KC_RBRC, ____, ____, KC_1, KC_2, KC_3, ____,
____, ____, KC_0, KC_DOT,
____, ____, ____, ____, ____, ____,
____, ____, ____, ____
),

/* LOWER
* ,----------------------------------, ,----------------------------------,
* | ! | @ | # | $ | % | | ^ | & | * | ( | ) |
* |------+------+------+------+------| |------+------+------+------+------|
* | ( | ) | { | } | = | | | - | + | | | |
* |------+------+------+------+------| |------+------+------+------+------|
* | | | | | | | | LEFT | DOWN | UP | RIGHT|
* |------+------+------+-------------| |------+------+------+------+------,
* | | | |QWERTY|COLEMA|
* '-------------+------, ,------|-------------'
* | ESC | | BSPC |
* |-------------, ,------+------|
* | GUI | TAB | | SHIFT| SPACE|
* |------+------| |------+------|
* | RAISE| CTRL | | LOWER| ENTER|
* '-------------' '-------------'
*/
[_LOWER] = LAYOUT(
KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN,
S(KC_9), S(KC_0), KC_LBRC, KC_RBRC, KC_EQL, ____, KC_MINS, KC_EQL, KC_PIPE, ____,
____, ____, ____, ____, ____, ____, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT,
____, ____, QWERTY, COLEMAK,
____, ____,
____, ____, ____, ____,
____, ____, ____, ____
KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN,
S(KC_9), S(KC_0), KC_LBRC, KC_RBRC, KC_EQL, ____, KC_MINS, KC_EQL, KC_PIPE, ____,
____, ____, ____, ____, ____, ____, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT,
____, ____, KC_QUOT, KC_GRV,
____, ____, ____, ____, ____, ____,
____, ____, ____, ____
)
};


bool process_record_user(uint16_t keycode, keyrecord_t *record) {
// If console is enabled, it will print the matrix position and status of each key pressed
#ifdef CONSOLE_ENABLE
uprintf("KL: kc: 0x%04X, col: %u, row: %u, pressed: %d, time: %u, interrupt: %d, count: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed, record->event.time, record->tap.interrupted, record->tap.count);
#endif
switch (keycode) {
case QWERTY:
if (record->event.pressed) {
set_single_persistent_default_layer(_BASE);
}
return false;
break;
case COLEMAK:
if (record->event.pressed) {
set_single_persistent_default_layer(_COLEMAK);
}
return false;
break;
}
return true;
}

Loading

0 comments on commit 03e0f4d

Please sign in to comment.