summaryrefslogtreecommitdiff
path: root/keyboards/ymdk_np21/keymaps
diff options
context:
space:
mode:
authorJames Young <18669334+noroadsleft@users.noreply.github.com>2020-02-07 19:15:35 -0800
committerGitHub <noreply@github.com>2020-02-07 19:15:35 -0800
commitb62829031de1ae2e5e1efaa35606981c04c443c3 (patch)
tree7fa96ea414e5b3f2f86a1beb9219c777083c4b51 /keyboards/ymdk_np21/keymaps
parent43c0a9293e74bc0f20c8b4324ea532dff56d9c50 (diff)
[Keyboard] YMDK NP21: matrix and keymap refactor (#8112)
* YMDK NP21: matrix and keymap refactor - refactored layout macros - LAYOUT_ortho_6x4 orients the keyboard with the USB port to the back instead of to the right - LAYOUT uses the previous sideways orientation (included for backwards compatibility) - removed redundant includes from ymdk_np21.h - added a readme for the default keymap * add Configurator layout support
Diffstat (limited to 'keyboards/ymdk_np21/keymaps')
-rw-r--r--keyboards/ymdk_np21/keymaps/default/keymap.c56
-rw-r--r--keyboards/ymdk_np21/keymaps/default/readme.md26
2 files changed, 47 insertions, 35 deletions
diff --git a/keyboards/ymdk_np21/keymaps/default/keymap.c b/keyboards/ymdk_np21/keymaps/default/keymap.c
index 3ade30479f..143f4f61bb 100644
--- a/keyboards/ymdk_np21/keymaps/default/keymap.c
+++ b/keyboards/ymdk_np21/keymaps/default/keymap.c
@@ -1,7 +1,7 @@
#include QMK_KEYBOARD_H
#define _NP 0
-#define _BL 1
+#define _BL 1
enum custom_keycodes {
NP = SAFE_RANGE,
@@ -9,38 +9,24 @@ enum custom_keycodes {
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-/* Qwerty
- * ,-----------------------------------------.
- * | 0 | 1 | 4 | 7 | NUM | ESC |
- * |------+------+------+------+------+------|
- * | . | 2 | 5 | 8 | / | TAB |---,
- * |------+------+------+------+------+------|USB|
- * | DOT | 3 | 6 | 9 | * | BS |---'
- * |------+------+------+------+------+------|
- * | Enter| Enter| + | + | - | FN |
- * `-----------------------------------------'
- */
-[_NP] = LAYOUT( \
- KC_KP_0, KC_KP_1, KC_KP_4, KC_KP_7, KC_NUMLOCK, KC_ESC, \
- KC_DOT, KC_KP_2, KC_KP_5, KC_KP_8, KC_KP_SLASH, KC_TAB, \
- KC_KP_DOT, KC_KP_3, KC_KP_6, KC_KP_9, KC_KP_ASTERISK, KC_BSPACE, \
- KC_KP_ENTER, KC_KP_ENTER, KC_KP_PLUS, KC_KP_PLUS, KC_KP_MINUS, MO(_BL) \
-),
-/* Qwerty
- * ,---------------------------------------------.
- * | BL_BRTG | | | | | |
- * |---------+--------+---------+--------+---+---|
- * | | BL_OFF | BL_TOGG | BL_ON | | |---,
- * |---------+--------+---------+--------+---+---|USB|
- * | | | | | | |---'
- * |---------+--------+---------+--------+---+---|
- * | BL_DEC | BL_DEC | BL_INC | BL_INC | | |
- * `---------------------------------------------'
- */
-[_BL] = LAYOUT( \
- BL_BRTG, _______, _______, _______, _______, _______, \
- _______, BL_OFF, BL_TOGG, BL_ON, _______, _______, \
- _______, _______, _______, _______, _______, _______, \
- BL_DEC, BL_DEC, BL_INC, BL_INC, _______, _______ \
-)
+ /* Qwerty */
+
+ [_NP] = LAYOUT_ortho_6x4(
+ KC_ESC, KC_TAB, KC_BSPC, MO(_BL),
+ KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
+ KC_P7, KC_P8, KC_P9, KC_PPLS,
+ KC_P4, KC_P5, KC_P6, KC_PPLS,
+ KC_P1, KC_P2, KC_P3, KC_PENT,
+ KC_P0, KC_DOT, KC_PDOT, KC_PENT
+ ),
+
+ [_BL] = LAYOUT_ortho_6x4(
+ _______, _______, _______, _______,
+ _______, _______, _______, _______,
+ _______, BL_ON, _______, BL_INC,
+ _______, BL_TOGG, _______, BL_INC,
+ _______, BL_OFF, _______, BL_DEC,
+ BL_BRTG, _______, _______, BL_DEC
+ )
+
};
diff --git a/keyboards/ymdk_np21/keymaps/default/readme.md b/keyboards/ymdk_np21/keymaps/default/readme.md
new file mode 100644
index 0000000000..aca4c0caba
--- /dev/null
+++ b/keyboards/ymdk_np21/keymaps/default/readme.md
@@ -0,0 +1,26 @@
+# default
+
+The default keymap for the YMDK NP21 keypad.
+
+ Base Layer Function Layer
+ .-----. .-----.
+ | USB | | USB |
+ ,-------------------------------. ,-------------------------------.
+ | Esc | Tab | Back | Fn | | | | |▒▒▒▒▒▒▒|
+ | | | Space | | | | | |▒▒▒▒▒▒▒|
+ |-------+-------+-------+-------| |-------+-------+-------+-------|
+ | Num | / | * | - | | | | | |
+ | Lock | | | | | | | | |
+ |-------+-------+-------+-------| |-------+-------+-------+-------|
+ | 7 | 8 | 9 | + | | | BL | | BL |
+ | Home | Up | PgUp | | | | On | | Inc |
+ |-------+-------+-------+-------| |-------+-------+-------+-------|
+ | 4 | 5 | 6 | + | | | BL | | BL |
+ | Left | | Right | | | | Togg | | Inc |
+ |-------+-------+-------+-------| |-------+-------+-------+-------|
+ | 1 | 2 | 3 | Ent | | | BL | | BL |
+ | End | Down | PgDn | | | | Off | | Dec |
+ |-------+-------+-------+-------| |-------+-------+-------+-------|
+ | 0 | . | . | Ent | | BL | | | BL |
+ | Ins | | Del | | | Brthg | | | Dec |
+ `-------------------------------' `-------------------------------'