Convert keymap to compact version
This commit is contained in:
parent
718b964806
commit
74c6c3d277
|
@ -0,0 +1,23 @@
|
||||||
|
#ifndef COMPACT_KEYMAP_H
|
||||||
|
#define COMPACT_KEYMAP_H
|
||||||
|
|
||||||
|
#define COMPACT_KEYMAP( \
|
||||||
|
k00, k01, k02, k03, k04, k05, k45, k44, k43, k42, k41, k40, \
|
||||||
|
k10, k11, k12, k13, k14, k15, k55, k54, k53, k52, k51, k50, \
|
||||||
|
k20, k21, k22, k23, k24, k25, k65, k64, k63, k62, k61, k60, \
|
||||||
|
k30, k31, k32, k33, k34, k35, k75, k74, k73, k72, k71, k70 \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{ KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05 }, \
|
||||||
|
{ KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15 }, \
|
||||||
|
{ KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25 }, \
|
||||||
|
{ KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35 }, \
|
||||||
|
{ KC_##k40, KC_##k41, KC_##k42, KC_##k43, KC_##k44, KC_##k45 }, \
|
||||||
|
{ KC_##k50, KC_##k51, KC_##k52, KC_##k53, KC_##k54, KC_##k55 }, \
|
||||||
|
{ KC_##k60, KC_##k61, KC_##k62, KC_##k63, KC_##k64, KC_##k65 }, \
|
||||||
|
{ KC_##k70, KC_##k71, KC_##k72, KC_##k73, KC_##k74, KC_##k75 } \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define KC_ KC_TRNS
|
||||||
|
|
||||||
|
#endif
|
|
@ -1,13 +1,10 @@
|
||||||
#include "lets_split.h"
|
#include "lets_split.h"
|
||||||
#include "action_layer.h"
|
#include "action_layer.h"
|
||||||
#include "eeconfig.h"
|
#include "eeconfig.h"
|
||||||
|
#include "compact_keymap.h"
|
||||||
|
|
||||||
extern keymap_config_t keymap_config;
|
extern keymap_config_t keymap_config;
|
||||||
|
|
||||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
|
||||||
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
|
||||||
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
|
||||||
// entirely and just use numbers.
|
|
||||||
#define _QWERTY 0
|
#define _QWERTY 0
|
||||||
#define _COLEMAK 1
|
#define _COLEMAK 1
|
||||||
#define _DVORAK 2
|
#define _DVORAK 2
|
||||||
|
@ -28,113 +25,91 @@ enum custom_keycodes {
|
||||||
ADJUST,
|
ADJUST,
|
||||||
};
|
};
|
||||||
|
|
||||||
// Fillers to make layering more clear
|
|
||||||
#define _______ KC_TRNS
|
#define _______ KC_TRNS
|
||||||
#define XXXXXXX KC_NO
|
|
||||||
|
|
||||||
#define KC_CAPW LGUI(LSFT(KC_3)) // Capture whole screen
|
#define KC_CAPW LGUI(LSFT(KC_3)) // Capture whole screen
|
||||||
#define KC_CPYW LGUI(LSFT(LCTL(KC_3))) // Copy whole screen
|
#define KC_CPYW LGUI(LSFT(LCTL(KC_3))) // Copy whole screen
|
||||||
#define KC_CAPP LGUI(LSFT(KC_4)) // Capture portion of screen
|
#define KC_CAPP LGUI(LSFT(KC_4)) // Capture portion of screen
|
||||||
#define KC_CPYP LGUI(LSFT(LCTL(KC_4))) // Copy portion of screen
|
#define KC_CPYP LGUI(LSFT(LCTL(KC_4))) // Copy portion of screen
|
||||||
|
#define KC_X0 MT(MOD_LCTL, KC_ESC)
|
||||||
|
#define KC_X1 LOWER
|
||||||
|
#define KC_X2 RAISE
|
||||||
|
#define KC_X3 LT(_FN3, KC_GRV)
|
||||||
|
#define KC_X4 MT(MOD_LSFT, KC_ENT)
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
/* Qwerty
|
[_QWERTY] = COMPACT_KEYMAP(
|
||||||
* ,-----------------------------------------------------------------------------------.
|
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
||||||
* | Tab | Q | W | E | R | T | Y | U | I | O | P | - |
|
TAB , Q , W , E , R , T , Y , U , I , O , P ,MINS,
|
||||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||||
* | Esc | A | S | D | F | G | H | J | K | L | ; | " |
|
X0 , A , S , D , F , G , H , J , K , L ,SCLN,QUOT,
|
||||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||||
* | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
|
LSFT, Z , X , C , V , B , N , M ,COMM,DOT ,SLSH, X4 ,
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||||
* | ` | Ctrl | Alt | GUI |Lower |Space | Bksp |Raise | Left | Down | Up |Right |
|
X3 ,LCTL,LALT,LGUI, X1 ,SPC , BSPC, X2 ,LEFT,DOWN, UP ,RGHT
|
||||||
* `-----------------------------------------------------------------------------------'
|
//`----+----+----+----+----+----' `----+----+----+----+----+----'
|
||||||
*/
|
),
|
||||||
[_QWERTY] = KEYMAP( \
|
|
||||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, \
|
|
||||||
MT(MOD_LCTL,KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
|
|
||||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MT(MOD_LSFT,KC_ENT) , \
|
|
||||||
LT(_FN3,KC_GRV), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_BSPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
|
|
||||||
),
|
|
||||||
|
|
||||||
/* Colemak
|
[_COLEMAK] = COMPACT_KEYMAP(
|
||||||
* ,-----------------------------------------------------------------------------------.
|
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
||||||
* | Tab | Q | W | F | P | G | J | L | U | Y | ; | - |
|
TAB , Q , W , F , P , G , J , L , U , Y ,SCLN,MINS,
|
||||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||||
* | Esc | A | R | S | T | D | H | N | E | I | O | " |
|
X0 , A , R , S , T , D , H , N , E , I , O ,QUOT,
|
||||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||||
* | Shift| Z | X | C | V | B | K | M | , | . | / |Enter |
|
LSFT, Z , X , C , V , B , K , M ,COMM,DOT ,SLSH, X4 ,
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||||
* | ` | Ctrl | Alt | GUI |Lower |Space | Bksp |Raise | Left | Down | Up |Right |
|
X3 ,LCTL,LALT,LGUI, X1 ,SPC , BSPC, X2 ,LEFT,DOWN, UP ,RGHT
|
||||||
* `-----------------------------------------------------------------------------------'
|
//`----+----+----+----+----+----' `----+----+----+----+----+----'
|
||||||
*/
|
),
|
||||||
[_COLEMAK] = KEYMAP( \
|
|
||||||
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_MINS, \
|
|
||||||
KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \
|
|
||||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \
|
|
||||||
KC_GRV, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_BSPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
|
|
||||||
),
|
|
||||||
|
|
||||||
/* Dvorak
|
[_DVORAK] = COMPACT_KEYMAP(
|
||||||
* ,-----------------------------------------------------------------------------------.
|
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
||||||
* | Tab | " | , | . | P | Y | F | G | C | R | L | - |
|
TAB ,QUOT,COMM,DOT , P , Y , F , G , C , R , L ,MINS,
|
||||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||||
* | Esc | A | O | E | U | I | D | H | T | N | S | / |
|
X0 , A , O , E , U , I , D , H , R , N , S ,SLSH,
|
||||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||||
* | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter |
|
LSFT,SCLN, Q , J , K , X , B , M , W , V , Z , X4 ,
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||||
* | ` | Ctrl | Alt | GUI |Lower |Space | Bksp |Raise | Left | Down | Up |Right |
|
X3 ,LCTL,LALT,LGUI, X1 ,SPC , BSPC, X2 ,LEFT,DOWN, UP ,RGHT
|
||||||
* `-----------------------------------------------------------------------------------'
|
//`----+----+----+----+----+----' `----+----+----+----+----+----'
|
||||||
*/
|
),
|
||||||
[_DVORAK] = KEYMAP( \
|
|
||||||
KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_MINS, \
|
|
||||||
KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \
|
|
||||||
KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , \
|
|
||||||
KC_GRV, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_BSPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
|
|
||||||
),
|
|
||||||
|
|
||||||
/* Lower
|
[_LOWER] = COMPACT_KEYMAP(
|
||||||
* ,-----------------------------------------------------------------------------------.
|
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
||||||
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
|
, 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , ,
|
||||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||||
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | | \ | | |
|
DEL ,CAPP,LEFT,RGHT, UP ,LBRC, RBRC, P4 , P5 , P6 ,PLUS,PIPE,
|
||||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||||
* | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | |Enter |
|
,CPYP, , ,DOWN,LCBR, RCBR, P1 , P2 , P3 ,MINS, ,
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||||
* | | | | | | | | Next | Vol- | Vol+ | Play |
|
, , , , , , DEL , P0 ,PDOT, , ,
|
||||||
* `-----------------------------------------------------------------------------------'
|
//`----+----+----+----+----+----' `----+----+----+----+----+----'
|
||||||
*/
|
),
|
||||||
[_LOWER] = KEYMAP( \
|
|
||||||
_______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, \
|
|
||||||
KC_DEL, KC_CAPP, KC_LEFT, KC_RGHT, KC_UP, KC_LBRC, KC_RBRC, KC_P4, KC_P5, KC_P6, KC_PLUS, KC_PIPE, \
|
|
||||||
_______, KC_CPYP, _______, _______, KC_DOWN, KC_LCBR, KC_RCBR, KC_P1, KC_P2, KC_P3, KC_MINS, _______, \
|
|
||||||
_______, _______, _______, _______, _______, _______, KC_DEL, KC_P0, KC_PDOT, _______, _______, _______ \
|
|
||||||
),
|
|
||||||
|
|
||||||
/* Raise
|
[_RAISE] = COMPACT_KEYMAP(
|
||||||
* ,-----------------------------------------------------------------------------------.
|
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
||||||
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
|
,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN, ,
|
||||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||||
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
|
DEL ,MPRV,MNXT,VOLU,PGUP,UNDS, EQL ,HOME, , , ,BSLS,
|
||||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||||
* | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | |Enter |
|
,MSTP,MPLY,VOLD,PGDN,MINS, PLUS,END , , , , ,
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||||
* | | | | | | | | Next | Vol- | Vol+ | Play |
|
, , , ,MUTE, , , , , , ,
|
||||||
* `-----------------------------------------------------------------------------------'
|
//`----+----+----+----+----+----' `----+----+----+----+----+----'
|
||||||
*/
|
),
|
||||||
[_RAISE] = KEYMAP( \
|
|
||||||
_______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, \
|
|
||||||
KC_DEL, KC_MPRV, KC_MNXT, KC_VOLU, KC_PGUP, KC_UNDS, KC_EQL , KC_HOME, _______, _______, _______, KC_BSLS, \
|
|
||||||
_______, KC_MSTP, KC_MPLY, KC_VOLD, KC_PGDN, KC_MINS, KC_PLUS, KC_END, _______, _______, _______, _______, \
|
|
||||||
_______, _______, _______, KC_MUTE, _______, _______, _______, _______, _______, _______, _______, _______ \
|
|
||||||
),
|
|
||||||
|
|
||||||
[_FN3] = KEYMAP( \
|
[_FN3] = COMPACT_KEYMAP(
|
||||||
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_UP, KC_F9, KC_F10, KC_F11, \
|
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
||||||
_______, _______, _______, _______, _______, KC_F8, KC_F12, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, \
|
F12 , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
|
, , , , , , , , , , , ,
|
||||||
),
|
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||||
|
, , , , , , , , , , , ,
|
||||||
|
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||||
|
, , , , , , , , , , ,
|
||||||
|
//`----+----+----+----+----+----' `----+----+----+----+----+----'
|
||||||
|
),
|
||||||
|
|
||||||
/* Adjust (Lower + Raise)
|
/* Adjust (Lower + Raise)
|
||||||
* ,-----------------------------------------------------------------------------------.
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
@ -147,12 +122,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
* | | | | | | | | | | | |
|
* | | | | | | | | | | | |
|
||||||
* `-----------------------------------------------------------------------------------'
|
* `-----------------------------------------------------------------------------------'
|
||||||
*/
|
*/
|
||||||
[_ADJUST] = KEYMAP( \
|
[_ADJUST] = KEYMAP( \
|
||||||
_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \
|
_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||||
_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \
|
_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -227,4 +202,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue