aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Dunsmore <jasondunsmore@gmail.com>2019-05-30 19:13:29 -0500
committerDrashna Jaelre <drashna@live.com>2019-05-30 17:13:29 -0700
commit3fd34daf14b0a9618d8c9c763f52a9b19aee96a5 (patch)
tree39dff8ed2d57e1255f098208ef390081d2df0258
parent88966767ee6005c33600e97ef36c873d33cb1e15 (diff)
downloadqmk_firmware-3fd34daf14b0a9618d8c9c763f52a9b19aee96a5.tar.gz
qmk_firmware-3fd34daf14b0a9618d8c9c763f52a9b19aee96a5.zip
[Keymap] Added keymap for user jasondunsmore (#6023)
-rw-r--r--keyboards/keebio/iris/keymaps/jasondunsmore/config.h27
-rw-r--r--keyboards/keebio/iris/keymaps/jasondunsmore/keymap.c147
-rw-r--r--keyboards/keebio/iris/keymaps/jasondunsmore/readme.md7
-rw-r--r--keyboards/keebio/iris/keymaps/jasondunsmore/rules.mk2
4 files changed, 183 insertions, 0 deletions
diff --git a/keyboards/keebio/iris/keymaps/jasondunsmore/config.h b/keyboards/keebio/iris/keymaps/jasondunsmore/config.h
new file mode 100644
index 000000000..8aa4be367
--- /dev/null
+++ b/keyboards/keebio/iris/keymaps/jasondunsmore/config.h
@@ -0,0 +1,27 @@
1/*
2Copyright 2017 Danny Nguyen <danny@keeb.io>
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18#pragma once
19
20/* Use I2C or Serial, not both */
21#define USE_SERIAL
22// #define USE_I2C
23
24/* Select hand configuration */
25#define MASTER_LEFT
26
27#define TAPPING_TERM 200
diff --git a/keyboards/keebio/iris/keymaps/jasondunsmore/keymap.c b/keyboards/keebio/iris/keymaps/jasondunsmore/keymap.c
new file mode 100644
index 000000000..5f9307663
--- /dev/null
+++ b/keyboards/keebio/iris/keymaps/jasondunsmore/keymap.c
@@ -0,0 +1,147 @@
1#include QMK_KEYBOARD_H
2
3extern keymap_config_t keymap_config;
4
5// Layers
6#define _QWERTY 0 // Base layer
7#define _NUMB 1
8#define _NAVI 2
9
10// Keys
11#define KC_NUMB MO(_NUMB)
12#define KC_NAVI MO(_NAVI)
13#define KC_AGRV LALT_T(KC_GRAVE)
14#define KC_GUIE LGUI_T(KC_ESC)
15#define KC_REST RESET
16#define KC_DBUG DEBUG
17
18// Tap Dance Declarations
19enum {
20 TD_LALT_GRV_BSLS = 0,
21 TD_LSFT_LBRC,
22 TD_RSFT_RBRC,
23};
24
25void alt_grave_backslash(qk_tap_dance_state_t *state, void *user_data) {
26 if (state->count == 1) {
27 if (!state->pressed) {
28 register_code(KC_GRAVE);
29 } else {
30 register_code(KC_LALT);
31 }
32 } else if (state->count == 2) {
33 register_code(KC_BSLASH);
34 }
35}
36
37void alt_grave_backslash_reset(qk_tap_dance_state_t *state, void *user_data) {
38 if (state->count == 1) {
39 unregister_code(KC_GRAVE);
40 unregister_code(KC_LALT);
41 } else if (state->count == 2) {
42 unregister_code(KC_BSLASH);
43 }
44}
45
46void left_brackets(qk_tap_dance_state_t *state, void *user_data) {
47 if (state->count == 1) {
48 if (!state->pressed) {
49 register_code(KC_LSFT);
50 register_code(KC_9);
51 } else {
52 register_code(KC_LSFT);
53 }
54 } else if (state->count == 2) {
55 register_code(KC_LBRC);
56 }
57}
58
59void left_brackets_reset(qk_tap_dance_state_t *state, void *user_data) {
60 if (state->count == 1) {
61 unregister_code(KC_LSFT);
62 unregister_code(KC_9);
63 } else if (state->count == 2) {
64 unregister_code(KC_LBRC);
65 }
66}
67
68void right_brackets(qk_tap_dance_state_t *state, void *user_data) {
69 if (state->count == 1) {
70 if (!state->pressed) {
71 register_code(KC_RSFT);
72 register_code(KC_0);
73 } else {
74 register_code(KC_RSFT);
75 }
76 } else if (state->count == 2) {
77 register_code(KC_RBRC);
78 }
79}
80
81void right_brackets_reset(qk_tap_dance_state_t *state, void *user_data) {
82 if (state->count == 1) {
83 unregister_code(KC_RSFT);
84 unregister_code(KC_0);
85 } else if (state->count == 2) {
86 unregister_code(KC_RBRC);
87 }
88}
89
90
91// Tap Dance Definitions
92qk_tap_dance_action_t tap_dance_actions[] = {
93 // Tap once for KC_SLSH, twice for KC_BSLS
94 [TD_LALT_GRV_BSLS] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, alt_grave_backslash, alt_grave_backslash_reset),
95 [TD_LSFT_LBRC] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, left_brackets, left_brackets_reset),
96 [TD_RSFT_RBRC] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, right_brackets, right_brackets_reset)
97};
98
99// Tap Dance Keys
100#define KC_AGRB TD(TD_LALT_GRV_BSLS)
101#define KC_LSBK TD(TD_LSFT_LBRC)
102#define KC_RSBK TD(TD_RSFT_RBRC)
103
104const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
105
106 [_QWERTY] = LAYOUT_kc(
107//,----+----+----+----+----+----. ,----+----+----+----+----+----.
108 GUIE, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, DEL,
109//|----+----+----+----+----+----| |----+----+----+----+----+----|
110 TAB, Q, W, E, R, T, Y, U, I, O, P, BSPC,
111//|----+----+----+----+----+----| |----+----+----+----+----+----|
112 AGRB, A, S, D, F, G, H, J, K, L, SCLN,QUOT,
113//|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
114 LSBK, Z, X, C, V, B, MINS, EQL, N, M, COMM,DOT, SLSH,RSBK,
115//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
116 NUMB,LCTL,SPC, ENT, RCTL,NAVI
117// `----+----+----' `----+----+----'
118 ),
119
120 [_NUMB] = LAYOUT_kc(
121//,----+----+----+----+----+----. ,----+----+----+----+----+----.
122 F12, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11,
123//|----+----+----+----+----+----| |----+----+----+----+----+----|
124 NO, F17, F18, F19, F20, NO, NO, 7, 8, 9, 0, TRNS,
125//|----+----+----+----+----+----| |----+----+----+----+----+----|
126 TRNS,F13, F14, F15, F16, NO, ASTR, 4, 5, 6, PLUS,TRNS,
127//|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
128 TRNS,F21, F22, F23, F24, NO, TRNS, TRNS,SLSH, 1, 2, 3, MINS,TRNS,
129//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
130 TRNS,TRNS,TRNS, TRNS,DOT, TRNS
131// `----+----+----' `----+----+----'
132 ),
133
134 [_NAVI] = LAYOUT_kc(
135//,----+----+----+----+----+----. ,----+----+----+----+----+----.
136 PWR, MUTE,VOLD,VOLU,BRID,BRIU, REST,DBUG, NO, NO, NO, TRNS,
137//|----+----+----+----+----+----| |----+----+----+----+----+----|
138 WAKE,HOME,PGUP, UP, PGDN,TRNS, NO, NO, NO, NO, NO, TRNS,
139//|----+----+----+----+----+----| |----+----+----+----+----+----|
140 TRNS,END, LEFT,DOWN,RGHT,TRNS, PAUS,CAPS,PSCR,SLCK,INS, TRNS,
141//|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
142 TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS, NO, NO, NO, NO, NO, TRNS,
143//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
144 TRNS,TRNS,TRNS, TRNS,TRNS,TRNS
145// `----+----+----' `----+----+----'
146 )
147};
diff --git a/keyboards/keebio/iris/keymaps/jasondunsmore/readme.md b/keyboards/keebio/iris/keymaps/jasondunsmore/readme.md
new file mode 100644
index 000000000..0817b5e9b
--- /dev/null
+++ b/keyboards/keebio/iris/keymaps/jasondunsmore/readme.md
@@ -0,0 +1,7 @@
1# jasondunsmore's iris layout
2
3_QWERTY is the default layer, from which all letters, symbols and
4numbers can be accessed. The _NUMB layer contains a numberpad,
5operators, and function keys. The _NAVI layer contains navigation
6keys, some hardware adjustment keys, lock keys, and RESET/DEBUG for
7QMK.
diff --git a/keyboards/keebio/iris/keymaps/jasondunsmore/rules.mk b/keyboards/keebio/iris/keymaps/jasondunsmore/rules.mk
new file mode 100644
index 000000000..d58c21f2b
--- /dev/null
+++ b/keyboards/keebio/iris/keymaps/jasondunsmore/rules.mk
@@ -0,0 +1,2 @@
1TAP_DANCE_ENABLE = yes
2COMMAND_ENABLE = no