diff options
author | Ryan <fauxpark@gmail.com> | 2021-07-27 22:00:38 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-27 22:00:38 +1000 |
commit | 468f7054558153cbf7f7ece3cf8775e1f3d28fe9 (patch) | |
tree | e94c0d273523afa212be77f706b36e9f8dc640bc /keyboards/handwired/dactyl_manuform/4x5 | |
parent | 95de60513d3f7375f58001f775ca23d199b75584 (diff) |
Dactyl Manuform cleanup (#13686)
Diffstat (limited to 'keyboards/handwired/dactyl_manuform/4x5')
7 files changed, 211 insertions, 242 deletions
diff --git a/keyboards/handwired/dactyl_manuform/4x5/4x5.c b/keyboards/handwired/dactyl_manuform/4x5/4x5.c index 78c0fee819..3170eb9399 100644 --- a/keyboards/handwired/dactyl_manuform/4x5/4x5.c +++ b/keyboards/handwired/dactyl_manuform/4x5/4x5.c @@ -1,23 +1 @@ #include "4x5.h" - - -#ifdef SSD1306OLED -void led_set_kb(uint8_t usb_led) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here - led_set_user(usb_led); -} -#endif - -void matrix_init_kb(void) { - - // // green led on - // DDRD |= (1<<5); - // PORTD &= ~(1<<5); - - // // orange led on - // DDRB |= (1<<0); - // PORTB &= ~(1<<0); - - matrix_init_user(); -}; - diff --git a/keyboards/handwired/dactyl_manuform/4x5/4x5.h b/keyboards/handwired/dactyl_manuform/4x5/4x5.h index 3d2d986bbc..73f6be64c2 100644 --- a/keyboards/handwired/dactyl_manuform/4x5/4x5.h +++ b/keyboards/handwired/dactyl_manuform/4x5/4x5.h @@ -2,65 +2,50 @@ #include "dactyl_manuform.h" -#include "quantum.h" - -#ifdef USE_I2C -#include <stddef.h> -#ifdef __AVR__ - #include <avr/io.h> - #include <avr/interrupt.h> -#endif -#endif +#define XXX KC_NO #ifndef FLIP_HALF #define LAYOUT( \ - L00, L01, L02, L03, L04, R00, R01, R02, R03, R04, \ - L10, L11, L12, L13, L14, R10, R11, R12, R13, R14, \ - L20, L21, L22, L23, L24, R20, R21, R22, R23, R24, \ - L31, L32, R32, R33, \ - L33, L34, R30, R31, \ - L44, L43, R41, R40, \ - L42, L41, R43, R42 \ - ) \ - { \ - { L00, L01, L02, L03, L04 }, \ - { L10, L11, L12, L13, L14 }, \ - { L20, L21, L22, L23, L24 }, \ - { KC_NO, L31, L32, L33, L34 }, \ - { KC_NO, L41, L42, L43, L44 }, \ + L00, L01, L02, L03, L04, R00, R01, R02, R03, R04, \ + L10, L11, L12, L13, L14, R10, R11, R12, R13, R14, \ + L20, L21, L22, L23, L24, R20, R21, R22, R23, R24, \ + L31, L32, R32, R33, \ + L33, L34, R30, R31, \ + L44, L43, R41, R40, \ + L42, L41, R43, R42 \ +) { \ + { L00, L01, L02, L03, L04 }, \ + { L10, L11, L12, L13, L14 }, \ + { L20, L21, L22, L23, L24 }, \ + { XXX, L31, L32, L33, L34 }, \ + { XXX, L41, L42, L43, L44 }, \ \ - { R04, R03, R02, R01, R00 }, \ - { R14, R13, R12, R11, R10 }, \ - { R24, R23, R22, R21, R20 }, \ - { KC_NO, R33, R32, R31, R30 }, \ - { KC_NO, R43, R42, R41, R40 } \ - } + { R04, R03, R02, R01, R00 }, \ + { R14, R13, R12, R11, R10 }, \ + { R24, R23, R22, R21, R20 }, \ + { XXX, R33, R32, R31, R30 }, \ + { XXX, R43, R42, R41, R40 } \ +} #else - - - #define LAYOUT( \ - L00, L01, L02, L03, L04, R00, R01, R02, R03, R04, \ - L10, L11, L12, L13, L14, R10, R11, R12, R13, R14, \ - L20, L21, L22, L23, L24, R20, R21, R22, R23, R24, \ - L31, L32, R32, R33, \ - L33, L34, R30, R31, \ - L43, L44, R40, R41, \ - L41, L42, R42, R43 \ - ) \ - { \ - { R04, R03, R02, R01, R00 }, \ - { R14, R13, R12, R11, R10 }, \ - { R24, R23, R22, R21, R20 }, \ - { KC_NO, R33, R32, R31, R30 }, \ - { KC_NO, R43, R42, R41, R40 }, \ + L00, L01, L02, L03, L04, R00, R01, R02, R03, R04, \ + L10, L11, L12, L13, L14, R10, R11, R12, R13, R14, \ + L20, L21, L22, L23, L24, R20, R21, R22, R23, R24, \ + L31, L32, R32, R33, \ + L33, L34, R30, R31, \ + L43, L44, R40, R41, \ + L41, L42, R42, R43 \ +) { \ + { R04, R03, R02, R01, R00 }, \ + { R14, R13, R12, R11, R10 }, \ + { R24, R23, R22, R21, R20 }, \ + { XXX, R33, R32, R31, R30 }, \ + { XXX, R43, R42, R41, R40 }, \ \ - { L00, L01, L02, L03, L04 }, \ - { L10, L11, L12, L13, L14 }, \ - { L20, L21, L22, L23, L24 }, \ - { KC_NO, L31, L32, L33, L34 }, \ - { KC_NO, L41, L42, L43, L44 } \ -\ - } + { L00, L01, L02, L03, L04 }, \ + { L10, L11, L12, L13, L14 }, \ + { L20, L21, L22, L23, L24 }, \ + { XXX, L31, L32, L33, L34 }, \ + { XXX, L41, L42, L43, L44 } \ +} #endif - diff --git a/keyboards/handwired/dactyl_manuform/4x5/config.h b/keyboards/handwired/dactyl_manuform/4x5/config.h index 22f800d0eb..8a06aeab8e 100644 --- a/keyboards/handwired/dactyl_manuform/4x5/config.h +++ b/keyboards/handwired/dactyl_manuform/4x5/config.h @@ -21,10 +21,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "config_common.h" /* USB Device descriptor parameter */ -#define PRODUCT_ID 0x3435 -#define DEVICE_VER 0x0001 - -#define MANUFACTURER tshort +#define PRODUCT_ID 0x3435 +#define DEVICE_VER 0x0001 +#define MANUFACTURER tshort /* key matrix size */ // Rows are doubled-up diff --git a/keyboards/handwired/dactyl_manuform/4x5/info.json b/keyboards/handwired/dactyl_manuform/4x5/info.json index 4ee52e1644..31039b8954 100644 --- a/keyboards/handwired/dactyl_manuform/4x5/info.json +++ b/keyboards/handwired/dactyl_manuform/4x5/info.json @@ -7,52 +7,65 @@ "layouts": { "LAYOUT": { "layout": [ - {"label":"L00", "x":0, "y":0}, - {"label":"L01", "x":1, "y":0}, - {"label":"L02", "x":2, "y":0}, - {"label":"L03", "x":3, "y":0}, - {"label":"L04", "x":4, "y":0}, - {"label":"R00", "x":10, "y":0}, - {"label":"R01", "x":11, "y":0}, - {"label":"R02", "x":12, "y":0}, - {"label":"R03", "x":13, "y":0}, - {"label":"R04", "x":14, "y":0}, - {"label":"L10", "x":0, "y":1}, - {"label":"L11", "x":1, "y":1}, - {"label":"L12", "x":2, "y":1}, - {"label":"L13", "x":3, "y":1}, - {"label":"L14", "x":4, "y":1}, - {"label":"R10", "x":10, "y":1}, - {"label":"R11", "x":11, "y":1}, - {"label":"R12", "x":12, "y":1}, - {"label":"R13", "x":13, "y":1}, - {"label":"R14", "x":14, "y":1}, - {"label":"L20", "x":0, "y":2}, - {"label":"L21", "x":1, "y":2}, - {"label":"L22", "x":2, "y":2}, - {"label":"L23", "x":3, "y":2}, - {"label":"L24", "x":4, "y":2}, - {"label":"R20", "x":10, "y":2}, - {"label":"R21", "x":11, "y":2}, - {"label":"R22", "x":12, "y":2}, - {"label":"R23", "x":13, "y":2}, - {"label":"R24", "x":14, "y":2}, - {"label":"L31", "x":1, "y":3}, - {"label":"L32", "x":2, "y":3}, - {"label":"R32", "x":12, "y":3}, - {"label":"R33", "x":13, "y":3}, - {"label":"L33", "x":3, "y":4}, - {"label":"L34", "x":4, "y":4}, - {"label":"R30", "x":10, "y":4}, - {"label":"R31", "x":11, "y":4}, - {"label":"L44", "x":5, "y":5}, - {"label":"L43", "x":6, "y":5}, - {"label":"R41", "x":8, "y":5}, - {"label":"R40", "x":9, "y":5}, - {"label":"L42", "x":5, "y":6}, - {"label":"L41", "x":6, "y":6}, - {"label":"R43", "x":8, "y":6}, - {"label":"R42", "x":9, "y":6} + {"x": 0, "y": 0}, + {"x": 1, "y": 0}, + {"x": 2, "y": 0}, + {"x": 3, "y": 0}, + {"x": 4, "y": 0}, + + {"x": 10, "y": 0}, + {"x": 11, "y": 0}, + {"x": 12, "y":0}, + {"x": 13, "y": 0}, + {"x": 14, "y": 0}, + + {"x": 0, "y": 1}, + {"x": 1, "y": 1}, + {"x": 2, "y": 1}, + {"x": 3, "y": 1}, + {"x": 4, "y": 1}, + + {"x": 10, "y": 1}, + {"x": 11, "y": 1}, + {"x": 12, "y": 1}, + {"x": 13, "y": 1}, + {"x": 14, "y": 1}, + + {"x": 0, "y": 2}, + {"x": 1, "y": 2}, + {"x": 2, "y": 2}, + {"x": 3, "y": 2}, + {"x": 4, "y": 2}, + + {"x": 10, "y": 2}, + {"x": 11, "y": 2}, + {"x": 12, "y": 2}, + {"x": 13, "y": 2}, + {"x": 14, "y": 2}, + + {"x": 1, "y": 3}, + {"x": 2, "y": 3}, + + {"x": 12, "y": 3}, + {"x": 13, "y": 3}, + + {"x": 3, "y": 4}, + {"x": 4, "y": 4}, + + {"x": 10, "y": 4}, + {"x": 11, "y": 4}, + + {"x": 5, "y": 5}, + {"x": 6, "y": 5}, + + {"x": 8, "y": 5}, + {"x": 9, "y": 5}, + + {"x": 5, "y": 6}, + {"x": 6, "y": 6}, + + {"x": 8, "y": 6}, + {"x": 9, "y": 6} ] } } diff --git a/keyboards/handwired/dactyl_manuform/4x5/keymaps/default/config.h b/keyboards/handwired/dactyl_manuform/4x5/keymaps/default/config.h index 6b0ddbfe8e..18320c0952 100644 --- a/keyboards/handwired/dactyl_manuform/4x5/keymaps/default/config.h +++ b/keyboards/handwired/dactyl_manuform/4x5/keymaps/default/config.h @@ -21,12 +21,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once /* Use I2C or Serial, not both */ - #define USE_SERIAL -// #define USE_I2C +//#define USE_I2C /* Select hand configuration */ +//#define MASTER_LEFT +//#define MASTER_RIGHT -// #define MASTER_LEFT -// #define MASTER_RIGHT #define EE_HANDS diff --git a/keyboards/handwired/dactyl_manuform/4x5/keymaps/default/keymap.c b/keyboards/handwired/dactyl_manuform/4x5/keymaps/default/keymap.c index 1a328f9d0a..7f71f3db89 100644 --- a/keyboards/handwired/dactyl_manuform/4x5/keymaps/default/keymap.c +++ b/keyboards/handwired/dactyl_manuform/4x5/keymaps/default/keymap.c @@ -1,14 +1,9 @@ #include QMK_KEYBOARD_H - #define _BASE 0 #define _RAISE 1 #define _LOWER 2 -// Fillers to make layering more clear - -#define ____ KC_TRNS - #define SFT_ESC SFT_T(KC_ESC) #define CTL_BSPC CTL_T(KC_BSPC) #define ALT_SPC ALT_T(KC_SPC) @@ -25,101 +20,98 @@ #define LOWER MO(_LOWER) 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 | BS | | SPACE|ENTER | + * | + | + | | + | + | + * | SHIFT| CTRL | | ALT |SHIFT | + * '------+------' '------+------' + * '------+------' '------+------' + * | TAB | HOME | | END | DEL | + * '------+------' '------+------' + * | Raise| ~ | | GUI | Lower| + * '------+------' '------+------' + */ + [_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_QUOT, + KC_LBRC, KC_RBRC, KC_MINS, KC_EQL, + SFT_ESC, CTL_BSPC, ALT_SPC, SFT_ENT, + KC_TAB, KC_HOME, KC_END, KC_DEL, + RAISE, KC_GRV, KC_LGUI, LOWER + ), -/* 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 | BS | | SPACE|ENTER | - * | + | + | | + | + | - * | SHIFT| CTRL | | ALT |SHIFT | - * '------+------' '------+------' - * '------+------' '------+------' - * | TAB | HOME | | END | DEL | - * '------+------' '------+------' - * | Raise| ~ | | GUI | Lower| - * '------+------' '------+------' - */ - -[_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_QUOT, \ - KC_LBRC, KC_RBRC, KC_MINS, KC_EQL, \ - SFT_ESC, CTL_BSPC, ALT_SPC, SFT_ENT, \ - KC_TAB, KC_HOME, KC_END, KC_DEL, \ - RAISE, KC_GRV, KC_LGUI, LOWER -), - -/* Raise - * ,----------------------------------, ,----------------------------------, - * | | | mup | | | | VOL+ | | up | | PgUp | - * |------+------+------+------+------| |-------------+------+------+------| - * | | mleft| mdown|mright| | | MUTE | left | down |right | PgDn | - * |------+------+------+------+------| |------|------+------+------+------| - * | | | | | | | VOL- | / | \ | ? | | | - * |------+------+------+-------------, ,-------------+------+------+------, - * | | | | mbtn |mbtn2 | - * '------+------'-------------' '-------------'------+------' - * | | | | | | - * | | | | | | - * | | | | | | - * '------+------' '------+------' - * '------+------' '------+------' - * | | | | | | - * '------+------' '------+------' - * | | | | | | - * '------+------' '------+------' - */ - -[_RAISE] = LAYOUT( \ - ____, ____, KC_MU, ____, ____, KC_VOLU, ____, KC_UP, ____, KC_PGUP, \ - ____, KC_ML, KC_MD, KC_MR, ____, KC_MUTE, KC_LEFT, KC_DOWN, KC_RIGHT, KC_PGDOWN, \ - ____, ____, ____, ____, ____, KC_VOLD, KC_SLSH, KC_BSLS, KC_QUES, KC_PIPE, \ - ____, ____, KC_MB1, KC_MB2, \ - ____, ____, ____, ____, \ - ____, ____, ____, ____, \ - ____, ____, ____, ____ \ -), -/* Lower - * ,----------------------------------, ,----------------------------------, - * | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | - * |------+------+------+------+------| |-------------+------+------+------| - * | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - * |------+------+------+------+------| |------|------+------+------+------| - * | ! | @ | # | $ | % | | ^ | & | * | ( | ) | - * |------+------+------+-------------, ,-------------+------+------+------, - * | F11 | F12 | | - | = | - * '------+------'-------------' '-------------'------+------' - * | | | | | | - * | | | | | | - * | | | | | | - * '------+------' '------+------' - * '------+------' '------+------' - * | | | | | | - * '------+------' '------+------' - * | | | | | | - * '------+------' '------+------' - */ + /* Raise + * ,----------------------------------, ,----------------------------------, + * | | | mup | | | | VOL+ | | up | | PgUp | + * |------+------+------+------+------| |-------------+------+------+------| + * | | mleft| mdown|mright| | | MUTE | left | down |right | PgDn | + * |------+------+------+------+------| |------|------+------+------+------| + * | | | | | | | VOL- | / | \ | ? | | | + * |------+------+------+-------------, ,-------------+------+------+------, + * | | | | mbtn |mbtn2 | + * '------+------'-------------' '-------------'------+------' + * | | | | | | + * | | | | | | + * | | | | | | + * '------+------' '------+------' + * '------+------' '------+------' + * | | | | | | + * '------+------' '------+------' + * | | | | | | + * '------+------' '------+------' + */ + [_RAISE] = LAYOUT( + _______, _______, KC_MU, _______, _______, KC_VOLU, _______, KC_UP, _______, KC_PGUP, + _______, KC_ML, KC_MD, KC_MR, _______, KC_MUTE, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, + _______, _______, _______, _______, _______, KC_VOLD, KC_SLSH, KC_BSLS, KC_QUES, KC_PIPE, + _______, _______, KC_MB1, KC_MB2, + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______ + ), -[_LOWER] = LAYOUT( \ - KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, \ - KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, \ - KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, \ - KC_F11, KC_F12, ____, ____, \ - ____, ____, ____, ____, \ - ____, ____, ____, ____, \ - ____, ____, ____, ____ \ -) + /* Lower + * ,----------------------------------, ,----------------------------------, + * | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | + * |------+------+------+------+------| |-------------+------+------+------| + * | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | + * |------+------+------+------+------| |------|------+------+------+------| + * | ! | @ | # | $ | % | | ^ | & | * | ( | ) | + * |------+------+------+-------------, ,-------------+------+------+------, + * | F11 | F12 | | - | = | + * '------+------'-------------' '-------------'------+------' + * | | | | | | + * | | | | | | + * | | | | | | + * '------+------' '------+------' + * '------+------' '------+------' + * | | | | | | + * '------+------' '------+------' + * | | | | | | + * '------+------' '------+------' + */ + [_LOWER] = LAYOUT( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, + KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, + KC_F11, KC_F12, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______ + ) }; void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); } diff --git a/keyboards/handwired/dactyl_manuform/4x5/rules.mk b/keyboards/handwired/dactyl_manuform/4x5/rules.mk index 7508070515..9a9bf7d69f 100644 --- a/keyboards/handwired/dactyl_manuform/4x5/rules.mk +++ b/keyboards/handwired/dactyl_manuform/4x5/rules.mk @@ -1,20 +1,23 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = caterina # Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically +# change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration -NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. - # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +SPLIT_KEYBOARD = yes |