summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanny Nguyen <danny@80pct.com>2017-03-07 15:39:59 -0500
committerDanny Nguyen <danny@80pct.com>2017-03-09 09:33:21 -0500
commit74c6c3d277bc76c319b5d28d578fbda9009efcbf (patch)
tree6c8ec96d1920816101fb04774c45359dc24ee335
parent718b9648061be99a82e6dddfdebd3eb2e5386f19 (diff)
Convert keymap to compact version
-rw-r--r--keyboards/lets_split/keymaps/hexwire/compact_keymap.h23
-rw-r--r--keyboards/lets_split/keymaps/hexwire/keymap.c193
2 files changed, 107 insertions, 109 deletions
diff --git a/keyboards/lets_split/keymaps/hexwire/compact_keymap.h b/keyboards/lets_split/keymaps/hexwire/compact_keymap.h
new file mode 100644
index 0000000000..d9d063fbfe
--- /dev/null
+++ b/keyboards/lets_split/keymaps/hexwire/compact_keymap.h
@@ -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 \ No newline at end of file
diff --git a/keyboards/lets_split/keymaps/hexwire/keymap.c b/keyboards/lets_split/keymaps/hexwire/keymap.c
index 403987dbe8..bae2e687e6 100644
--- a/keyboards/lets_split/keymaps/hexwire/keymap.c
+++ b/keyboards/lets_split/keymaps/hexwire/keymap.c
@@ -1,13 +1,10 @@
#include "lets_split.h"
#include "action_layer.h"
#include "eeconfig.h"
+#include "compact_keymap.h"
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 _COLEMAK 1
#define _DVORAK 2
@@ -28,113 +25,91 @@ enum custom_keycodes {
ADJUST,
};
-// Fillers to make layering more clear
#define _______ KC_TRNS
-#define XXXXXXX KC_NO
#define KC_CAPW LGUI(LSFT(KC_3)) // Capture 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_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] = {
-/* Qwerty
- * ,-----------------------------------------------------------------------------------.
- * | Tab | Q | W | E | R | T | Y | U | I | O | P | - |
- * |------+------+------+------+------+-------------+------+------+------+------+------|
- * | Esc | A | S | D | F | G | H | J | K | L | ; | " |
- * |------+------+------+------+------+------|------+------+------+------+------+------|
- * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
- * |------+------+------+------+------+------+------+------+------+------+------+------|
- * | ` | Ctrl | Alt | GUI |Lower |Space | Bksp |Raise | Left | Down | Up |Right |
- * `-----------------------------------------------------------------------------------'
- */
-[_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
- * ,-----------------------------------------------------------------------------------.
- * | Tab | Q | W | F | P | G | J | L | U | Y | ; | - |
- * |------+------+------+------+------+-------------+------+------+------+------+------|
- * | Esc | A | R | S | T | D | H | N | E | I | O | " |
- * |------+------+------+------+------+------|------+------+------+------+------+------|
- * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter |
- * |------+------+------+------+------+------+------+------+------+------+------+------|
- * | ` | Ctrl | Alt | GUI |Lower |Space | Bksp |Raise | Left | Down | Up |Right |
- * `-----------------------------------------------------------------------------------'
- */
-[_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
- * ,-----------------------------------------------------------------------------------.
- * | Tab | " | , | . | P | Y | F | G | C | R | L | - |
- * |------+------+------+------+------+-------------+------+------+------+------+------|
- * | Esc | A | O | E | U | I | D | H | T | N | S | / |
- * |------+------+------+------+------+------|------+------+------+------+------+------|
- * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter |
- * |------+------+------+------+------+------+------+------+------+------+------+------|
- * | ` | Ctrl | Alt | GUI |Lower |Space | Bksp |Raise | Left | Down | Up |Right |
- * `-----------------------------------------------------------------------------------'
- */
-[_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
- * ,-----------------------------------------------------------------------------------.
- * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
- * |------+------+------+------+------+-------------+------+------+------+------+------|
- * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | | \ | | |
- * |------+------+------+------+------+------|------+------+------+------+------+------|
- * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | |Enter |
- * |------+------+------+------+------+------+------+------+------+------+------+------|
- * | | | | | | | | Next | Vol- | Vol+ | Play |
- * `-----------------------------------------------------------------------------------'
- */
-[_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
- * ,-----------------------------------------------------------------------------------.
- * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
- * |------+------+------+------+------+-------------+------+------+------+------+------|
- * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
- * |------+------+------+------+------+------|------+------+------+------+------+------|
- * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | |Enter |
- * |------+------+------+------+------+------+------+------+------+------+------+------|
- * | | | | | | | | Next | Vol- | Vol+ | Play |
- * `-----------------------------------------------------------------------------------'
- */
-[_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( \
- _______, 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, _______, _______, \
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
-),
+ [_QWERTY] = COMPACT_KEYMAP(
+ //,----+----+----+----+----+----. ,----+----+----+----+----+----.
+ TAB , Q , W , E , R , T , Y , U , I , O , P ,MINS,
+ //|----+----+----+----+----+----| |----+----+----+----+----+----|
+ X0 , A , S , D , F , G , H , J , K , L ,SCLN,QUOT,
+ //|----+----+----+----+----+----| |----+----+----+----+----+----|
+ LSFT, Z , X , C , V , B , N , M ,COMM,DOT ,SLSH, X4 ,
+ //|----+----+----+----+----+----| |----+----+----+----+----+----|
+ X3 ,LCTL,LALT,LGUI, X1 ,SPC , BSPC, X2 ,LEFT,DOWN, UP ,RGHT
+ //`----+----+----+----+----+----' `----+----+----+----+----+----'
+ ),
+
+ [_COLEMAK] = COMPACT_KEYMAP(
+ //,----+----+----+----+----+----. ,----+----+----+----+----+----.
+ TAB , Q , W , F , P , G , J , L , U , Y ,SCLN,MINS,
+ //|----+----+----+----+----+----| |----+----+----+----+----+----|
+ X0 , A , R , S , T , D , H , N , E , I , O ,QUOT,
+ //|----+----+----+----+----+----| |----+----+----+----+----+----|
+ LSFT, Z , X , C , V , B , K , M ,COMM,DOT ,SLSH, X4 ,
+ //|----+----+----+----+----+----| |----+----+----+----+----+----|
+ X3 ,LCTL,LALT,LGUI, X1 ,SPC , BSPC, X2 ,LEFT,DOWN, UP ,RGHT
+ //`----+----+----+----+----+----' `----+----+----+----+----+----'
+ ),
+
+ [_DVORAK] = COMPACT_KEYMAP(
+ //,----+----+----+----+----+----. ,----+----+----+----+----+----.
+ TAB ,QUOT,COMM,DOT , P , Y , F , G , C , R , L ,MINS,
+ //|----+----+----+----+----+----| |----+----+----+----+----+----|
+ X0 , A , O , E , U , I , D , H , R , N , S ,SLSH,
+ //|----+----+----+----+----+----| |----+----+----+----+----+----|
+ LSFT,SCLN, Q , J , K , X , B , M , W , V , Z , X4 ,
+ //|----+----+----+----+----+----| |----+----+----+----+----+----|
+ X3 ,LCTL,LALT,LGUI, X1 ,SPC , BSPC, X2 ,LEFT,DOWN, UP ,RGHT
+ //`----+----+----+----+----+----' `----+----+----+----+----+----'
+ ),
+
+ [_LOWER] = COMPACT_KEYMAP(
+ //,----+----+----+----+----+----. ,----+----+----+----+----+----.
+ , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , ,
+ //|----+----+----+----+----+----| |----+----+----+----+----+----|
+ DEL ,CAPP,LEFT,RGHT, UP ,LBRC, RBRC, P4 , P5 , P6 ,PLUS,PIPE,
+ //|----+----+----+----+----+----| |----+----+----+----+----+----|
+ ,CPYP, , ,DOWN,LCBR, RCBR, P1 , P2 , P3 ,MINS, ,
+ //|----+----+----+----+----+----| |----+----+----+----+----+----|
+ , , , , , , DEL , P0 ,PDOT, , ,
+ //`----+----+----+----+----+----' `----+----+----+----+----+----'
+ ),
+
+ [_RAISE] = COMPACT_KEYMAP(
+ //,----+----+----+----+----+----. ,----+----+----+----+----+----.
+ ,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN, ,
+ //|----+----+----+----+----+----| |----+----+----+----+----+----|
+ DEL ,MPRV,MNXT,VOLU,PGUP,UNDS, EQL ,HOME, , , ,BSLS,
+ //|----+----+----+----+----+----| |----+----+----+----+----+----|
+ ,MSTP,MPLY,VOLD,PGDN,MINS, PLUS,END , , , , ,
+ //|----+----+----+----+----+----| |----+----+----+----+----+----|
+ , , , ,MUTE, , , , , , ,
+ //`----+----+----+----+----+----' `----+----+----+----+----+----'
+ ),
+
+ [_FN3] = COMPACT_KEYMAP(
+ //,----+----+----+----+----+----. ,----+----+----+----+----+----.
+ F12 , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,
+ //|----+----+----+----+----+----| |----+----+----+----+----+----|
+ , , , , , , , , , , , ,
+ //|----+----+----+----+----+----| |----+----+----+----+----+----|
+ , , , , , , , , , , , ,
+ //|----+----+----+----+----+----| |----+----+----+----+----+----|
+ , , , , , , , , , , ,
+ //`----+----+----+----+----+----' `----+----+----+----+----+----'
+ ),
/* Adjust (Lower + Raise)
* ,-----------------------------------------------------------------------------------.
@@ -147,12 +122,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
-[_ADJUST] = KEYMAP( \
- _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \
- _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
-)
+ [_ADJUST] = KEYMAP( \
+ _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, 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;
}
return true;
-} \ No newline at end of file
+}