From d06e6d1332f19d381d8bf37105f18082019b99e4 Mon Sep 17 00:00:00 2001 From: tslil clingman <> Date: Mon, 17 Aug 2020 11:56:07 -0400 Subject: Init --- 4x5/4x5.c | 23 +++++++ 4x5/4x5.h | 65 ++++++++++++++++++ 4x5/config.h | 55 ++++++++++++++++ 4x5/info.json | 59 +++++++++++++++++ 4x5/keymaps/colemak_mod_dh/config.h | 32 +++++++++ 4x5/keymaps/colemak_mod_dh/keymap.c | 127 ++++++++++++++++++++++++++++++++++++ 4x5/rules.mk | 20 ++++++ 7 files changed, 381 insertions(+) create mode 100644 4x5/4x5.c create mode 100644 4x5/4x5.h create mode 100644 4x5/config.h create mode 100644 4x5/info.json create mode 100644 4x5/keymaps/colemak_mod_dh/config.h create mode 100644 4x5/keymaps/colemak_mod_dh/keymap.c create mode 100644 4x5/rules.mk (limited to '4x5') diff --git a/4x5/4x5.c b/4x5/4x5.c new file mode 100644 index 0000000..78c0fee --- /dev/null +++ b/4x5/4x5.c @@ -0,0 +1,23 @@ +#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/4x5/4x5.h b/4x5/4x5.h new file mode 100644 index 0000000..99e6e7e --- /dev/null +++ b/4x5/4x5.h @@ -0,0 +1,65 @@ +#pragma once + +#include "dactyl_manuform.h" + +#include "quantum.h" + +#ifdef USE_I2C +#include +#ifdef __AVR__ + #include + #include +#endif +#endif + +#ifndef FLIP_HALF +#define LAYOUT( \ + L00, L01, L02, L03, L04, R04, R03, R02, R01, R00, \ + L10, L11, L12, L13, L14, R14, R13, R12, R11, R10, \ + L20, L21, L22, L23, L24, R24, R23, R22, R21, R20, \ + L31, L32, R31, R30, \ + L33, L34, R33, R32, \ + L43, L44, R43, R42, \ + L41, L42, 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 }, \ +\ + { R04, R03, R02, R01, R00 }, \ + { R14, R13, R12, R11, R10 }, \ + { R24, R23, R22, R21, R20 }, \ + { R33, R32, R31, R30, KC_NO }, \ + { R43, R42, R41, R40, KC_NO } \ + } +#else + + + +#define LAYOUT( \ + L00, L01, L02, L03, L04, R04, R03, R02, R01, R00, \ + L10, L11, L12, L13, L14, R14, R13, R12, R11, R10, \ + L20, L21, L22, L23, L24, R24, R23, R22, R21, R20, \ + L31, L32, R31, R30, \ + L33, L34, R33, R32, \ + L43, L44, R43, R42, \ + L41, L42, R41, R40 \ + ) \ + { \ + { R04, R03, R02, R01, R00 }, \ + { R14, R13, R12, R11, R10 }, \ + { R24, R23, R22, R21, R20 }, \ + { R33, R32, R31, R30, KC_NO }, \ + { R43, R42, R41, R40, KC_NO } \ +\ + { 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 } \ +\ + } +#endif diff --git a/4x5/config.h b/4x5/config.h new file mode 100644 index 0000000..0f80cf3 --- /dev/null +++ b/4x5/config.h @@ -0,0 +1,55 @@ +/* +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define PRODUCT_ID 0x3435 +#define DEVICE_VER 0x0001 + +#define MANUFACTURER tslil clingman +#define DESCRIPTION A split keyboard for the cheap makers + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 10 +#define MATRIX_COLS 5 + +// wiring of each half +#define MATRIX_ROW_PINS { F7, B1, B3, B2, B6 } +//#define MATRIX_COL_PINS { B5, B4, E6, D7, C6 } // Right +#define MATRIX_COL_PINS { C6, D7, E6, B4, B5 } // Left + +#define DIODE_DIRECTION COL2ROW + +/* Customise the behaviour of dual-function keys */ +//define PERMISSIVE_HOLD +#define TAPPING_TERM 200 +#define IGNORE_MOD_TAP_INTERRUPT + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* WS2812 RGB LED strip input and number of LEDs */ +// #define RGB_DI_PIN D3 +// #define RGBLED_NUM 12 + +/* number of backlight levels */ +// #define BACKLIGHT_LEVELS 3 diff --git a/4x5/info.json b/4x5/info.json new file mode 100644 index 0000000..4ee52e1 --- /dev/null +++ b/4x5/info.json @@ -0,0 +1,59 @@ +{ + "keyboard_name": "Dactyl Manuform 4x5", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 7, + "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} + ] + } + } +} diff --git a/4x5/keymaps/colemak_mod_dh/config.h b/4x5/keymaps/colemak_mod_dh/config.h new file mode 100644 index 0000000..6b0ddbf --- /dev/null +++ b/4x5/keymaps/colemak_mod_dh/config.h @@ -0,0 +1,32 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +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 . +*/ + +#pragma once + +/* Use I2C or Serial, not both */ + +#define USE_SERIAL +// #define USE_I2C + +/* Select hand configuration */ + +// #define MASTER_LEFT +// #define MASTER_RIGHT +#define EE_HANDS diff --git a/4x5/keymaps/colemak_mod_dh/keymap.c b/4x5/keymaps/colemak_mod_dh/keymap.c new file mode 100644 index 0000000..4531a21 --- /dev/null +++ b/4x5/keymaps/colemak_mod_dh/keymap.c @@ -0,0 +1,127 @@ +#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 SFT_ENT SFT_T(KC_ENT) +#define ALT_SPC ALT_T(KC_SPC) +#define LGUI_TAB LGUI_T(KC_TAB) + +#define KC_ML KC_MS_LEFT +#define KC_MR KC_MS_RIGHT +#define KC_MU KC_MS_UP +#define KC_MD KC_MS_DOWN +#define KC_MB1 KC_MS_BTN1 +#define KC_MB2 KC_MS_BTN2 + +#define RAISE MO(_RAISE) +#define LOWER MO(_LOWER) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Raise + * ,----------------------------------, ,----------------------------------, + * | | | up | | | | VOL+ | | mup | | PgUp | + * |------+------+------+------+------| |-------------+------+------+------| + * |S(INS)| left | down | right| | | MUTE |mleft |mdown |mright| PgDn | + * |------+------+------+------+------| |------|------+------+------+------| + * | | | | | | | VOL- | ] | | | | | + * |------+------+------+-------------, ,-------------+------+------+------, + * | | RESET| | mbtn |mbtn2 | + * '------+------'-------------' '-------------'------+------' + * | | | | | | + * | | | | | | + * | | | | | | + * '------+------' '------+------' + * '------+------' '------+------' + * | | | | | | + * '------+------' '------+------' + * | | | | | | + * '------+------' '------+------' + */ + +[_RAISE] = LAYOUT( \ + ____, ____, KC_UP, ____, ____, KC_VOLU, ____, KC_MU, ____, KC_PGUP, \ + S(KC_INSERT), KC_LEFT, KC_DOWN, KC_RIGHT, ____, KC_MUTE, KC_ML, KC_MD, KC_MR, KC_PGDOWN, \ + ____, ____, ____, ____, ____, KC_VOLD, KC_RBRC, KC_PIPE, ____, ____, \ + ____, RESET, KC_MB1, KC_MB2, \ + ____, ____, ____, ____, \ + ____, ____, ____, ____, \ + ____, ____, ____, ____ \ +), + +/* Base + * ,----------------------------------, ,----------------------------------, + * | q | w | f | p | b | | j | l | u | y | ; | + * |------+------+------+------+------| |-------------+------+------+------| + * | a | r | s | t | g | | k | n | e | i | o | + * |------+------+------+------+------| |------|------+------+------+------| + * | z | x | c | d | v | | m | h | , | . | ' | + * |------+------+------+-------------, ,-------------+------+------+------, + * | [ | / | | \ | - | + * '------+------'-------------' '-------------'------+------' + * | ESC | BKSP | | SPC | RET | + * | + | + | | + | + | + * | SHIFT| CTRL | | ALT | SHIFT| + * '------+------' '------+------' + * '------+------' '------+------' + * |LG/Tab| Raise| | Lower|LG/Tab| + * '------+------' '------+------' + * | HOME | ~ | | DEL | END | + * '------+------' '------+------' + */ + +[_BASE] = LAYOUT( \ + KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, \ + KC_A, KC_R, KC_S, KC_T, KC_G, KC_K, KC_N, KC_E, KC_I, KC_O, \ + KC_Z, KC_X, KC_C, KC_D, KC_V, KC_M, KC_H, KC_COMM, KC_DOT, KC_QUOT, \ + KC_LBRC, KC_SLSH, KC_BSLS, KC_MINS, \ + SFT_ESC, CTL_BSPC, ALT_SPC, SFT_ENT, \ + LGUI_TAB,RAISE, LOWER, LGUI_TAB, \ + KC_HOME, KC_GRV, KC_DEL, KC_END +), + +/* 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_EQL, KC_MINS, KC_COMM, KC_DOT, \ + ____, ____, ____, ____, \ + ____, ____, ____, ____, \ + ____, KC_F11, KC_F12, ____ \ +) +}; + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} diff --git a/4x5/rules.mk b/4x5/rules.mk new file mode 100644 index 0000000..7508070 --- /dev/null +++ b/4x5/rules.mk @@ -0,0 +1,20 @@ + +# 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 +# +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) +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 -- cgit v1.3.1