aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMechMerlin <30334081+mechmerlin@users.noreply.github.com>2018-11-06 12:04:25 -0800
committerDrashna Jaelre <drashna@live.com>2018-11-06 12:04:25 -0800
commita5d22424f40cf386120008b5d44d810c62d0ffcb (patch)
tree5a6fdcd8bc7362d9990d21737fed1ac4f18117a4
parent29dd6645898d1647c5e4326c9851c2f1562bb6a0 (diff)
downloadqmk_firmware-a5d22424f40cf386120008b5d44d810c62d0ffcb.tar.gz
qmk_firmware-a5d22424f40cf386120008b5d44d810c62d0ffcb.zip
Commit my DZ60 keymap (#4375)
* default mechmerlin keymap initial commit * fix up the keymap * cleanup keymap * add rgb sleep functionality * add the beginning of a readme * fix that compile error * fixup formatting * spruce up that readme * add RGB lighting controls to _CL layer * update readme * set rgb underglow color * update readme * fix formatting
-rw-r--r--keyboards/dz60/keymaps/mechmerlin/config.h6
-rw-r--r--keyboards/dz60/keymaps/mechmerlin/keymap.c40
-rw-r--r--keyboards/dz60/keymaps/mechmerlin/readme.md68
3 files changed, 114 insertions, 0 deletions
diff --git a/keyboards/dz60/keymaps/mechmerlin/config.h b/keyboards/dz60/keymaps/mechmerlin/config.h
new file mode 100644
index 000000000..92d4cfb50
--- /dev/null
+++ b/keyboards/dz60/keymaps/mechmerlin/config.h
@@ -0,0 +1,6 @@
1#pragma once
2
3// Turn off RGB when computer goes to sleep
4#ifdef RGBLIGHT_ENABLE
5#define RGBLIGHT_SLEEP
6#endif // RGBLIGHT_ENABLE
diff --git a/keyboards/dz60/keymaps/mechmerlin/keymap.c b/keyboards/dz60/keymaps/mechmerlin/keymap.c
new file mode 100644
index 000000000..1a8593ef1
--- /dev/null
+++ b/keyboards/dz60/keymaps/mechmerlin/keymap.c
@@ -0,0 +1,40 @@
1#include QMK_KEYBOARD_H
2
3enum keyboard_layers {
4 _BL = 0, // Base Layer
5 _FL, // Function Layer
6 _CL // Control Layer
7};
8
9// Custom #defined keycodes (shorter macros for readability)
10#define KC_CTCP LCTL_T(KC_CAPS)
11#define KC_RSSH RSFT_T(KC_SLSH)
12
13const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
14 [_BL] = LAYOUT_60_b_ansi(
15 KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC,
16 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
17 KC_CTCP, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
18 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_RSSH, KC_UP, KC_DEL,
19 KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
20
21 [_FL] = LAYOUT_60_b_ansi(
22 KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_DEL,
23 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
24 KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
25 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_PGUP, MO(_CL),
26 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END),
27
28 [_CL] = LAYOUT_60_b_ansi(
29 RESET, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_M_SN, RGB_M_K, RGB_M_X, RGB_M_G, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
30 RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
31 KC_TRNS, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
32 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
33 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)
34};
35
36// Set underglow RGB leds to yellow
37// Find the list of available colors in quantum/rgblight_list.h
38void matrix_init_user(void) {
39 rgblight_sethsv_noeeprom_yellow();
40}
diff --git a/keyboards/dz60/keymaps/mechmerlin/readme.md b/keyboards/dz60/keymaps/mechmerlin/readme.md
new file mode 100644
index 000000000..76ff54de5
--- /dev/null
+++ b/keyboards/dz60/keymaps/mechmerlin/readme.md
@@ -0,0 +1,68 @@
1# MechMerlin's DZ60 Keymap
2
3The purpose of this keymap is to provide examples on how to do some common QMK features.
4
5Make example for this keyboard (after setting up your build environment):
6
7 make dz60:mechmerlin
8
9## Merlin's DZ60 Hardware Info
10---
11
12The DZ60 is a 60% pcb produced by KBDFans. It comes in two variants, USB Mini B and USB C. It supports many many layouts. It also supports both backlight and RGB underglow. The USB C variant does not have a hardware reset switch. USB C to C is not supported.
13
14Merlin's DZ60 uses
15- Layout B, in QMK this is LAYOUT_60_b_ansi.
16- USB C
17- 50g Zilents
18- Arrows are 78g Zilents
19- KPRepublic XD64 Case
20
21## Layers
22---
23
24Merlin's keymap has three different layers. To switch layers you can use the `MO(X)` keycode, where `X` is the layer you want to switch to.
25
26### _BL
27
28This is the base layer also known as layer 0. It is a standard QWERTY layout. It has the `_FL` layer switch key.
29
30### _FL
31
32This is the function layer also known as layer 1. It utiizes the following:
33- Function Keys
34- Navigation Keys
35- Audio keys such as Mute, Volume Down and Volume Up.
36- `_CL` layer switch key
37
38### _CL
39
40This is the control layer also known as layer 2. It utilizes the following:
41- RGB Controls
42- `RESET` key
43
44## Non Standard Keycodes
45---
46### RESET
47
48As long `BOOTMAGIC_ENABLE` is set to `yes` in `rules.mk`, the DZ60 can be put into bootloader mode by holding the `space` key and the `b` key while plugging in. However sometmes this doesn't work or is troublesome to do, might as well use the `RESET` keycode to accomplish this.
49
50### RSFT_T(KC_SLSH)
51
52Layout B is missing the `?` key and is instead replaced with a `right shift`. This keycode makes it so that the key can be tapped for `?` and held for `right shift`.
53
54### LCTL_T(KC_CAPS)
55
56`Caps Lock` is only ever used by tapping, why not use it as a `control` key when held? This keycode makes it so that the key can be tapped for `caps lock` and held for `control`.
57
58
59## RGB Lighting
60---
61
62### RGBLIGHT_SLEEP
63
64This is set in `mechmerlin/config.h` so that when the computer goes to sleep, the RGB lights will also go to sleep on the keyboard. They will turn back on when the computer wakes.
65
66### RGB Underglow Color: Yellow
67
68This is set in `mechmerlin/keymap.c` in the `matrix_init_user` function. The list of available colors can be found in [`quantum/rgblight_list.h`](https://github.com/qmk/qmk_firmware/blob/388df5359b913eaf1ce6fb0ef624e430ad010ea5/quantum/rgblight_list.h#L59-L121).