add keymap for dactyl-manuform
This commit is contained in:
parent
35edec2998
commit
76d20c7f8e
3 changed files with 230 additions and 2 deletions
|
|
@ -0,0 +1,24 @@
|
||||||
|
/*
|
||||||
|
This is the c configuration file for the keymap
|
||||||
|
|
||||||
|
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||||
|
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 <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
/* Select hand configuration */
|
||||||
|
// #define EE_HANDS
|
||||||
|
|
@ -0,0 +1,202 @@
|
||||||
|
/*
|
||||||
|
This is the c configuration file for the keymap
|
||||||
|
|
||||||
|
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||||
|
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 <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
#define _BASE 0
|
||||||
|
#define _LAYER1 1
|
||||||
|
#define _LAYER2 2
|
||||||
|
|
||||||
|
#define L1_BSP LT(1,KC_BACKSPACE)
|
||||||
|
#define ALT_ESC MT(MOD_LALT, KC_ESC)
|
||||||
|
#define L2_SPACE LT(2, KC_SPACE)
|
||||||
|
#define CTL_ENT MT(MOD_RCTL, KC_ENT)
|
||||||
|
#define CT_TAB MT(MOD_LCTL, KC_TAB)
|
||||||
|
#define GUI_DEL MT(MOD_RGUI, KC_DEL)
|
||||||
|
#define SFT_F MT(MOD_LSFT, KC_F)
|
||||||
|
#define SFT_J MT(MOD_RSFT, KC_J)
|
||||||
|
|
||||||
|
#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
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* Base (qwerty)
|
||||||
|
* ,----------------------------------, ,----------------------------------,
|
||||||
|
* | q | w | e | r | t | | y | u | i | o | p |
|
||||||
|
* |------+------+------+------+------| |-------------+------+------+------|
|
||||||
|
* | a | s | d | SF f | g | | h | SF j | k | l | ; |
|
||||||
|
* |------+------+------+------+------| |------|------+------+------+------|
|
||||||
|
* | z | x | c | v | b | | n | m | , | . | / |
|
||||||
|
* |------+------+------+-------------, ,-------------+------+------+------,
|
||||||
|
* | [ | ] | | - | = |
|
||||||
|
* '------+------'-------------' '-------------'------+------'
|
||||||
|
* | ESC | BS | | SPACE|ENTER |
|
||||||
|
* | + | + | | + | + |
|
||||||
|
* | Alt | L1 | | L2 |CTLR |
|
||||||
|
* '------+------' '------+------'
|
||||||
|
* '------+------' '------+------'
|
||||||
|
* |CTLTAB| PGUP | | PGDN |GUIDEL|
|
||||||
|
* '------+------' '------+------'
|
||||||
|
* | `~ | HOME | | END | \| |
|
||||||
|
* '------+------' '------+------'
|
||||||
|
*/
|
||||||
|
[_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, SFT_F, KC_G, KC_H, SFT_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_SLASH,
|
||||||
|
KC_LBRC, KC_RBRC, KC_MINS, KC_EQL,
|
||||||
|
ALT_ESC, L1_BSP, L2_SPACE, CTL_ENT,
|
||||||
|
CT_TAB, KC_PGUP, KC_PGDN, GUI_DEL,
|
||||||
|
KC_GRV, KC_HOME, KC_END, KC_NUHS
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Layer 1
|
||||||
|
* ,----------------------------------, ,----------------------------------,
|
||||||
|
* |QKBOOT| | mup | | | | VOL+ | | up | | PgUp |
|
||||||
|
* |------+------+------+------+------| |-------------+------+------+------|
|
||||||
|
* | | mleft| mdown|mright| | | MUTE | left | down |right | PgDn |
|
||||||
|
* |------+------+------+------+------| |------|------+------+------+------|
|
||||||
|
* | | | | | | | VOL- | / | \ | ? | | |
|
||||||
|
* |------+------+------+-------------, ,-------------+------+------+------,
|
||||||
|
* | | | | mbtn |mbtn2 |
|
||||||
|
* '------+------'-------------' '-------------'------+------'
|
||||||
|
* | | | | | |
|
||||||
|
* | | | | | |
|
||||||
|
* | | | | | |
|
||||||
|
* '------+------' '------+------'
|
||||||
|
* '------+------' '------+------'
|
||||||
|
* | | | | | |
|
||||||
|
* '------+------' '------+------'
|
||||||
|
* | | | | | |
|
||||||
|
* '------+------' '------+------'
|
||||||
|
*/
|
||||||
|
[_LAYER1] = LAYOUT(
|
||||||
|
QK_BOOT, _______, 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,
|
||||||
|
_______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Layer 2
|
||||||
|
* ,----------------------------------, ,----------------------------------,
|
||||||
|
* | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 |
|
||||||
|
* |------+------+------+------+------| |-------------+------+------+------|
|
||||||
|
* | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 |
|
||||||
|
* |------+------+------+------+------| |------|------+------+------+------|
|
||||||
|
* | ! | @ | # | $ | % | | ^ | & | * | ( | ) |
|
||||||
|
* |------+------+------+-------------, ,-------------+------+------+------,
|
||||||
|
* | F11 | F12 | | - | = |
|
||||||
|
* '------+------'-------------' '-------------'------+------'
|
||||||
|
* | | | | | |
|
||||||
|
* | | | | | |
|
||||||
|
* | | | | | |
|
||||||
|
* '------+------' '------+------'
|
||||||
|
* '------+------' '------+------'
|
||||||
|
* | | | | | |
|
||||||
|
* '------+------' '------+------'
|
||||||
|
* | | | | | |
|
||||||
|
* '------+------' '------+------'
|
||||||
|
*/
|
||||||
|
[_LAYER2] = 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, _______, _______,
|
||||||
|
_______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______
|
||||||
|
)
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Combos
|
||||||
|
enum combo_events {
|
||||||
|
AS_AE,
|
||||||
|
OP_OE,
|
||||||
|
UI_UE,
|
||||||
|
LSEMI_APOSTROPHE,
|
||||||
|
QW_DESKTOPLEFT,
|
||||||
|
ER_DESKTOPORIGHT,
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM combo_ae[] = {KC_A, KC_S, COMBO_END};
|
||||||
|
const uint16_t PROGMEM combo_oe[] = {KC_O, KC_P, COMBO_END};
|
||||||
|
const uint16_t PROGMEM combo_ue[] = {KC_U, KC_I, COMBO_END};
|
||||||
|
const uint16_t PROGMEM combo_apostrophe[] = {KC_L, KC_SCLN, COMBO_END};
|
||||||
|
const uint16_t PROGMEM combo_desktopleft[] = {KC_Q, KC_W, COMBO_END};
|
||||||
|
const uint16_t PROGMEM combo_desktopright[] = {KC_E, KC_R, COMBO_END};
|
||||||
|
|
||||||
|
combo_t key_combos[] = {
|
||||||
|
[AS_AE] = COMBO_ACTION(combo_ae),
|
||||||
|
[OP_OE] = COMBO_ACTION(combo_oe),
|
||||||
|
[UI_UE] = COMBO_ACTION(combo_ue),
|
||||||
|
[LSEMI_APOSTROPHE] = COMBO_ACTION(combo_apostrophe),
|
||||||
|
[QW_DESKTOPLEFT] = COMBO_ACTION(combo_desktopleft),
|
||||||
|
[ER_DESKTOPORIGHT] = COMBO_ACTION(combo_desktopright),
|
||||||
|
};
|
||||||
|
/* COMBO_ACTION(x) is same as COMBO(x, KC_NO) */
|
||||||
|
|
||||||
|
void process_combo_event(uint16_t combo_index, bool pressed) {
|
||||||
|
switch(combo_index) {
|
||||||
|
case AS_AE:
|
||||||
|
if (pressed) {
|
||||||
|
tap_code16(RALT(KC_Q));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case OP_OE:
|
||||||
|
if (pressed) {
|
||||||
|
tap_code16(RALT(KC_P));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case UI_UE:
|
||||||
|
if (pressed) {
|
||||||
|
tap_code16(RALT(KC_Y));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case LSEMI_APOSTROPHE:
|
||||||
|
if (pressed) {
|
||||||
|
tap_code16(KC_QUOT);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case QW_DESKTOPLEFT:
|
||||||
|
if (pressed) {
|
||||||
|
tap_code16(KC_LCTL);
|
||||||
|
tap_code16(KC_LGUI);
|
||||||
|
tap_code16(KC_LEFT);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case ER_DESKTOPORIGHT:
|
||||||
|
if (pressed) {
|
||||||
|
tap_code16(KC_LCTL);
|
||||||
|
tap_code16(KC_LGUI);
|
||||||
|
tap_code16(KC_RGHT);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
6
qmk.json
6
qmk.json
|
|
@ -1,4 +1,6 @@
|
||||||
{
|
{
|
||||||
"userspace_version": "1.0",
|
"userspace_version": "1.1",
|
||||||
"build_targets": []
|
"build_targets": [
|
||||||
|
["handwired/dactyl_manuform/4x5", "thecount"]
|
||||||
|
]
|
||||||
}
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue