aboutsummaryrefslogtreecommitdiff
path: root/keyboards/diverge3
diff options
context:
space:
mode:
authorLevi Olson <olson.levi@gmail.com>2018-10-22 14:04:28 -0500
committerDrashna Jaelre <drashna@live.com>2018-10-22 12:04:28 -0700
commit47dcda1087a2aa3bbb46d69c5cf682bf45650a8b (patch)
tree01b6e9487ee25d0f17a37cd106ceef8e7f2c5ac1 /keyboards/diverge3
parenta2b650df474420b2003978fbf391393b2cccbd33 (diff)
downloadqmk_firmware-47dcda1087a2aa3bbb46d69c5cf682bf45650a8b.tar.gz
qmk_firmware-47dcda1087a2aa3bbb46d69c5cf682bf45650a8b.zip
Diverge3 - Workman Layout (#3682)
* Diverge3: Workman Programmers Layout * Diverge3: Comment Removal * Diverge3: Image Links Fixed * Diverge3: Images added * Diverge3: Images cleaned up * Diverge3: Images cleaned up * Diverge3: Removing Images * Diverge3: Improving readme.md * Diverge3: Improving readme.md * Diverge3: Add supporting Comments * Diverge3: Update readme * Diverge3: Update readme * Diverge3: Updates per comments in PR * Diverge3: Updates per comments in PR * Diverge3: Updates per comments in PR * Diverge3: Updates per comments in PR * Diverge3: Updates per comments in PR * Diverge3: Updates per comments in PR
Diffstat (limited to 'keyboards/diverge3')
-rw-r--r--keyboards/diverge3/.gitignore1
-rw-r--r--keyboards/diverge3/config.h9
-rw-r--r--keyboards/diverge3/keymaps/workman/config.h5
-rw-r--r--keyboards/diverge3/keymaps/workman/keymap.c212
-rw-r--r--keyboards/diverge3/keymaps/workman/readme.md21
-rw-r--r--keyboards/diverge3/keymaps/workman/rules.mk1
-rw-r--r--keyboards/diverge3/readme.md6
7 files changed, 250 insertions, 5 deletions
diff --git a/keyboards/diverge3/.gitignore b/keyboards/diverge3/.gitignore
new file mode 100644
index 000000000..722d5e71d
--- /dev/null
+++ b/keyboards/diverge3/.gitignore
@@ -0,0 +1 @@
.vscode
diff --git a/keyboards/diverge3/config.h b/keyboards/diverge3/config.h
index db3c6a6f7..f3ed06739 100644
--- a/keyboards/diverge3/config.h
+++ b/keyboards/diverge3/config.h
@@ -31,7 +31,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
31/* key matrix size */ 31/* key matrix size */
32#define MATRIX_ROWS 10 32#define MATRIX_ROWS 10
33#define MATRIX_COLS 8 33#define MATRIX_COLS 8
34// SERIAL is the only supported 34// Only SERIAL is currently supported
35// By converting this to use I2C, backlight
36// would/should be fully functional as well
35#define USE_SERIAL 37#define USE_SERIAL
36 38
37/* 39/*
@@ -51,7 +53,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
51/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ 53/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
52#define DIODE_DIRECTION ROW2COL 54#define DIODE_DIRECTION ROW2COL
53 55
54// #define BACKLIGHT_PIN B7 56// #define BACKLIGHT_PIN C6
55// #define BACKLIGHT_BREATHING 57// #define BACKLIGHT_BREATHING
56// #define BACKLIGHT_LEVELS 3 58// #define BACKLIGHT_LEVELS 3
57 59
@@ -61,8 +63,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
61 63
62/* define if matrix has ghost (lacks anti-ghosting diodes) */ 64/* define if matrix has ghost (lacks anti-ghosting diodes) */
63//#define MATRIX_HAS_GHOST 65//#define MATRIX_HAS_GHOST
64 66
65/* number of backlight levels */
66 67
67/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ 68/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
68#define LOCKING_SUPPORT_ENABLE 69#define LOCKING_SUPPORT_ENABLE
diff --git a/keyboards/diverge3/keymaps/workman/config.h b/keyboards/diverge3/keymaps/workman/config.h
new file mode 100644
index 000000000..9829a604f
--- /dev/null
+++ b/keyboards/diverge3/keymaps/workman/config.h
@@ -0,0 +1,5 @@
1#pragma once
2
3// place overrides here
4#define PERMISSIVE_HOLD
5#define TAPPING_TERM 150 \ No newline at end of file
diff --git a/keyboards/diverge3/keymaps/workman/keymap.c b/keyboards/diverge3/keymaps/workman/keymap.c
new file mode 100644
index 000000000..5e681f418
--- /dev/null
+++ b/keyboards/diverge3/keymaps/workman/keymap.c
@@ -0,0 +1,212 @@
1/* Copyright 2017 IslandMan93
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16#include QMK_KEYBOARD_H
17
18// KEYMAP
19extern keymap_config_t keymap_config;
20
21#define _WORKMAN_P 0
22#define _GAME 1
23#define _RAISE 2
24
25#define _______ KC_TRNS
26
27#define SHIFT_MOD MOD_BIT(KC_LSFT)
28#define SPACE_RAISE LT(_RAISE, KC_SPC)
29#define ENT_RAISE LT(_RAISE, KC_ENT)
30#define PAGE_PREV S(LCTL(KC_TAB))
31#define PAGE_NEXT LCTL(KC_TAB)
32
33enum custom_keycodes
34{
35 LO_BSPC = SAFE_RANGE,
36 LO_1,
37 LO_2,
38 LO_3,
39 LO_4,
40 LO_5,
41 LO_6,
42 LO_7,
43 LO_8,
44 LO_9,
45 LO_0,
46};
47
48bool process_record_user(uint16_t keycode, keyrecord_t* record)
49{
50 if (record->event.pressed) {
51 switch (keycode) {
52 case LO_BSPC:
53 if (record->event.pressed) {
54 if (get_mods() & SHIFT_MOD) {
55 uint8_t current_mods = get_mods();
56 clear_mods();
57 SEND_STRING(SS_TAP(X_DELETE));
58 set_mods(current_mods);
59 } else {
60 SEND_STRING(SS_TAP(X_BSPACE));
61 }
62 }
63 return false;
64 case LO_1:
65 if (record->event.pressed) {
66 uint8_t current_mods = get_mods();
67 if (current_mods & SHIFT_MOD) {
68 clear_mods();
69 SEND_STRING("1");
70 set_mods(current_mods);
71 } else {
72 SEND_STRING("!");
73 }
74 }
75 return false;
76 case LO_2:
77 if (record->event.pressed) {
78 uint8_t current_mods = get_mods();
79 if (current_mods & SHIFT_MOD) {
80 clear_mods();
81 SEND_STRING("2");
82 set_mods(current_mods);
83 } else {
84 SEND_STRING("@");
85 }
86 }
87 return false;
88 case LO_3:
89 if (record->event.pressed) {
90 uint8_t current_mods = get_mods();
91 if (current_mods & SHIFT_MOD) {
92 clear_mods();
93 SEND_STRING("3");
94 set_mods(current_mods);
95 } else {
96 SEND_STRING("#");
97 }
98 }
99 return false;
100 case LO_4:
101 if (record->event.pressed) {
102 uint8_t current_mods = get_mods();
103 if (current_mods & SHIFT_MOD) {
104 clear_mods();
105 SEND_STRING("4");
106 set_mods(current_mods);
107 } else {
108 SEND_STRING("$");
109 }
110 }
111 return false;
112 case LO_5:
113 if (record->event.pressed) {
114 uint8_t current_mods = get_mods();
115 if (current_mods & SHIFT_MOD) {
116 clear_mods();
117 SEND_STRING("5");
118 set_mods(current_mods);
119 } else {
120 SEND_STRING("%");
121 }
122 }
123 return false;
124 case LO_6:
125 if (record->event.pressed) {
126 uint8_t current_mods = get_mods();
127 if (current_mods & SHIFT_MOD) {
128 clear_mods();
129 SEND_STRING("6");
130 set_mods(current_mods);
131 } else {
132 SEND_STRING("^");
133 }
134 }
135 return false;
136 case LO_7:
137 if (record->event.pressed) {
138 uint8_t current_mods = get_mods();
139 if (current_mods & SHIFT_MOD) {
140 clear_mods();
141 SEND_STRING("7");
142 set_mods(current_mods);
143 } else {
144 SEND_STRING("&");
145 }
146 }
147 return false;
148 case LO_8:
149 if (record->event.pressed) {
150 uint8_t current_mods = get_mods();
151 if (current_mods & SHIFT_MOD) {
152 clear_mods();
153 SEND_STRING("8");
154 set_mods(current_mods);
155 } else {
156 SEND_STRING("*");
157 }
158 }
159 return false;
160 case LO_9:
161 if (record->event.pressed) {
162 uint8_t current_mods = get_mods();
163 if (current_mods & SHIFT_MOD) {
164 clear_mods();
165 SEND_STRING("9");
166 set_mods(current_mods);
167 } else {
168 SEND_STRING("(");
169 }
170 }
171 return false;
172 case LO_0:
173 if (record->event.pressed) {
174 uint8_t current_mods = get_mods();
175 if (current_mods & SHIFT_MOD) {
176 clear_mods();
177 SEND_STRING("0");
178 set_mods(current_mods);
179 } else {
180 SEND_STRING(")");
181 }
182 }
183 return false;
184 }
185 }
186 return true;
187};
188
189const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
190
191 [_WORKMAN_P] = LAYOUT(
192 KC_ESC, LO_1, LO_2, LO_3, LO_4, LO_5, LO_6, LO_6, LO_7, LO_8, LO_9, LO_0, KC_MINS, KC_ESC,
193 KC_GRV, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_LPRN, KC_RPRN, KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_EQL,
194 KC_TAB, KC_A, KC_S, KC_H, KC_T, KC_G, KC_LCBR, KC_RCBR, KC_Y, KC_N, KC_E, KC_O, KC_I, KC_BSLS,
195 KC_LCTL, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_LBRC, KC_RBRC, KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT,
196 KC_LSFT, RESET, PAGE_PREV, PAGE_NEXT, KC_END, KC_LGUI, KC_LALT, TG(_GAME), LO_BSPC, ENT_RAISE, SPACE_RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_RCTL),
197
198 [_GAME] = LAYOUT(
199 KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_ESC,
200 KC_GRV, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_LPRN, KC_RPRN, KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_EQL,
201 KC_TAB, KC_A, KC_S, KC_H, KC_T, KC_G, KC_LCBR, KC_RCBR, KC_Y, KC_N, KC_E, KC_O, KC_I, KC_BSLS,
202 KC_LCTL, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_LBRC, KC_RBRC, KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT,
203 KC_LSFT, KC_F1, KC_F2, KC_3, KC_F5, KC_SPC, KC_LALT, TG(_GAME), LO_BSPC, ENT_RAISE, SPACE_RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_RCTL),
204
205 [_RAISE] = LAYOUT(
206 _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, RESET,
207 _______, _______, _______, _______, _______, _______, BL_INC, KC_VOLU, _______, _______, _______, _______, _______, KC_F12,
208 _______, _______, _______, _______, _______, _______, BL_DEC, KC_VOLD, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______,
209 _______, _______, _______, _______, _______, _______, BL_BRTG, KC_MUTE, _______, _______, KC_MPRV, KC_MNXT, KC_MPLY, _______,
210 _______, _______, _______, _______, _______, _______, BL_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______),
211
212}; \ No newline at end of file
diff --git a/keyboards/diverge3/keymaps/workman/readme.md b/keyboards/diverge3/keymaps/workman/readme.md
new file mode 100644
index 000000000..48ba482fe
--- /dev/null
+++ b/keyboards/diverge3/keymaps/workman/readme.md
@@ -0,0 +1,21 @@
1# The Workman keymap for diverge3
2
3Basic example of the [Workman Programming Layout](https://github.com/ojbucao/workman) which uses the `SHIFT`ed variants of the number row, by default.
4
5## Layer 1 - Default Layer
6
7Workman programming layout.
8
9![Workman Layout Picture](https://i.imgur.com/IOOmRfI.png)
10
11## Layer 2 - Gaming Layer
12
13Reverts the number row to the normal 1, 2, 3, etc... for better gaming compatibility.
14
15![Gaming Layer Picture](https://i.imgur.com/E0vmEAa.png)
16
17## Layer 3 - Raise Layer
18
19Volume and backlight controls (although backlight is not fully functional using `USE_SERIAL` in `../config.h`).
20
21![Raise Layer Misc Buttons Picture](https://i.imgur.com/50L3O62.png)
diff --git a/keyboards/diverge3/keymaps/workman/rules.mk b/keyboards/diverge3/keymaps/workman/rules.mk
new file mode 100644
index 000000000..8b1378917
--- /dev/null
+++ b/keyboards/diverge3/keymaps/workman/rules.mk
@@ -0,0 +1 @@
diff --git a/keyboards/diverge3/readme.md b/keyboards/diverge3/readme.md
index 2ecfbca3b..43add9d99 100644
--- a/keyboards/diverge3/readme.md
+++ b/keyboards/diverge3/readme.md
@@ -10,7 +10,11 @@ Make example for this keyboard (after setting up your build environment):
10 10
11 make diverge3:default 11 make diverge3:default
12 12
13Or for the [Workman](https://github.com/ojbucao/workman) layout:
14
15 make diverge3:workman
16
13See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. 17See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information.
14 18
15# Reflashing Animus 19# Reflashing Animus
16Reflashing the stock firmware is pretty easy. Just follow the same steps in the [original guide](https://imgur.com/a/8UapN). You will have to manually reset the Pro Micro (by shorting the GND and RST) during the upload step. Then reapply your keymap through Arbites. \ No newline at end of file 20Reflashing the stock firmware is pretty easy. Just follow the same steps in the [original guide](https://imgur.com/a/8UapN). You will have to manually reset the Pro Micro (by shorting the GND and RST pins) during the upload step. Then reapply your keymap through Arbites. \ No newline at end of file