aboutsummaryrefslogtreecommitdiff
path: root/layouts
diff options
context:
space:
mode:
authorJack Humbert <jack.humb@gmail.com>2020-10-18 16:51:15 -0400
committerGitHub <noreply@github.com>2020-10-18 13:51:15 -0700
commit7622678bd0cf5710df81a2f5d58096c8869ed86d (patch)
treea47579df751935546b5284de1c178221a8581c21 /layouts
parent0728a6b7530c956494f4c026da917d4705724173 (diff)
downloadqmk_firmware-7622678bd0cf5710df81a2f5d58096c8869ed86d.tar.gz
qmk_firmware-7622678bd0cf5710df81a2f5d58096c8869ed86d.zip
[Keymap] Adds Jack's 4x12 grid keymap (#10586)
* add jack's planck keymap * move to community layouts * add image to readme * fix imgae * fix image for real * Update layouts/community/ortho_4x12/jackhumbert/config.h Co-authored-by: Drashna Jaelre <drashna@live.com> Co-authored-by: Drashna Jaelre <drashna@live.com>
Diffstat (limited to 'layouts')
-rw-r--r--layouts/community/ortho_4x12/jackhumbert/config.h54
-rw-r--r--layouts/community/ortho_4x12/jackhumbert/keymap.c157
-rw-r--r--layouts/community/ortho_4x12/jackhumbert/readme.md9
3 files changed, 220 insertions, 0 deletions
diff --git a/layouts/community/ortho_4x12/jackhumbert/config.h b/layouts/community/ortho_4x12/jackhumbert/config.h
new file mode 100644
index 000000000..ea554c053
--- /dev/null
+++ b/layouts/community/ortho_4x12/jackhumbert/config.h
@@ -0,0 +1,54 @@
1 /* Copyright 2015-2020 Jack Humbert
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
17 #pragma once
18
19#ifdef AUDIO_ENABLE
20 #define STARTUP_SONG SONG(PLANCK_SOUND)
21 // #define STARTUP_SONG SONG(NO_SOUND)
22
23 #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \
24 SONG(COLEMAK_SOUND), \
25 SONG(DVORAK_SOUND) \
26 }
27#endif
28
29/*
30 * MIDI options
31 */
32
33/* Prevent use of disabled MIDI features in the keymap */
34//#define MIDI_ENABLE_STRICT 1
35
36/* enable basic MIDI features:
37 - MIDI notes can be sent when in Music mode is on
38*/
39
40#define MIDI_BASIC
41
42/* enable advanced MIDI features:
43 - MIDI notes can be added to the keymap
44 - Octave shift and transpose
45 - Virtual sustain, portamento, and modulation wheel
46 - etc.
47*/
48//#define MIDI_ADVANCED
49
50/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
51//#define MIDI_TONE_KEYCODE_OCTAVES 2
52
53// Most tactile encoders have detents every 4 stages
54#define ENCODER_RESOLUTION 4
diff --git a/layouts/community/ortho_4x12/jackhumbert/keymap.c b/layouts/community/ortho_4x12/jackhumbert/keymap.c
new file mode 100644
index 000000000..8f07e375a
--- /dev/null
+++ b/layouts/community/ortho_4x12/jackhumbert/keymap.c
@@ -0,0 +1,157 @@
1/* Copyright 2015-2020 Jack Humbert
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
17#include QMK_KEYBOARD_H
18
19
20enum planck_layers {
21 _COLEMAK,
22 _SHIFT_COLEMAK,
23 _LOWER,
24 _RAISE,
25 _ADJUST
26};
27
28#define S_SFT MO(_SHIFT_COLEMAK)
29#define LOWER MO(_LOWER)
30#define RAISE MO(_RAISE)
31
32const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
33
34
35/* Colemak
36 * ,-----------------------------------------------------------------------------------.
37 * | Tab | q | w | f | p | g | j | l | u | y | ; | Bksp |
38 * |------+------+------+------+------+------+------+------+------+------+------+------|
39 * | - | a | r | s | t | d | h | n | e | i | o | ' |
40 * |------+------+------+------+------+------+------+------+------+------+------+------|
41 * | Esc | z | x | c | v | b | k | m | , | . | / |Enter |
42 * |------+------+------+------+------+------+------+------+------+------+------+------|
43 * | Shft | Ctrl | Alt | GUI |Lower | Shft | Spc |Raise | Left | Down | Up |Right |
44 * `-----------------------------------------------------------------------------------'
45 */
46[_COLEMAK] = LAYOUT_planck_grid(
47 KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC,
48 KC_MINS, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT,
49 KC_ESC, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT ,
50 KC_LSFT, KC_LGUI, KC_LALT, KC_LCTL, LOWER, S_SFT, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
51),
52
53/* Colemak, Shifted
54 * ,-----------------------------------------------------------------------------------.
55 * | Tab | Q | W | F | P | G | J | L | U | Y | ; | |
56 * |------+------+------+------+------+------+------+------+------+------+------+------|
57 * | _ | A | R | S | T | D | H | N | E | I | O | ` |
58 * |------+------+------+------+------+------+------+------+------+------+------+------|
59 * | Esc | Z | X | C | V | B | K | M | ! | @ | ? | |
60 * |------+------+------+------+------+------+------+------+------+------+------+------|
61 * | | | | | | | | | | | | |
62 * `-----------------------------------------------------------------------------------'
63 */
64[_SHIFT_COLEMAK] = LAYOUT_planck_grid(
65 S(KC_TAB), S(KC_Q), S(KC_W), S(KC_F), S(KC_P), S(KC_G), S(KC_J), S(KC_L), S(KC_U), S(KC_Y), KC_COLN, _______,
66 S(KC_MINS), S(KC_A), S(KC_R), S(KC_S), S(KC_T), S(KC_D), S(KC_H), S(KC_N), S(KC_E), S(KC_I), S(KC_O), KC_GRV,
67 S(KC_ESC), S(KC_Z), S(KC_X), S(KC_C), S(KC_V), S(KC_B), S(KC_K), S(KC_M), KC_EXLM, KC_AT, KC_QUES, _______ ,
68 _______, _______, _______, _______, _______, _______, _______, _______, S(KC_LEFT), S(KC_DOWN), S(KC_UP), S(KC_RGHT)
69),
70
71
72/* Lower
73 * ,-----------------------------------------------------------------------------------.
74 * | | | 7 | 8 | 9 | | Del | F9 | F10 | F11 | F12 | |
75 * |------+------+------+------+------+------+------+------+------+------+------+------|
76 * | Del | | 4 | 5 | 6 | | | F5 | F6 | F7 | F8 | |
77 * |------+------+------+------+------+------+------+------+------+------+------+------|
78 * | | 0 | 1 | 2 | 3 | | | F1 | F2 | F3 | F4 | |
79 * |------+------+------+------+------+------+------+------+------+------+------+------|
80 * | | | | | | | | | Home | Pgup | Pgdn | End |
81 * `-----------------------------------------------------------------------------------'
82 */
83[_LOWER] = LAYOUT_planck_grid(
84 _______, XXXXXXX, KC_7, KC_8, KC_9, XXXXXXX, KC_DEL, KC_F9, KC_F10, KC_F11, KC_F12, _______,
85 KC_DEL, XXXXXXX, KC_4, KC_5, KC_6, XXXXXXX, XXXXXXX, KC_F5, KC_F6, KC_F7, KC_F8, _______,
86 _______, KC_0, KC_1, KC_2, KC_3, XXXXXXX, XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, _______,
87 _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_PGDN, KC_END
88),
89
90/* Raise
91 * ,-----------------------------------------------------------------------------------.
92 * | | | < | $ | > | | | [ | _ | ] | | |
93 * |------+------+------+------+------+------+------+------+------+------+------+------|
94 * | | \ | ( | " | ) | # | % | { | = | } | ] | |
95 * |------+------+------+------+------+------+------+------+------+------+------+------|
96 * | | | : | * | + | | | & | ^ | ~ | | |
97 * |------+------+------+------+------+------+------+------+------+------+------+------|
98 * | | | | | | | | | Next | Vol- | Vol+ | Play |
99 * `-----------------------------------------------------------------------------------'
100 */
101[_RAISE] = LAYOUT_planck_grid(
102 _______, XXXXXXX, KC_LT, KC_DLR, KC_GT, XXXXXXX, XXXXXXX, KC_LBRC, KC_UNDS, KC_RBRC, XXXXXXX, _______,
103 _______, KC_BSLS, KC_LPRN, KC_DQUO, KC_RPRN, KC_HASH, KC_PERC, KC_LCBR, KC_EQL, KC_RCBR, KC_PIPE, _______,
104 _______, XXXXXXX, KC_COLN, KC_ASTR, KC_PLUS, XXXXXXX, XXXXXXX, KC_AMPR, KC_CIRC, KC_TILD, XXXXXXX, _______,
105 _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
106),
107
108/* Adjust (Lower + Raise)
109 * v------------------------RGB CONTROL--------------------v
110 * ,-----------------------------------------------------------------------------------.
111 * | | Reset|Debug | RGB |RGBMOD| HUE+ | HUE- | SAT+ | SAT- |BRGTH+|BRGTH-| |
112 * |------+------+------+------+------+------+------+------+------+------+------+------|
113 * | | |MUSmod|Aud on|Audoff|AGnorm|AGswap| | | | | |
114 * |------+------+------+------+------+------+------+------+------+------+------+------|
115 * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof|TermOn|TermOf| | | |
116 * |------+------+------+------+------+------+------+------+------+------+------+------|
117 * | | | | | | | | | | | | |
118 * `-----------------------------------------------------------------------------------'
119 */
120[_ADJUST] = LAYOUT_planck_grid(
121 _______, RESET, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______,
122 _______, XXXXXXX, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______,
123 _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TERM_ON, TERM_OFF, XXXXXXX, XXXXXXX, _______,
124 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
125)
126
127};
128
129layer_state_t layer_state_set_user(layer_state_t state) {
130 return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
131};
132
133void encoder_update(bool clockwise) {
134 if (clockwise) {
135 #ifdef MOUSEKEY_ENABLE
136 tap_code(KC_MS_WH_DOWN);
137 #else
138 tap_code(KC_PGDN);
139 #endif
140 } else {
141 #ifdef MOUSEKEY_ENABLE
142 tap_code(KC_MS_WH_UP);
143 #else
144 tap_code(KC_PGUP);
145 #endif
146 }
147}
148
149bool music_mask_user(uint16_t keycode) {
150 switch (keycode) {
151 case RAISE:
152 case LOWER:
153 return false;
154 default:
155 return true;
156 }
157}
diff --git a/layouts/community/ortho_4x12/jackhumbert/readme.md b/layouts/community/ortho_4x12/jackhumbert/readme.md
new file mode 100644
index 000000000..a3b05e64a
--- /dev/null
+++ b/layouts/community/ortho_4x12/jackhumbert/readme.md
@@ -0,0 +1,9 @@
1![Jack's Planck Keymap](https://i.imgur.com/763RLNC.png)
2
3# Jack's Planck Keymap
4
5[Link to KLE of above image](http://www.keyboard-layout-editor.com/#/gists/8d5e8d5ee3884333bc5c4a231035f145)
6
7Mostly standard Colemak, but the shift and symbol layers are influenced from BEAKL: https://ieants.cc/code/keyboard/beakl/
8
9Unfortunately I haven't figured out a good way to adapt this to a 2u format yet. \ No newline at end of file