summaryrefslogtreecommitdiffstats
path: root/keyboards/dz60/keymaps/model42
diff options
context:
space:
mode:
authorYan-Fa Li <yanfali@gmail.com>2017-09-20 13:04:31 -0700
committerJack Humbert <jack.humb@gmail.com>2017-09-21 09:43:27 -0400
commit878774b24e262785d553428543b72a233b1e4c9f (patch)
tree91c21c94c55db0aea14b30ba10abaacc17a94ee9 /keyboards/dz60/keymaps/model42
parent8c02748c8121c083a907abc1b0b9388c4cf851a3 (diff)
Contribute a DZ60 keymap for 67 key configuration
Diffstat (limited to 'keyboards/dz60/keymaps/model42')
-rw-r--r--keyboards/dz60/keymaps/model42/keymap.c65
-rw-r--r--keyboards/dz60/keymaps/model42/readme.md42
2 files changed, 107 insertions, 0 deletions
diff --git a/keyboards/dz60/keymaps/model42/keymap.c b/keyboards/dz60/keymaps/model42/keymap.c
new file mode 100644
index 0000000000..b87141bee9
--- /dev/null
+++ b/keyboards/dz60/keymaps/model42/keymap.c
@@ -0,0 +1,65 @@
+#include "dz60.h"
+#include "action_layer.h"
+
+// Hard Reload Chrome
+enum dz60_keycodes {
+ LT_1_OR_RELOAD_CHROME = SAFE_RANGE
+};
+
+const uint16_t PROGMEM keymaps[][5][15] = {
+// layer 0
+KEYMAP_DIRECTIONAL(KC_GRV, 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_PGUP, KC_PGDN,
+ 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_ESC, 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, LT(3, KC_Z), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, MT(MOD_RSFT, KC_SLSH), KC_UP, KC_SLSH,
+ KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, LT(4, KC_SPC), KC_BSPC, MO(2), LT_1_OR_RELOAD_CHROME, KC_LEFT, KC_DOWN, KC_RGHT),
+
+// layer 1
+KEYMAP_DIRECTIONAL(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, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET,
+ 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, BL_DEC, BL_TOGG, BL_INC, BL_STEP, 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),
+
+// layer 2
+KEYMAP_DIRECTIONAL(KC_TRNS, 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_HOME, KC_END,
+ 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, 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),
+
+// layer 3
+KEYMAP_DIRECTIONAL(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, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
+
+// layer 4
+KEYMAP_DIRECTIONAL(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_MS_BTN1, KC_MS_UP, KC_MS_BTN2, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, 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, KC_TRNS, KC_TRNS, KC_TRNS),
+};
+
+uint16_t custom_lt_timer;
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ if(LT_1_OR_RELOAD_CHROME == keycode) {
+ if(record->event.pressed) {
+ custom_lt_timer = timer_read();
+ layer_on(1);
+ } else {
+ layer_off(1);
+ if (timer_elapsed(custom_lt_timer) < 200) {
+ register_code(KC_LGUI);
+ register_code(KC_RSHIFT);
+ register_code(KC_R);
+ unregister_code(KC_R);
+ unregister_code(KC_RSHIFT);
+ unregister_code(KC_LGUI);
+ }
+ }
+ }
+ return true;
+}
diff --git a/keyboards/dz60/keymaps/model42/readme.md b/keyboards/dz60/keymaps/model42/readme.md
new file mode 100644
index 0000000000..af84075068
--- /dev/null
+++ b/keyboards/dz60/keymaps/model42/readme.md
@@ -0,0 +1,42 @@
+# yanfali's keymap for KBDFans DZ60 PCB
+
+## 4 Layers
+
+### Layer 0
+
+![layer 0](https://imgur.com/bOiQI69.png)
+Conventional ANSI layout. Except:
+
+ - Backspace has been replaced with 2 keys
+ - PGUP
+ - PGDN
+ - 2.25U Left shift is now 1.25U with 1U key LT(layer 3, KC_Z)
+ - Bottom right shift is 1.75U. Has arrow cluster. Tap right shift for / and dedicated / key is to far right.
+ - Bottom row, split space bar
+ - 2.75U (Space)
+ - 1.25U (mouse key + WASD) with LT(4, KC_SPC)
+ - 2.25U (backspace)
+ - 1U MO(layer 2)
+ - 1U LT(layer 1, SHIFT+LGUI+R)
+ - arrows.
+
+### Layer 1
+
+![layer 1](https://imgur.com/X7iKNxQ.png)
+RGB underglow and backlight controls, Reset
+
+### Layer 2
+
+![layer 1](https://imgur.com/gELh7Se.png)
+F1-F12, PGUP -> HOME, PGDN -> END
+
+### Layer 3
+
+Unused at this time but tied to 3 FN key to right of 1.25U left shift.
+
+### Layer 4
+
+ * WASD - Mouse controls
+ * Q - Btn 1
+ * E - Btn 2
+