diff options
author | MechMerlin <30334081+mechmerlin@users.noreply.github.com> | 2018-11-06 12:04:25 -0800 |
---|---|---|
committer | Drashna Jaelre <drashna@live.com> | 2018-11-06 12:04:25 -0800 |
commit | a5d22424f40cf386120008b5d44d810c62d0ffcb (patch) | |
tree | 5a6fdcd8bc7362d9990d21737fed1ac4f18117a4 /keyboards/dz60 | |
parent | 29dd6645898d1647c5e4326c9851c2f1562bb6a0 (diff) |
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
Diffstat (limited to 'keyboards/dz60')
-rw-r--r-- | keyboards/dz60/keymaps/mechmerlin/config.h | 6 | ||||
-rw-r--r-- | keyboards/dz60/keymaps/mechmerlin/keymap.c | 40 | ||||
-rw-r--r-- | keyboards/dz60/keymaps/mechmerlin/readme.md | 68 |
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 0000000000..92d4cfb50a --- /dev/null +++ b/keyboards/dz60/keymaps/mechmerlin/config.h @@ -0,0 +1,6 @@ +#pragma once + +// Turn off RGB when computer goes to sleep +#ifdef RGBLIGHT_ENABLE +#define RGBLIGHT_SLEEP +#endif // RGBLIGHT_ENABLE diff --git a/keyboards/dz60/keymaps/mechmerlin/keymap.c b/keyboards/dz60/keymaps/mechmerlin/keymap.c new file mode 100644 index 0000000000..1a8593ef16 --- /dev/null +++ b/keyboards/dz60/keymaps/mechmerlin/keymap.c @@ -0,0 +1,40 @@ +#include QMK_KEYBOARD_H + +enum keyboard_layers { + _BL = 0, // Base Layer + _FL, // Function Layer + _CL // Control Layer +}; + +// Custom #defined keycodes (shorter macros for readability) +#define KC_CTCP LCTL_T(KC_CAPS) +#define KC_RSSH RSFT_T(KC_SLSH) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BL] = LAYOUT_60_b_ansi( + 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, + 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, + 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, + 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, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + [_FL] = LAYOUT_60_b_ansi( + 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, + 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, + 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, + 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), + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END), + + [_CL] = LAYOUT_60_b_ansi( + 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, + 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, + 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, + 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) +}; + +// Set underglow RGB leds to yellow +// Find the list of available colors in quantum/rgblight_list.h +void matrix_init_user(void) { + rgblight_sethsv_noeeprom_yellow(); +} diff --git a/keyboards/dz60/keymaps/mechmerlin/readme.md b/keyboards/dz60/keymaps/mechmerlin/readme.md new file mode 100644 index 0000000000..76ff54de54 --- /dev/null +++ b/keyboards/dz60/keymaps/mechmerlin/readme.md @@ -0,0 +1,68 @@ +# MechMerlin's DZ60 Keymap + +The purpose of this keymap is to provide examples on how to do some common QMK features. + +Make example for this keyboard (after setting up your build environment): + + make dz60:mechmerlin + +## Merlin's DZ60 Hardware Info +--- + +The 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. + +Merlin's DZ60 uses +- Layout B, in QMK this is LAYOUT_60_b_ansi. +- USB C +- 50g Zilents +- Arrows are 78g Zilents +- KPRepublic XD64 Case + +## Layers +--- + +Merlin'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. + +### _BL + +This is the base layer also known as layer 0. It is a standard QWERTY layout. It has the `_FL` layer switch key. + +### _FL + +This is the function layer also known as layer 1. It utiizes the following: +- Function Keys +- Navigation Keys +- Audio keys such as Mute, Volume Down and Volume Up. +- `_CL` layer switch key + +### _CL + +This is the control layer also known as layer 2. It utilizes the following: +- RGB Controls +- `RESET` key + +## Non Standard Keycodes +--- +### RESET + +As 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. + +### RSFT_T(KC_SLSH) + +Layout 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`. + +### LCTL_T(KC_CAPS) + +`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`. + + +## RGB Lighting +--- + +### RGBLIGHT_SLEEP + +This 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. + +### RGB Underglow Color: Yellow + +This 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). |