summaryrefslogtreecommitdiff
path: root/keyboards/preonic
diff options
context:
space:
mode:
authorQMK Bot <hello@qmk.fm>2022-12-27 20:15:16 +0000
committerQMK Bot <hello@qmk.fm>2022-12-27 20:15:16 +0000
commit3b80638ac32b348f994f91dcf024fdfc883f2b3a (patch)
tree2aaa86877278f4667361b9b96668332066241238 /keyboards/preonic
parent7f2ac4c5765f899d53aef6456a99be910ce3f3b5 (diff)
parent202a708ba7d35cc77fab6c49294f44bea528760e (diff)
Merge remote-tracking branch 'origin/master' into develop
Diffstat (limited to 'keyboards/preonic')
-rw-r--r--keyboards/preonic/keymaps/snowskeleton/config.h30
-rw-r--r--keyboards/preonic/keymaps/snowskeleton/keymap.c178
-rw-r--r--keyboards/preonic/keymaps/snowskeleton/readme.md20
-rw-r--r--keyboards/preonic/keymaps/snowskeleton/rules.mk3
4 files changed, 231 insertions, 0 deletions
diff --git a/keyboards/preonic/keymaps/snowskeleton/config.h b/keyboards/preonic/keymaps/snowskeleton/config.h
new file mode 100644
index 0000000000..7ad61e44c8
--- /dev/null
+++ b/keyboards/preonic/keymaps/snowskeleton/config.h
@@ -0,0 +1,30 @@
1/* Copyright 2015-2021 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(PREONIC_SOUND)
21// #define STARTUP_SONG SONG(NO_SOUND) // uncomment to silence startup sounds
22
23#endif
24#define MUSIC_MASK (keycode != KC_NO)
25#define MIDI_BASIC
26
27
28#define ENCODERS_PAD_A { B12 }
29#define ENCODERS_PAD_B { B13 }
30#define ENCODER_RESOLUTION 4
diff --git a/keyboards/preonic/keymaps/snowskeleton/keymap.c b/keyboards/preonic/keymaps/snowskeleton/keymap.c
new file mode 100644
index 0000000000..030adf8cbb
--- /dev/null
+++ b/keyboards/preonic/keymaps/snowskeleton/keymap.c
@@ -0,0 +1,178 @@
1/* Copyright 2015-2021 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#include "muse.h"
19
20enum preonic_layers {
21 _QWERTY_MACOS,
22 _LOWER,
23 _RAISE,
24 _ADJUST
25};
26
27enum preonic_keycodes {
28 QWERTY_MACOS = SAFE_RANGE,
29 LOWER,
30 RAISE,
31 BACKLIT
32};
33
34const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
35
36/* Qwerty Mac
37 * ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┐
38 * │ Esc │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ Bksp │
39 * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
40 * │ ` │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ \ │
41 * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
42 * │ Tab │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │
43 * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
44 * │ Shft │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shft │
45 * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
46 * │ Play │ Ctrl │ Alt │ Gui │Lower │ Space │Raise │ Left │ Down │ Up │ Right│
47 * └──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┘
48 */
49[_QWERTY_MACOS] = LAYOUT_preonic_grid(
50 KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_BSPC,
51 KC_GRV, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
52 KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
53 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
54 KC_MPLY, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
55),
56
57
58/* RAISE
59 * ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┐
60 * │ │ F11 │ F12 │ F13 │ F14 │ F15 │ F16 │ F17 │ F18 │ F19 │ F20 │ │
61 * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
62 * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ Del │
63 * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
64 * │ Del │ │ │ │ │ │ Left │ Down │ Up │ Right│ │ \ │
65 * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
66 * │ Shft │ │ │ │ │ │ │ │ │ │ │Enter │
67 * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
68 * │ │ │ │ │ │ │ │ │ │ │ │ │
69 * └──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┘
70 */
71[_RAISE] = LAYOUT_preonic_grid(
72 _______, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, _______,
73 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DELETE,
74 KC_DEL, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, KC_BSLS,
75 KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_ENTER,
76 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
77),
78
79
80/* LOWER
81 * ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┐
82 * │ │ │ │ │ │ │ │ │ │ │ │ │
83 * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
84 * │ ~ │ ! │ @ │ # │ $ │ % │ ^ │ & │ * │ ( │ ) │ Del │
85 * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
86 * │ Del │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ - │ │ [ │ ] │ \ │
87 * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
88 * │Enter │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │ + │ = │ { │ } │ Shft │
89 * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
90 * │ │ │ │ │ │ │ │ │ │ │ │ │
91 * └──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┘
92 */
93[_LOWER] = LAYOUT_preonic_grid(
94 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
95 KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DELETE,
96 KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_UNDS, KC_LBRC, KC_RBRC, KC_BSLS,
97 KC_ENTER, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PLUS, KC_EQL, KC_LCBR, KC_RCBR, KC_RSFT,
98 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
99),
100
101/* ADJUST
102 * ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┐
103 * │ │ │ │ │ │ │ │ │ │ │ │ │
104 * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
105 * │ │BOOT │DBTOGG│AUTOGG│ │ │ │ │ Ins │ │ │ Del │
106 * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
107 * │ Caps │ │ │ │ │AGTOGG│ │ │ │ │ │ │
108 * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
109 * │ │ │ Del │ │ │ │ │ │ │ │ │ │
110 * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
111 * │ │ │ │ │ │ │ │ │ │ │ │ │
112 * └──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┘
113 */
114[_ADJUST] = LAYOUT_preonic_grid(
115 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
116 _______, QK_BOOT, DB_TOGG, AU_TOGG, _______, _______, _______, _______, KC_INS, _______, _______, KC_DELETE,
117 KC_CAPS, _______, _______, _______, _______, AG_TOGG, _______, _______, _______, _______, _______, _______,
118 _______, _______, KC_DEL, _______, _______, _______, _______, _______, _______, _______, _______, _______,
119 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
120)
121
122
123};
124
125bool process_record_user(uint16_t keycode, keyrecord_t *record) {
126 switch (keycode) {
127 case LOWER:
128 if (record->event.pressed) {
129 layer_on(_LOWER);
130 update_tri_layer(_LOWER, _RAISE, _ADJUST);
131 } else {
132 layer_off(_LOWER);
133 update_tri_layer(_LOWER, _RAISE, _ADJUST);
134 }
135 return false;
136 break;
137 case RAISE:
138 if (record->event.pressed) {
139 layer_on(_RAISE);
140 update_tri_layer(_LOWER, _RAISE, _ADJUST);
141 } else {
142 layer_off(_RAISE);
143 update_tri_layer(_LOWER, _RAISE, _ADJUST);
144 }
145 return false;
146 break;
147 case BACKLIT:
148 if (record->event.pressed) {
149 register_code(KC_RSFT);
150 #ifdef BACKLIGHT_ENABLE
151 backlight_step();
152 #endif
153 #ifdef RGBLIGHT_ENABLE
154 rgblight_step();
155 #endif
156 #ifdef __AVR__
157 writePinLow(E6);
158 #endif
159 } else {
160 unregister_code(KC_RSFT);
161 #ifdef __AVR__
162 writePinHigh(E6);
163 #endif
164 }
165 return false;
166 break;
167 }
168 return true;
169};
170
171#if defined(ENCODER_MAP_ENABLE)
172const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
173 [_QWERTY_MACOS] = { ENCODER_CCW_CW(KC_VOLU, KC_VOLD) },
174 [_LOWER] = { ENCODER_CCW_CW(_______, _______) },
175 [_RAISE] = { ENCODER_CCW_CW(KC_BRMU, KC_BRMD) },
176 [_ADJUST] = { ENCODER_CCW_CW(_______, _______) },
177};
178#endif
diff --git a/keyboards/preonic/keymaps/snowskeleton/readme.md b/keyboards/preonic/keymaps/snowskeleton/readme.md
new file mode 100644
index 0000000000..76a1dda003
--- /dev/null
+++ b/keyboards/preonic/keymaps/snowskeleton/readme.md
@@ -0,0 +1,20 @@
1# Snowskeleton Preonic Layout (with Rotery Encoder)
2This layout aims to optimize several corner cases where the default layout falls short.
3This is a opinionated layout, designed for efficient coding in English.
4As such, several internationalizations have been removed,
5and you may wish to add them back in when adjusting to your language.
6
7Special notes:
8
9the Enter key is only accessable through alternate layers,
10but there it is available on both sides of the board (depending on the layer).
11
12Numbers and their coorisponding symbols (1 and !, 2 and @, etc) can be typed several ways.
13Each is available on its own layer,
14while still following Shift key convention.
15
16Vim-like arrow keys on Raise layer.
17
18Instead of having a separate layout for Windows,
19I only support swapping the Gui and Alt keys.
20This provides 99% of the functionality without requiring the maintainence of two separate layouts.
diff --git a/keyboards/preonic/keymaps/snowskeleton/rules.mk b/keyboards/preonic/keymaps/snowskeleton/rules.mk
new file mode 100644
index 0000000000..da6657c8bd
--- /dev/null
+++ b/keyboards/preonic/keymaps/snowskeleton/rules.mk
@@ -0,0 +1,3 @@
1SRC += muse.c
2ENCODER_ENABLE = yes
3ENCODER_MAP_ENABLE = yes