aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrederick Hirsch <fsck@legit.solutions>2019-02-14 02:51:16 +0100
committerDrashna Jaelre <drashna@live.com>2019-02-13 17:51:16 -0800
commit31b75c75fd0408c7ef15d15892a369f8a271e551 (patch)
tree0899a47ccb250125b5861f1f1e4e030422700237
parent8cd6cfcb77b5e90c1ad77486171049c436183175 (diff)
downloadqmk_firmware-31b75c75fd0408c7ef15d15892a369f8a271e551.tar.gz
qmk_firmware-31b75c75fd0408c7ef15d15892a369f8a271e551.zip
[Keymap] Add fsck keymaps for eco, planck and preonic (#5106)
* Add the fsck keymaps for eco, planck and preonic * Review changes for fsck layout
-rw-r--r--keyboards/eco/keymaps/fsck/config.h19
-rw-r--r--keyboards/eco/keymaps/fsck/keymap.c76
-rw-r--r--keyboards/eco/keymaps/fsck/readme.md5
-rw-r--r--keyboards/eco/keymaps/fsck/rules.mk19
-rw-r--r--keyboards/planck/keymaps/fsck/config.h28
-rw-r--r--keyboards/planck/keymaps/fsck/keymap.c154
-rw-r--r--keyboards/planck/keymaps/fsck/readme.md5
-rw-r--r--keyboards/planck/keymaps/fsck/rules.mk3
-rw-r--r--keyboards/preonic/keymaps/fsck/config.h26
-rw-r--r--keyboards/preonic/keymaps/fsck/keymap.c249
-rw-r--r--keyboards/preonic/keymaps/fsck/readme.md5
-rw-r--r--keyboards/preonic/keymaps/fsck/rules.mk1
12 files changed, 590 insertions, 0 deletions
diff --git a/keyboards/eco/keymaps/fsck/config.h b/keyboards/eco/keymaps/fsck/config.h
new file mode 100644
index 000000000..b0a7901b2
--- /dev/null
+++ b/keyboards/eco/keymaps/fsck/config.h
@@ -0,0 +1,19 @@
1/* Copyright 2019 Frederick Hirsch
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#define USB_MAX_POWER_CONSUMPTION 100
diff --git a/keyboards/eco/keymaps/fsck/keymap.c b/keyboards/eco/keymaps/fsck/keymap.c
new file mode 100644
index 000000000..8d7cb89c1
--- /dev/null
+++ b/keyboards/eco/keymaps/fsck/keymap.c
@@ -0,0 +1,76 @@
1/* Copyright 2019 Frederick Hirsch
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
18extern keymap_config_t keymap_config;
19
20#define _QWERTY 0
21#define _RAISE 3
22
23enum eco_keycodes {
24 QWERTY = SAFE_RANGE,
25 RAISE
26};
27
28#define JC_Z CTL_T(KC_Z)
29#define JC_X ALT_T(KC_X)
30#define JC_C GUI_T(KC_C)
31#define JC_COMM GUI_T(KC_COMM)
32#define JC_DOT ALT_T(KC_DOT)
33#define JC_SLSH CTL_T(KC_SLSH)
34
35#define JC_CAPS LT(_RAISE,KC_CAPS)
36
37const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
38
39/* Qwerty
40 * ,-------------------------------------------------------------------------------------------------.
41 * | Tab | 1 | 2 | 3 | 4 | 5 | - | = | 6 | 7 | 8 | 9 | 10 | Bksp |
42 * |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
43 * | ESC | Q | W | E | R | T | Home | PgUp | Y | U | I | O | P | ' |
44 * |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
45 * | Raise| A | S | D | F | G | End | PgDn | H | J | K | L | ; | Enter|
46 * |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
47 * | Shift| Z | X | C | V | B | Space | N | M | , | . | / | Shift|
48 * | | Ctrl | Alt | GUI | | | | GUI | Alt | Ctrl | |
49 * `-------------------------------------------------------------------------------------------------'
50 */
51[_QWERTY] = LAYOUT(
52 KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
53 KC_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_HOME, KC_PGUP, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_QUOT,
54 JC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_END, KC_PGDN, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT,
55 KC_LSFT, JC_Z, JC_X, JC_C, KC_V, KC_B, KC_SPC, KC_SPC, KC_N, KC_M, JC_COMM, JC_DOT, JC_SLSH, KC_RSFT
56),
57
58
59/* Raise
60 * ,-------------------------------------------------------------------------------------------------.
61 * | ` | F1 | F2 | F3 | F4 | F5 | | | F6 | F7 | F8 | F9 | F0 | Del |
62 * |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
63 * | Del | | Up | | | | |PrntSc| | | | [ | ] | \ |
64 * |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
65 * | | Left | Down | Right| | |ScrLck|Pause | | | | | | |
66 * |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
67 * | | | | | | | | | | | |Insert|
68 * `-------------------------------------------------------------------------------------------------'
69 */
70[_RAISE] = LAYOUT(
71 KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL,
72 _______, _______, KC_UP, _______, _______, _______, _______, KC_PSCR, _______, _______, _______, KC_LBRC, KC_RBRC, KC_BSLS,
73 _______, KC_LEFT, KC_DOWN, KC_RIGHT,_______, _______, KC_SLCK, KC_PAUS, _______, _______, _______, _______, _______, _______,
74 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS
75)
76}; \ No newline at end of file
diff --git a/keyboards/eco/keymaps/fsck/readme.md b/keyboards/eco/keymaps/fsck/readme.md
new file mode 100644
index 000000000..1f3678daf
--- /dev/null
+++ b/keyboards/eco/keymaps/fsck/readme.md
@@ -0,0 +1,5 @@
1![eco:fsck Layout Image](https://i.imgur.com/Sb8n8B0.png)
2
3# ECO Layout by fsck
4
5This is the fsck layout for the eco keyboard. The bottom row of the default layer are dual function tap/hold keys. \ No newline at end of file
diff --git a/keyboards/eco/keymaps/fsck/rules.mk b/keyboards/eco/keymaps/fsck/rules.mk
new file mode 100644
index 000000000..8fb2adf38
--- /dev/null
+++ b/keyboards/eco/keymaps/fsck/rules.mk
@@ -0,0 +1,19 @@
1# Build Options
2# change to "no" to disable the options, or define them in the Makefile in
3# the appropriate keymap folder that will get included automatically
4#
5BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
6MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
7EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
8CONSOLE_ENABLE = no # Console for debug(+400)
9COMMAND_ENABLE = no # Commands for debug and configuration
10NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
11BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
12MIDI_ENABLE = no # MIDI controls
13AUDIO_ENABLE = no # Audio output on port C6
14UNICODE_ENABLE = no # Unicode
15BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
16RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
17
18# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
19SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
diff --git a/keyboards/planck/keymaps/fsck/config.h b/keyboards/planck/keymaps/fsck/config.h
new file mode 100644
index 000000000..bf25da3a6
--- /dev/null
+++ b/keyboards/planck/keymaps/fsck/config.h
@@ -0,0 +1,28 @@
1#pragma once
2
3#define USB_MAX_POWER_CONSUMPTION 100
4
5#ifdef AUDIO_ENABLE
6 #define STARTUP_SONG SONG(PLANCK_SOUND)
7 // #define STARTUP_SONG SONG(NO_SOUND)
8
9 #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \
10 SONG(COLEMAK_SOUND), \
11 SONG(DVORAK_SOUND) \
12 }
13#endif
14
15#define MUSIC_MASK (keycode != KC_NO)
16
17/*
18 * MIDI options
19 */
20
21/* Prevent use of disabled MIDI features in the keymap */
22//#define MIDI_ENABLE_STRICT 1
23
24/* enable basic MIDI features:
25 - MIDI notes can be sent when in Music mode is on
26*/
27
28#define MIDI_BASIC
diff --git a/keyboards/planck/keymaps/fsck/keymap.c b/keyboards/planck/keymaps/fsck/keymap.c
new file mode 100644
index 000000000..cac5d554e
--- /dev/null
+++ b/keyboards/planck/keymaps/fsck/keymap.c
@@ -0,0 +1,154 @@
1/* Copyright 2015-2017 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#include QMK_KEYBOARD_H
17
18extern keymap_config_t keymap_config;
19
20enum planck_layers {
21 _QWERTY,
22 _LOWER,
23 _RAISE,
24 _ADJUST
25};
26
27enum planck_keycodes {
28 QWERTY = SAFE_RANGE,
29 LOWER,
30 RAISE,
31 BACKLIT,
32 EXT_PLV
33};
34
35const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
36
37/* Qwerty
38 * ,-----------------------------------------------------------------------------------.
39 * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
40 * |------+------+------+------+------+-------------+------+------+------+------+------|
41 * | Esc | A | S | D | F | G | H | J | K | L | ; | " |
42 * |------+------+------+------+------+------|------+------+------+------+------+------|
43 * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
44 * |------+------+------+------+------+------+------+------+------+------+------+------|
45 * | Ctrl |Brite | GUI | Alt |Lower | Space |Raise | Left | Down | Up |Right |
46 * `-----------------------------------------------------------------------------------'
47 */
48[_QWERTY] = LAYOUT_planck_grid(
49 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
50 KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
51 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
52 KC_LCTL, BACKLIT, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
53),
54
55/* Lower
56 * ,-----------------------------------------------------------------------------------.
57 * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del |
58 * |------+------+------+------+------+-------------+------+------+------+------+------|
59 * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | |
60 * |------+------+------+------+------+------|------+------+------+------+------+------|
61 * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Vol- | Vol+ | |
62 * |------+------+------+------+------+------+------+------+------+------+------+------|
63 * | | | | ALTGr| | | | Home |Pg Dn |Pg Up | End |
64 * `-----------------------------------------------------------------------------------'
65 */
66[_LOWER] = LAYOUT_planck_grid(
67 KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL,
68 KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
69 _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_VOLD, KC_VOLU, _______,
70 _______, _______, _______, KC_RALT, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END
71),
72
73/* Raise
74 * ,-----------------------------------------------------------------------------------.
75 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
76 * |------+------+------+------+------+-------------+------+------+------+------+------|
77 * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
78 * |------+------+------+------+------+------|------+------+------+------+------+------|
79 * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | Vol- | Vol+ | |
80 * |------+------+------+------+------+------+------+------+------+------+------+------|
81 * | | | | ALTGr| | | | Home |Pg Dn |Pg Up | End |
82 * `-----------------------------------------------------------------------------------'
83 */
84[_RAISE] = LAYOUT_planck_grid(
85 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
86 KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
87 _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_VOLD, KC_VOLU, _______,
88 _______, _______, _______, KC_RALT, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END
89),
90
91/* Adjust (Lower + Raise)
92 * ,-----------------------------------------------------------------------------------.
93 * | | Reset| | | | | | | | | | Del |
94 * |------+------+------+------+------+-------------+------+------+------+------+------|
95 * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty| | | | |
96 * |------+------+------+------+------+------|------+------+------+------+------+------|
97 * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | |
98 * |------+------+------+------+------+------+------+------+------+------+------+------|
99 * | | | | | | | | | | | |
100 * `-----------------------------------------------------------------------------------'
101 */
102[_ADJUST] = LAYOUT_planck_grid(
103 _______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL,
104 _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, _______, _______, _______,
105 _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______,
106 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
107)
108
109};
110
111#ifdef AUDIO_ENABLE
112 float plover_song[][2] = SONG(PLOVER_SOUND);
113 float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND);
114#endif
115
116bool process_record_user(uint16_t keycode, keyrecord_t *record) {
117 switch (keycode) {
118 case QWERTY:
119 if (record->event.pressed) {
120 print("mode just switched to qwerty and this is a huge string\n");
121 set_single_persistent_default_layer(_QWERTY);
122 }
123 return false;
124 case LOWER:
125 if (record->event.pressed) {
126 layer_on(_LOWER);
127 update_tri_layer(_LOWER, _RAISE, _ADJUST);
128 } else {
129 layer_off(_LOWER);
130 update_tri_layer(_LOWER, _RAISE, _ADJUST);
131 }
132 return false;
133 case RAISE:
134 if (record->event.pressed) {
135 layer_on(_RAISE);
136 update_tri_layer(_LOWER, _RAISE, _ADJUST);
137 } else {
138 layer_off(_RAISE);
139 update_tri_layer(_LOWER, _RAISE, _ADJUST);
140 }
141 return false;
142 case BACKLIT:
143 if (record->event.pressed) {
144 register_code(KC_RSFT);
145 #ifdef BACKLIGHT_ENABLE
146 backlight_step();
147 #endif
148 } else {
149 unregister_code(KC_RSFT);
150 }
151 return false;
152 }
153 return true;
154}
diff --git a/keyboards/planck/keymaps/fsck/readme.md b/keyboards/planck/keymaps/fsck/readme.md
new file mode 100644
index 000000000..755da3e21
--- /dev/null
+++ b/keyboards/planck/keymaps/fsck/readme.md
@@ -0,0 +1,5 @@
1![preonic:fsck Layout Image](https://i.imgur.com/GOLyPGP.png)
2
3# fsck's Planck Layout
4
5This is largely based on the default planck layout. \ No newline at end of file
diff --git a/keyboards/planck/keymaps/fsck/rules.mk b/keyboards/planck/keymaps/fsck/rules.mk
new file mode 100644
index 000000000..bd0181d62
--- /dev/null
+++ b/keyboards/planck/keymaps/fsck/rules.mk
@@ -0,0 +1,3 @@
1#pragma once
2NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
3BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality \ No newline at end of file
diff --git a/keyboards/preonic/keymaps/fsck/config.h b/keyboards/preonic/keymaps/fsck/config.h
new file mode 100644
index 000000000..b06980c5b
--- /dev/null
+++ b/keyboards/preonic/keymaps/fsck/config.h
@@ -0,0 +1,26 @@
1#pragma once
2
3#ifdef AUDIO_ENABLE
4 #define STARTUP_SONG SONG(PREONIC_SOUND)
5 // #define STARTUP_SONG SONG(NO_SOUND)
6
7 #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \
8 SONG(COLEMAK_SOUND), \
9 SONG(DVORAK_SOUND) \
10 }
11#endif
12
13#define MUSIC_MASK (keycode != KC_NO)
14
15/*
16 * MIDI options
17 */
18
19/* Prevent use of disabled MIDI features in the keymap */
20//#define MIDI_ENABLE_STRICT 1
21
22/* enable basic MIDI features:
23 - MIDI notes can be sent when in Music mode is on
24*/
25
26#define MIDI_BASIC
diff --git a/keyboards/preonic/keymaps/fsck/keymap.c b/keyboards/preonic/keymaps/fsck/keymap.c
new file mode 100644
index 000000000..97a0ed608
--- /dev/null
+++ b/keyboards/preonic/keymaps/fsck/keymap.c
@@ -0,0 +1,249 @@
1/* Copyright 2015-2017 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,
22 _LOWER,
23 _RAISE,
24 _ADJUST
25};
26
27enum preonic_keycodes {
28 QWERTY = SAFE_RANGE,
29 LOWER,
30 RAISE,
31 BACKLIT
32};
33
34const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
35
36/* Qwerty
37 * ,-----------------------------------------------------------------------------------.
38 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
39 * |------+------+------+------+------+------+------+------+------+------+------+------|
40 * | Tab | Q | W | E | R | T | Y | U | I | O | P | Del |
41 * |------+------+------+------+------+-------------+------+------+------+------+------|
42 * | Esc | A | S | D | F | G | H | J | K | L | ; | " |
43 * |------+------+------+------+------+------|------+------+------+------+------+------|
44 * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
45 * |------+------+------+------+------+------+------+------+------+------+------+------|
46 * | Ctrl |Brite | GUI | Alt |Lower | Space |Raise | Left | Down | Up |Right |
47 * `-----------------------------------------------------------------------------------'
48 */
49[_QWERTY] = LAYOUT_preonic_grid( \
50 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
51 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, \
52 KC_ESC, 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_ENT, \
54 KC_LCTL, BACKLIT, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
55),
56
57/* Lower
58 * ,-----------------------------------------------------------------------------------.
59 * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
60 * |------+------+------+------+------+-------------+------+------+------+------+------|
61 * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del |
62 * |------+------+------+------+------+-------------+------+------+------+------+------|
63 * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | |
64 * |------+------+------+------+------+------|------+------+------+------+------+------|
65 * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Vol- | Vol+ | |
66 * |------+------+------+------+------+------+------+------+------+------+------+------|
67 * | | | | ALTGr| | | | Home |Pg Dn |Pg Up | End |
68 * `-----------------------------------------------------------------------------------'
69 */
70[_LOWER] = LAYOUT_preonic_grid( \
71 KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \
72 KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \
73 KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \
74 _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),KC_VOLD,KC_VOLU,_______, \
75 _______, _______, _______, KC_RALT, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END \
76),
77
78/* Raise
79 * ,-----------------------------------------------------------------------------------.
80 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
81 * |------+------+------+------+------+------+------+------+------+------+------+------|
82 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
83 * |------+------+------+------+------+-------------+------+------+------+------+------|
84 * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
85 * |------+------+------+------+------+------|------+------+------+------+------+------|
86 * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | Vol- | Vol+ | |
87 * |------+------+------+------+------+------+------+------+------+------+------+------|
88 * | | | | ALTGr| | | | Home |Pg Dn |Pg Up | End |
89 * `-----------------------------------------------------------------------------------'
90 */
91[_RAISE] = LAYOUT_preonic_grid( \
92 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
93 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \
94 KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \
95 _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_VOLD, KC_VOLU, _______,
96 _______, _______, _______, KC_RALT, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END \
97),
98
99/* Adjust (Lower + Raise)
100 * ,-----------------------------------------------------------------------------------.
101 * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
102 * |------+------+------+------+------+------+------+------+------+------+------+------|
103 * | | Reset| | | | | | | | | | Del |
104 * |------+------+------+------+------+-------------+------+------+------+------+------|
105 * | | | |Aud on|AudOff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | |
106 * |------+------+------+------+------+------|------+------+------+------+------+------|
107 * | |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | |
108 * |------+------+------+------+------+------+------+------+------+------+------+------|
109 * | | | | | | | | | | | |
110 * `-----------------------------------------------------------------------------------'
111 */
112[_ADJUST] = LAYOUT_preonic_grid( \
113 KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \
114 _______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL, \
115 _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, _______, _______, _______, \
116 _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, \
117 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
118)
119
120
121};
122
123bool process_record_user(uint16_t keycode, keyrecord_t *record) {
124 switch (keycode) {
125 case QWERTY:
126 if (record->event.pressed) {
127 set_single_persistent_default_layer(_QWERTY);
128 }
129 return false;
130 break;
131 case LOWER:
132 if (record->event.pressed) {
133 layer_on(_LOWER);
134 update_tri_layer(_LOWER, _RAISE, _ADJUST);
135 } else {
136 layer_off(_LOWER);
137 update_tri_layer(_LOWER, _RAISE, _ADJUST);
138 }
139 return false;
140 break;
141 case RAISE:
142 if (record->event.pressed) {
143 layer_on(_RAISE);
144 update_tri_layer(_LOWER, _RAISE, _ADJUST);
145 } else {
146 layer_off(_RAISE);
147 update_tri_layer(_LOWER, _RAISE, _ADJUST);
148 }
149 return false;
150 break;
151 case BACKLIT:
152 if (record->event.pressed) {
153 register_code(KC_RSFT);
154 #ifdef BACKLIGHT_ENABLE
155 backlight_step();
156 #endif
157 #ifdef __AVR__
158 PORTE &= ~(1<<6);
159 #endif
160 } else {
161 unregister_code(KC_RSFT);
162 #ifdef __AVR__
163 PORTE |= (1<<6);
164 #endif
165 }
166 return false;
167 break;
168 }
169 return true;
170};
171
172bool muse_mode = false;
173uint8_t last_muse_note = 0;
174uint16_t muse_counter = 0;
175uint8_t muse_offset = 70;
176uint16_t muse_tempo = 50;
177
178void encoder_update_user(uint8_t index, bool clockwise) {
179 if (muse_mode) {
180 if (IS_LAYER_ON(_RAISE)) {
181 if (clockwise) {
182 muse_offset++;
183 } else {
184 muse_offset--;
185 }
186 } else {
187 if (clockwise) {
188 muse_tempo+=1;
189 } else {
190 muse_tempo-=1;
191 }
192 }
193 } else {
194 if (clockwise) {
195 register_code(KC_PGDN);
196 unregister_code(KC_PGDN);
197 } else {
198 register_code(KC_PGUP);
199 unregister_code(KC_PGUP);
200 }
201 }
202}
203
204void dip_update(uint8_t index, bool active) {
205 switch (index) {
206 case 0:
207 if (active) {
208 layer_on(_ADJUST);
209 } else {
210 layer_off(_ADJUST);
211 }
212 break;
213 case 1:
214 if (active) {
215 muse_mode = true;
216 } else {
217 muse_mode = false;
218 #ifdef AUDIO_ENABLE
219 stop_all_notes();
220 #endif
221 }
222 }
223}
224
225void matrix_scan_user(void) {
226 #ifdef AUDIO_ENABLE
227 if (muse_mode) {
228 if (muse_counter == 0) {
229 uint8_t muse_note = muse_offset + SCALE[muse_clock_pulse()];
230 if (muse_note != last_muse_note) {
231 stop_note(compute_freq_for_midi_note(last_muse_note));
232 play_note(compute_freq_for_midi_note(muse_note), 0xF);
233 last_muse_note = muse_note;
234 }
235 }
236 muse_counter = (muse_counter + 1) % muse_tempo;
237 }
238 #endif
239}
240
241bool music_mask_user(uint16_t keycode) {
242 switch (keycode) {
243 case RAISE:
244 case LOWER:
245 return false;
246 default:
247 return true;
248 }
249}
diff --git a/keyboards/preonic/keymaps/fsck/readme.md b/keyboards/preonic/keymaps/fsck/readme.md
new file mode 100644
index 000000000..e459884eb
--- /dev/null
+++ b/keyboards/preonic/keymaps/fsck/readme.md
@@ -0,0 +1,5 @@
1![preonic:fsck Layout Image](https://i.imgur.com/nI8fBco.png)
2
3# fsck's Preonic Layout
4
5This is based on the fsck layout for the Planck keyboard and similar to the Preonic default layout. \ No newline at end of file
diff --git a/keyboards/preonic/keymaps/fsck/rules.mk b/keyboards/preonic/keymaps/fsck/rules.mk
new file mode 100644
index 000000000..dcf16bef3
--- /dev/null
+++ b/keyboards/preonic/keymaps/fsck/rules.mk
@@ -0,0 +1 @@
SRC += muse.c