aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJack Humbert <jack.humb@gmail.com>2017-05-07 20:18:23 -0400
committerGitHub <noreply@github.com>2017-05-07 20:18:23 -0400
commitb11a5be62cdbb0049896b17060d15c454aead6f2 (patch)
treed2111033fdb859f420d18e3556c93ca8abd15d4d
parent0b050f6c3354c14844faa4983b6e7968050378f4 (diff)
parentcb60fe393fd4e5dc43c0b11b22f76e6ece89d0f4 (diff)
downloadqmk_firmware-b11a5be62cdbb0049896b17060d15c454aead6f2.tar.gz
qmk_firmware-b11a5be62cdbb0049896b17060d15c454aead6f2.zip
Merge pull request #1278 from shieldsd/master
Add new keymap for dshields.
-rw-r--r--keyboards/planck/keymaps/dshields/Makefile11
-rw-r--r--keyboards/planck/keymaps/dshields/config.h23
-rw-r--r--keyboards/planck/keymaps/dshields/keymap.c98
3 files changed, 132 insertions, 0 deletions
diff --git a/keyboards/planck/keymaps/dshields/Makefile b/keyboards/planck/keymaps/dshields/Makefile
new file mode 100644
index 000000000..5eaceda53
--- /dev/null
+++ b/keyboards/planck/keymaps/dshields/Makefile
@@ -0,0 +1,11 @@
1ifndef QUANTUM_DIR
2 include ../../../../Makefile
3endif
4
5MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
6COMMAND_ENABLE = yes # Commands for debug and configuration
7BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
8# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
9SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
10TAP_DANCE_ENABLE = no
11AUDIO_ENABLE = no
diff --git a/keyboards/planck/keymaps/dshields/config.h b/keyboards/planck/keymaps/dshields/config.h
new file mode 100644
index 000000000..35358af0b
--- /dev/null
+++ b/keyboards/planck/keymaps/dshields/config.h
@@ -0,0 +1,23 @@
1#ifndef CONFIG_USER_H
2#define CONFIG_USER_H
3
4#ifndef NO_DEBUG
5#define NO_DEBUG
6#endif
7#ifndef NO_PRINT
8#define NO_PRINT
9#endif
10
11#include "../../config.h"
12
13#define TAPPING_TOGGLE 2
14#define TAPPING_TERM 300
15
16#define ONESHOT_TAP_TOGGLE 2
17#define ONESHOT_TIMEOUT 300
18
19#define _______ KC_TRNS
20#define XXXXXXX KC_NO
21
22#endif
23
diff --git a/keyboards/planck/keymaps/dshields/keymap.c b/keyboards/planck/keymaps/dshields/keymap.c
new file mode 100644
index 000000000..e96a67a53
--- /dev/null
+++ b/keyboards/planck/keymaps/dshields/keymap.c
@@ -0,0 +1,98 @@
1#include "planck.h"
2#include "backlight.h"
3#include "config.h"
4#include "action_layer.h"
5#include "eeconfig.h"
6
7extern keymap_config_t keymap_config;
8
9enum planck_layers { DEF, LWR, RSE, FUN };
10enum planck_keycodes { M1 = SAFE_RANGE, M2, M3, M4 };
11
12const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
13 /* Default
14 * ,-----------------------------------------------------------------------------------.
15 * | Q | W | E | R | T | Esc | Bksp | Y | U | I | O | P |
16 * |------+------+------+------+------+-------------+------+------+------+------+------|
17 * | A | S | D | F | G | Tab | Enter| H | J | K | L | ; |
18 * |------+------+------+------+------+------|------+------+------+------+------+------|
19 * | Z | X | C | V | B | Shift| Play | N | M | , | . | / |
20 * |------+------+------+------+------+------+------+------+------+------+------+------|
21 * | Ctrl | Super| Alt | Fun | Lower| Space | Raise| Left | Down | Up |Right |
22 * `-----------------------------------------------------------------------------------'
23 */
24 [DEF] = {
25 {KC_Q, KC_W, KC_E, KC_R, KC_T, KC_ESC, KC_BSPC, KC_Y, KC_U, KC_I, KC_O, KC_P},
26 {KC_A, KC_S, KC_D, KC_F, KC_G, KC_TAB, KC_ENT, KC_H, KC_J, KC_K, KC_L, KC_SCLN},
27 {KC_Z, KC_X, KC_C, KC_V, KC_B, OSM(MOD_LSFT), XXXXXXX, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH},
28 {KC_LCTL, KC_LGUI, KC_LALT, TT(FUN), TT(LWR), KC_SPC, KC_SPC, TT(RSE), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
29 },
30 /* Lower
31 * ,-----------------------------------------------------------------------------------.
32 * | ! | @ | # | $ | % | | | ^ | & | * | ( | ) |
33 * |------+------+------+------+------+-------------+------+------+------+------+------|
34 * | ~ | | | | | | | _ | + | | { | } |
35 * |------+------+------+------+------+------|------+------+------+------+------+------|
36 * | | | | | | | | | | | " | | |
37 * |------+------+------+------+------+------+------+------+------+------+------+------|
38 * | | | | | | | | Home | PgDn | PgUp | End |
39 * `-----------------------------------------------------------------------------------'
40 */
41 [LWR] = {
42 {KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN},
43 {S(KC_GRV), _______, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, _______, S(KC_LBRC), S(KC_RBRC)},
44 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, S(KC_QUOT), S(KC_BSLS)},
45 {_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END}
46 },
47 /* Raise
48 * ,-----------------------------------------------------------------------------------.
49 * | 1 | 2 | 3 | 4 | 5 | | | 6 | 7 | 8 | 9 | 0 |
50 * |------+------+------+------+------+-------------+------+------+------+------+------|
51 * | ` | | | | | | | - | = | | [ | ] |
52 * |------+------+------+------+------+------|------+------+------+------+------+------|
53 * | | | | | | | | | | | | |
54 * |------+------+------+------+------+------+------+------+------+------+------+------|
55 * | | | | | | | | Home | PgDn | PgUp | End |
56 * `-----------------------------------------------------------------------------------'
57 */
58 [RSE] = {
59 {KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0},
60 {KC_GRV, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, _______, KC_LBRC, KC_RBRC},
61 {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_QUOT, KC_BSLS},
62 {_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END}
63 },
64 /* Function
65 * ,-----------------------------------------------------------------------------------.
66 * | F1 | F2 | F3 | F4 | F5 | Reset|Delete| F6 | F7 | F8 | F9 | F10 |
67 * |------+------+------+------+------+-------------+------+------+------+------+------|
68 * | F11 | F12 | F13 | F14 | F15 | | | F16 | F17 | F18 | F19 | F20 |
69 * |------+------+------+------+------+------|------+------+------+------+------+------|
70 * |BlTggl|BlStep| | M1 | M2 | | | M3 | M4 |MsBtn1|MsBtn2|MsBtn3|
71 * |------+------+------+------+------+------+------+------+------+------+------+------|
72 * | | | | | | | |MsLeft|MsDown| MsUp |MsRght|
73 * `-----------------------------------------------------------------------------------'
74 */
75 [FUN] = {
76 {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, RESET, KC_DEL, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10},
77 {KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, _______, _______, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20},
78 {BL_TOGG, BL_STEP, _______, M1, _______, _______, _______, _______, _______, KC_BTN1, KC_BTN2, KC_BTN3},
79 {_______, _______, _______, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R}
80 },
81
82};
83
84bool process_record_user(uint16_t keycode, keyrecord_t *record) {
85 switch (keycode) {
86 case M1:
87 if (record->event.pressed) {
88 SEND_STRING(" 2>&1 > ");
89 }
90 return false;
91 break;
92 }
93 return true;
94}
95
96void matrix_init_user(void) {
97}
98