summaryrefslogtreecommitdiff
path: root/keyboards/preonic
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/preonic')
-rw-r--r--keyboards/preonic/keymaps/AlexDaigre/config.h37
-rw-r--r--keyboards/preonic/keymaps/AlexDaigre/keyboard-layout-editor/adjust.json80
-rw-r--r--keyboards/preonic/keymaps/AlexDaigre/keyboard-layout-editor/lower.json80
-rw-r--r--keyboards/preonic/keymaps/AlexDaigre/keyboard-layout-editor/main.json95
-rw-r--r--keyboards/preonic/keymaps/AlexDaigre/keyboard-layout-editor/raise.json80
-rw-r--r--keyboards/preonic/keymaps/AlexDaigre/keymap.c326
-rw-r--r--keyboards/preonic/keymaps/AlexDaigre/readme.md19
-rw-r--r--keyboards/preonic/keymaps/AlexDaigre/rules.mk1
-rw-r--r--keyboards/preonic/keymaps/pvillano/config.h32
-rw-r--r--keyboards/preonic/keymaps/pvillano/keymap.c113
-rw-r--r--keyboards/preonic/keymaps/pvillano/readme.md25
-rw-r--r--keyboards/preonic/keymaps/pvillano/rules.mk1
-rw-r--r--keyboards/preonic/keymaps/that_canadian/keymap.c8
-rw-r--r--keyboards/preonic/rev1/rules.mk2
-rw-r--r--keyboards/preonic/rev2/rules.mk2
-rw-r--r--keyboards/preonic/rev3/config.h1
-rw-r--r--keyboards/preonic/rev3/rules.mk2
17 files changed, 897 insertions, 7 deletions
diff --git a/keyboards/preonic/keymaps/AlexDaigre/config.h b/keyboards/preonic/keymaps/AlexDaigre/config.h
new file mode 100644
index 0000000000..40a9524b46
--- /dev/null
+++ b/keyboards/preonic/keymaps/AlexDaigre/config.h
@@ -0,0 +1,37 @@
+#pragma once
+
+#ifdef AUDIO_ENABLE
+ #define STARTUP_SONG SONG(PREONIC_SOUND)
+ // #define STARTUP_SONG SONG(NO_SOUND)
+
+ #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \
+ SONG(COLEMAK_SOUND), \
+ SONG(DVORAK_SOUND) \
+ }
+#endif
+
+#define MUSIC_MASK (keycode != KC_NO)
+
+/*
+ * MIDI options
+ */
+
+/* Prevent use of disabled MIDI features in the keymap */
+//#define MIDI_ENABLE_STRICT 1
+
+/* enable basic MIDI features:
+ - MIDI notes can be sent when in Music mode is on
+*/
+
+#define MIDI_BASIC
+
+/* enable advanced MIDI features:
+ - MIDI notes can be added to the keymap
+ - Octave shift and transpose
+ - Virtual sustain, portamento, and modulation wheel
+ - etc.
+*/
+//#define MIDI_ADVANCED
+
+/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
+//#define MIDI_TONE_KEYCODE_OCTAVES 2
diff --git a/keyboards/preonic/keymaps/AlexDaigre/keyboard-layout-editor/adjust.json b/keyboards/preonic/keymaps/AlexDaigre/keyboard-layout-editor/adjust.json
new file mode 100644
index 0000000000..6dac52cb94
--- /dev/null
+++ b/keyboards/preonic/keymaps/AlexDaigre/keyboard-layout-editor/adjust.json
@@ -0,0 +1,80 @@
+[
+ {
+ "name": "Plank Don Gato Programming Raise Layer"
+ },
+ [
+ {
+ "a": 7
+ },
+ "F1",
+ "F2",
+ "F3",
+ "F4",
+ "F5",
+ "F6",
+ "F7",
+ "F8",
+ "F9",
+ "F10",
+ "F11",
+ "F12"
+ ],
+ [
+ "",
+ "Reset",
+ "Debug",
+ "",
+ "",
+ "",
+ "",
+ "Term On",
+ "Term Off",
+ "",
+ "",
+ ""
+ ],
+ [
+ "",
+ "",
+ "Mu Mod",
+ "Audio On",
+ "Audio Off",
+ "AG Norm",
+ "AG Swap",
+ "Qwerty",
+ "Colemak",
+ "Dvorak",
+ "",
+ ""
+ ],
+ [
+ "",
+ "Voice -",
+ "Voice +",
+ "Music On",
+ "Music Off",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ ""
+ ],
+ [
+ "",
+ "",
+ "",
+ "",
+ "",
+ {
+ "w": 2
+ },
+ "",
+ "",
+ "Next",
+ "Vol -",
+ "Vol +",
+ "Play"
+ ]
+] \ No newline at end of file
diff --git a/keyboards/preonic/keymaps/AlexDaigre/keyboard-layout-editor/lower.json b/keyboards/preonic/keymaps/AlexDaigre/keyboard-layout-editor/lower.json
new file mode 100644
index 0000000000..ccf860653f
--- /dev/null
+++ b/keyboards/preonic/keymaps/AlexDaigre/keyboard-layout-editor/lower.json
@@ -0,0 +1,80 @@
+[
+ {
+ "name": "Plank Don Gato Programming Lower Layer"
+ },
+ [
+ {
+ "a": 7
+ },
+ "Print Screen",
+ "Page Up",
+ "Page Down",
+ "Home",
+ "End",
+ "Insert",
+ "Scroll Lock",
+ "Num Lock",
+ "Pause",
+ "]",
+ "[",
+ "-"
+ ],
+ [
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "Delete"
+ ],
+ [
+ "Caps Lock",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ ""
+ ],
+ [
+ "Right Shift",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "\\",
+ "Menu"
+ ],
+ [
+ "Right Ctrl",
+ "Right Alt",
+ "Right Os",
+ "",
+ "",
+ {
+ "w": 2
+ },
+ "",
+ "",
+ "",
+ "",
+ "",
+ ""
+ ]
+] \ No newline at end of file
diff --git a/keyboards/preonic/keymaps/AlexDaigre/keyboard-layout-editor/main.json b/keyboards/preonic/keymaps/AlexDaigre/keyboard-layout-editor/main.json
new file mode 100644
index 0000000000..77589c205c
--- /dev/null
+++ b/keyboards/preonic/keymaps/AlexDaigre/keyboard-layout-editor/main.json
@@ -0,0 +1,95 @@
+[
+ {
+ "name": "Plank Don Gato Programming Main Layer"
+ },
+ [
+ {
+ "a": 5
+ },
+ "~\n`",
+ "!\n1",
+ "@\n2",
+ "#\n3",
+ "$\n4",
+ "%\n5",
+ "^\n6",
+ "&\n7",
+ "*\n8",
+ "(\n9",
+ ")\n0",
+ "+\n="
+ ],
+ [
+ {
+ "a": 7
+ },
+ "Tab",
+ "Q",
+ "W",
+ "E",
+ "R",
+ "T",
+ "Y",
+ "U",
+ "I",
+ "O",
+ "P",
+ "Back Space"
+ ],
+ [
+ "Esc",
+ "A",
+ "S",
+ "D",
+ "F",
+ "G",
+ "H",
+ "J",
+ "K",
+ "L",
+ {
+ "a": 5
+ },
+ ":\n;",
+ "\"\n'"
+ ],
+ [
+ {
+ "a": 7
+ },
+ "Shift",
+ "Z",
+ "X",
+ "C",
+ "V",
+ "B",
+ "N",
+ "M",
+ {
+ "a": 5
+ },
+ "<\n,",
+ ">\n.",
+ {
+ "a": 7
+ },
+ "/",
+ "Return"
+ ],
+ [
+ "Ctrl",
+ "Alt",
+ "OS",
+ "Super",
+ "&dArr;",
+ {
+ "w": 2
+ },
+ "",
+ "&uArr;",
+ "&larr;",
+ "&darr;",
+ "&uarr;",
+ "&rarr;"
+ ]
+] \ No newline at end of file
diff --git a/keyboards/preonic/keymaps/AlexDaigre/keyboard-layout-editor/raise.json b/keyboards/preonic/keymaps/AlexDaigre/keyboard-layout-editor/raise.json
new file mode 100644
index 0000000000..aae97d489f
--- /dev/null
+++ b/keyboards/preonic/keymaps/AlexDaigre/keyboard-layout-editor/raise.json
@@ -0,0 +1,80 @@
+[
+ {
+ "name": "Plank Don Gato Programming Raise Layer"
+ },
+ [
+ {
+ "a": 7
+ },
+ "Print Screen",
+ "Page Up",
+ "Page Down",
+ "Home",
+ "End",
+ "Insert",
+ "Scroll Lock",
+ "Num Lock",
+ "Pause",
+ "{",
+ "}",
+ "_"
+ ],
+ [
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "Delete"
+ ],
+ [
+ "Caps Lock",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ ""
+ ],
+ [
+ "Right Shift",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "|",
+ "Menu"
+ ],
+ [
+ "Right Ctrl",
+ "Right Alt",
+ "Right Os",
+ "",
+ "",
+ {
+ "w": 2
+ },
+ "",
+ "",
+ "",
+ "",
+ "",
+ ""
+ ]
+ ] \ No newline at end of file
diff --git a/keyboards/preonic/keymaps/AlexDaigre/keymap.c b/keyboards/preonic/keymaps/AlexDaigre/keymap.c
new file mode 100644
index 0000000000..67d13005cf
--- /dev/null
+++ b/keyboards/preonic/keymaps/AlexDaigre/keymap.c
@@ -0,0 +1,326 @@
+/* Copyright 2020 Alex Daigre
+ * Modified from layout provided by Jack Humbert
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include QMK_KEYBOARD_H
+#include "muse.h"
+
+enum preonic_layers {
+ _QWERTY,
+ _COLEMAK,
+ _DVORAK,
+ _LOWER,
+ _RAISE,
+ _ADJUST
+};
+
+enum preonic_keycodes {
+ QWERTY = SAFE_RANGE,
+ COLEMAK,
+ DVORAK,
+ LOWER,
+ RAISE,
+ BACKLIT,
+ ADJUST
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+/* Qwerty
+ * ,-----------------------------------------------------------------------------------.
+ * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | = |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Esc | A | S | D | F | G | H | J | K | L | ; | " |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Ctrl | Alt | GUI |Adjust| Lower| Space |Raise | Left | Down | Up |Right |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_QWERTY] = LAYOUT_preonic_grid( \
+ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQUAL, \
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \
+ KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, \
+ KC_LCTL, KC_LALT, KC_LGUI, ADJUST, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
+),
+
+/* Colemak
+ * ,-----------------------------------------------------------------------------------.
+ * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | = |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Esc | A | R | S | T | D | H | N | E | I | O | " |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Ctrl | Alt | GUI |Adjust| Lower| Space |Raise | Left | Down | Up |Right |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_COLEMAK] = LAYOUT_preonic_grid( \
+ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQUAL, \
+ KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \
+ KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, \
+ KC_LCTL, KC_LALT, KC_LGUI, ADJUST, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
+),
+
+/* Dvorak
+ * ,-----------------------------------------------------------------------------------.
+ * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | = |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Esc | A | O | E | U | I | D | H | T | N | S | / |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Ctrl | Alt | GUI |Adjust| Lower| Space |Raise | Left | Down | Up |Right |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_DVORAK] = LAYOUT_preonic_grid( \
+ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQUAL, \
+ KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \
+ KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \
+ KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT, \
+ KC_LCTL, KC_LALT, KC_LGUI, ADJUST, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
+),
+
+/* Lower
+ * ,-----------------------------------------------------------------------------------.
+ * |PrtScr| PgUp | PgDw | Home | End |Insert|ScrlLk|NumLck|Pause | [ | ] | - |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | | | | | | | | | | | | Del |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Caps | | | | | | | | | | | |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | | | | | | | | | | | \ | Menu |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * |RCtrl | RAlt | RGui | | | | | | | | | |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_LOWER] = LAYOUT_preonic_grid( \
+ KC_PSCREEN, KC_PGUP, KC_PGDOWN, KC_HOME, KC_END, KC_INSERT, KC_SCROLLLOCK, KC_NUMLOCK, KC_PAUSE, KC_LBRACKET, KC_RBRACKET, KC_MINUS, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DELETE, \
+ KC_CAPSLOCK, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ KC_RSHIFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BSLASH, KC_MENU, \
+ KC_RCTRL, KC_RALT, KC_RGUI, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
+),
+
+/* Raise
+ * ,-----------------------------------------------------------------------------------.
+ * |PrtScr| PgUp | PgDw | Home | End |Insert|ScrlLk|NumLck|Pause | { | } | _ |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | | | | | | | | | | Del |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Caps | | | | | | | | | | | |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | | | | | | | | | | | | | Menu |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * |RCtrl | RAlt | RGui | | | | | | | | | |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_RAISE] = LAYOUT_preonic_grid( \
+ KC_PSCREEN, KC_PGUP, KC_PGDOWN, KC_HOME, KC_END, KC_INSERT, KC_SCROLLLOCK, KC_NUMLOCK, KC_PAUSE, KC_LEFT_CURLY_BRACE, KC_RIGHT_CURLY_BRACE, KC_UNDERSCORE, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DELETE, \
+ KC_CAPSLOCK, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ KC_RSHIFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PIPE, KC_MENU, \
+ KC_RCTRL, KC_RALT, KC_RGUI, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
+),
+
+/* Adjust (Lower + Raise)
+ * ,-----------------------------------------------------------------------------------.
+ * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | Reset| | | | | | | | | | Del |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | | | |Aud on|AudOff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Light| | | | | | | Next | Vol- | Vol+ | Play |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_ADJUST] = LAYOUT_preonic_grid( \
+ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \
+ _______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, _______, \
+ _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \
+ _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, \
+ BACKLIT, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
+)
+
+
+};
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case QWERTY:
+ if (record->event.pressed) {
+ set_single_persistent_default_layer(_QWERTY);
+ }
+ return false;
+ break;
+ case COLEMAK:
+ if (record->event.pressed) {
+ set_single_persistent_default_layer(_COLEMAK);
+ }
+ return false;
+ break;
+ case DVORAK:
+ if (record->event.pressed) {
+ set_single_persistent_default_layer(_DVORAK);
+ }
+ return false;
+ break;
+ case ADJUST:
+ if (record->event.pressed) {
+ layer_on(_RAISE);
+ layer_on(_LOWER);
+ layer_on(_ADJUST);
+ update_tri_layer(_LOWER, _RAISE, _ADJUST);
+ } else {
+ layer_off(_RAISE);
+ layer_off(_LOWER);
+ layer_off(_ADJUST);
+ update_tri_layer(_LOWER, _RAISE, _ADJUST);
+ }
+ return false;
+ break;
+ case LOWER:
+ if (record->event.pressed) {
+ layer_on(_LOWER);
+ update_tri_layer(_LOWER, _RAISE, _ADJUST);
+ } else {
+ layer_off(_LOWER);
+ update_tri_layer(_LOWER, _RAISE, _ADJUST);
+ }
+ return false;
+ break;
+ case RAISE:
+ if (record->event.pressed) {
+ layer_on(_RAISE);
+ update_tri_layer(_LOWER, _RAISE, _ADJUST);
+ } else {
+ layer_off(_RAISE);
+ update_tri_layer(_LOWER, _RAISE, _ADJUST);
+ }
+ return false;
+ break;
+ case BACKLIT:
+ if (record->event.pressed) {
+ register_code(KC_RSFT);
+ #ifdef BACKLIGHT_ENABLE
+ backlight_step();
+ #endif
+ #ifdef __AVR__
+ writePinLow(E6);
+ #endif
+ } else {
+ unregister_code(KC_RSFT);
+ #ifdef __AVR__
+ writePinHigh(E6);
+ #endif
+ }
+ return false;
+ break;
+ }
+ return true;
+};
+
+bool muse_mode = false;
+uint8_t last_muse_note = 0;
+uint16_t muse_counter = 0;
+uint8_t muse_offset = 70;
+uint16_t muse_tempo = 50;
+
+void encoder_update_user(uint8_t index, bool clockwise) {
+ if (muse_mode) {
+ if (IS_LAYER_ON(_RAISE)) {
+ if (clockwise) {
+ muse_offset++;
+ } else {
+ muse_offset--;
+ }
+ } else {
+ if (clockwise) {
+ muse_tempo+=1;
+ } else {
+ muse_tempo-=1;
+ }
+ }
+ } else {
+ if (clockwise) {
+ register_code(KC_PGDN);
+ unregister_code(KC_PGDN);
+ } else {
+ register_code(KC_PGUP);
+ unregister_code(KC_PGUP);
+ }
+ }
+}
+
+void dip_switch_update_user(uint8_t index, bool active) {
+ switch (index) {
+ case 0:
+ if (active) {
+ layer_on(_ADJUST);
+ } else {
+ layer_off(_ADJUST);
+ }
+ break;
+ case 1:
+ if (active) {
+ muse_mode = true;
+ } else {
+ muse_mode = false;
+ }
+ }
+}
+
+
+void matrix_scan_user(void) {
+#ifdef AUDIO_ENABLE
+ if (muse_mode) {
+ if (muse_counter == 0) {
+ uint8_t muse_note = muse_offset + SCALE[muse_clock_pulse()];
+ if (muse_note != last_muse_note) {
+ stop_note(compute_freq_for_midi_note(last_muse_note));
+ play_note(compute_freq_for_midi_note(muse_note), 0xF);
+ last_muse_note = muse_note;
+ }
+ }
+ muse_counter = (muse_counter + 1) % muse_tempo;
+ } else {
+ if (muse_counter) {
+ stop_all_notes();
+ muse_counter = 0;
+ }
+ }
+#endif
+}
+
+bool music_mask_user(uint16_t keycode) {
+ switch (keycode) {
+ case RAISE:
+ case LOWER:
+ return false;
+ default:
+ return true;
+ }
+}
diff --git a/keyboards/preonic/keymaps/AlexDaigre/readme.md b/keyboards/preonic/keymaps/AlexDaigre/readme.md
new file mode 100644
index 0000000000..0aed8ebe09
--- /dev/null
+++ b/keyboards/preonic/keymaps/AlexDaigre/readme.md
@@ -0,0 +1,19 @@
+[Layout Images](https://imgur.com/a/k95XQlP)
+
+# Alex Daigre's programming Layout
+
+The default Preonic layout is suited to general english typing but not very convent to program on. This is my custom layout to re-optimise the keyboard for programming tasks.
+I have been programming with this keyboard layout at work and I found it much faster and easier to adjust to than the default layout.
+
+- Removed keys on the RAISE, LOWER, and ADJUST layers that duplicated keys on the main QWERTY layout.
+- Moved the control, alt, and gui keys to a more natural position.
+- Added the Caps-lock key on RAISE and LOWER in its position on a standard keyboard.
+- Moved {}[], -_, and \| (on RAISE and LOWER) to be close to to similar keys on the QWERTY layout to make them easier to remember. They are kept as close as possible to their locations on a standard layout so users won't have to ADJUST their muscle memory much.
+ - (), {}, and [] are all on the 9 and 0 keys. This is where () are placed naturally, so it is easy to find all of your braces.
+ - -_ are moved to the += key. Now you can remember that -, +, and = are all together. The keys are also right next to each-other on a standard layout, so it is a very small move.
+ - \ and | have beeb moved to the /? key. Easy to remember as / and \ are together.
+- Moved backspace to make room for +=.
+- Added delete to the backspace key on RAISE / LOWER
+- Removed backlight, from the main layer, and added an ADJUST key. As the Massdrop kits don't come with backlighting default, I think this is more useful for most users.
+- I have left the Colemak and Dvorak alternate layouts, but they won't map up as conveniently to the other layers.
+- I have included the keyboard layouts so that those wishing to make modifications or new versions of this layout can quickly update their images.
diff --git a/keyboards/preonic/keymaps/AlexDaigre/rules.mk b/keyboards/preonic/keymaps/AlexDaigre/rules.mk
new file mode 100644
index 0000000000..dcf16bef39
--- /dev/null
+++ b/keyboards/preonic/keymaps/AlexDaigre/rules.mk
@@ -0,0 +1 @@
+SRC += muse.c
diff --git a/keyboards/preonic/keymaps/pvillano/config.h b/keyboards/preonic/keymaps/pvillano/config.h
new file mode 100644
index 0000000000..a338a1da44
--- /dev/null
+++ b/keyboards/preonic/keymaps/pvillano/config.h
@@ -0,0 +1,32 @@
+#pragma once
+
+#ifdef AUDIO_ENABLE
+ #define STARTUP_SONG SONG(PREONIC_SOUND)
+#endif
+
+#define MUSIC_MASK (keycode != KC_NO)
+
+// #define MUSIC_MAP
+/*
+ * MIDI options
+ */
+
+/* Prevent use of disabled MIDI features in the keymap */
+//#define MIDI_ENABLE_STRICT 1
+
+/* enable basic MIDI features:
+ - MIDI notes can be sent when in Music mode is on
+*/
+
+#define MIDI_BASIC
+
+/* enable advanced MIDI features:
+ - MIDI notes can be added to the keymap
+ - Octave shift and transpose
+ - Virtual sustain, portamento, and modulation wheel
+ - etc.
+*/
+//#define MIDI_ADVANCED
+
+/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
+//#define MIDI_TONE_KEYCODE_OCTAVES 2
diff --git a/keyboards/preonic/keymaps/pvillano/keymap.c b/keyboards/preonic/keymaps/pvillano/keymap.c
new file mode 100644
index 0000000000..093948e093
--- /dev/null
+++ b/keyboards/preonic/keymaps/pvillano/keymap.c
@@ -0,0 +1,113 @@
+/* Do as you please
+ * - pvillano
+ */
+
+#include QMK_KEYBOARD_H
+#include "muse.h"
+
+ enum preonic_layers {
+ _QWERTY,
+ _GAME,
+ _ALT,
+ _FUN,
+ };
+
+ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ /* Qwerty
+ * ,-----------------------------------------------------------------------------------------------------------.
+ * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
+ * | ` | Q | W | E | R | T | Y | U | I | O | P | \ |
+ * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+--------|
+ * | Tab | A | S | D | F | G | H | J | K | L | ; | " |
+ * |--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------|
+ * | Shift | Z | X | C | V | B | N | M | , | . | / | Enter |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
+ * | Ctrl | GUI | Alt | Func |AltLayer| Space | _ |AltLayer| Left | Down | Up | Right |
+ * `-----------------------------------------------------------------------------------------------------------'
+ */
+ [_QWERTY] = LAYOUT_preonic_grid(
+ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
+ KC_GRV, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
+ KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
+ KC_LCTL, KC_LGUI, KC_LALT, MO(_FUN),MO(_ALT),KC_SPC, KC_UNDS, MO(_ALT),KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+ ),
+
+ /* Game
+ * ,-----------------------------------------------------------------------------------------------------------.
+ * | | | | | | | | | | | | |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
+ * | | | | | | | | | | | | |
+ * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+--------|
+ * | | | | | | | | | | | | |
+ * |--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------|
+ * | | | | | | | | | | | | |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
+ * | | NOOP | | | | | ALT | | | | | |
+ * `-----------------------------------------------------------------------------------------------------------'
+ */
+ [_GAME] = LAYOUT_preonic_grid(
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, XXXXXXX, _______, _______, _______, _______, KC_LALT, _______, _______, _______, _______, _______
+ ),
+
+ /* Alt
+ * ,-----------------------------------------------------------------------------------------------------------.
+ * | | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
+ * | |Keypad 7|Keypad 8|Keypad 9| | | | - | + | { | } | |
+ * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+--------|
+ * | |Keypad 4|Keypad 5|Keypad 6| | | | - | = | [ | ] | |
+ * |--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------|
+ * | |Keypad 1|Keypad 2|Keypad 3| | | | | | < | > | |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
+ * | |Keypad 0|Keypad 0| | | | | | | | | |
+ * `-----------------------------------------------------------------------------------------------------------'
+ */
+ [_ALT] = LAYOUT_preonic_grid(
+ _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL,
+ _______, KC_P7, KC_P8, KC_P9, _______, _______, _______, KC_MINS, KC_PLUS, KC_LCBR, KC_RCBR, _______,
+ _______, KC_P4, KC_P5, KC_P6, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______,
+ _______, KC_P1, KC_P2, KC_P3, _______, _______, _______, _______, _______, KC_LT, KC_GT, _______,
+ _______, KC_P0, KC_P0, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ ),
+
+ /* Function
+ * ,-----------------------------------------------------------------------------------------------------------.
+ * | | F1 | F2 | F3 | F4 | | | | | | | Del |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
+ * | | F5 | F6 | F7 | F8 | | | | | |program | |
+ * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+--------|
+ * | | F9 | F10 | F11 | F12 | Game | | | | | | |
+ * |--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------|
+ * | | | | | | |Num Lock| Music | | | | |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
+ * | | | | | | | | | | | | |
+ * `-----------------------------------------------------------------------------------------------------------'
+ */
+ [_FUN] = LAYOUT_preonic_grid(
+ _______, KC_F1, KC_F2, KC_F3, KC_F4, _______, _______, _______, _______, _______, _______, KC_DEL,
+ _______, KC_F5, KC_F6, KC_F7, KC_F8, _______, _______, _______, _______, _______, RESET, _______,
+ _______, KC_F9, KC_F10, KC_F11, KC_F12, TG(_GAME),_______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, KC_NLCK, MU_TOG, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ )
+ };
+
+
+ bool music_mask_user(uint16_t keycode) {
+ switch (keycode) {
+ case MO(_FUN):
+ case MO(_ALT):
+ case KC_SPC:
+ case KC_UNDS:
+ return false;
+ default:
+ return true;
+ }
+ }
diff --git a/keyboards/preonic/keymaps/pvillano/readme.md b/keyboards/preonic/keymaps/pvillano/readme.md
new file mode 100644
index 0000000000..a1d11f8acb
--- /dev/null
+++ b/keyboards/preonic/keymaps/pvillano/readme.md
@@ -0,0 +1,25 @@
+# A preonic layout similar to the default,
+
+but with some extra conviences for programming and gaming
+
+## For programming
+
+* Underscore is next to space.
+* Backslash replaces Del on the default layer.
+* Brackets are easy to reach, and are arranged symmetrically.
+
+## For Gaming
+
+* Gaming mode disables OS key.
+* Gaming mode moves ALT to "right space", to be more easily reached.
+* Numpad is available with only the left hand (for emotes).
+
+## Personal taste
+
+* Esc is in the top left, where it belongs
+* Only one Alt layer and one Func layer
+* Function codes are mnemonic
+ * Func + G for Game mode
+ * Func + M for Music mode
+ * Func + N for Num lock
+* No multi-key combos with more than two keys
diff --git a/keyboards/preonic/keymaps/pvillano/rules.mk b/keyboards/preonic/keymaps/pvillano/rules.mk
new file mode 100644
index 0000000000..dcf16bef39
--- /dev/null
+++ b/keyboards/preonic/keymaps/pvillano/rules.mk
@@ -0,0 +1 @@
+SRC += muse.c
diff --git a/keyboards/preonic/keymaps/that_canadian/keymap.c b/keyboards/preonic/keymaps/that_canadian/keymap.c
index bf9e89e1f2..d1d274f293 100644
--- a/keyboards/preonic/keymaps/that_canadian/keymap.c
+++ b/keyboards/preonic/keymaps/that_canadian/keymap.c
@@ -161,7 +161,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
case QWERTY:
if (record->event.pressed) {
#ifdef AUDIO_ENABLE
- PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
+ PLAY_SONG(tone_qwerty);
#endif
persistant_default_layer_set(1UL<<_QWERTY);
}
@@ -213,12 +213,12 @@ void matrix_init_user(void) {
void startup_user()
{
_delay_ms(20); // gets rid of tick
- PLAY_NOTE_ARRAY(tone_startup, false, 0);
+ PLAY_SONG(tone_startup);
}
void shutdown_user()
{
- PLAY_NOTE_ARRAY(tone_goodbye, false, 0);
+ PLAY_SONG(tone_goodbye);
_delay_ms(150);
stop_all_notes();
}
@@ -230,7 +230,7 @@ void music_on_user(void)
void music_scale_user(void)
{
- PLAY_NOTE_ARRAY(music_scale, false, 0);
+ PLAY_SONG(music_scale);
}
#endif
diff --git a/keyboards/preonic/rev1/rules.mk b/keyboards/preonic/rev1/rules.mk
index 9be496ce79..45edfa0b0f 100644
--- a/keyboards/preonic/rev1/rules.mk
+++ b/keyboards/preonic/rev1/rules.mk
@@ -23,7 +23,7 @@ COMMAND_ENABLE = no # Commands for debug and configuration
NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
MIDI_ENABLE = no # MIDI controls
-AUDIO_ENABLE = yes # Audio output on port C6
+AUDIO_ENABLE = yes # Audio output
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
diff --git a/keyboards/preonic/rev2/rules.mk b/keyboards/preonic/rev2/rules.mk
index b98f9b52c8..f24c6a49b7 100644
--- a/keyboards/preonic/rev2/rules.mk
+++ b/keyboards/preonic/rev2/rules.mk
@@ -23,7 +23,7 @@ COMMAND_ENABLE = no # Commands for debug and configuration
NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
MIDI_ENABLE = no # MIDI controls
-AUDIO_ENABLE = yes # Audio output on port C6
+AUDIO_ENABLE = yes # Audio output
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
diff --git a/keyboards/preonic/rev3/config.h b/keyboards/preonic/rev3/config.h
index b5b2ced5a7..b7429f757a 100644
--- a/keyboards/preonic/rev3/config.h
+++ b/keyboards/preonic/rev3/config.h
@@ -40,6 +40,7 @@
#define MUSIC_MAP
#undef AUDIO_VOICES
+// Note: following undef isn't really necessary on STM32, C6_AUDIO is AVR related
#undef C6_AUDIO
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
diff --git a/keyboards/preonic/rev3/rules.mk b/keyboards/preonic/rev3/rules.mk
index 4c5d2f2ffe..a5fc16a2e5 100644
--- a/keyboards/preonic/rev3/rules.mk
+++ b/keyboards/preonic/rev3/rules.mk
@@ -14,7 +14,7 @@ COMMAND_ENABLE = yes # Commands for debug and configuration
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
MIDI_ENABLE = no # MIDI controls
-AUDIO_ENABLE = yes # Audio output on port C6
+AUDIO_ENABLE = yes # Audio output
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.