diff options
Diffstat (limited to 'keyboards/preonic/keymaps')
37 files changed, 0 insertions, 2948 deletions
diff --git a/keyboards/preonic/keymaps/arkag/config.h b/keyboards/preonic/keymaps/arkag/config.h deleted file mode 100644 index 1b42e6ef9e..0000000000 --- a/keyboards/preonic/keymaps/arkag/config.h +++ /dev/null @@ -1,30 +0,0 @@ -/* Copyright 2021 Alex Kagno - * - * 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/>. -*/ - -#pragma once - -#ifdef AUDIO_ENABLE -# define STARTUP_SONG SONG(STARTUP_SOUND) -# define GOODBYE_SONG SONG(GOODBYE_SOUND) -# define AUDIO_CLICKY -# define AUDIO_CLICKY_FREQ_RANDOMNESS 1.0f -# define MIDI_BASIC -# define MUSIC_MASK keycode != KC_NO -#endif - -// save me space! -#define NO_ACTION_MACRO -#define NO_ACTION_FUNCTION diff --git a/keyboards/preonic/keymaps/arkag/keymap.c b/keyboards/preonic/keymaps/arkag/keymap.c deleted file mode 100644 index e127711791..0000000000 --- a/keyboards/preonic/keymaps/arkag/keymap.c +++ /dev/null @@ -1,84 +0,0 @@ -/* Copyright 2021 Alex Kagno - * - * 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 "arkag.h" -#include "muse.h" - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - [_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, M_OS, - KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, - 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, MEDIA, SYMBOL, KC_SPC, QK_LEAD, ARROW, FUNCT, KC_RALT, XXXXXXX, HITBOX), - - [_SYMBOL] = LAYOUT_preonic_grid( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - KC_GRV, KC_LPRN, KC_RPRN, KC_PLUS, KC_UNDS, KC_CIRC, KC_AMPR, KC_7, KC_8, KC_9, _______, _______, - KC_LCBR, KC_LBRC, KC_RBRC, KC_EQL, KC_MINS, KC_ASTR, KC_PIPE, KC_4, KC_5, KC_6, _______, KC_NUM, - KC_RCBR, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_PDOT, KC_1, KC_2, KC_3, KC_BSLS, KC_PENT, - M_DASH, KC_TILD, _______, KEEB, _______, _______, _______, KC_0, KC_PSLS, KC_PMNS, KC_PPLS, KC_PAST), - - [_MEDIA] = LAYOUT_preonic_grid( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, KC_VOLU, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, KC_MPRV, KC_VOLD, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, - KC_MPLY, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - KC_MUTE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), - - [_ARROW] = LAYOUT_preonic_grid( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), - - [_HITBOX] = LAYOUT_preonic_grid( - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_U, KC_I, KC_O, KC_P, XXXXXXX, - XXXXXXX, XXXXXXX, KC_A, KC_S, KC_D, XXXXXXX, XXXXXXX, KC_J, KC_K, KC_L, KC_SCLN, XXXXXXX, - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_ENT, - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_W, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, HITBOX), - - [_FUNCT] = LAYOUT_preonic_grid( - _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, - _______, _______, _______, KC_END, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, KC_HOME, _______, _______, _______, _______, _______, - _______, _______, _______, KC_CALC, _______, _______, _______, _______, _______, _______, _______, KC_CAPS, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), - - [_KEEB] = LAYOUT_preonic_grid( - CK_TOGG, AU_TOGG, MU_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, HITBOX, - M_USSR, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, BL_TOGG, BL_STEP, BL_UP, BL_DOWN, BL_BRTG, _______, _______, _______, _______, _______, _______, - RGB_M_P, RGB_TOG, RGB_MOD, RGB_VAI, RGB_VAD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, _______, _______, _______, - QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), - -}; - -#ifdef AUDIO_ENABLE -bool music_mask_user(uint16_t keycode) { - switch (keycode) { - case MU_TOGG: - case SYMBOL: - case KEEB: - return false; - default: - return true; - } -} -#endif diff --git a/keyboards/preonic/keymaps/arkag/readme.md b/keyboards/preonic/keymaps/arkag/readme.md deleted file mode 100644 index e911968dd9..0000000000 --- a/keyboards/preonic/keymaps/arkag/readme.md +++ /dev/null @@ -1 +0,0 @@ -# The default Preonic layout - largely based on the Planck's
\ No newline at end of file diff --git a/keyboards/preonic/keymaps/arkag/rules.mk b/keyboards/preonic/keymaps/arkag/rules.mk deleted file mode 100644 index 5b87801fca..0000000000 --- a/keyboards/preonic/keymaps/arkag/rules.mk +++ /dev/null @@ -1,17 +0,0 @@ -BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite -MOUSEKEY_ENABLE = no -STENO_ENABLE = no -EXTRAKEY_ENABLE = yes -CONSOLE_ENABLE = no -COMMAND_ENABLE = no -SLEEP_LED_ENABLE = yes -NKRO_ENABLE = yes -BACKLIGHT_ENABLE = no -AUDIO_ENABLE = yes -RGBLIGHT_ENABLE = yes -TAP_DANCE_ENABLE = no -UNICODE_ENABLE = yes -LEADER_ENABLE = yes - -# from default -SRC += muse.c diff --git a/keyboards/preonic/keymaps/badger/keymap.c b/keyboards/preonic/keymaps/badger/keymap.c deleted file mode 100644 index 553b84ad34..0000000000 --- a/keyboards/preonic/keymaps/badger/keymap.c +++ /dev/null @@ -1,74 +0,0 @@ -/* -Copyright 2020 Dan White <opensource@bluetufa.com> - -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/>. -*/ - -// if not REV3, just compile the default keymaps -#ifndef KEYBOARD_preonic_rev3 -#include "../default/keymap.c" -#else - -#include "ortho.h" - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QWERTY_MAC_ORTHO] = LAYOUT_preonic_2x2u( - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, - MOMAC, 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, RAISE, P_ADJ, KC_SPC, LOWER, KC_RGUI, KC_RALT, MAC_POP), - - [_MOVE_MAC_ORTHO] = LAYOUT_preonic_2x2u( - MAC_FRC, MM_LEFT, MM_RGHT, IJ_TOP, IJ_BOTT, _______, _______, IJ_UP, IJ_DOWN, IJ_BACK, IJ_FWD, KC_BSPC, - KC_BACK, IJ_STEP, IJ_INTO, IJ_OUT, IJ_RUN, IJ_STOP, _______, WD_BACK, KC_HOME, KC_END, WD_FRWD, KC_NEXT, - _______, MM_LH, MM_MAX, MM_RH, IJ_FIND, IJ_IMPS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, CM_RIGHT, CM_DOWN, - _______, MM_UH, MM_BH, MAC_CPY, MAC_PST, IJ_IMPH, _______, IJ_REN, IJ_IMPL, IJ_DECL, IJ_USAG, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), - - [_QWERTY_LINUX_ORTHO] = LAYOUT_preonic_2x2u( - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, - MOLNX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, - KC_LCTL, KC_LGUI, KC_LALT, RAISE, P_ADJ, KC_SPC, LOWER, KC_RALT, KC_RGUI, OS_POP), - - [_MOVE_LINUX_ORTHO] = LAYOUT_preonic_2x2u( - KC_ESC, VD_1, VD_2, VD_3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL, - _______, WM_VD1, WM_UH, WM_VD2, KC_MAC1, KC_MSTP, KC_MPLY, KC_PGUP, KC_HOME, KC_END, KC_PGDN, KC_INS, - _______, WM_LH, WM_MAX, WM_RH, KC_MAC2, KC_PSCR, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, CS_RIGHT, CS_DOWN, - _______, WM_VD3, WM_BH, OS_COPY, OS_PAST, KC_MPRV, KC_MNXT, KC_MUTE, KC_WBAK, KC_WFWD, KC_WSCH, _______, - _______, KC_LCTL, KC_LALT, KC_LGUI, _______, _______, _______, _______, _______, _______), - - [_RAISE] = LAYOUT_preonic_2x2u( - KC_TILD, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL, - _______, KC_F11, KC_F12, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, - _______, KC_AGIN, KC_STOP, KC_MENU, KC_FIND, KC_MPLY, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_COLN, KC_DQUO, - _______, KC_UNDO, KC_CUT, OS_COPY, OS_PAST, KC_MPRV, KC_MNXT, KC_MUTE, KC_LT, KC_GT, KC_QUES, KC_TRNS, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), - - [_LOWER] = LAYOUT_preonic_2x2u( - KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, - _______, KC_7, KC_8, KC_9, KC_PMNS, KC_VOLD, KC_VOLU, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, - _______, KC_4, KC_5, KC_6, KC_PPLS, KC_PSCR, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_SCLN, KC_QUOT, - _______, KC_1, KC_2, KC_3, KC_PAST, KC_NO, KC_NO, KC_WHOM, KC_WBAK, KC_WFWD, KC_WSCH, _______, - _______, KC_0, KC_DOT, KC_ENT, _______, _______, _______, _______, _______, _______), - - [_ADJUST_ORTHO] = LAYOUT_preonic_2x2u( - KC_ESC, AU_ON, AU_OFF, CK_TOGG, CK_UP, CK_DOWN, CK_RST, MU_ON, MU_OFF, MU_TOGG, MU_NEXT, KC_DEL, - _______, NK_ON, NK_OFF, EE_CLR, QK_BOOT, KC_MSTP, KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R, KC_BTN2, KC_INS, - _______, GE_SWAP, GE_NORM, DB_TOGG, AG_SWAP, AG_NORM, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_BTN1, _______, - _______, KC_LYRC, KC_FIRST, KC_CAPS, KC_NO, KC_MPRV, KC_MNXT, KC_MUTE, KC_ACL0, KC_ACL1, KC_ACL2, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______) -}; - -#endif diff --git a/keyboards/preonic/keymaps/badger/readme.md b/keyboards/preonic/keymaps/badger/readme.md deleted file mode 100644 index 5e16979605..0000000000 --- a/keyboards/preonic/keymaps/badger/readme.md +++ /dev/null @@ -1,21 +0,0 @@ -# A QWERTY-centric preonic layout by [BlueTufa](https://github.com/BlueTufa) - -## Layouts - -### QWERTY -Standard QWERTY layer, but ESC maps to MOVE layer when held down. Dedicated modifier for Adjust layer and a dedicated OS action key. -### RAISE layer -Access to function keys and shifted characters not on Preonic layout. Effort is taken to keep Function keys aligned with corresponding number. Some OS action keys are available in this layer. - -### LOWER layer -Numpad behavior and access to characters not present on Preonic layout. - -### MOVE layer -OS-specific convenience shortcuts. Macros are used to make it easier to adapt these to other operating systems. -Window move and resize, and option to move to a specific virtual desktop. - -### ADJUST layer -The first row is focused on audio config. -Take advantage of the mouse movement keys, as well as toggling common keyboard config settings. -Flash settings are accessed here as well. - diff --git a/keyboards/preonic/keymaps/dudeofawesome/config.h b/keyboards/preonic/keymaps/dudeofawesome/config.h deleted file mode 100644 index 354e9c6021..0000000000 --- a/keyboards/preonic/keymaps/dudeofawesome/config.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" -#include "dudeofawesome.h" - -#define TAPPING_TOGGLE 2 - -#ifdef AUDIO_ENABLE - #define STARTUP_SONG SONG(PLANCK_SOUND) - // #define STARTUP_SONG SONG(NO_SOUND) - - #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ - SONG(WORKMAN_SOUND), \ - SONG(COLEMAK_SOUND), \ - SONG(DVORAK_SOUND) \ - } -#endif - -#define MUSIC_MASK (keycode != KC_NO) - -/* - * MIDI options - */ - -/* 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 - -#endif diff --git a/keyboards/preonic/keymaps/dudeofawesome/keymap.c b/keyboards/preonic/keymaps/dudeofawesome/keymap.c deleted file mode 100644 index 8b09f87b43..0000000000 --- a/keyboards/preonic/keymaps/dudeofawesome/keymap.c +++ /dev/null @@ -1,292 +0,0 @@ -/* Copyright 2015-2017 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 - -enum preonic_layers { - _QWERTY, - _WORKMAN, - _COLEMAK, - _DVORAK, - _LOWER, - _RAISE, - _ADJUST, - _NUMPAD -}; - -enum preonic_keycodes { - QWERTY = SAFE_RANGE, - WORKMAN, - COLEMAK, - DVORAK, - LOWER, - RAISE, - BACKLIT -}; - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - -/* Qwerty - * ,-----------------------------------------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | 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 | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Num | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | - * `-----------------------------------------------------------------------------------' - */ -[_QWERTY] = LAYOUT_preonic_1x2uC( - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, - 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, RSFT_T(KC_ENT), - TT(_NUMPAD), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT -), - -/* Workman - * ,-----------------------------------------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Tab | Q | D | R | W | B | J | F | U | P | ; | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | S | H | T | G | Y | N | E | O | I | ' | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | M | C | V | K | L | , | . | / | Enter| - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Num | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | - * `-----------------------------------------------------------------------------------' - */ -[_WORKMAN] = LAYOUT_preonic_1x2uC( - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, - KC_TAB, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_BSPC, - KC_ESC, KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, KC_QUOT, - KC_LSFT, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH, RSFT_T(KC_ENT), - TT(_NUMPAD), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT -), - -/* Colemak - * ,-----------------------------------------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | 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 | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Num | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | - * `-----------------------------------------------------------------------------------' - */ -[_COLEMAK] = LAYOUT_preonic_1x2uC( - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, - 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, RSFT_T(KC_ENT), - TT(_NUMPAD), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT -), - -/* Dvorak - * ,-----------------------------------------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | 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 | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Num | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | - * `-----------------------------------------------------------------------------------' - */ -[_DVORAK] = LAYOUT_preonic_1x2uC( - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, - 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, RSFT_T(KC_ENT), - TT(_NUMPAD), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT -), - -/* Lower - * ,-----------------------------------------------------------------------------------. - * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | Play | Vol- | Vol+ | Next | - * `-----------------------------------------------------------------------------------' - */ -[_LOWER] = LAYOUT_preonic_1x2uC( - KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, - KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, - KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, - _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),KC_HOME, KC_END, _______, - _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_VOLD, KC_VOLU, KC_MNXT -), - -/* Raise - * ,-----------------------------------------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | Play | Vol- | Vol+ | Next | - * `-----------------------------------------------------------------------------------' - */ -[_RAISE] = LAYOUT_preonic_1x2uC( - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, - KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, - _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______, - _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_VOLD, KC_VOLU, KC_MNXT -), - -/* Adjust (Lower + Raise) - * ,-----------------------------------------------------------------------------------. - * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | Reset| | | | | | | | | | Del | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * |CPSLCK| | |Aud on|AudOff|AGnorm|AGswap|Qwerty|Workmn|Dvorak|Colemk| | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | - * `-----------------------------------------------------------------------------------' - */ -[_ADJUST] = LAYOUT_preonic_1x2uC( - KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, - _______, QK_BOOT, DB_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, - KC_CAPS, _______, MU_NEXT, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, WORKMAN, DVORAK, COLEMAK, _______, - _______, AU_PREV, AU_NEXT, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ -), - -/* Numpad - * ,-----------------------------------------------------------------------------------. - * | | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ | / | * | - | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | ✗ | Home | Up | End | PgUp | ✗ | 7 | 8 | 9 | + | | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | ✗ | Left | Down | Right| PgDn | ✗ | 4 | 5 | 6 | + | ✗ | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | / | * | - | + | Enter| ✗ | 1 | 2 | 3 | Enter| Enter| - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | ✗ | | 0 | 0 | . | Enter| = | - * `-----------------------------------------------------------------------------------' - */ -[_NUMPAD] = LAYOUT_preonic_1x2uC( - _______, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PSLS, KC_PAST, KC_PMNS, _______, - _______, KC_NO, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_NO, KC_P7, KC_P8, KC_P9, KC_PPLS, _______, - _______, KC_NO, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_NO, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_NO, - _______, KC_PSLS, KC_PAST, KC_PMNS, KC_PPLS, KC_PENT, KC_NO, KC_P1, KC_P2, KC_P3, KC_PENT, KC_PENT, - _______, _______, _______, _______, KC_NO, _______, KC_P0, KC_P0, KC_PDOT, KC_PENT, KC_PEQL -) - - -}; - -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; - case WORKMAN: - if (record->event.pressed) { - set_single_persistent_default_layer(_WORKMAN); - } - return false; - case COLEMAK: - if (record->event.pressed) { - set_single_persistent_default_layer(_COLEMAK); - } - return false; - case DVORAK: - if (record->event.pressed) { - set_single_persistent_default_layer(_DVORAK); - } - return false; - 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; - 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; - 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; - } - return true; -}; - -bool numpadActive = false; - -float tone_numpad_on[][2] = SONG(NUMPAD_ON_SOUND); - -void matrix_scan_user (void) { - uint8_t layer = get_highest_layer(layer_state); - - switch (layer) { - case _NUMPAD: - if (!numpadActive) { - numpadActive = true; - PLAY_SONG(tone_numpad_on); - } - break; - default: - if (numpadActive) { - numpadActive = false; - } - } -}; diff --git a/keyboards/preonic/keymaps/dudeofawesome/readme.md b/keyboards/preonic/keymaps/dudeofawesome/readme.md deleted file mode 100644 index a5d89fc828..0000000000 --- a/keyboards/preonic/keymaps/dudeofawesome/readme.md +++ /dev/null @@ -1,22 +0,0 @@ -# DudeOfAwesome's Preonic layout - -![Preonic Layout](https://i.imgur.com/EC42Pnw.png) - -## Features - -- Base Layers - - QWERTY - - Workman - - Dvorak - - Colemak -- Numpad layer - ![numpad layer](https://i.imgur.com/IH8sWmQ.png) -- Audio - -## Building and flashing - -1. Put your board in DFU mode with either the button on the bottom, or with a software key in your current firmware -1. Flash: - ```bash - $ make preonic/rev2:dudeofawesome:dfu - ``` diff --git a/keyboards/preonic/keymaps/dudeofawesome/rules.mk b/keyboards/preonic/keymaps/dudeofawesome/rules.mk deleted file mode 100644 index 607192459a..0000000000 --- a/keyboards/preonic/keymaps/dudeofawesome/rules.mk +++ /dev/null @@ -1,5 +0,0 @@ -BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = yes # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. diff --git a/keyboards/preonic/keymaps/kuatsure/config.h b/keyboards/preonic/keymaps/kuatsure/config.h deleted file mode 100644 index e5b55d131d..0000000000 --- a/keyboards/preonic/keymaps/kuatsure/config.h +++ /dev/null @@ -1,39 +0,0 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - - -#ifdef AUDIO_ENABLE - #define STARTUP_SONG SONG(PREONIC_SOUND) - // #define STARTUP_SONG SONG(NO_SOUND) - - #define GAME_SOUND VICTORY_FANFARE_SHORT - - #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ - SONG(GAME_SOUND) \ - } -#endif - -#define MUSIC_MASK (keycode != KC_NO) - -/* - * MIDI options - */ - -/* 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 - -#endif diff --git a/keyboards/preonic/keymaps/kuatsure/keymap.c b/keyboards/preonic/keymaps/kuatsure/keymap.c deleted file mode 100644 index 86795cba03..0000000000 --- a/keyboards/preonic/keymaps/kuatsure/keymap.c +++ /dev/null @@ -1,190 +0,0 @@ -/* Copyright 2015-2017 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 "kuatsure.h" - -#define LAYOUT_preonic_grid_wrapper(...) LAYOUT_preonic_grid(__VA_ARGS__) - -enum preonic_layers { - _QWERTY, - _GAME, - _LOWER, - _RAISE, - _ADJUST, -}; - -enum preonic_keycodes { - QWERTY = USER_SAFE_RANGE, - GAME, - LOWER, - RAISE, -}; - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - -/* Qwerty - * ,-----------------------------------------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Tab/M| Q | W | E | R | T | Y | U | I | O | P | \ | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc/C| A | S | D | F | G | H | J | K | L | ; | ' | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * |Leader| Game | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | - * `-----------------------------------------------------------------------------------' - */ -[_QWERTY] = LAYOUT_preonic_grid_wrapper( - KC_GRV, _________________NUMBER_L1_________________, _________________NUMBER_R1_________________, KC_BSPC, - KT_MTAB, _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, KC_BSLS, - KT_CESC, _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, KC_QUOT, - KC_LSFT, _________________QWERTY_L3_________________, _________________QWERTY_R3_________________, KC_ENT, - QK_LEAD, GAME, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT -), - -/* Game - * - * Mostly transparent, but wanted to disable gui key. - * Also give a key to get back to qwerty layout. - * - * ,-----------------------------------------------------------------------------------. - * | | | | | | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | | | | | | | | | | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | | | | | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | |Qwerty| | Spc | | | | | | | | - * `-----------------------------------------------------------------------------------' - */ -[_GAME] = LAYOUT_preonic_grid_wrapper( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, QWERTY, _______, KC_SPC, _______, _______, _______, _______, _______, _______, _______, _______ -), - -/* Lower - * ,-----------------------------------------------------------------------------------. - * | E`~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | | Up | | ` | < | { | } | _ | | | | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | Del | Left | Down | Right| ~ | = | ( | ) | + | : | " | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | Vol- | Prev | Play | Next | Vol+ | - | [ | ] | > | ? | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | Mute | | | | | | Home | PgDn | PgUp | End | - * `-----------------------------------------------------------------------------------' - */ -[_LOWER] = LAYOUT_preonic_grid_wrapper( - QK_GESC, _________________SYMBOL_L1_________________, _________________SYMBOL_R1_________________, _______, - _______, _______, _______, KC_UP, _______, KC_GRV, _______, ____CRBRACES____, KC_UNDS, _______, KC_PIPE, - _______, KC_DEL, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TILD, KC_EQL, _____PARENS_____, KC_PLUS, KC_COLN, KC_DQT , - _______, KC_VOLD, KC_MRWD, KC_MPLY, KC_MFFD, KC_VOLU, KC_MINS, ___SQBRACKETS___, _______, KC_QUES, _______, - _______, KC_MUTE, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END -), - -/* Raise - * ,-----------------------------------------------------------------------------------. - * | | | | | | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | F9 | F10 | F11 | F12 | | * | 7 | 8 | 9 | 0 | | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | F5 | F6 | F7 | F8 | | = | 4 | 5 | 6 | + | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F1 | F2 | F3 | F4 | | - | 1 | 2 | 3 | / | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | 0 | 0 | | | - * `-----------------------------------------------------------------------------------' - */ -[_RAISE] = LAYOUT_preonic_grid_wrapper( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, ____________FUNCTION_3____________, _______, KC_ASTR, KC_7, KC_8, KC_9, KC_0, _______, - _______, ____________FUNCTION_2____________, _______, KC_EQL, KC_4, KC_5, KC_6, KC_PLUS, _______, - _______, ____________FUNCTION_1____________, _______, KC_MINS, KC_1, KC_2, KC_3, KC_SLASH, _______, - _______, _______, _______, _______, _______, _______, _______, _______, KC_0, KC_0, _______, _______ -), - -/* Adjust (Lower + Raise) - * ,-----------------------------------------------------------------------------------. - * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | MAKE | FLSH | | | | | | | | | Del | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | Boot | Debug| | |Aud on|AudOff| | | | | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | VRSN | | |MusMod|Mus on|MusOff| | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | |Qwerty| Game | | | - * `-----------------------------------------------------------------------------------' - */ -[_ADJUST] = LAYOUT_preonic_grid_wrapper( - ____________FUNCTION_1____________, ____________FUNCTION_2____________, ____________FUNCTION_3____________, - _______, KB_MAKE, KB_FLSH, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, - _______, QK_BOOT, DB_TOGG, _______, _______, AU_ON, AU_OFF, _______, _______, _______, _______, _______, - _______, KB_VRSN, _______, _______, MU_NEXT, MU_ON, MU_OFF, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, QWERTY, GAME, _______, _______ -), - -}; - -bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case QWERTY: - if (record->event.pressed) { - set_single_persistent_default_layer(_QWERTY); - } - return false; - break; - - case GAME: - if (record->event.pressed) { - set_single_persistent_default_layer(_GAME); - } - 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; - - } - return true; -}; diff --git a/keyboards/preonic/keymaps/kuatsure/readme.md b/keyboards/preonic/keymaps/kuatsure/readme.md deleted file mode 100644 index 64cf5ae28e..0000000000 --- a/keyboards/preonic/keymaps/kuatsure/readme.md +++ /dev/null @@ -1 +0,0 @@ -# The kuatsure Preonic layout - largely based on the Preonic's & Keyboard Paradise V60's layout diff --git a/keyboards/preonic/keymaps/kuatsure/rules.mk b/keyboards/preonic/keymaps/kuatsure/rules.mk deleted file mode 100644 index 9369f99a9e..0000000000 --- a/keyboards/preonic/keymaps/kuatsure/rules.mk +++ /dev/null @@ -1,2 +0,0 @@ -BACKLIGHT_ENABLE = no -LEADER_ENABLE = yes diff --git a/keyboards/preonic/keymaps/mguterl/config.h b/keyboards/preonic/keymaps/mguterl/config.h deleted file mode 100644 index 37858350a8..0000000000 --- a/keyboards/preonic/keymaps/mguterl/config.h +++ /dev/null @@ -1,34 +0,0 @@ -#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 - */ - -/* 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/mguterl/keymap.c b/keyboards/preonic/keymaps/mguterl/keymap.c deleted file mode 100644 index ecf65b0497..0000000000 --- a/keyboards/preonic/keymaps/mguterl/keymap.c +++ /dev/null @@ -1,325 +0,0 @@ -/* Copyright 2015-2017 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" -#include "mguterl.h" - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - -/* Qwerty - * ,-----------------------------------------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * |HypTab| Q | W | E | R | T | Y | U | I | O | P | Bksp | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * |EscCtl| A | S | D | F | G | H | J | K | L | ; | " | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | GESC | Ctrl | Alt | GUI |Lower |SpcUtl|SpcUtl|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_BSPC, - HPR_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, - ESC_CTL, 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, SFT_ENT, - QK_GESC, KC_LCTL, KC_LALT, KC_LGUI, LOWER, SPC_UTL, SPC_UTL, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT -), - -/* - * Gaming is very similar to Qwerty. Certain features from Qwerty are disable - * for better gaming experience. - */ -[_GAMING] = LAYOUT_preonic_grid( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - KC_TAB, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - KC_ESC, _______, _______, _______, _______, KC_SPC, KC_SPC, _______, _______, _______, _______, _______ -), - -/* - * Util is accessed by holding Space. The Util layer contains vimkeys and - * shortcuts that I find myself needing often. - */ -[_UTIL] = LAYOUT_preonic_grid( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, GUI_1, GUI_2, GUI_3, GUI_4, GUI_5, GUI_6, GUI_7, GUI_8, GUI_9, GUI_0, _______, - _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, - _______, _______, _______, _______, _______, _______, _______, GO_BACK, GO_FWD, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ -), - -/* Colemak - * ,-----------------------------------------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Del | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | R | S | T | D | H | N | E | I | O | " | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Brite| Ctrl | Alt | GUI |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_BSPC, - KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_DEL, - 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, - BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, 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 | Bksp | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Tab | " | , | . | P | Y | F | G | C | R | L | Del | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | O | E | U | I | D | H | T | N | S | / | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Brite| Ctrl | Alt | GUI |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_BSPC, - KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DEL, - 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, - BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT -), - -/* Lower - * ,-----------------------------------------------------------------------------------. - * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 | - | = | [ | ] | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | Next | Vol- | Vol+ | Play | - * `-----------------------------------------------------------------------------------' - */ -[_LOWER] = LAYOUT_preonic_grid( - KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, - KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, - KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, - _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, - _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY -), - -/* Raise - * ,-----------------------------------------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Del | F1 | F2 | F3 | F4 | F5 | F6 | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 | | |Pg Up |Pg Dn | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | Next | Vol- | Vol+ | Play | - * `-----------------------------------------------------------------------------------' - */ -[_RAISE] = 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_BSPC, - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, - KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, _______, _______, _______, _______, - _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, KC_PGUP, KC_PGDN, _______, - _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY -), - -/* Adjust (Lower + Raise) - * ,-----------------------------------------------------------------------------------. - * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * |ToGame| Reset| | | | | | | | | | Del | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | |Aud on|AudOff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | - * `-----------------------------------------------------------------------------------' - */ -[_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, - TG_GAME, QK_BOOT, DB_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, - _______, _______, MU_NEXT, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, - _______, AU_PREV, AU_NEXT, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ -) - - -}; - -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 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; - -bool 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) { - #ifdef MOUSEKEY_ENABLE - tap_code(KC_MS_WH_DOWN); - #else - tap_code(KC_PGDN); - #endif - } else { - #ifdef MOUSEKEY_ENABLE - tap_code(KC_MS_WH_UP); - #else - tap_code(KC_PGUP); - #endif - } - } - return true; -} - -bool 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; - } - } - return true; -} - - -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/mguterl/readme.md b/keyboards/preonic/keymaps/mguterl/readme.md deleted file mode 100644 index f909976011..0000000000 --- a/keyboards/preonic/keymaps/mguterl/readme.md +++ /dev/null @@ -1,18 +0,0 @@ -# Michael Guterl's Preonic Layout - -I have a very similar [keymap](/keyboards/planck/keymaps/mguterl) for my -Planck. - -Check out my [userspace](/users/mguterl) for the custom keycodes that are used -in keymap.c. - -At a very high level I use 4 layers: - -* Qwerty - Letters -* Util - Vimkeys for navigation and other convenient things -* Raise - Numbers and F keys -* Lower - Symbols - -```sh -make preonic/rev3:mguterl:flash -``` diff --git a/keyboards/preonic/keymaps/mguterl/rules.mk b/keyboards/preonic/keymaps/mguterl/rules.mk deleted file mode 100644 index dcf16bef39..0000000000 --- a/keyboards/preonic/keymaps/mguterl/rules.mk +++ /dev/null @@ -1 +0,0 @@ -SRC += muse.c diff --git a/keyboards/preonic/keymaps/mverteuil/config.h b/keyboards/preonic/keymaps/mverteuil/config.h deleted file mode 100644 index 1c7bae0183..0000000000 --- a/keyboards/preonic/keymaps/mverteuil/config.h +++ /dev/null @@ -1,36 +0,0 @@ -#ifdef AUDIO_ENABLE -# if __has_include("copyright.h") -# include "copyright.h" -# endif - -# define AUDIO_CLICKY_DELAY_DURATION 0 -# define AUDIO_CLICKY_FREQ_DEFAULT 100.0f -# define AUDIO_CLICKY_FREQ_MIN 61.0f -# define AUDIO_CLICKY_FREQ_RANDOMNESS 0.2f -# define DAC_SAMPLE_MAX 7000U -# define STARTUP_SONG SONG(WORKMAN_SOUND) -# define GOODBYE_SONG SONG(COIN_SOUND) -#endif - -#define MUSIC_MASK (keycode != KC_NO) - -/* - * MIDI options - */ - -/* 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/mverteuil/keymap.c b/keyboards/preonic/keymaps/mverteuil/keymap.c deleted file mode 100644 index e81f38362a..0000000000 --- a/keyboards/preonic/keymaps/mverteuil/keymap.c +++ /dev/null @@ -1,510 +0,0 @@ -/* Copyright 2015-2017 Jack Humbert, 2019 Matthew de Verteuil - * - * 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" -#include "mverteuil.h" - -/* TapDance Aliases */ -#define TD_LBRK TD(TD_BRACKETS_LEFT) -#define TD_RBRK TD(TD_BRACKETS_RIGHT) -#define TD_CLES TD(TD_CONTROL_ESCAPE) -#define TD_NPFR TD(TD_NUMPAD_FUNCTIONROW) -#define TD_PLEQ TD(TD_PLUS_EQUALS) -#define TD_SCOL TD(TD_SEMICOLON_COLON) -#define TD_SLQU TD(TD_SLASH_QUESTION) -#define TD_SQDQ TD(TD_QUOTE_DOUBLEQUOTE) -#define TD_USMI TD(TD_UNDERSCORE_MINUS) - -/* Sentinel value for invalid tap dance exit */ -#define TAP_DANCE_NO_MATCH 64 - -enum preonic_layers { - _QWERTY, - _FUNCTIONROW, - _NUMPAD, - _LOWER, - _RAISE, - _ADJUST, -}; - -enum preonic_keycodes { - QWERTY = SAFE_RANGE, - NUMPAD, - LOWER, - RAISE, - BACKLIT, -}; - -enum tapdance_keycodes { - TD_BRACKETS_LEFT, - TD_BRACKETS_RIGHT, - TD_CONTROL_ESCAPE, - TD_NUMPAD_FUNCTIONROW, - TD_PLUS_EQUALS, - TD_QUOTE_DOUBLEQUOTE, - TD_SEMICOLON_COLON, - TD_SLASH_QUESTION, - TD_UNDERSCORE_MINUS, -}; - -typedef enum { - SINGLE_TAP, - SINGLE_HOLD, - DOUBLE_TAP, - DOUBLE_HOLD, - TRIPLE_TAP, - TRIPLE_HOLD, -} t_tap_state; - -typedef struct { - t_tap_state left_brackets; - t_tap_state numpad_funcrow; - t_tap_state right_brackets; -} t_tap; - -t_tap_state get_tapdance_state(tap_dance_state_t *state); - -void td_numpad_funcrow_finished(tap_dance_state_t *state, void *user_data); -void td_numpad_funcrow_reset(tap_dance_state_t *state, void *user_data); -void td_brackets_left_finished(tap_dance_state_t *state, void *user_data); -void td_brackets_left_reset(tap_dance_state_t *state, void *user_data); -void td_brackets_right_finished(tap_dance_state_t *state, void *user_data); -void td_brackets_right_reset(tap_dance_state_t *state, void *user_data); - -/* Tap Dance Definitions */ -tap_dance_action_t tap_dance_actions[] = { - /* Tap once for left parenthesis, twice for left bracket, thrice for left brace */ - [TD_BRACKETS_LEFT] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, td_brackets_left_finished, td_brackets_left_reset), - /* Tap once for right parenthesis, twice for right bracket, thrice for right brace */ - [TD_BRACKETS_RIGHT] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, td_brackets_right_finished, td_brackets_right_reset), - /* Tap once for control, twice for escape */ - [TD_CONTROL_ESCAPE] = ACTION_TAP_DANCE_DOUBLE(KC_LCTL, KC_ESCAPE), - /* Tap once for plus, twice for equals */ - [TD_PLUS_EQUALS] = ACTION_TAP_DANCE_DOUBLE(KC_PLUS, KC_EQUAL), - /* Hold for numpad, tap twice to toggle function row, double hold for temporary function row */ - [TD_NUMPAD_FUNCTIONROW] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, td_numpad_funcrow_finished, td_numpad_funcrow_reset), - /* Tap once for single quote, twice for double quote */ - [TD_QUOTE_DOUBLEQUOTE] = ACTION_TAP_DANCE_DOUBLE(KC_QUOTE, KC_DOUBLE_QUOTE), - /* Tap once for semicolon, twice for colon */ - [TD_SEMICOLON_COLON] = ACTION_TAP_DANCE_DOUBLE(KC_SEMICOLON, KC_COLON), - /* Tap once for slash, twice for question mark */ - [TD_SLASH_QUESTION] = ACTION_TAP_DANCE_DOUBLE(KC_SLASH, KC_QUESTION), - /* Tap once for underscore, twice for minus */ - [TD_UNDERSCORE_MINUS] = ACTION_TAP_DANCE_DOUBLE(KC_UNDERSCORE, KC_MINUS), -}; - -/* clang-format off */ -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - -/* Qwerty - * ,-----------------------------------------------------------------------------------. - * | ` | ! | @ | # | $ | % | ^ | & | * | _ - | + = | Bksp | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Tab | Q | W | E | R | T | Y | U | I | O | P | ' " | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * |CtlEsc| A | S | D | F | G | H | J | K | L | ; : | Enter| - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | N | M | , | . | Up | GUI | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * |NP FRw| Ctrl | Alt | GUI |Lower | Space |Raise | / ? | Left | Down |Right | - * `-----------------------------------------------------------------------------------' - */ -[_QWERTY] = LAYOUT_preonic_1x2uC ( - KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, TD_USMI, TD_PLEQ, KC_BSPC, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, TD_SQDQ, - TD_CLES, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, TD_SCOL, KC_ENT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_RGUI, - TD_NPFR, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, RAISE, TD_SLQU, KC_LEFT, KC_DOWN, KC_RGHT -), - -/* Function Row - * ,-----------------------------------------------------------------------------------. - * | F12 | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | | | | | | | | | | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | | | | | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | - * `-----------------------------------------------------------------------------------' - */ -[_FUNCTIONROW] = LAYOUT_preonic_1x2uC ( - KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ -), - -/* Numpad - * ,------+------+------+------+------+------|------+------+------+------+------+------. - * | | | | | | | | Tab | / | * |Bksp | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | | | | | | | 7 | 8 | 9 | - | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | | | | | | | 4 | 5 | 6 | + | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | | | | | | | 1 | 2 | 3 |Enter | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | 0 | . |Enter | | - * `-----------------------------------------------------------------------------------' - */ -[_NUMPAD] = LAYOUT_preonic_1x2uC ( - _______, _______, _______, _______, _______, _______, _______, KC_TAB, KC_SLSH, KC_PAST, KC_BSPC, _______, - _______, _______, _______, _______, _______, _______, _______, KC_KP_7, KC_KP_8, KC_KP_9, KC_PMNS, _______, - _______, _______, _______, _______, _______, _______, _______, KC_KP_4, KC_KP_5, KC_KP_6, KC_PPLS, _______, - _______, _______, _______, _______, _______, _______, _______, KC_KP_1, KC_KP_2, KC_KP_3, KC_PENT, _______, - _______, _______, _______, _______, _______, _______, _______, KC_KP_0, KC_PDOT, KC_PENT, _______ -), - -/* Lower - * ,-----------------------------------------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | Vol+ | | | | | | | | Play | | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | Prev | Vol- | Next | | | ? | _ | + | | | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | | | | | | | Mute | | | PgUp | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * |RGBmod| | | | | | | \ | Home | PgDn | End | - * `-----------------------------------------------------------------------------------' - */ -[_LOWER] = LAYOUT_preonic_1x2uC ( - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, - _______, _______, KC_VOLU, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, _______, - _______, KC_MPRV, KC_VOLD, KC_MNXT, _______, _______, KC_QUES, KC_UNDS, KC_PLUS, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, KC_MUTE, _______, _______, KC_PGUP, _______, - _______, _______, _______, _______, _______, _______, _______, KC_BSLS, KC_HOME, KC_PGDN, KC_END -), - -/* Raise - * ,-----------------------------------------------------------------------------------. - * | ~ | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | | | | | | | | [ { (| ) } ]| | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | | | | | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | - * `-----------------------------------------------------------------------------------' - */ -[_RAISE] = LAYOUT_preonic_1x2uC ( - KC_TILD, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, TD_LBRK, TD_RBRK, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, KC_PIPE, _______, _______, _______ -), - -/* Adjust (Lower + Raise) - * ,-----------------------------------------------------------------------------------. - * |AudTog|XXXXXX|XXXXXX|XXXXXX|XXXXXX|XXXXXX|XXXXXX|XXXXXX|XXXXXX|XXXXXX| Debug| Reset| - * |------+------+------+------+------+------+------+------+------+------+------+------| - * |ClkTog|ClkFq-|ClkFq+|XXXXXX|XXXXXX|XXXXXX|XXXXXX|XXXXXX|XXXXXX|XXXXXX|XXXXXX|XXXXXX| - * |------+------+------+------+------+-------------+------+------+------+------+------| - * |MusTog|Voice- Voice+|XXXXXX|XXXXXX|XXXXXX|XXXXXX|XXXXXX|XXXXXX|XXXXXX|AGnorm|AGswap| - * |------+------+------+------+------+------|------+------+------+------+------+------| - * |MidTog|Rplain|Rbreat|Rrainb|Rswirl|Rsnake|Rkridr|Rxmas |Rgrad |RGBtst|XXXXXX|Shift | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * |RGBmod|RGBhue|RBGsat|RGBval| | | |XXXXXX|XXXXXX|XXXXXX|XXXXXX| - * `-----------------------------------------------------------------------------------' - */ -[_ADJUST] = LAYOUT_preonic_1x2uC ( - AU_TOGG, XXXXXXX, XXXXXXX, XXXXXXX, RGB_HUI, RGB_HUD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DB_TOGG, QK_BOOT, - CK_TOGG, CK_DOWN, CK_UP, XXXXXXX, RGB_SAI, RGB_SAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - MU_TOGG, AU_PREV, AU_NEXT, XXXXXXX, RGB_VAI, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, AG_NORM, AG_SWAP, - MI_TOGG, RGB_M_P, RGB_M_B, RGB_M_R,RGB_M_SW,RGB_M_SN, RGB_M_K, RGB_M_X, RGB_M_G, RGB_M_T, RGB_SPI, KC_LSFT, - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, RGB_TOG, _______, XXXXXXX,RGB_RMOD, RGB_SPD, RGB_MOD -) - -}; -/* clang-format on */ - -float s_audio_on[][2] = AUDIO_ON_SONG; -float s_layer_lower[][2] = LAYER_LOWER_SONG; -float s_layer_raise[][2] = LAYER_RAISE_SONG; - -void audio_on_user(void) { PLAY_SONG(s_audio_on); }; - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case LOWER: - if (record->event.pressed) { - layer_on(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - PLAY_SONG(s_layer_lower); - } 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); - PLAY_SONG(s_layer_raise); - } 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; -}; - -/* Global TapDance State */ -static t_tap tap_state = { - .left_brackets = 0, - .numpad_funcrow = 0, - .right_brackets = 0, -}; - -float s_functionrow_on[][2] = LAYER_FUNCROW_ON_SONG; -float s_functionrow_off[][2] = LAYER_FUNCROW_OFF_SONG; -float s_numpad_toggle[][2] = LAYER_NMPAD_SONG; - -t_tap_state get_tapdance_state(tap_dance_state_t *state) { - if (state->count == 1) { - if (state->interrupted || !state->pressed) { - return SINGLE_TAP; - } else { - return SINGLE_HOLD; - } - } else if (state->count == 2) { - if (state->interrupted || !state->pressed) { - return DOUBLE_TAP; - } else { - return DOUBLE_HOLD; - } - } else if (state->count == 3) { - if (state->interrupted || !state->pressed) { - return TRIPLE_TAP; - } else { - return TRIPLE_HOLD; - } - } else - return TAP_DANCE_NO_MATCH; -} - -void td_numpad_funcrow_finished(tap_dance_state_t *state, void *user_data) { - tap_state.numpad_funcrow = get_tapdance_state(state); - switch (tap_state.numpad_funcrow) { - case SINGLE_TAP ... SINGLE_HOLD: - layer_on(_NUMPAD); - PLAY_SONG(s_numpad_toggle); - break; - case DOUBLE_HOLD: - layer_on(_FUNCTIONROW); - break; - case DOUBLE_TAP: - if (layer_state_is(_FUNCTIONROW)) { - layer_off(_FUNCTIONROW); - PLAY_SONG(s_functionrow_off); - } else { - layer_on(_FUNCTIONROW); - PLAY_SONG(s_functionrow_on); - } - break; - default: - break; - } -} - -void td_numpad_funcrow_reset(tap_dance_state_t *state, void *user_data) { - switch (tap_state.numpad_funcrow) { - case SINGLE_HOLD: - layer_off(_NUMPAD); - break; - case DOUBLE_HOLD: - layer_off(_FUNCTIONROW); - break; - default: - break; - } -} - -void td_brackets_left_finished(tap_dance_state_t *state, void *user_data) { - tap_state.left_brackets = get_tapdance_state(state); - switch (tap_state.left_brackets) { - case SINGLE_TAP: - register_code16(KC_LEFT_PAREN); - break; - case DOUBLE_TAP: - register_code(KC_LEFT_BRACKET); - break; - case TRIPLE_TAP: - register_code16(KC_LEFT_CURLY_BRACE); - break; - default: - break; - } -} - -void td_brackets_left_reset(tap_dance_state_t *state, void *user_data) { - switch (tap_state.left_brackets) { - case SINGLE_TAP: - unregister_code16(KC_LEFT_PAREN); - break; - case DOUBLE_TAP: - unregister_code(KC_LEFT_BRACKET); - break; - case TRIPLE_TAP: - unregister_code16(KC_LEFT_CURLY_BRACE); - break; - default: - break; - } - tap_state.left_brackets = 0; -} - -void td_brackets_right_finished(tap_dance_state_t *state, void *user_data) { - tap_state.right_brackets = get_tapdance_state(state); - switch (tap_state.right_brackets) { - case SINGLE_TAP: - register_code16(KC_RIGHT_PAREN); - break; - case DOUBLE_TAP: - register_code(KC_RIGHT_BRACKET); - break; - case TRIPLE_TAP: - register_code16(KC_RIGHT_CURLY_BRACE); - break; - default: - break; - } -} - -void td_brackets_right_reset(tap_dance_state_t *state, void *user_data) { - switch (tap_state.right_brackets) { - case SINGLE_TAP: - unregister_code16(KC_RIGHT_PAREN); - break; - case DOUBLE_TAP: - unregister_code(KC_RIGHT_BRACKET); - break; - case TRIPLE_TAP: - unregister_code16(KC_RIGHT_CURLY_BRACE); - break; - default: - break; - } - tap_state.right_brackets = 0; -} - -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; - -bool 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) { - tap_code(KC_PGDN); - } else { - tap_code(KC_PGUP); - } - } - return true; -} - -bool 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; - } - } - return true; -} - -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/mverteuil/readme.md b/keyboards/preonic/keymaps/mverteuil/readme.md deleted file mode 100644 index b21df3f8fa..0000000000 --- a/keyboards/preonic/keymaps/mverteuil/readme.md +++ /dev/null @@ -1,2 +0,0 @@ -# mverteuil does olkb preonic -## 1x2u: One 2u spacebar on bottom row diff --git a/keyboards/preonic/keymaps/mverteuil/rules.mk b/keyboards/preonic/keymaps/mverteuil/rules.mk deleted file mode 100644 index a29a3cad79..0000000000 --- a/keyboards/preonic/keymaps/mverteuil/rules.mk +++ /dev/null @@ -1,5 +0,0 @@ -SRC += muse.c - -AUDIO_ENABLE = yes -MIDI_ENABLE = yes -TAP_DANCE_ENABLE = yes diff --git a/keyboards/preonic/keymaps/mverteuil_2x2u/config.h b/keyboards/preonic/keymaps/mverteuil_2x2u/config.h deleted file mode 100644 index 1c7bae0183..0000000000 --- a/keyboards/preonic/keymaps/mverteuil_2x2u/config.h +++ /dev/null @@ -1,36 +0,0 @@ -#ifdef AUDIO_ENABLE -# if __has_include("copyright.h") -# include "copyright.h" -# endif - -# define AUDIO_CLICKY_DELAY_DURATION 0 -# define AUDIO_CLICKY_FREQ_DEFAULT 100.0f -# define AUDIO_CLICKY_FREQ_MIN 61.0f -# define AUDIO_CLICKY_FREQ_RANDOMNESS 0.2f -# define DAC_SAMPLE_MAX 7000U -# define STARTUP_SONG SONG(WORKMAN_SOUND) -# define GOODBYE_SONG SONG(COIN_SOUND) -#endif - -#define MUSIC_MASK (keycode != KC_NO) - -/* - * MIDI options - */ - -/* 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/mverteuil_2x2u/keymap.c b/keyboards/preonic/keymaps/mverteuil_2x2u/keymap.c deleted file mode 100644 index cab5cdcb05..0000000000 --- a/keyboards/preonic/keymaps/mverteuil_2x2u/keymap.c +++ /dev/null @@ -1,415 +0,0 @@ -/* Copyright 2015-2017 Jack Humbert, 2019 Matthew de Verteuil - * - * 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" -#include "mverteuil.h" - -/* Layer Aliases */ -#define LT_LWSP LT(_LOWER, KC_SPACE) -#define LT_RSRT LT(_RAISE, KC_ENTER) -#define MO_NUMS MO(_NUMPAD) - -/* Mod-Tap Aliases */ -#define MT_CESC CTL_T(KC_ESCAPE) - -/* TapDance Aliases */ -#define TD_LBRK TD(TD_BRACKETS_LEFT) -#define TD_RBRK TD(TD_BRACKETS_RIGHT) -#define TD_PLEQ TD(TD_PLUS_EQUALS) -#define TD_SCOL TD(TD_SEMICOLON_COLON) -#define TD_SLQU TD(TD_SLASH_QUESTION) -#define TD_SQDQ TD(TD_QUOTE_DOUBLEQUOTE) -#define TD_USMI TD(TD_UNDERSCORE_MINUS) - -/* Sentinel value for invalid tap dance exit */ -#define TAP_DANCE_NO_MATCH 64 - -enum preonic_layers { - _QWERTY, - _NUMPAD, - _LOWER, - _RAISE, - _ADJUST, -}; - -enum preonic_keycodes { - QWERTY = SAFE_RANGE, - NUMPAD, - LOWER, - RAISE, - BACKLIT, -}; - -enum tapdance_keycodes { - TD_BRACKETS_LEFT, - TD_BRACKETS_RIGHT, - TD_CONTROL_ESCAPE, - TD_PLUS_EQUALS, - TD_QUOTE_DOUBLEQUOTE, - TD_SEMICOLON_COLON, - TD_SLASH_QUESTION, - TD_UNDERSCORE_MINUS, -}; - -typedef enum { - SINGLE_TAP, - SINGLE_HOLD, - DOUBLE_TAP, - DOUBLE_HOLD, - TRIPLE_TAP, - TRIPLE_HOLD, -} t_tap_state; - -typedef struct { - t_tap_state left_brackets; - t_tap_state right_brackets; -} t_tap; - -t_tap_state get_tapdance_state(tap_dance_state_t *state); - -void td_brackets_left_finished(tap_dance_state_t *state, void *user_data); -void td_brackets_left_reset(tap_dance_state_t *state, void *user_data); -void td_brackets_right_finished(tap_dance_state_t *state, void *user_data); -void td_brackets_right_reset(tap_dance_state_t *state, void *user_data); - -/* Tap Dance Definitions */ -tap_dance_action_t tap_dance_actions[] = { - /* Tap once for left parenthesis, twice for left bracket, thrice for left brace */ - [TD_BRACKETS_LEFT] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, td_brackets_left_finished, td_brackets_left_reset), - /* Tap once for right parenthesis, twice for right bracket, thrice for right brace */ - [TD_BRACKETS_RIGHT] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, td_brackets_right_finished, td_brackets_right_reset), - /* Tap once for plus, twice for equals */ - [TD_PLUS_EQUALS] = ACTION_TAP_DANCE_DOUBLE(KC_PLUS, KC_EQUAL), - /* Tap once for single quote, twice for double quote */ - [TD_QUOTE_DOUBLEQUOTE] = ACTION_TAP_DANCE_DOUBLE(KC_QUOTE, KC_DOUBLE_QUOTE), - /* Tap once for semicolon, twice for colon */ - [TD_SEMICOLON_COLON] = ACTION_TAP_DANCE_DOUBLE(KC_SEMICOLON, KC_COLON), - /* Tap once for slash, twice for question mark */ - [TD_SLASH_QUESTION] = ACTION_TAP_DANCE_DOUBLE(KC_SLASH, KC_QUESTION), - /* Tap once for underscore, twice for minus */ - [TD_UNDERSCORE_MINUS] = ACTION_TAP_DANCE_DOUBLE(KC_UNDERSCORE, KC_MINUS), -}; - -/* clang-format off */ -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - -/* Qwerty - * ,-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------. - * | ` | ! | @ | # | $ | % | ^ | & | * | _ - | + = | Bksp | - * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| - * | Tab | Q | W | E | R | T | Y | U | I | O | P | ' " | - * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| - * |CtrlEsc| A | S | D | F | G | H | J | K | L | ; : | / ? | - * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| - * | Shift | Z | X | C | V | B | N | M | , | . | ↑ | RShift| - * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| - * |NumPad | Ctrl | Alt | GUI | Lower/Space | Raise/Enter | GUI | ← | ↓ | → | - * `-----------------------------------------------------------------------------------------------' - */ -[_QWERTY] = LAYOUT_preonic_2x2u ( - KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, TD_USMI, TD_PLEQ, KC_BSPC, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, TD_SQDQ, - MT_CESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, TD_SCOL, TD_SLQU, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_RSFT, - MO_NUMS, KC_LCTL, KC_LALT, KC_LGUI, LT_LWSP, LT_RSRT, KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT -), - -/* Numpad - * ,-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------. - * | | | | | | | | Tab | / | * | Bksp | | - * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| - * | | | | | | | | 7 | 8 | 9 | - | | - * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| - * | | | | | | | | 4 | 5 | 6 | + | | - * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| - * | | | | | | | | 1 | 2 | 3 | Enter | | - * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| - * | | | | | | | 0 | . | Enter | | - * `-----------------------------------------------------------------------------------------------' - */ -[_NUMPAD] = LAYOUT_preonic_2x2u ( - _______, _______, _______, _______, _______, _______, _______, KC_TAB, KC_SLSH, KC_PAST, KC_BSPC, _______, - _______, _______, _______, _______, _______, _______, _______, KC_KP_7, KC_KP_8, KC_KP_9, KC_PMNS, _______, - _______, _______, _______, _______, _______, _______, _______, KC_KP_4, KC_KP_5, KC_KP_6, KC_PPLS, _______, - _______, _______, _______, _______, _______, _______, _______, KC_KP_1, KC_KP_2, KC_KP_3, KC_PENT, _______, - _______, _______, _______, _______, _______, _______, KC_KP_0, KC_PDOT, KC_PENT, _______ -), - -/* Lower - * ,-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------. - * | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 |Delete | - * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| - * | | | Vol+ | | | | | | | | MPlay | | - * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| - * | | MPrev | Vol- | MNext | | | | | | | | \ | - * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| - * | | | | | | | | Mute | | | PgUp | | - * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| - * | | | | | | | | Home | PgDn | End | - * `-----------------------------------------------------------------------------------------------' - */ -[_LOWER] = LAYOUT_preonic_2x2u ( - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, - _______, _______, KC_VOLU, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, _______, - _______, KC_MPRV, KC_VOLD, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, KC_BSLS, - _______, _______, _______, _______, _______, _______, _______, KC_MUTE, _______, _______, KC_PGUP, _______, - _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END -), - -/* Raise - * ,-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------. - * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | | - * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| - * | | | | | | | | | | | | | - * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| - * | | | | | | | | | [ { ( | ) } ] | | | | - * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| - * | | | | | | | | | | | | | - * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| - * | | | | | | | | | | | - * `-----------------------------------------------------------------------------------------------' - */ -[_RAISE] = LAYOUT_preonic_2x2u ( - _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, TD_LBRK, TD_RBRK, _______, KC_PIPE, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ -), - -/* Adjust (Lower + Raise) - * ,-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------. - * |AudTog |███████|███████|███████|███████|███████|███████|███████|███████|███████| Debug | Reset | - * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| - * |Clicky |ClkFrq-|ClkFrq+|███████|███████|███████|███████|███████|███████|███████|███████|███████| - * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| - * | Music |Voice- |Voice+ |███████|███████|███████|███████|███████|███████|███████|AGnorm |AGswap | - * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| - * | MIDI |R plain|R breat|R rnbow|R swirl|R snake|R knigt|R xmas |R grade|RGBtest|███████| Shift | - * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| - * |RGBmode|RGBhue+|RGBsat+|RGBval+| | |███████|███████|███████|███████| - * `-----------------------------------------------------------------------------------------------' - */ -[_ADJUST] = LAYOUT_preonic_2x2u ( - AU_TOGG, XXXXXXX, XXXXXXX, XXXXXXX, RGB_HUI, RGB_HUD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DB_TOGG, QK_BOOT, - CK_TOGG, CK_DOWN, CK_UP, XXXXXXX, RGB_SAI, RGB_SAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - MU_TOGG, AU_PREV, AU_NEXT, XXXXXXX, RGB_VAI, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, AG_NORM, AG_SWAP, - MI_TOGG, RGB_M_P, RGB_M_B, RGB_M_R,RGB_M_SW,RGB_M_SN, RGB_M_K, RGB_M_X, RGB_M_G, RGB_M_T, RGB_SPI, KC_LSFT, - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX,RGB_RMOD, RGB_SPD, RGB_MOD -) - -}; -/* clang-format on */ - -float s_audio_on[][2] = AUDIO_ON_SONG; -float s_layer_lower[][2] = LAYER_LOWER_SONG; -float s_layer_raise[][2] = LAYER_RAISE_SONG; - -void audio_on_user(void) { PLAY_SONG(s_audio_on); }; - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case LOWER: - if (record->event.pressed) { - layer_on(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - PLAY_SONG(s_layer_lower); - } 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); - PLAY_SONG(s_layer_raise); - } 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; -}; - -/* Global TapDance State */ -static t_tap tap_state = { - .left_brackets = 0, - .right_brackets = 0, -}; - -float s_numpad_toggle[][2] = LAYER_NMPAD_SONG; - -t_tap_state get_tapdance_state(tap_dance_state_t *state) { - if (state->count == 1) { - if (state->interrupted || !state->pressed) { - return SINGLE_TAP; - } else { - return SINGLE_HOLD; - } - } else if (state->count == 2) { - if (state->interrupted || !state->pressed) { - return DOUBLE_TAP; - } else { - return DOUBLE_HOLD; - } - } else if (state->count == 3) { - if (state->interrupted || !state->pressed) { - return TRIPLE_TAP; - } else { - return TRIPLE_HOLD; - } - } else - return TAP_DANCE_NO_MATCH; -} - -void td_brackets_left_finished(tap_dance_state_t *state, void *user_data) { - tap_state.left_brackets = get_tapdance_state(state); - switch (tap_state.left_brackets) { - case SINGLE_TAP: - register_code16(KC_LEFT_PAREN); - break; - case DOUBLE_TAP: - register_code(KC_LEFT_BRACKET); - break; - case TRIPLE_TAP: - register_code16(KC_LEFT_CURLY_BRACE); - break; - default: - break; - } -} - -void td_brackets_left_reset(tap_dance_state_t *state, void *user_data) { - switch (tap_state.left_brackets) { - case SINGLE_TAP: - unregister_code16(KC_LEFT_PAREN); - break; - case DOUBLE_TAP: - unregister_code(KC_LEFT_BRACKET); - break; - case TRIPLE_TAP: - unregister_code16(KC_LEFT_CURLY_BRACE); - break; - default: - break; - } - tap_state.left_brackets = 0; -} - -void td_brackets_right_finished(tap_dance_state_t *state, void *user_data) { - tap_state.right_brackets = get_tapdance_state(state); - switch (tap_state.right_brackets) { - case SINGLE_TAP: - register_code16(KC_RIGHT_PAREN); - break; - case DOUBLE_TAP: - register_code(KC_RIGHT_BRACKET); - break; - case TRIPLE_TAP: - register_code16(KC_RIGHT_CURLY_BRACE); - break; - default: - break; - } -} - -void td_brackets_right_reset(tap_dance_state_t *state, void *user_data) { - switch (tap_state.right_brackets) { - case SINGLE_TAP: - unregister_code16(KC_RIGHT_PAREN); - break; - case DOUBLE_TAP: - unregister_code(KC_RIGHT_BRACKET); - break; - case TRIPLE_TAP: - unregister_code16(KC_RIGHT_CURLY_BRACE); - break; - default: - break; - } - tap_state.right_brackets = 0; -} - -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; - -bool 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) { - tap_code(KC_PGDN); - } else { - tap_code(KC_PGUP); - } - } - return true; -} - -bool 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; - } - } - return true; -} diff --git a/keyboards/preonic/keymaps/mverteuil_2x2u/rules.mk b/keyboards/preonic/keymaps/mverteuil_2x2u/rules.mk deleted file mode 100644 index 9e55d0aa67..0000000000 --- a/keyboards/preonic/keymaps/mverteuil_2x2u/rules.mk +++ /dev/null @@ -1,6 +0,0 @@ -USER_NAME := mverteuil -SRC += muse.c - -AUDIO_ENABLE = yes -MIDI_ENABLE = yes -TAP_DANCE_ENABLE = yes diff --git a/keyboards/preonic/keymaps/peterfalken/config.h b/keyboards/preonic/keymaps/peterfalken/config.h deleted file mode 100644 index 797bd2c78d..0000000000 --- a/keyboards/preonic/keymaps/peterfalken/config.h +++ /dev/null @@ -1,49 +0,0 @@ -/* Copyright 2015-2021 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/>. - */ - -#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 - -/* - * MIDI options - */ - -/* 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 - -// Most tactile encoders have detents every 4 stages -#define ENCODER_RESOLUTION 4 diff --git a/keyboards/preonic/keymaps/peterfalken/keymap.c b/keyboards/preonic/keymaps/peterfalken/keymap.c deleted file mode 100644 index 7123ba7669..0000000000 --- a/keyboards/preonic/keymaps/peterfalken/keymap.c +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright 2023 Peter.Falken (@PeterFalken) -// SPDX-License-Identifier: GPL-2.0-or-later - -#include "muse.h" -#include "peterfalken.h" - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* Qwerty - * ,-----------------------------------------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Tab | A | S | D | F | G | H | J | K | L | ; | " | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | ▽ | Ctrl | Alt | GUI |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_DEL, - KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, - 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_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT -), - -/* Lower - * ,-----------------------------------------------------------------------------------. - * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | ▽ | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | ▽ | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | ▽ | ▽ | ▽ | ▽ | ▽ | ▽ ▽ | ▽ | Next | Vol- | Vol+ | Play | - * `-----------------------------------------------------------------------------------' - */ -[_LOWER] = LAYOUT_preonic_grid( - KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, - KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, - KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, - _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),KC_HOME, KC_END, _______, - _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY -), - -/* Raise - * ,-----------------------------------------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | ▽ | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | Pg Up| Pg Dn| ▽ | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | ▽ | ▽ | ▽ | ▽ | ▽ | ▽ ▽ | ▽ | Next | Vol- | Vol+ | Play | - * `-----------------------------------------------------------------------------------' - */ -[_RAISE] = 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_DEL, - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, - KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, - _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______, - _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY -), - -/* Adjust (Lower + Raise) - * ,-----------------------------------------------------------------------------------. - * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | RSET | ▽ | M.AP | M.AL | LPAD | ▽ | ▽ | ▽ | ▽ | ▽ | ▽ | Bksp | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | ▽ | ▽ | ▽ | ▽ | ▽ | ▽ | ▽ | ▽ | ▽ | ▽ | ▽ | SLEP | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | CPWD | UN | CU | CO | PA | MV | ▽ | ▽ | ▽ | ▽ | ▽ | ▽ | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | ▽ | ▽ | ▽ | ▽ | ▽ | ▽ ▽ | ▽ | ▽ | ▽ | ▽ | ▽ | - * `-----------------------------------------------------------------------------------' - */ -[_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, - QK_BOOT, _______, CK_M1, KC_MCTL, KC_LPAD, _______, _______, _______, _______, _______, _______, KC_BSPC, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, CK_SLP, - CK_CW, _______, CK_CU, CK_CO, CK_PA, CK_MV, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ -) - -}; diff --git a/keyboards/preonic/keymaps/peterfalken/readme.md b/keyboards/preonic/keymaps/peterfalken/readme.md deleted file mode 100644 index f64d682a51..0000000000 --- a/keyboards/preonic/keymaps/peterfalken/readme.md +++ /dev/null @@ -1,14 +0,0 @@ -Copyright 2023 LEG <ucaboys@gmail.com> @PeterFalken - -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/>. diff --git a/keyboards/preonic/keymaps/peterfalken/rules.mk b/keyboards/preonic/keymaps/peterfalken/rules.mk deleted file mode 100644 index a33c6c1ddb..0000000000 --- a/keyboards/preonic/keymaps/peterfalken/rules.mk +++ /dev/null @@ -1,8 +0,0 @@ -# Setup keymap QMK features -# TODO: Check for space optimizations -AUDIO_ENABLE = yes # Enable Audio Output -ENCODER_ENABLE = no # Disable encoder - -ifeq ($(strip $(AUDIO_ENABLE)), yes) - SRC += muse.c -endif diff --git a/keyboards/preonic/keymaps/rmeli/config.h b/keyboards/preonic/keymaps/rmeli/config.h deleted file mode 100644 index 6f8b8b6c70..0000000000 --- a/keyboards/preonic/keymaps/rmeli/config.h +++ /dev/null @@ -1,45 +0,0 @@ -/* Copyright 2015-2021 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/>. - */ - -#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 - */ - -/* 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 diff --git a/keyboards/preonic/keymaps/rmeli/keymap.c b/keyboards/preonic/keymaps/rmeli/keymap.c deleted file mode 100644 index 0a16dc8bf7..0000000000 --- a/keyboards/preonic/keymaps/rmeli/keymap.c +++ /dev/null @@ -1,231 +0,0 @@ -/* Copyright 2015-2021 Jack Humbert - * Copyright 2022 Rocco Meli <@RMeli> - * - * 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" - -#include "rmeli.h" - -enum preonic_layers { _QWERTY, _COLEMAK, _LOWER, _RAISE, _ADJUST }; -enum preonic_keycodes { QWERTY = SAFE_RANGE, COLEMAK, LOWER, RAISE, BACKLIT }; - -#define ____________________BOTTOM_L_x6_____________________ BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC -#define ____________________BOTTOM_R_x6_____________________ KC_ENT, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT - -/* LAYOUT - * - * ,-----------------------------------------------------------. - * | | | | | | | | | | | | | - * |----+----+----+----+----+----+----+----+----+----+----+----| - * | | | | | | | | | | | | | - * |----+----+----+----+----+----+----+----+----+----+----+----| - * | | | | | | | | | | | | | - * |----+----+----+----+----+----+----+----+----+----+----+----| - * | | | | | | | | | | | | | - * |----+----+----+----+----+----+----+----+----+----+----+----| - * | | | | | | | | | | | | | - * `----+----+----+----+----+----+----+----+----+----+----+----' - */ - -// Define wrapper for standard CRKB layout -#define LAYOUT_wrapper(...) LAYOUT_preonic_grid(__VA_ARGS__) - -// clang-format off -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - -[_QWERTY] = LAYOUT_wrapper( - ___________________NUMBER_LEFT_x6___________________, ___________________NUMBER_RIGHT_x6__________________, - ___________________QWERTY_L1_x6_____________________, ___________________QWERTY_R1_x6_____________________, - ___________________QWERTY_L2_x6_____________________, ___________________QWERTY_R2_x6_____________________, - ___________________QWERTY_L3_x6_____________________, ___________________QWERTY_R3_x6_____________________, - ____________________BOTTOM_L_x6_____________________, ____________________BOTTOM_R_x6_____________________ -), - -[_COLEMAK] = LAYOUT_wrapper( - ___________________NUMBER_LEFT_x6___________________, ___________________NUMBER_RIGHT_x6__________________, - ________________COLEMAK_MOD_DH_L1_x6________________, ________________COLEMAK_MOD_DH_R1_x6________________, - ________________COLEMAK_MOD_DH_L2_x6________________, ________________COLEMAK_MOD_DH_R2_x6________________, - ________________COLEMAK_MOD_DH_L3_x6________________, ________________COLEMAK_MOD_DH_R3_x6________________, - ____________________BOTTOM_L_x6_____________________, ____________________BOTTOM_R_x6_____________________ -), - -[_LOWER] = LAYOUT_wrapper( - ____________________FUNC_LEFT_x6____________________, ____________________FUNC_RIGHT_x6___________________, - ___________________NUMBER_LEFT_x6___________________, ___________________NUMBER_RIGHT_x6__________________, - _______, ______________UNICODE_L2_x5________________, ________________NAV_R2_x5__________________, XXXXXXX, - _______, ______________UNICODE_L3_x5________________, ________________NAV_R3_x5__________________, _______, - ______________________BLANK_6x______________________, ______________________BLANK_6x______________________ -), - -[_RAISE] = LAYOUT_wrapper( - ___________________NUMBER_LEFT_x6___________________, ___________________NUMBER_RIGHT_x6__________________, - ___________________SYMBOL_LEFT_x6___________________, ___________________SYMBOL_RIGHT_x6__________________, - _______, ____________NAV_VIM_x4____________, XXXXXXX, ____________________SYMBOL_R2_x6____________________, - _______, _________________NONE_5x___________________, ____________________SYMBOL_R3_x6____________________, - ______________________BLANK_6x______________________, ______________________BLANK_6x______________________ -), - -[_ADJUST] = LAYOUT_wrapper( - QK_BOOT, _________________NONE_5x___________________, ______________________NONE_6x_______________________, - XXXXXXX, MU_ON, AU_ON, MI_ON, XXXXXXX, XXXXXXX, _______________CONFIG_R1_x5________________, QWERTY, - QK_BOOT, MU_NEXT, AU_TOGG, MI_TOGG, XXXXXXX, XXXXXXX, _______________CONFIG_R2_x5________________, XXXXXXX, - XXXXXXX, MU_OFF, AU_OFF, MI_OFF, XXXXXXX, XXXXXXX, _______________CONFIG_R3_x5________________, COLEMAK, - ______________________BLANK_6x______________________, ______________________BLANK_6x______________________ -) -}; -// clang-format on - -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 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 RGBLIGHT_ENABLE - rgblight_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; - -bool 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); - } - } - return true; -} - -bool 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; - } - } - return true; -} - -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/rmeli/readme.md b/keyboards/preonic/keymaps/rmeli/readme.md deleted file mode 100644 index e911968dd9..0000000000 --- a/keyboards/preonic/keymaps/rmeli/readme.md +++ /dev/null @@ -1 +0,0 @@ -# The default Preonic layout - largely based on the Planck's
\ No newline at end of file diff --git a/keyboards/preonic/keymaps/rmeli/rules.mk b/keyboards/preonic/keymaps/rmeli/rules.mk deleted file mode 100644 index 3903cc1228..0000000000 --- a/keyboards/preonic/keymaps/rmeli/rules.mk +++ /dev/null @@ -1,12 +0,0 @@ -TAP_DANCE_ENABLE = yes -AUTO_SHIFT_ENABLE = no - -MAGIC_ENABLE = yes - -UNICODEMAP_ENABLE = yes - -# Turn off rev3_drop options -RGBLIGHT_ENABLE = no -MOUSEKEY_ENABLE = no - -SRC += muse.c diff --git a/keyboards/preonic/keymaps/uqs/keymap.c b/keyboards/preonic/keymaps/uqs/keymap.c deleted file mode 100644 index 4e3fdec111..0000000000 --- a/keyboards/preonic/keymaps/uqs/keymap.c +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright 2022 Ulrich Spörlein (@uqs) -// SPDX-License-Identifier: GPL-2.0-or-later -// vi:et sw=4 cc=5,15,25,35,45,55,65: - -#include "uqs.h" - -/* - * My custom layout macro that allows for easy diff(1) operations between - * various keyboards. It probably doesn't make sense to you. - */ -#define LAYOUT_uqs( \ - k00, k01, k02, k03, k04, k05, \ - k10, k11, k12, k13, k14, k15, \ - k20, k21, k22, k23, k24, k25, \ - k30, k31, k32, k33, k34, k35, \ - k43, k44, \ - k40, k41, k42, \ - k06, k07, k08, k09, k0a, k0b, \ - k16, k17, k18, k19, k1a, k1b, \ - k26, k27, k28, k29, k2a, k2b, \ - k36, k37, k38, k39, k3a, k3b, \ - k46, k48, \ - k49, k4a, k4b \ -) \ -LAYOUT_preonic_2x2u( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ - k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, \ - k40, k41, k42, k43, k44, k46, k48, k49, k4a, k4b \ -) - -// clang-format off -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [L_QWER] = LAYOUT_uqs( - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, - KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, - - /*thumb*/ LT_EXTD_ESC, KC_SPC, - /*aux*/ KC_NO, KC_LGUI, KC_LALT, - KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, - KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, - KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, - KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, - /*thumb*/ KC_ENT, LT_NUM_BSPC, - /*aux*/ MO(L_FUNC), KC_NO, KC_NO - ), - [L_EXTD] = LAYOUT_uqs( - KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, - _______, KC_BTN1, KC_SCTAB, KC_PGUP, KC_CTAB, QK_LEAD, - _______, OSM_GUI, OSM_ALT, OSM_SFT, OSM_CTL, KC_RALT, - _______, ALT_TAB, MS_WHUP, MS_WHDN, KC_PGDN, INS_HARD, - /*thumb*/ _______, _______, - /*aux*/ _______, _______, _______, - /* ^^^^ can't be used */ - KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12, - KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_INS, KC_NO, - KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_DEL, KC_NO, - WIN_LEFT, WIN_DN, WIN_UP, WIN_RGHT, KC_PSTE, KC_NO, - /*thumb*/ _______, KC_BSPC, - /*aux*/ _______, _______, KC_ENTER - /* ^^^^ use these */ - ), - - [L_NUM] = LAYOUT_uqs( - KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, - _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, - _______, KC_SCLN, KC_COLN, KC_LCBR, KC_LPRN, KC_LBRC, - _______, KC_CIRC, KC_AMPR, KC_RCBR, KC_RPRN, KC_RBRC, - /*thumb*/ KC_ESC, _______, - /*aux*/ _______, _______, _______, - /* ^^^^ use these */ - KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12, - KC_EQUAL, KC_7, KC_8, KC_9, KC_KP_PLUS,_______, - KC_KP_ASTERISK,KC_4,KC_5, KC_6, MINS_UNDSCR,_______, - KC_COMM, KC_1, KC_2, KC_3, KC_KP_SLASH,KC_KP_ENTER, // Enter here, because thumb is occupied - /*thumb*/ _______, _______, - /*aux*/ KC_0, KC_KP_DOT, _______ - /* ^^^^ can't be used */ - ), - - [L_FUNC] = LAYOUT_uqs( - _______, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - _______, KC_NO, KC_MUTE, KC_VOLD, KC_VOLU, KC_NO, - _______, KC_LGUI, KC_LALT, KC_LSFT, KC_LCTL, KC_NO, - _______, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - /*thumb*/ _______, _______, - /*aux*/ _______, _______, _______, - /* ^^^^ use these */ - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - KC_PSCR, KC_F7, KC_F8, KC_F9, KC_F10, KC_NO, - KC_SCRL, KC_F4, KC_F5, KC_F6, KC_F11, KC_NO, - KC_PAUS, KC_F1, KC_F2, KC_F3, KC_F12, KC_NO, - /*thumb*/ _______, _______, - /*aux*/ _______, _______, _______ - /* ^^^^ can't be used */ - ), - - [L_MOUSE] = LAYOUT_uqs( - KC_NO, _______, _______, _______, _______, _______, - KC_NO, KC_NO, KC_BTN2, KC_BTN3, KC_BTN1, KC_VOLU, - KC_NO, KC_NO, KC_ACL0, KC_ACL1, KC_ACL2, KC_VOLD, - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MUTE, - /*thumb*/ _______, _______, - /*aux*/ _______, _______, _______, - /* ^^^^ can't be used */ - _______, _______, _______, _______, _______, _______, - _______, _______, KC_MS_UP, MS_WHUP, _______, _______, - MS_WHLEFT,KC_MS_L, KC_MS_D, KC_MS_R, MS_WHRGHT,_______, - _______, MS_WHDN, KC_BTN3, KC_BTN4, KC_BTN5, _______, - /*thumb*/ KC_BTN1, KC_BTN2, - /*aux*/ KC_NO, KC_NO, KC_NO - /* use these ^^^^ */ - ), -}; diff --git a/keyboards/preonic/keymaps/uqs/rules.mk b/keyboards/preonic/keymaps/uqs/rules.mk deleted file mode 100644 index ca99fa107c..0000000000 --- a/keyboards/preonic/keymaps/uqs/rules.mk +++ /dev/null @@ -1,14 +0,0 @@ -LTO_ENABLE=no -AUDIO_ENABLE=no -ENCODER_ENABLE=no - -# Broken with gcc >6, see https://github.com/qmk/qmk_firmware/issues/6753 -# (yes, different option, but I suspect the code has moved around) -# This produces working firmware on Arch Linux with GCC 11, but is still broken -# on Debian with 8.3.1 -RGBLIGHT_ENABLE=no -RGB_MATRIX_ENABLE=no - -# not required, but helps on debian where there is a soft/hard float confusion. -# but see above, gcc 8.3.1 still fucks up the firmware. -USE_FPU=no diff --git a/keyboards/preonic/keymaps/xulkal/keymap.c b/keyboards/preonic/keymaps/xulkal/keymap.c deleted file mode 100644 index f63316e0cd..0000000000 --- a/keyboards/preonic/keymaps/xulkal/keymap.c +++ /dev/null @@ -1,150 +0,0 @@ -#include QMK_KEYBOARD_H -#include "xulkal.h" - -#include "muse.h" - -#define EXPAND_LAYOUT(...) LAYOUT_preonic_grid(__VA_ARGS__) - -// Define your non-alpha grouping in this define's LAYOUT, and all your BASE_LAYERS will share the same mod/macro columns - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Qwerty Layout - * ,------------------------------------------------. ,------------------------------------------------. - * | GESC | 1 | 2 | 3 | 4 | 5 | - | | = | 6 | 7 | 8 | 9 | 0 | BkSp | - * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| - * | Tab | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | \ | - * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| - * |FN(CAPS)| A | S | D | F | G | ` | | ' | H | J | K | L | ; | Enter| - * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * | Sft[ | Z | X | C | V | B | RGB | |RGBRST| N | M | , | . | / | Sft] | - * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * | Ctrl | Win | LOWER| RAISE| Alt | Space|RGBRMOD| |RGBMOD| Space| Left | Up | Down | Right| Ctrl | - * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------' - * | Space| DEL | | Enter| Space| - * `-------------' `-------------' - */ - [_QWERTY] = EXPAND_LAYOUT( - _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, - _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, - _________________QWERTY_L3_________________, _________________QWERTY_R3_________________, - _________________QWERTY_L4_________________, _________________QWERTY_R4_________________, - _________________QWERTY_L5_________________, _________________QWERTY_R5_________________ - ), - -#ifndef GAMELAYER_DISABLE - [_GAME] = EXPAND_LAYOUT( - ___________________GAME_L1_________________, ___________________GAME_R1_________________, - ___________________GAME_L2_________________, ___________________GAME_R2_________________, - ___________________GAME_L3_________________, ___________________GAME_R3_________________, - ___________________GAME_L4_________________, ___________________GAME_R4_________________, - ___________________GAME_L5_________________, ___________________GAME_R5_________________ - ), -#endif - - [_LOWER] = EXPAND_LAYOUT( - __________________LOWER_L1_________________, __________________LOWER_R1_________________, - __________________LOWER_L2_________________, __________________LOWER_R2_________________, - __________________LOWER_L3_________________, __________________LOWER_R3_________________, - __________________LOWER_L4_________________, __________________LOWER_R4_________________, - __________________LOWER_L5_________________, __________________LOWER_R5_________________ - ), - - [_RAISE] = EXPAND_LAYOUT( - __________________RAISE_L1_________________, __________________RAISE_R1_________________, - __________________RAISE_L2_________________, __________________RAISE_R2_________________, - __________________RAISE_L3_________________, __________________RAISE_R3_________________, - __________________RAISE_L4_________________, __________________RAISE_R4_________________, - __________________RAISE_L5_________________, __________________RAISE_R5_________________ - ), - -#ifdef TRILAYER_ENABLED - [_ADJUST] = EXPAND_LAYOUT( - _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, - _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, - _________________ADJUST_L3_________________, _________________ADJUST_R3_________________, - _________________ADJUST_L4_________________, _________________ADJUST_R4_________________, - _________________ADJUST_L5_________________, _________________ADJUST_R5_________________ - ), -#endif -}; - -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; - -bool 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); - } - } - return true; -} - -bool 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; - #ifdef AUDIO_ENABLE - stop_all_notes(); - #endif - } - } - return true -} - -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; - } - #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/xulkal/rules.mk b/keyboards/preonic/keymaps/xulkal/rules.mk deleted file mode 100644 index f7e76252cd..0000000000 --- a/keyboards/preonic/keymaps/xulkal/rules.mk +++ /dev/null @@ -1,6 +0,0 @@ -SRC += muse.c - -ENCODER_ENABLE = no - -OPT_DEFS += -DTRILAYER_ENABLED -OPT_DEFS += -DAUDIO_CLICKY |