[Keymap] Add users/alfrdmalr and switch to layouts (#8030)
* WIP do not merge * first pass at custom preonic layout * add auto shift and reset via leader key * Update readme * update copyright notice * formatting changes * fix: use MO instead of process_record_user * added backslash and moved grave position * remove extraneous 'j' characer in NUMPAD template * update template formatting * remove process_record_user * swap "!" with "@" * fix readme formatting * update readme layout image * restore settings layer * add windows minimize sequence * fix: switch to correct seq function for three-key sequence * fix: missing semicolon * refactor: move keymap to userspace and generic 5x12 layout * add numlock to numpad layer * add readme * update readme formatting * remove unused wrappers from layout keymap * update readme title to reflect new location * remove alfrdmalr directory from preonic/keymaps * clean up user config
This commit is contained in:
parent
be05de6a3d
commit
707c04b4ab
|
@ -1,40 +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
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* Prevent use of disabled MIDI features in the keymap */
|
|
||||||
//#define MIDI_ENABLE_STRICT 1
|
|
||||||
|
|
||||||
/* enable basic MIDI features:
|
|
||||||
- MIDI notes can be sent when in Music mode is on
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define MIDI_BASIC
|
|
||||||
|
|
||||||
/* enable advanced MIDI features:
|
|
||||||
- MIDI notes can be added to the keymap
|
|
||||||
- Octave shift and transpose
|
|
||||||
- Virtual sustain, portamento, and modulation wheel
|
|
||||||
- etc.
|
|
||||||
*/
|
|
||||||
//#define MIDI_ADVANCED
|
|
||||||
|
|
||||||
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
|
|
||||||
//#define MIDI_TONE_KEYCODE_OCTAVES 2
|
|
||||||
|
|
||||||
#define LEADER_TIMEOUT 400
|
|
||||||
#define LEADER_PER_KEY_TIMING
|
|
|
@ -1,192 +0,0 @@
|
||||||
/* Copyright 2015-2017 Jack Humbert 2019-2020 Alfred Maler
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include QMK_KEYBOARD_H
|
|
||||||
#include "muse.h"
|
|
||||||
|
|
||||||
enum preonic_layers {
|
|
||||||
_QWERTY,
|
|
||||||
_SETTINGS,
|
|
||||||
_SYMBOLS,
|
|
||||||
_NAVIGATION,
|
|
||||||
_NUMPAD,
|
|
||||||
};
|
|
||||||
|
|
||||||
enum preonic_keycodes {
|
|
||||||
QWERTY = SAFE_RANGE,
|
|
||||||
SYMBOLS,
|
|
||||||
NAVIGATION,
|
|
||||||
NUMPAD,
|
|
||||||
SETTINGS
|
|
||||||
};
|
|
||||||
|
|
||||||
#define NUMSPACE LT(_NUMPAD, KC_SPC)
|
|
||||||
#define NAVLAYER MO(_NAVIGATION)
|
|
||||||
#define SYMLAYER MO(_SYMBOLS)
|
|
||||||
#define CTRLSHFT C(KC_LSFT)
|
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|
||||||
|
|
||||||
/* Qwerty
|
|
||||||
* ,-----------------------------------------------------------------------------------.
|
|
||||||
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
|
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
|
||||||
* | TAB | Q | W | E | R | T | Y | U | I | O | P | DEL |
|
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
|
||||||
* | NAV | A | S | D | F | G | H | J | K | L | ; | " |
|
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
|
||||||
* | SHFT | Z | X | C | V | B | N | M | , | . | / | SHFT |
|
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
|
||||||
* | CTRL | C/S | LGUI | LALT | SYMB | SPACE/NUM | SYMB | RALT | SETT | MUTG | LEAD |
|
|
||||||
* `-----------------------------------------------------------------------------------'
|
|
||||||
*/
|
|
||||||
[_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,
|
|
||||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL,
|
|
||||||
NAVLAYER, 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_RSFT,
|
|
||||||
KC_LCTL, CTRLSHFT, KC_LGUI, KC_LALT, SYMLAYER, NUMSPACE, NUMSPACE, SYMLAYER, KC_RALT, SETTINGS, MU_TOG, KC_LEAD
|
|
||||||
),
|
|
||||||
|
|
||||||
/* SYMBOLS
|
|
||||||
* ,-----------------------------------------------------------------------------------.
|
|
||||||
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
|
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
|
||||||
* | TAB | # | $ | { | } | | | ^ | * | | | ~ | DEL |
|
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
|
||||||
* | ESC | < | > | ( | ) | | | - | + | & | \ | ` |
|
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
|
||||||
* | SHFT | ! | @ | [ | ] | | | _ | = | % | / | SHFT |
|
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
|
||||||
* | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS |
|
|
||||||
* `-----------------------------------------------------------------------------------'
|
|
||||||
*/
|
|
||||||
[_SYMBOLS] = 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_HASH, KC_DOLLAR, KC_LCBR, KC_RCBR, KC_NO, KC_NO, KC_CIRC, KC_ASTR, KC_PIPE, KC_TILD, KC_DEL,
|
|
||||||
KC_NO, KC_LABK, KC_RABK, KC_LPRN, KC_RPRN, KC_NO, KC_NO, KC_MINS, KC_PLUS, KC_AMPR, KC_BSLS, KC_GRV,
|
|
||||||
KC_LSFT, KC_EXCLAIM, KC_AT, KC_LBRC, KC_RBRC, KC_NO, KC_NO, KC_UNDS, KC_EQL, KC_PERC, KC_SLSH, KC_RSFT,
|
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
|
||||||
),
|
|
||||||
|
|
||||||
/* NAVIGATION
|
|
||||||
* ,-----------------------------------------------------------------------------------.
|
|
||||||
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
|
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
|
||||||
* | TRNS | | | SPC | F5 | | INS | HOME | END | TAB | | DEL |
|
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
|
||||||
* | NAV | SHFT | CTRl | ALT | GUI | | LEFT | DOWN | UP | RGHT | | ENTR |
|
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
|
||||||
* | SHFT | UNDO | CUT | COPY | PSTE | | SPC | PGDO | PGUP | | | SHFT |
|
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
|
||||||
* | TRNS | TRNS | TRNS | TRNS | TRNS | ESC | TRNS | TRNS | TRNS | TRNS | TRNS |
|
|
||||||
* `-----------------------------------------------------------------------------------'
|
|
||||||
*/
|
|
||||||
[_NAVIGATION] = 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_TRNS, KC_NO, KC_NO, KC_SPC, KC_F5, KC_NO, KC_INS, KC_HOME, KC_END, KC_TAB, KC_NO, KC_DEL,
|
|
||||||
KC_TRNS, KC_LSFT, KC_LCTRL, KC_LALT, KC_LGUI, KC_NO, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_NO, KC_ENT,
|
|
||||||
KC_TRNS, C(KC_Z), C(KC_X), C(KC_C), C(KC_V), KC_NO, KC_SPC, KC_PGDN, KC_PGUP, KC_NO, KC_NO, KC_TRNS,
|
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_ESC, KC_ESC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
|
||||||
),
|
|
||||||
|
|
||||||
/* NUMPAD
|
|
||||||
* ,-----------------------------------------------------------------------------------.
|
|
||||||
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
|
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
|
||||||
* | TRNS | F9 | F10 | F11 | F12 | | | 7 | 8 | 9 | - | DEL |
|
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
|
||||||
* | ESC | F5 | F6 | F7 | F8 | SPC | SPC | 4 | 5 | 6 | + | ENTR |
|
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
|
||||||
* | TRNS | F1 | F2 | F3 | F4 | ALT | CAPS | 1 | 2 | 3 | / | TRNS |
|
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
|
||||||
* | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | 0 | , | . | * | TRNS |
|
|
||||||
* `-----------------------------------------------------------------------------------'
|
|
||||||
*/
|
|
||||||
[_NUMPAD] = 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_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO, KC_7, KC_8, KC_9, KC_MINS, KC_DEL,
|
|
||||||
KC_ESC, KC_F5, KC_F6, KC_F7, KC_F8, KC_SPC, KC_SPC, KC_4, KC_5, KC_6, KC_PLUS, KC_ENT,
|
|
||||||
KC_LSFT, KC_F1, KC_F2, KC_F3, KC_F4, KC_LALT, KC_CAPS, KC_1, KC_2, KC_3, KC_SLSH, KC_TRNS,
|
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_COMM, KC_DOT, KC_ASTR, KC_TRNS
|
|
||||||
),
|
|
||||||
|
|
||||||
/* SETTINGS
|
|
||||||
* ,-----------------------------------------------------------------------------------.
|
|
||||||
* | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
|
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
|
||||||
* | | | | | | | | | | | | Del |
|
|
||||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
|
||||||
* | | | |Aud on|AudOff|AGnorm|AGswap|Qwerty| | | | |
|
|
||||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
|
||||||
* | ASTG |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | |
|
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
|
||||||
* | | | | | | | | | | | |
|
|
||||||
* `-----------------------------------------------------------------------------------'
|
|
||||||
*/
|
|
||||||
[_SETTINGS] = 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,
|
|
||||||
_______, _______, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL,
|
|
||||||
_______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, _______, _______, _______,
|
|
||||||
KC_ASTG, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______,
|
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
|
||||||
)
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
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;
|
|
||||||
|
|
||||||
LEADER_EXTERNS();
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
LEADER_DICTIONARY() {
|
|
||||||
leading = false;
|
|
||||||
SEQ_FIVE_KEYS(KC_R, KC_E, KC_S, KC_E, KC_T) {
|
|
||||||
reset_keyboard();
|
|
||||||
}
|
|
||||||
leader_end();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
bool music_mask_user(uint16_t keycode) {
|
|
||||||
switch (keycode) {
|
|
||||||
default:
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,80 +0,0 @@
|
||||||
# alfrdmalr's preonic layout
|
|
||||||
## Overview
|
|
||||||
The alphanumeric characters and symbols are spread between three main 'typing' layers: QWERTY, NUMPAD, and SYMBOLS. The NUMPAD layer also holds the first twelve function keys.
|
|
||||||
|
|
||||||
A fourth layer, NAVIGATION, contains useful modifiers, shortcuts, and navigation functions like the arrow keys and page up/down. This layer also provides access to the ENTER and ESC keys.
|
|
||||||
|
|
||||||
Finally, a SETTINGS layer can be used to adjust certain keyboard-related options. Right now, this is pretty similar to the default settings layer (the planck's ADJUST layer). Primary differences are the inclusion of an autoshift toggle and the removal of the reset button. The bootloader functionality has been moved to a leader key sequence: LEAD - R - E - S - E - T.
|
|
||||||
|
|
||||||
```
|
|
||||||
/* Qwerty
|
|
||||||
* ,-----------------------------------------------------------------------------------.
|
|
||||||
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
|
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
|
||||||
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Del |
|
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
|
||||||
* | NAV | A | S | D | F | G | H | J | K | L | ; | " |
|
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
|
||||||
* | SHFT | Z | X | C | V | B | N | M | , | . | / | SHFT |
|
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
|
||||||
* | CTRL | C/S | LGUI | LALT | SYMB | SPACE/NUM | SYMB | RALT | SETT |mu tog| LEAD |
|
|
||||||
* `-----------------------------------------------------------------------------------'
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* SYMBOLS
|
|
||||||
* ,-----------------------------------------------------------------------------------.
|
|
||||||
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
|
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
|
||||||
* | Tab | # | $ | { | } | | | ^ | * | | | ~ | Del |
|
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
|
||||||
* | Esc | < | > | ( | ) | | | - | + | & | ` | ENTR |
|
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
|
||||||
* | SHFT | ! | @ | [ | ] | | | _ | = | % | / | SHFT |
|
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
|
||||||
* | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS |
|
|
||||||
* `-----------------------------------------------------------------------------------'
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* NUMPAD
|
|
||||||
* ,-----------------------------------------------------------------------------------.
|
|
||||||
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
|
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
|
||||||
* | TRNS | F9 | F10 | F11 | F12 | | | 7 | 8 | 9 | - | DEL |
|
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
|
||||||
* | ESC | F5 | F6 | F7 | F8 | SPC | SPC | 4 | 5 | 6 | + | ENTR |
|
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
|
||||||
* | TRNS | F1 | F2 | F3 | F4 | ALT | CAPS | 1 | 2 | 3 | / | TRNS |
|
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
|
||||||
* | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | 0 | , | . | * | TRNS |
|
|
||||||
* `-----------------------------------------------------------------------------------'
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* NAVIGATION
|
|
||||||
* ,-----------------------------------------------------------------------------------.
|
|
||||||
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
|
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
|
||||||
* | TRNS | | | SPC | F5 | | INS | HOME | END | TAB | | Del |
|
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
|
||||||
* | NAV | SHIFT| CTRl | ALT | GUI | | LEFT | DOWN | UP | RIGHT| | ENTR |
|
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
|
||||||
* | SHFT | UNDO | CUT | COPY | PASTE| | SPC | PGDO | PGUP | | | SHFT |
|
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
|
||||||
* | TRNS | TRNS | TRNS | TRNS | TRNS | ESC | TRNS | TRNS | TRNS | TRNS | TRNS |
|
|
||||||
* `-----------------------------------------------------------------------------------'
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* SETTINGS
|
|
||||||
* ,-----------------------------------------------------------------------------------.
|
|
||||||
* | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
|
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
|
||||||
* | | | | | | | | | | | | Del |
|
|
||||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
|
||||||
* | | | |Aud on|AudOff|AGnorm|AGswap|Qwerty| | | | |
|
|
||||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
|
||||||
* | ASTG |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | |
|
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
|
||||||
* | | | | | | | | | | | |
|
|
||||||
* `-----------------------------------------------------------------------------------'
|
|
||||||
*/
|
|
||||||
```
|
|
||||||
ASTG = autoshift toggle
|
|
|
@ -1,3 +0,0 @@
|
||||||
SRC += muse.c
|
|
||||||
AUTO_SHIFT_ENABLE = yes
|
|
||||||
LEADER_ENABLE = yes
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
#define STARTUP_SONG SONG(PREONIC_SOUND)
|
||||||
|
#endif
|
|
@ -0,0 +1,49 @@
|
||||||
|
#include "alfrdmalr.h"
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
// QWERTY
|
||||||
|
[_QWERTY] = LAYOUT_ortho_5x12_wrapper(
|
||||||
|
K00, ____NUMROW_L0____, ____NUMROW_R0____, K0B,
|
||||||
|
K10, ____QWERTY_L1____, ____QWERTY_R1____, K1B_ALT,
|
||||||
|
K20, ____QWERTY_L2____, ____QWERTY_R2____, K2B,
|
||||||
|
K30, ____QWERTY_L3____, ____QWERTY_R3____, K3B,
|
||||||
|
K40, _____BASE_L4_____, _____BASE_R4_____, K4B
|
||||||
|
),
|
||||||
|
|
||||||
|
// SYMBOLS
|
||||||
|
[_SYMBOLS] = LAYOUT_ortho_5x12_wrapper(
|
||||||
|
K00_SYM, ____NUMROW_L0____, ____NUMROW_R0____, K0B_SYM,
|
||||||
|
K10_SYM, ____SYMBOL_L1____, ____SYMBOL_R1____, K1B_SYM,
|
||||||
|
K20_SYM, ____SYMBOL_L2____, ____SYMBOL_R2____, K2B_SYM,
|
||||||
|
K30_SYM, ____SYMBOL_L3____, ____SYMBOL_R3____, K3B_SYM,
|
||||||
|
K40_SYM, ____SYMBOL_L4____, ____SYMBOL_R4____, K4B_SYM
|
||||||
|
),
|
||||||
|
|
||||||
|
// NAVIGATION
|
||||||
|
[_NAVIGATION] = LAYOUT_ortho_5x12_wrapper(
|
||||||
|
K00_NAV, ____NUMROW_L0____, ____NUMROW_R0____, K0B_NAV,
|
||||||
|
K10_NAV, __NAVIGATION_L1__, __NAVIGATION_R1__, K1B_NAV,
|
||||||
|
K20_NAV, __NAVIGATION_L2__, __NAVIGATION_R2__, K2B_NAV,
|
||||||
|
K30_NAV, __NAVIGATION_L3__, __NAVIGATION_R3__, K3B_NAV,
|
||||||
|
K40_NAV, __NAVIGATION_L4__, __NAVIGATION_R4__, K4B_NAV
|
||||||
|
),
|
||||||
|
|
||||||
|
// NUMPAD
|
||||||
|
[_NUMPAD] = LAYOUT_ortho_5x12_wrapper(
|
||||||
|
K00_NUM, ____NUMROW_L0____, ____NUMROW_R0____, K0B_NUM,
|
||||||
|
K10_NUM, ____NUMPAD_L1____, ____NUMPAD_R1____, K1B_NUM,
|
||||||
|
K20_NUM, ____NUMPAD_L2____, ____NUMPAD_R2____, K2B_NUM,
|
||||||
|
K30_NUM, ____NUMPAD_L3____, ____NUMPAD_R3____, K3B_NUM,
|
||||||
|
K40_NUM, ____NUMPAD_L4____, ____NUMPAD_R4____, K4B_NUM
|
||||||
|
),
|
||||||
|
|
||||||
|
// SETTINGS
|
||||||
|
[_SETTINGS] = LAYOUT_ortho_5x12_wrapper(
|
||||||
|
K00_SET, ______TRANS______, ______TRANS______, K0B_SET,
|
||||||
|
K10_SET, ___SETTINGS_L1___, ___SETTINGS_R1___, K1B_SET,
|
||||||
|
K20_SET, ___SETTINGS_L2___, ___SETTINGS_R2___, K2B_SET,
|
||||||
|
K30_SET, ___SETTINGS_L3___, ___SETTINGS_R3___, K3B_SET,
|
||||||
|
K40_SET, ___SETTINGS_L4___, ___SETTINGS_R4___, K4B_SET
|
||||||
|
)
|
||||||
|
};
|
|
@ -0,0 +1,44 @@
|
||||||
|
#include "alfrdmalr.h"
|
||||||
|
#include "muse.h"
|
||||||
|
|
||||||
|
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;
|
||||||
|
|
||||||
|
LEADER_EXTERNS();
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
LEADER_DICTIONARY() {
|
||||||
|
leading = false;
|
||||||
|
// reset keyboard to bootloader
|
||||||
|
SEQ_FIVE_KEYS(KC_R, KC_E, KC_S, KC_E, KC_T) {
|
||||||
|
reset_keyboard();
|
||||||
|
}
|
||||||
|
// minimize window (Windows)
|
||||||
|
SEQ_THREE_KEYS(KC_M, KC_I, KC_N) {
|
||||||
|
SEND_STRING(SS_LALT(" ")"n");
|
||||||
|
}
|
||||||
|
leader_end();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,276 @@
|
||||||
|
/*
|
||||||
|
Copyright 2020 Alfred Maler @alfrdmalr
|
||||||
|
|
||||||
|
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
|
||||||
|
MERCHANTIBILITY 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
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
enum shared_layers {
|
||||||
|
_QWERTY,
|
||||||
|
_SETTINGS,
|
||||||
|
_SYMBOLS,
|
||||||
|
_NAVIGATION,
|
||||||
|
_NUMPAD
|
||||||
|
};
|
||||||
|
|
||||||
|
// KEYCODES ============================================================================
|
||||||
|
#define NUMSPACE LT(_NUMPAD, KC_SPC)
|
||||||
|
#define NAVLAYER MO(_NAVIGATION)
|
||||||
|
#define SYMLAYER MO(_SYMBOLS)
|
||||||
|
#define SETLAYER MO(_SETTINGS)
|
||||||
|
#define CTRLSHFT C(KC_LSFT)
|
||||||
|
#define WINUNDO C(KC_Z)
|
||||||
|
#define WINCOPY C(KC_C)
|
||||||
|
#define WINCUT C(KC_X)
|
||||||
|
#define WINPASTE C(KC_V)
|
||||||
|
|
||||||
|
// convenience keycodes/aliases for base modifiers
|
||||||
|
// bottom row
|
||||||
|
#define K41 CTRLSHFT
|
||||||
|
#define K42 KC_LGUI
|
||||||
|
#define K43 KC_LALT
|
||||||
|
#define K44 SYMLAYER
|
||||||
|
#define K45 NUMSPACE
|
||||||
|
#define K46 NUMSPACE
|
||||||
|
#define K47 SYMLAYER
|
||||||
|
#define K48 KC_RALT
|
||||||
|
#define K49 SETLAYER
|
||||||
|
#define K4A MU_TOG
|
||||||
|
|
||||||
|
// leftmost column
|
||||||
|
#define K00 KC_ESC
|
||||||
|
#define K10 KC_TAB
|
||||||
|
#define K20 NAVLAYER
|
||||||
|
#define K30 KC_LSFT
|
||||||
|
#define K40 KC_LCTL
|
||||||
|
|
||||||
|
// rightmost column
|
||||||
|
#define K0B KC_BSPC
|
||||||
|
#define K1B KC_BSPC
|
||||||
|
#define K1B_ALT KC_DEL // for 5x12 boards, keep backspace as the top-left key and add delete key
|
||||||
|
#define K2B KC_QUOT
|
||||||
|
#define K3B KC_RSFT
|
||||||
|
#define K4B KC_LEAD
|
||||||
|
|
||||||
|
// LAYOUT WRAPPERS =====================================================================
|
||||||
|
#if (!defined(LAYOUT) && defined(KEYMAP))
|
||||||
|
# define LAYOUT KEYMAP
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__)
|
||||||
|
#define LAYOUT_ortho_4x12_wrapper(...) LAYOUT_ortho_4x12(__VA_ARGS__)
|
||||||
|
#define LAYOUT_ortho_5x12_wrapper(...) LAYOUT_ortho_5x12(__VA_ARGS__)
|
||||||
|
|
||||||
|
// KEYCODE GROUPS ======================================================================
|
||||||
|
// MISC
|
||||||
|
#define ______TRANS______ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||||
|
#define ____NUMROW_L0____ KC_1, KC_2, KC_3, KC_4, KC_5
|
||||||
|
#define ____NUMROW_R0____ KC_6, KC_7, KC_8, KC_9, KC_0
|
||||||
|
#define _____BASE_L4_____ K41, K42, K43, K44, K45
|
||||||
|
#define _____BASE_R4_____ K46, K47, K48, K49, K4A
|
||||||
|
|
||||||
|
/* QWERTY ==============================================================================
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | BKSP |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | TAB | Q | W | E | R | T | Y | U | I | O | P | DEL |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | NAV | A | S | D | F | G | H | J | K | L | ; | " |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | SHFT | Z | X | C | V | B | N | M | , | . | / | SHFT |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | CTRL | C/S | LGUI | LALT | SYMB | NUM/SPACE | SYMB | RALT | SETT | MUTG | LEAD |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
|
||||||
|
// LEFT
|
||||||
|
// - CORE
|
||||||
|
#define ____QWERTY_L1____ KC_Q, KC_W, KC_E, KC_R, KC_T
|
||||||
|
#define ____QWERTY_L2____ KC_A, KC_S, KC_D, KC_F, KC_G
|
||||||
|
#define ____QWERTY_L3____ KC_Z, KC_X, KC_C, KC_V, KC_B
|
||||||
|
|
||||||
|
// RIGHT
|
||||||
|
// - CORE
|
||||||
|
#define ____QWERTY_R1____ KC_Y, KC_U, KC_I, KC_O, KC_P
|
||||||
|
#define ____QWERTY_R2____ KC_H, KC_J, KC_K, KC_L, KC_SCLN
|
||||||
|
#define ____QWERTY_R3____ KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH
|
||||||
|
|
||||||
|
/* NUMPAD ==============================================================================
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | TRNS | F9 | F10 | F11 | F12 | | NLCK | 7 | 8 | 9 | - | DEL |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | ESC | F5 | F6 | F7 | F8 | SPC | SPC | 4 | 5 | 6 | + | ENTR |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | TRNS | F1 | F2 | F3 | F4 | ALT | CAPS | 1 | 2 | 3 | / | TRNS |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | 0 | , | . | * | TRNS |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
|
||||||
|
// LEFT
|
||||||
|
// - CORE
|
||||||
|
#define ____NUMPAD_L1____ KC_F9, KC_F10, KC_F11, KC_F12, KC_NO
|
||||||
|
#define ____NUMPAD_L2____ KC_F5, KC_F6, KC_F7, KC_F8, KC_SPC
|
||||||
|
#define ____NUMPAD_L3____ KC_F1, KC_F2, KC_F3, KC_F4, KC_LALT
|
||||||
|
|
||||||
|
// - MODS
|
||||||
|
#define ____NUMPAD_L4____ ______TRANS______
|
||||||
|
#define K00_NUM KC_TRNS
|
||||||
|
#define K10_NUM KC_TRNS
|
||||||
|
#define K20_NUM KC_TRNS
|
||||||
|
#define K30_NUM KC_TRNS
|
||||||
|
#define K40_NUM KC_TRNS
|
||||||
|
|
||||||
|
// RIGHT
|
||||||
|
// - CORE
|
||||||
|
#define ____NUMPAD_R1____ KC_NLCK, KC_7, KC_8, KC_9, KC_MINS
|
||||||
|
#define ____NUMPAD_R2____ KC_SPC, KC_4, KC_5, KC_6, KC_PLUS
|
||||||
|
#define ____NUMPAD_R3____ KC_CAPS, KC_1, KC_2, KC_3, KC_SLSH
|
||||||
|
|
||||||
|
// - MODS
|
||||||
|
#define ____NUMPAD_R4____ KC_TRNS, KC_0, KC_COMM, KC_DOT, KC_ASTR
|
||||||
|
#define K0B_NUM KC_TRNS
|
||||||
|
#define K1B_NUM KC_TRNS
|
||||||
|
#define K2B_NUM KC_ENT
|
||||||
|
#define K3B_NUM KC_TRNS
|
||||||
|
#define K4B_NUM KC_TRNS
|
||||||
|
|
||||||
|
/* SYMBOLS =============================================================================
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | BKSP |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | TRNS | # | $ | { | } | | | ^ | * | | | ~ | TRNS |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | TRNS | < | > | ( | ) | | | - | + | & | \ | ` |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | TRNS | ! | @ | [ | ] | | | _ | = | % | / | SHFT |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
|
||||||
|
// LEFT
|
||||||
|
// - CORE
|
||||||
|
#define ____SYMBOL_L1____ KC_HASH, KC_DOLLAR, KC_LCBR, KC_RCBR, KC_NO
|
||||||
|
#define ____SYMBOL_L2____ KC_LABK, KC_RABK, KC_LPRN, KC_RPRN, KC_NO
|
||||||
|
#define ____SYMBOL_L3____ KC_EXCLAIM, KC_AT, KC_LBRC, KC_RBRC, KC_NO
|
||||||
|
|
||||||
|
// - MODS
|
||||||
|
#define ____SYMBOL_L4____ ______TRANS______
|
||||||
|
#define K00_SYM KC_TRNS
|
||||||
|
#define K10_SYM KC_TRNS
|
||||||
|
#define K20_SYM KC_TRNS
|
||||||
|
#define K30_SYM KC_TRNS
|
||||||
|
#define K40_SYM KC_TRNS
|
||||||
|
|
||||||
|
// RIGHT
|
||||||
|
// - CORE
|
||||||
|
#define ____SYMBOL_R1____ KC_NO, KC_CIRC, KC_ASTR, KC_PIPE, KC_TILD
|
||||||
|
#define ____SYMBOL_R2____ KC_NO, KC_MINS, KC_PLUS, KC_AMPR, KC_BSLS
|
||||||
|
#define ____SYMBOL_R3____ KC_NO, KC_UNDS, KC_EQL, KC_PERC, KC_SLSH
|
||||||
|
|
||||||
|
// - MODS
|
||||||
|
#define ____SYMBOL_R4____ ______TRANS______
|
||||||
|
#define K0B_SYM KC_TRNS
|
||||||
|
#define K1B_SYM KC_TRNS
|
||||||
|
#define K2B_SYM KC_GRV
|
||||||
|
#define K3B_SYM KC_TRNS
|
||||||
|
#define K4B_SYM KC_TRNS
|
||||||
|
|
||||||
|
/* NAVIGATION ==========================================================================
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | BKSP |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | TRNS | | | SPC | F5 | | INS | HOME | END | TAB | DEL | TRNS |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | TRNS | SHFT | CTRl | ALT | GUI | | LEFT | DOWN | UP | RGHT | | ENTR |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | TRNS | UNDO | CUT | COPY | PSTE | | SPC | PGDO | PGUP | | | TRNS |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | TRNS | TRNS | TRNS | TRNS | TRNS | ESC | TRNS | TRNS | TRNS | TRNS | TRNS |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
|
||||||
|
// LEFT
|
||||||
|
// - CORE
|
||||||
|
#define __NAVIGATION_L1__ KC_NO, KC_NO, KC_SPC, KC_F5, KC_NO
|
||||||
|
#define __NAVIGATION_L2__ KC_LSFT, KC_LCTRL, KC_LALT, KC_LGUI, KC_NO
|
||||||
|
#define __NAVIGATION_L3__ WINUNDO, WINCUT, WINCOPY, WINPASTE, KC_NO
|
||||||
|
|
||||||
|
// - MODS
|
||||||
|
#define __NAVIGATION_L4__ _______, _______, _______, _______, KC_ESC
|
||||||
|
#define K00_NAV KC_TRNS
|
||||||
|
#define K10_NAV KC_TRNS
|
||||||
|
#define K20_NAV KC_TRNS
|
||||||
|
#define K30_NAV KC_TRNS
|
||||||
|
#define K40_NAV KC_TRNS
|
||||||
|
|
||||||
|
// RIGHT
|
||||||
|
// - CORE
|
||||||
|
#define __NAVIGATION_R1__ KC_INS, KC_HOME, KC_END, KC_TAB, KC_DEL
|
||||||
|
#define __NAVIGATION_R2__ KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_NO
|
||||||
|
#define __NAVIGATION_R3__ KC_SPC, KC_PGDN, KC_PGUP, KC_NO, KC_NO
|
||||||
|
|
||||||
|
// - MODS
|
||||||
|
#define __NAVIGATION_R4__ KC_ESC, _______, _______, _______, _______
|
||||||
|
#define K0B_NAV KC_TRNS
|
||||||
|
#define K1B_NAV KC_TRNS
|
||||||
|
#define K2B_NAV KC_ENT
|
||||||
|
#define K3B_NAV KC_TRNS
|
||||||
|
#define K4B_NAV KC_TRNS
|
||||||
|
|
||||||
|
/* SETTINGS ============================================================================
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | | | | | | | | | | | | |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | | DBUG | | | | | | | | | |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | | | |Aud on|AudOff|AGnorm|AGswap| | | | | |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | ASTG |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | | | | |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
// LEFT
|
||||||
|
// - CORE
|
||||||
|
#define ___SETTINGS_L1___ _______, DEBUG, _______, _______, _______
|
||||||
|
#define ___SETTINGS_L2___ _______, MU_MOD, AU_ON, AU_OFF, AG_NORM
|
||||||
|
#define ___SETTINGS_L3___ MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON
|
||||||
|
|
||||||
|
// - MODS
|
||||||
|
#define ___SETTINGS_L4___ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO
|
||||||
|
#define K00_SET KC_NO
|
||||||
|
#define K10_SET KC_NO
|
||||||
|
#define K20_SET KC_NO
|
||||||
|
#define K30_SET KC_ASTG
|
||||||
|
#define K40_SET KC_NO
|
||||||
|
|
||||||
|
// RIGHT
|
||||||
|
// - CORE
|
||||||
|
#define ___SETTINGS_R1___ TERM_ON, TERM_OFF, _______, _______, _______
|
||||||
|
#define ___SETTINGS_R2___ _______, _______, _______, _______, _______
|
||||||
|
#define ___SETTINGS_R3___ _______, _______, _______, _______, _______
|
||||||
|
|
||||||
|
// - MODS
|
||||||
|
#define ___SETTINGS_R4___ KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO
|
||||||
|
#define K0B_SET KC_NO
|
||||||
|
#define K1B_SET KC_NO
|
||||||
|
#define K2B_SET KC_NO
|
||||||
|
#define K3B_SET KC_NO
|
||||||
|
#define K4B_SET KC_NO
|
|
@ -0,0 +1,7 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#define MUSIC_MASK (keycode != KC_NO)
|
||||||
|
#define MIDI_BASIC
|
||||||
|
|
||||||
|
#define LEADER_TIMEOUT 400
|
||||||
|
#define LEADER_PER_KEY_TIMING
|
|
@ -0,0 +1,47 @@
|
||||||
|
# alfrdmalr's userspace
|
||||||
|
## Overview
|
||||||
|
The alphanumeric characters and symbols are spread between three main 'typing' layers: REGULAR, NUMPAD, and SYMBOLS.
|
||||||
|
|
||||||
|
A fourth layer, NAVIGATION, contains useful modifiers, shortcuts, and navigation functions like the arrow keys and page up/down. This layer also provides access to the `ENTER` and `ESC` keys.
|
||||||
|
|
||||||
|
Finally, a SETTINGS layer can be used to adjust certain keyboard-related options.
|
||||||
|
|
||||||
|
A visual representation of each layer can be found in [alfrdmalr.h](./alfrdmalr.h)
|
||||||
|
|
||||||
|
### Layers
|
||||||
|
|
||||||
|
#### REGULAR
|
||||||
|
Right now this is just a QWERTY layer, but other layouts (DVORAK, COLEMAK, etc.) could easily be added. The REGULAR layer uses the default modifiers.
|
||||||
|
|
||||||
|
The default modifiers are defined in the style `K00`, where the first digit is the row index and the second digit is the column index. These indices are based on the Preonic's 5x12 grid, and are **not** adjusted for a board of different size; for instance, the upper-leftmost key in the preonic layout is `K00`, whereas the upper-leftmost key on a Planck would be `K10`.
|
||||||
|
|
||||||
|
This convention is designed to work nicely with layout wrappers.
|
||||||
|
|
||||||
|
#### NUMPAD
|
||||||
|
The NUMPAD layer puts a numpad under the right hand, surrounding the home row position. Several basic arithmetic operators are also provided, as well as comma/decimal symbols, to emulate a traditional numpad. The numlock/capslock keys are accessible from this layer as well, though it should be noted that the actual keycodes being sent by the numpad are NOT the numpad versions of the numbers - this is to prevent the normal numlock behavior from blocking numbers from being sent.
|
||||||
|
|
||||||
|
This layer also holds the first twelve function keys.
|
||||||
|
|
||||||
|
#### SYMBOLS
|
||||||
|
This layer holds all the symbols that are not accessible from the REGULAR layer. There is some redundancy (for instance, `/` exists in both the REGULAR and SYMBOLS layer; its position, however, remains consistent) but with the exception of single and double quotes, all symbols are available from this layer.
|
||||||
|
|
||||||
|
#### NAVIGATION
|
||||||
|
The primary function of this layer is to provide arrow keys under hjkl. The surrounding keys contain similar functionality - for instance, the keys directly below `DOWN` and `UP` are `PAGEDOWN` and `PAGEUP`, respectively. `HOME` and `END` are inverted from this convention, simply because I kept hitting the wrong key when trying to jump to the beginning/end of lines when editing text.
|
||||||
|
|
||||||
|
To the immediate right of the NAVIGATION layer key are the following modifiers: `SHIFT`, `CONTROL`, `ALT`, `GUI`. All modifiers are the "left" variants. The idea is to use the left hand to hold different modifiers as necessary while using the right hand to navigate and format.
|
||||||
|
|
||||||
|
`ESCAPE` is located on the spacebar from this layer, and `DELETE` is placed next to `BACKSPACE`, for convenience when formatting text. There are also four Windows shortcuts for undo, cut, copy, and paste, located in the same position as the relevant keys on the base layer (undo, for example, is in the same place as the `Z` key).
|
||||||
|
|
||||||
|
#### SETTINGS
|
||||||
|
Right now, this is pretty similar to the default settings layer (the planck's ADJUST layer).
|
||||||
|
|
||||||
|
Primary differences are the inclusion of an autoshift toggle and the removal of the reset button. The bootloader functionality has been moved to a leader key sequence: LEAD - R - E - S - E - T.
|
||||||
|
|
||||||
|
### Leader Key Sequences
|
||||||
|
A complete list of leader sequences can be found below:
|
||||||
|
|
||||||
|
#### Reset
|
||||||
|
LEAD - R - E - S - E - T
|
||||||
|
|
||||||
|
#### Minimize (Windows)
|
||||||
|
LEAD - M - I - N
|
|
@ -0,0 +1,8 @@
|
||||||
|
SRC += alfrdmalr.c
|
||||||
|
|
||||||
|
ifdef AUDIO_ENABLE
|
||||||
|
SRC += muse.c
|
||||||
|
endif
|
||||||
|
|
||||||
|
AUTO_SHIFT_ENABLE = yes
|
||||||
|
LEADER_ENABLE = yes
|
Loading…
Reference in New Issue