summaryrefslogtreecommitdiff
path: root/keyboards/niu_mini/keymaps/xtonhasvim
diff options
context:
space:
mode:
authornoroadsleft <18669334+noroadsleft@users.noreply.github.com>2018-07-18 08:02:52 -0700
committerDrashna Jaelre <drashna@live.com>2018-07-18 08:02:52 -0700
commitffc2ae057bc903a9b34c98c5c653a186369e8a1c (patch)
treeada852ff73ad193e9ef38292f9620c347d235c9a /keyboards/niu_mini/keymaps/xtonhasvim
parenta012113d636e3f23841c23343ae3f1d5b7452701 (diff)
Keyboard: NIU Mini refactor and Configurator update (#3433)
* Removed LAYOUTS = planck_grid from rules.mk * Matrix refactor * Keymap refactor * Configurator update
Diffstat (limited to 'keyboards/niu_mini/keymaps/xtonhasvim')
-rw-r--r--keyboards/niu_mini/keymaps/xtonhasvim/keymap.c97
1 files changed, 48 insertions, 49 deletions
diff --git a/keyboards/niu_mini/keymaps/xtonhasvim/keymap.c b/keyboards/niu_mini/keymaps/xtonhasvim/keymap.c
index 6a23c0a2ca..dd764826fe 100644
--- a/keyboards/niu_mini/keymaps/xtonhasvim/keymap.c
+++ b/keyboards/niu_mini/keymaps/xtonhasvim/keymap.c
@@ -15,7 +15,6 @@
*/
#include QMK_KEYBOARD_H
-#include "action_layer.h"
#include "xtonhasvim.h"
/************************************
@@ -52,12 +51,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* - Holding A or ; switches to movement layer.
* - Raise and Lower are one-shot layers.
*/
-[_QWERTY] = {
- {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
- {LCTL_T(KC_ESC), LT(_MOVE,KC_A), KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, LT(_MOVE,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, RSFT_T(KC_ENT) },
- {TG(_MOUSE), X_____X, KC_LALT, KC_LGUI, OSL(_LOWER), KC_SPC, KC_SPC, OSL(_RAISE), KC_LGUI, KC_LALT, X_____X, VIM_START }
-},
+[_QWERTY] = LAYOUT_planck_mit(
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
+ LCTL_T(KC_ESC), LT(_MOVE,KC_A), KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, LT(_MOVE,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, RSFT_T(KC_ENT),
+ TG(_MOUSE), X_____X, KC_LALT, KC_LGUI, OSL(_LOWER), KC_SPC, OSL(_RAISE), KC_LGUI, KC_LALT, X_____X, VIM_START
+),
/* Lower
* ,-----------------------------------------------------------------------------------.
@@ -70,12 +69,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | Bail | | | | | | | | Bail | |
* `-----------------------------------------------------------------------------------'
*/
-[_LOWER] = {
- {KC_TILD, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_BSPC},
- {KC_DEL, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PIPE},
- {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, X_____X, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY},
- {X_____X, TO(_QWERTY), _______, _______, _______, KC_BSPC, KC_BSPC, OSL(_ADJUST), _______, _______, TO(_QWERTY), X_____X}
-},
+[_LOWER] = LAYOUT_planck_mit(
+ KC_TILD, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_BSPC,
+ KC_DEL, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PIPE,
+ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, X_____X, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY,
+ X_____X, TO(_QWERTY), _______, _______, _______, KC_BSPC, OSL(_ADJUST), _______, _______, TO(_QWERTY), X_____X
+),
/* Raise
* ,-----------------------------------------------------------------------------------.
@@ -88,12 +87,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | Bail | | | | | | | | Bail | |
* `-----------------------------------------------------------------------------------'
*/
-[_RAISE] = {
- {KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSPC},
- {KC_DEL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS},
- {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY},
- {X_____X, TO(_QWERTY), _______, _______, OSL(_ADJUST), X_____X, X_____X, _______, _______, _______, TO(_QWERTY), X_____X}
-},
+[_RAISE] = LAYOUT_planck_mit(
+ KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSPC,
+ KC_DEL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS,
+ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY,
+ X_____X, TO(_QWERTY), _______, _______, OSL(_ADJUST), X_____X, _______, _______, _______, TO(_QWERTY), X_____X
+),
/* Adjust (Lower + Raise)
@@ -107,48 +106,48 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | RGB | Bail | | | | | | | | Bail | |
* `-------------------------------------------------------------------------------------'
*/
-[_ADJUST] = {
- {RGB_MODE_PLAIN, RESET, DEBUG, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL },
- {RGB_MODE_REVERSE, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, _______, _______, _______, _______, RGB_VAI},
- {RGB_MODE_FORWARD, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, RGB_VAD},
- {RGB_TOG, TO(_QWERTY), _______, _______, _______, _______, _______, _______, _______, _______, TO(_QWERTY), X_____X}
-},
+[_ADJUST] = LAYOUT_planck_mit(
+ RGB_MODE_PLAIN, RESET, DEBUG, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL,
+ RGB_MODE_REVERSE, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, _______, _______, _______, _______, RGB_VAI,
+ RGB_MODE_FORWARD, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, RGB_VAD,
+ RGB_TOG, TO(_QWERTY), _______, _______, _______, _______, _______, _______, _______, TO(_QWERTY), X_____X
+),
/* movement layer (hold semicolon)
*/
-[_MOVE] = {
- {TO(_QWERTY), X_____X, X_____X, X_____X, X_____X, X_____X, KC_HOME, KC_PGDN, KC_PGUP, KC_END, X_____X, X_____X},
- {_______, X_____X, LGUI(KC_LBRC), LGUI(LSFT(KC_LBRC)), LGUI(LSFT(KC_RBRC)), LGUI(KC_RBRC), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, X_____X, X_____X},
- {_______, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, _______},
- {X_____X, TO(_QWERTY), _______, _______, _______, X_____X, X_____X, _______, _______, _______, TO(_QWERTY), X_____X}
-},
+[_MOVE] = LAYOUT_planck_mit(
+ TO(_QWERTY), X_____X, X_____X, X_____X, X_____X, X_____X, KC_HOME, KC_PGDN, KC_PGUP, KC_END, X_____X, X_____X,
+ _______, X_____X, LGUI(KC_LBRC), LGUI(LSFT(KC_LBRC)), LGUI(LSFT(KC_RBRC)), LGUI(KC_RBRC), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, X_____X, X_____X,
+ _______, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, _______,
+ X_____X, TO(_QWERTY), _______, _______, _______, X_____X, _______, _______, _______, TO(_QWERTY), X_____X
+),
/* mouse layer
*/
-[_MOUSE] = {
- {TO(_QWERTY), X_____X, X_____X, KC_MS_UP, X_____X, X_____X, KC_MS_WH_LEFT, KC_MS_WH_DOWN, KC_MS_WH_UP, KC_MS_WH_RIGHT, X_____X, X_____X },
- {_______, X_____X, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, X_____X, X_____X, KC_MS_BTN1, KC_MS_BTN2, KC_MS_BTN3, X_____X, X_____X},
- {_______, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, _______},
- {_______, TO(_QWERTY), _______, _______, _______, X_____X, X_____X, _______, _______, _______, TO(_QWERTY), X_____X}
-},
+[_MOUSE] = LAYOUT_planck_mit(
+ TO(_QWERTY), X_____X, X_____X, KC_MS_UP, X_____X, X_____X, KC_MS_WH_LEFT, KC_MS_WH_DOWN, KC_MS_WH_UP, KC_MS_WH_RIGHT, X_____X, X_____X,
+ _______, X_____X, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, X_____X, X_____X, KC_MS_BTN1, KC_MS_BTN2, KC_MS_BTN3, X_____X, X_____X,
+ _______, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, X_____X, _______,
+ _______, TO(_QWERTY), _______, _______, _______, X_____X, _______, _______, _______, TO(_QWERTY), X_____X
+),
/* vim edit mode. just has an escape -> _CMD key */
-[_EDIT] = {
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
- {VIM_START, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
- {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
- {_______, TO(_QWERTY), _______, _______, _______, _______, _______, _______, _______, _______, TO(_QWERTY), _______}
-},
+[_EDIT] = LAYOUT_planck_mit(
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ VIM_START, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, TO(_QWERTY), _______, _______, _______, _______, _______, _______, _______, TO(_QWERTY), _______
+),
/* vim command layer.
*/
-[_CMD] = {
- {X_____X, X_____X, VIM_W, VIM_E, X_____X, X_____X, VIM_Y, VIM_U, VIM_I, VIM_O, VIM_P, X_____X},
- {VIM_ESC, VIM_A, VIM_S, VIM_D, X_____X, VIM_G, VIM_H, VIM_J, VIM_K, VIM_L, X_____X, X_____X},
- {VIM_SHIFT, X_____X, VIM_X, VIM_C, VIM_V, VIM_B, X_____X, X_____X, VIM_COMMA, VIM_PERIOD, X_____X, VIM_SHIFT},
- {X_____X, TO(_QWERTY), _______, _______, X_____X, X_____X, X_____X, X_____X, _______, _______, TO(_QWERTY), X_____X}
-}
+[_CMD] = LAYOUT_planck_mit(
+ X_____X, X_____X, VIM_W, VIM_E, X_____X, X_____X, VIM_Y, VIM_U, VIM_I, VIM_O, VIM_P, X_____X,
+ VIM_ESC, VIM_A, VIM_S, VIM_D, X_____X, VIM_G, VIM_H, VIM_J, VIM_K, VIM_L, X_____X, X_____X,
+ VIM_SHIFT, X_____X, VIM_X, VIM_C, VIM_V, VIM_B, X_____X, X_____X, VIM_COMMA, VIM_PERIOD, X_____X, VIM_SHIFT,
+ X_____X, TO(_QWERTY), _______, _______, X_____X, X_____X, X_____X, _______, _______, TO(_QWERTY), X_____X
+)
};