forked from forks/qmk_firmware
[Keymap Removal] Preonic and related keymaps. (#22689)
This commit is contained in:
parent
1556a2ed0e
commit
27a710861e
|
@ -1,85 +0,0 @@
|
|||
/* Copyright 2020 codecoffeecode
|
||||
*
|
||||
* 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 layers {
|
||||
_MAIN,
|
||||
_LOWER,
|
||||
_RAISE,
|
||||
};
|
||||
|
||||
// Readability keycodes
|
||||
#define LOWER MO(_LOWER)
|
||||
#define RAISE MO(_RAISE)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Layer _MAIN
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Esc | A | S | D | F | G | H | J | K | L | ; | " |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Ctrl | Caps | Alt | GUI |Layer1| Space |Layer2| Left | Down | Up |Right |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_MAIN] = LAYOUT_ortho_4x12(
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
|
||||
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT ,
|
||||
KC_LCTL, KC_CAPS, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
|
||||
),
|
||||
|
||||
/* Layer _LOWER
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | Del |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | | Vol- | Vol+ | Mute | Play | | | F11 | F12 | | | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Reset| | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_LOWER] = LAYOUT_ortho_4x12(
|
||||
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL,
|
||||
_______, KC_VOLD, KC_VOLU, KC_MUTE, KC_MPLY, _______, _______, KC_F11, KC_F12, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
/* Layer _RAISE
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | | | | | | | | - | = | [ | ] | \ |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_RAISE] = LAYOUT_ortho_4x12(
|
||||
_______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
)
|
||||
|
||||
};
|
|
@ -1,19 +0,0 @@
|
|||
/* Copyright 2020 Nathan Spears
|
||||
*
|
||||
* 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
|
||||
#define UNICODE_SELECTED_MODES UNICODE_MODE_LINUX, UNICODE_MODE_MACOS, UNICODE_MODE_WINCOMPOSE
|
||||
#define TAPPING_TOGGLE 2
|
|
@ -1,195 +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 ortho_4x12_layers {
|
||||
_QWERTY,
|
||||
_FN,
|
||||
_LOWER,
|
||||
_RAISE,
|
||||
_ADJUST
|
||||
};
|
||||
|
||||
enum ortho_4x12_keycodes {
|
||||
LOWER = SAFE_RANGE,
|
||||
RAISE,
|
||||
SHRUG, // ¯\_(ツ)_/¯
|
||||
TFLIP, // (╯°□°)╯︵ ┻━┻
|
||||
POOP, // 💩
|
||||
DPOINT, // (ಠ_ಠ)
|
||||
STRUT, // ᕕ( ᐛ )ᕗ
|
||||
SARCSM, // ⸮
|
||||
};
|
||||
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Qwerty
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | Tab | Q | W | E | R | T | Y | U | I | O | P |Bkpsc |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Esc | A | S | D | F | G | H | J | K | L | ; | " |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | FN | Ctrl | GUI | ALT |Lower | Space |Raise | Left | Down | Up |Right |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_QWERTY] = LAYOUT_ortho_4x12(
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
|
||||
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
|
||||
MO(_FN), KC_LCTL, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
|
||||
),
|
||||
|
||||
/* FN
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ` | | | | | | | | |POOP |PrtScr|Del |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | |UC_Wnc|
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | |SHRUG |TFLIP | POOP |DPOINT|STRUT | | | | |SARCSM|UC_Lin|
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_FN] = LAYOUT_ortho_4x12(
|
||||
KC_GRV, _______, _______, _______, _______, _______, _______, _______, _______, POOP, KC_PSCR, KC_DEL,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, UC_WINC,
|
||||
_______, SHRUG, TFLIP, POOP, DPOINT, STRUT, _______, _______, _______, _______, SARCSM, UC_LINX,
|
||||
_______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______
|
||||
),
|
||||
|
||||
/* Lower
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | | | | | | | | | | | | Del |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | F7 | F8 | F9 | F10 | F11 | F12 | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | |Raise | Home | PgDn | PgUp | End |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_LOWER] = LAYOUT_ortho_4x12(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL,
|
||||
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_HOME, KC_PGDN, KC_PGUP, KC_END
|
||||
),
|
||||
|
||||
/* Raise
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | | | | | | | | | | | | Del |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | F7 | F8 | F9 | F10 | F11 | F12 | | Prev | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | |Lower | | | | Next | Vol- | Vol+ | Play |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_RAISE] = LAYOUT_ortho_4x12(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL,
|
||||
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_MPRV, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
|
||||
),
|
||||
|
||||
|
||||
/* Adjust (Lower + Raise)
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | | Reset| Debug| | | | | | | | | Del |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_ADJUST] = LAYOUT_ortho_4x12(
|
||||
_______, QK_BOOT, DB_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
)
|
||||
|
||||
|
||||
};
|
||||
|
||||
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);
|
||||
} 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 SHRUG:
|
||||
if (record->event.pressed) {
|
||||
send_unicode_string("¯\\_(ツ)_/¯");
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case TFLIP:
|
||||
if (record->event.pressed) {
|
||||
send_unicode_string("(╯°□°)╯︵ ┻━┻");
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case POOP:
|
||||
if (record->event.pressed) {
|
||||
send_unicode_string("💩");
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case DPOINT:
|
||||
if (record->event.pressed) {
|
||||
send_unicode_string("(ಠ_ಠ)");
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case STRUT:
|
||||
if (record->event.pressed) {
|
||||
send_unicode_string("ᕕ( ᐛ )ᕗ");
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case SARCSM:
|
||||
if (record->event.pressed) {
|
||||
send_unicode_string("⸮");
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
};
|
|
@ -1,47 +0,0 @@
|
|||
// Copyright 2022 Jose Pablo Ramirez (@jpe230)
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
/* ---------------------------
|
||||
* Common Spit Configuration
|
||||
* ---------------------------
|
||||
*/
|
||||
#define SPLIT_OLED_ENABLE
|
||||
|
||||
/* ---------------------------
|
||||
* Common OLED Configuration
|
||||
* ---------------------------
|
||||
*/
|
||||
#define OLED_TIMEOUT 0
|
||||
#define CUSTOM_OLED_TIMEOUT 10000
|
||||
|
||||
/* ---------------------------
|
||||
* Common Bootmagic Lite
|
||||
* ---------------------------
|
||||
*/
|
||||
#define BOOTMAGIC_LITE_ROW 0
|
||||
#define BOOTMAGIC_LITE_COLUMN 0
|
||||
|
||||
/* ---------------------------
|
||||
* Common RGB Configuration
|
||||
* ---------------------------
|
||||
*/
|
||||
#define RGB_DISABLE_WHEN_USB_SUSPENDED
|
||||
#define RGB_DISABLE_TIMEOUT CUSTOM_OLED_TIMEOUT
|
||||
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 128
|
||||
#define RGB_MATRIX_DEFAULT_HUE 215
|
||||
#define RGB_MATRIX_DEFAULT_SAT 255
|
||||
#define RGB_MATRIX_DEFAULT_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS
|
||||
|
||||
/* ---------------------------
|
||||
* Common other Configuration
|
||||
* ---------------------------
|
||||
*/
|
||||
#define ENABLE_COMPILE_KEYCODE
|
||||
|
||||
#if defined CONVERT_TO_KB2040 || defined CONVERT_TO_PROMICRO_RP2040
|
||||
# include "config_rp2040.h"
|
||||
#else
|
||||
# include "config_avr.h"
|
||||
#endif
|
|
@ -1,15 +0,0 @@
|
|||
// Copyright 2022 Jose Pablo Ramirez (@jpe230)
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
/* ---------------------------
|
||||
* AVR RGB Configuration
|
||||
* ---------------------------
|
||||
*/
|
||||
#define ENABLE_RGB_MATRIX_ALPHAS_MODS
|
||||
#define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT
|
||||
#define ENABLE_RGB_MATRIX_BAND_VAL
|
||||
#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
|
||||
#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
|
||||
#define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS
|
|
@ -1,73 +0,0 @@
|
|||
// Copyright 2022 Jose Pablo Ramirez (@jpe230)
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
/* ---------------------------
|
||||
* RP2040 OLED Configuration
|
||||
* ---------------------------
|
||||
*/
|
||||
#define I2C1_CLOCK_SPEED 400000
|
||||
#define OLED_UPDATE_INTERVAL 1
|
||||
#define OLED_I2C_TIMEOUT 1
|
||||
|
||||
/* ---------------------------
|
||||
* RP2040 Split Configuration
|
||||
* ---------------------------
|
||||
*/
|
||||
#define SPLIT_WPM_ENABLE
|
||||
|
||||
/* ---------------------------
|
||||
* RP2040 Debounce
|
||||
* ---------------------------
|
||||
*/
|
||||
#undef DEBOUNCE
|
||||
#define DEBOUNCE 1
|
||||
|
||||
/* ---------------------------
|
||||
* RP2040 RGB Configuration
|
||||
* ---------------------------
|
||||
*/
|
||||
#define ENABLE_RGB_MATRIX_ALPHAS_MODS
|
||||
#define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN
|
||||
#define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT
|
||||
#define ENABLE_RGB_MATRIX_BREATHING
|
||||
#define ENABLE_RGB_MATRIX_BAND_SAT
|
||||
#define ENABLE_RGB_MATRIX_BAND_VAL
|
||||
#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
|
||||
#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL
|
||||
#define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT
|
||||
#define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL
|
||||
#define ENABLE_RGB_MATRIX_CYCLE_ALL
|
||||
#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
|
||||
#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN
|
||||
#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
|
||||
#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN
|
||||
#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
|
||||
#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL
|
||||
#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL
|
||||
#define ENABLE_RGB_MATRIX_DUAL_BEACON
|
||||
#define ENABLE_RGB_MATRIX_RAINBOW_BEACON
|
||||
#define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS
|
||||
#define ENABLE_RGB_MATRIX_RAINDROPS
|
||||
#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
|
||||
#define ENABLE_RGB_MATRIX_HUE_BREATHING
|
||||
#define ENABLE_RGB_MATRIX_HUE_PENDULUM
|
||||
#define ENABLE_RGB_MATRIX_HUE_WAVE
|
||||
#define ENABLE_RGB_MATRIX_PIXEL_RAIN
|
||||
#define ENABLE_RGB_MATRIX_PIXEL_FLOW
|
||||
#define ENABLE_RGB_MATRIX_PIXEL_FRACTAL
|
||||
#define ENABLE_RGB_MATRIX_TYPING_HEATMAP
|
||||
#define ENABLE_RGB_MATRIX_DIGITAL_RAIN
|
||||
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
|
||||
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE
|
||||
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
|
||||
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
|
||||
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
|
||||
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
|
||||
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
|
||||
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
|
||||
#define ENABLE_RGB_MATRIX_SPLASH
|
||||
#define ENABLE_RGB_MATRIX_MULTISPLASH
|
||||
#define ENABLE_RGB_MATRIX_SOLID_SPLASH
|
||||
#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
|
|
@ -1,15 +0,0 @@
|
|||
// Copyright 2022 Jose Pablo Ramirez (@jpe230)
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
/* ---------------------------
|
||||
* Custom OLED Fncs Prototypes
|
||||
* ---------------------------
|
||||
*/
|
||||
void render_slave_oled(void);
|
||||
void render_master_oled(void);
|
||||
void oled_timer_reset(void);
|
||||
void set_keylog(uint16_t keycode, keyrecord_t *record);
|
|
@ -1,57 +0,0 @@
|
|||
// Copyright 2022 Jose Pablo Ramirez (@jpe230)
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
// clang-format off
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = LAYOUT_split_3x6_3(
|
||||
//,-----------------------------------------------------. ,-----------------------------------------------------.
|
||||
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_LCTL, 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_ESC,
|
||||
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
|
||||
KC_LGUI, MO(1), KC_ENT, KC_SPC, MO(2), KC_RALT
|
||||
//`--------------------------' `--------------------------'
|
||||
|
||||
),
|
||||
|
||||
[1] = LAYOUT_split_3x6_3(
|
||||
//,-----------------------------------------------------. ,-----------------------------------------------------.
|
||||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||
KC_CAPS, _______, _______, _______, _______, _______, _______, KC_UP, _______, RGB_MOD, RGB_HUI, RGB_VAI,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||
KC_LSFT, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN,KC_RIGHT, RGB_TOG, RGB_SAI, RGB_SPI,
|
||||
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
|
||||
KC_LGUI, _______, _______, _______, MO(3), KC_RALT
|
||||
//`--------------------------' `--------------------------'
|
||||
),
|
||||
|
||||
[2] = LAYOUT_split_3x6_3(
|
||||
//,-----------------------------------------------------. ,-----------------------------------------------------.
|
||||
KC_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||
KC_CAPS, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, KC_GRV,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||
KC_LSFT, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, KC_TILD,
|
||||
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
|
||||
KC_LGUI, MO(3), _______, TG(3), _______, KC_RALT
|
||||
//`--------------------------' `--------------------------'
|
||||
),
|
||||
|
||||
[3] = LAYOUT_split_3x6_3(
|
||||
//,-----------------------------------------------------. ,-----------------------------------------------------.
|
||||
KC_MUTE, KC_WBAK, KC_WFWD, KC_F7, KC_F8, KC_F9, _______, KC_7, KC_8, KC_9, _______, QK_BOOT,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||
KC_VOLU, _______, KC_MNXT, KC_F6, KC_F5, KC_F6, _______, KC_6, KC_5, KC_4, _______, QK_MAKE,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||
KC_VOLD, KC_MPRV, KC_MNXT, KC_F1, KC_F2, KC_F3, _______, KC_1, KC_2, KC_3, _______, DB_TOGG,
|
||||
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
|
||||
KC_LGUI, _______, _______, TG(3), _______, KC_RALT
|
||||
//`--------------------------' `--------------------------'
|
||||
)
|
||||
};
|
||||
// clang-format off
|
|
@ -1,75 +0,0 @@
|
|||
// Copyright 2022 Jose Pablo Ramirez (@jpe230)
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "jpe230.h"
|
||||
|
||||
extern uint8_t logged_row;
|
||||
extern uint8_t logged_col;
|
||||
extern uint32_t oled_timer;
|
||||
static char logged_char = ' ';
|
||||
static uint16_t logged_keycode = 0;
|
||||
|
||||
#define L_BASE 0
|
||||
#define L_LOWER 2
|
||||
#define L_RAISE 4
|
||||
#define L_ADJUST 8
|
||||
|
||||
void oled_render_layer_state(void) {
|
||||
oled_write_P(PSTR("Layer: "), false);
|
||||
switch (layer_state) {
|
||||
case L_BASE:
|
||||
oled_write_ln_P(PSTR("Default"), false);
|
||||
break;
|
||||
case L_LOWER:
|
||||
oled_write_ln_P(PSTR("Lower"), false);
|
||||
break;
|
||||
case L_RAISE:
|
||||
oled_write_ln_P(PSTR("Raise"), false);
|
||||
break;
|
||||
case L_ADJUST:
|
||||
case L_ADJUST|L_LOWER:
|
||||
case L_ADJUST|L_RAISE:
|
||||
case L_ADJUST|L_LOWER|L_RAISE:
|
||||
oled_write_ln_P(PSTR("Adjust"), false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
const char code_to_name[60] = {
|
||||
' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f',
|
||||
'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p',
|
||||
'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
|
||||
'1', '2', '3', '4', '5', '6', '7', '8', '9', '0',
|
||||
'R', 'E', 'B', 'T', '_', '-', '=', '[', ']', '\\',
|
||||
'#', ';', '\'', '`', ',', '.', '/', ' ', ' ', ' '};
|
||||
|
||||
void handle_oled_keypress(uint16_t keycode, keyrecord_t *record) {
|
||||
if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) ||
|
||||
(keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX)) { keycode = keycode & 0xFF; }
|
||||
if (keycode < 60) {
|
||||
logged_char = code_to_name[keycode];
|
||||
}
|
||||
|
||||
logged_keycode = keycode;
|
||||
}
|
||||
|
||||
void oled_render_keylog(void) {
|
||||
oled_write(get_u8_str(logged_row, '0'), false);
|
||||
oled_write_P(PSTR(":"), false);
|
||||
oled_write(get_u8_str(logged_col, '0'), false);
|
||||
oled_write_P(PSTR(", "), false);
|
||||
oled_write(get_u16_str(logged_keycode, ' '), false);
|
||||
oled_write_P(PSTR(" : "), false);
|
||||
oled_write((const char *)&logged_char, false);
|
||||
}
|
||||
|
||||
void render_master_oled(void) {
|
||||
if (timer_elapsed32(oled_timer) > CUSTOM_OLED_TIMEOUT) {
|
||||
oled_off();
|
||||
return;
|
||||
}
|
||||
|
||||
oled_on();
|
||||
oled_render_layer_state();
|
||||
oled_render_keylog();
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
// Copyright 2022 Jose Pablo Ramirez (@jpe230)
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "jpe230.h"
|
||||
|
||||
void render_slave_oled(void) {
|
||||
static const char PROGMEM crkbd_logo[] = {
|
||||
0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94,
|
||||
0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4,
|
||||
0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4,
|
||||
0};
|
||||
oled_write_P(crkbd_logo, false);
|
||||
}
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
// Copyright 2022 Jose Pablo Ramirez (@jpe230)
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "jpe230.h"
|
||||
|
||||
uint8_t logged_row;
|
||||
uint8_t logged_col;
|
||||
uint32_t oled_timer = 0;
|
||||
|
||||
__attribute__ ((weak)) void handle_oled_keypress(uint16_t keycode, keyrecord_t *record) {}
|
||||
|
||||
__attribute__ ((weak)) oled_rotation_t rotate_master(oled_rotation_t rotation) {return rotation;}
|
||||
__attribute__ ((weak)) oled_rotation_t rotate_slave(oled_rotation_t rotation) {return rotation;}
|
||||
|
||||
void oled_timer_reset(void) { oled_timer = timer_read32(); }
|
||||
|
||||
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
|
||||
|
||||
if (!is_keyboard_master()) {
|
||||
return rotate_slave(rotation);
|
||||
}
|
||||
|
||||
return rotate_master(rotation);
|
||||
}
|
||||
|
||||
|
||||
void set_keylog(uint16_t keycode, keyrecord_t *record) {
|
||||
logged_row = record->event.key.row;
|
||||
logged_col = record->event.key.col;
|
||||
|
||||
handle_oled_keypress(keycode, record);
|
||||
}
|
||||
|
||||
bool oled_task_user(void) {
|
||||
if (is_keyboard_master()) {
|
||||
render_master_oled();
|
||||
} else {
|
||||
render_slave_oled();
|
||||
}
|
||||
return false;
|
||||
}
|
|
@ -1,13 +0,0 @@
|
|||
// Copyright 2022 Jose Pablo Ramirez (@jpe230)
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "jpe230.h"
|
||||
#include <stdio.h>
|
||||
|
||||
#define ANIM_SIZE 352 // number of bytes in array, max is 1024 (minimize where possible)
|
||||
#define IDLE_FRAMES 67 //number of total frames
|
||||
|
||||
void change_frame_up(uint8_t frame_number);
|
||||
void change_frame_down(uint8_t frame_number);
|
||||
const char first_frame[ANIM_SIZE];
|
||||
const uint8_t key_frame[4];
|
|
@ -1,463 +0,0 @@
|
|||
// Copyright 2022 Jose Pablo Ramirez (@jpe230)
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "indicators.h"
|
||||
|
||||
const uint8_t key_frame[4] = {10, 30, 46, 61};
|
||||
|
||||
static const uint16_t cumsum_inds[IDLE_FRAMES+1] = {
|
||||
0, 8, 50, 82, 113, 141, 199, 261, 283, 294, 294, 294, 294, 294, 294,
|
||||
294, 330, 332, 377, 478, 588, 741, 844, 970, 1085, 1172, 1219, 1235, 1242, 1242,
|
||||
1243, 1243, 1244, 1318, 1368, 1466, 1491, 1627, 1797, 1900, 2019, 2094, 2215, 2311, 2375,
|
||||
2404, 2404, 2404, 2404, 2477, 2479, 2515, 2560, 2614, 2728, 2884, 2961, 3072, 3143, 3164,
|
||||
3167, 3167, 3167, 3167, 3169, 3171, 3221, 3221,
|
||||
};
|
||||
|
||||
static const uint16_t change_inds[3221] = {
|
||||
173, 174, 175, 176, 177, 207, 208, 209, 135, 136, 137, 138, 139, 140, 141,
|
||||
142, 143, 144, 145, 146, 147, 148, 167, 168, 169, 170, 171, 172, 173, 174,
|
||||
175, 176, 177, 178, 179, 180, 206, 207, 208, 209, 210, 211, 212, 238, 239,
|
||||
240, 241, 242, 243, 244, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
|
||||
144, 145, 146, 147, 148, 149, 166, 167, 168, 169, 171, 172, 181, 213, 238,
|
||||
239, 240, 241, 242, 243, 244, 245, 134, 135, 136, 137, 138, 139, 140, 141,
|
||||
142, 143, 144, 145, 146, 147, 148, 149, 166, 167, 168, 171, 172, 181, 213,
|
||||
238, 239, 240, 241, 242, 243, 244, 245, 39, 102, 135, 136, 137, 138, 139,
|
||||
140, 141, 142, 143, 144, 145, 146, 147, 148, 167, 169, 170, 171, 173, 238,
|
||||
239, 240, 241, 242, 243, 244, 0, 2, 3, 4, 5, 7, 8, 10, 11,
|
||||
12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
|
||||
27, 28, 29, 30, 39, 62, 94, 96, 97, 98, 100, 102, 126, 134, 136,
|
||||
137, 140, 148, 158, 166, 180, 190, 198, 212, 222, 230, 244, 254, 262, 286,
|
||||
294, 318, 326, 350, 0, 2, 3, 4, 5, 7, 8, 10, 11, 12, 13,
|
||||
14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
|
||||
29, 30, 62, 64, 65, 66, 67, 94, 96, 97, 98, 99, 100, 102, 126,
|
||||
131, 134, 158, 163, 166, 190, 195, 198, 222, 227, 230, 254, 259, 262, 286,
|
||||
291, 294, 318, 323, 326, 350, 32, 33, 64, 65, 66, 67, 97, 99, 129,
|
||||
131, 161, 163, 193, 195, 225, 227, 257, 259, 289, 291, 321, 323, 32, 33,
|
||||
65, 97, 129, 161, 193, 225, 257, 289, 321, 136, 137, 138, 139, 140, 141,
|
||||
142, 143, 144, 145, 146, 147, 168, 169, 170, 171, 172, 173, 174, 175, 176,
|
||||
177, 178, 179, 206, 207, 208, 209, 210, 211, 238, 239, 240, 241, 242, 243,
|
||||
175, 176, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149,
|
||||
150, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181,
|
||||
182, 183, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212,
|
||||
213, 214, 108, 109, 110, 111, 112, 113, 114, 132, 133, 134, 135, 136, 137,
|
||||
138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152,
|
||||
153, 154, 155, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175,
|
||||
176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 196, 197, 198,
|
||||
199, 200, 201, 202, 203, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214,
|
||||
215, 216, 217, 218, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238,
|
||||
239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 38, 39,
|
||||
40, 42, 43, 44, 45, 46, 47, 48, 50, 51, 54, 55, 56, 65, 66,
|
||||
67, 90, 91, 92, 97, 108, 109, 110, 111, 112, 113, 114, 120, 121, 122,
|
||||
123, 124, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144,
|
||||
146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 164, 165, 168, 169, 171,
|
||||
172, 174, 182, 186, 187, 193, 194, 196, 197, 198, 199, 203, 207, 208, 210,
|
||||
211, 213, 217, 218, 220, 221, 223, 228, 229, 230, 231, 232, 233, 234, 235,
|
||||
236, 237, 238, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 261,
|
||||
262, 264, 265, 38, 39, 40, 42, 43, 44, 45, 46, 47, 48, 50, 51,
|
||||
54, 55, 56, 65, 66, 67, 89, 90, 91, 92, 93, 94, 95, 97, 111,
|
||||
112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 132, 133,
|
||||
134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148,
|
||||
149, 150, 151, 152, 153, 154, 160, 161, 162, 163, 165, 166, 167, 168, 169,
|
||||
170, 172, 179, 183, 184, 185, 186, 193, 194, 197, 198, 202, 205, 206, 207,
|
||||
208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 220, 221, 223, 229,
|
||||
230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244,
|
||||
245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 261, 262, 264, 265,
|
||||
266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 290, 291, 292, 293,
|
||||
294, 295, 296, 297, 320, 321, 62, 63, 84, 85, 86, 87, 88, 89, 90,
|
||||
91, 92, 93, 94, 95, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
|
||||
115, 116, 117, 118, 119, 120, 128, 129, 130, 131, 132, 133, 134, 135, 136,
|
||||
137, 139, 140, 141, 142, 147, 150, 151, 152, 153, 160, 161, 162, 163, 181,
|
||||
184, 185, 230, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 266,
|
||||
267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281,
|
||||
282, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 320,
|
||||
321, 322, 323, 324, 30, 31, 52, 53, 54, 55, 56, 57, 58, 59, 60,
|
||||
61, 62, 63, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
|
||||
85, 86, 87, 88, 89, 90, 91, 92, 93, 96, 97, 98, 99, 100, 101,
|
||||
102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116,
|
||||
128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 250, 251, 252, 253, 254,
|
||||
255, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283,
|
||||
284, 285, 286, 287, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302,
|
||||
303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 320, 321, 322, 323,
|
||||
324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 20, 21, 22, 23, 24,
|
||||
25, 26, 27, 28, 29, 30, 31, 41, 42, 43, 44, 45, 46, 47, 48,
|
||||
49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 64,
|
||||
65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
|
||||
80, 81, 82, 83, 84, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105,
|
||||
106, 146, 280, 281, 282, 283, 284, 285, 286, 287, 301, 302, 303, 304, 305,
|
||||
306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 323,
|
||||
324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338,
|
||||
339, 340, 341, 342, 343, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
|
||||
20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
|
||||
35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
|
||||
50, 51, 52, 53, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
|
||||
146, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 331, 332, 333, 334,
|
||||
335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349,
|
||||
350, 351, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
|
||||
13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 32, 33, 34, 35, 36,
|
||||
37, 38, 39, 40, 41, 42, 43, 64, 341, 342, 343, 344, 345, 346, 347,
|
||||
348, 349, 350, 351, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
|
||||
11, 12, 32, 33, 351, 0, 1, 2, 3, 4, 5, 6, 146, 146, 135,
|
||||
136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150,
|
||||
151, 152, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 177, 178, 179,
|
||||
180, 181, 182, 183, 184, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207,
|
||||
208, 209, 210, 211, 212, 213, 214, 215, 216, 230, 231, 232, 233, 234, 235,
|
||||
236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 137, 138,
|
||||
139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 168, 169, 170,
|
||||
171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 200, 201, 202,
|
||||
203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 237, 238, 239,
|
||||
240, 241, 242, 108, 109, 110, 111, 112, 113, 114, 132, 133, 134, 135, 136,
|
||||
137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151,
|
||||
152, 153, 154, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175,
|
||||
176, 177, 178, 181, 182, 183, 184, 185, 186, 195, 196, 197, 198, 199, 200,
|
||||
201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 213, 214, 215, 216,
|
||||
217, 218, 219, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
|
||||
240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 108, 109, 110, 111,
|
||||
112, 113, 114, 133, 134, 136, 144, 150, 154, 185, 195, 204, 211, 219, 231,
|
||||
234, 235, 243, 244, 247, 250, 34, 35, 36, 37, 38, 41, 42, 43, 44,
|
||||
45, 46, 47, 48, 49, 52, 53, 55, 64, 65, 89, 90, 91, 92, 122,
|
||||
123, 124, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141,
|
||||
142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 161, 164,
|
||||
166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 178, 182, 183, 184,
|
||||
185, 186, 193, 196, 203, 204, 205, 206, 207, 208, 209, 210, 211, 217, 218,
|
||||
225, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240,
|
||||
241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 252, 285, 288, 289, 313,
|
||||
314, 315, 316, 317, 323, 324, 327, 328, 329, 330, 331, 332, 333, 334, 335,
|
||||
336, 337, 338, 339, 340, 342, 343, 26, 27, 28, 29, 30, 31, 34, 35,
|
||||
36, 37, 38, 41, 42, 43, 44, 45, 46, 47, 48, 49, 52, 53, 55,
|
||||
64, 65, 89, 90, 91, 92, 95, 96, 97, 98, 99, 100, 101, 102, 103,
|
||||
104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 119,
|
||||
120, 121, 122, 123, 124, 125, 126, 129, 130, 131, 132, 133, 134, 135, 136,
|
||||
137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151,
|
||||
152, 153, 161, 165, 171, 172, 177, 183, 184, 185, 193, 197, 198, 199, 200,
|
||||
201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 216, 217, 224, 225, 226,
|
||||
227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241,
|
||||
242, 243, 244, 245, 246, 247, 248, 249, 250, 252, 281, 282, 283, 284, 285,
|
||||
286, 287, 288, 289, 313, 314, 315, 316, 317, 323, 324, 327, 328, 329, 330,
|
||||
331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 342, 343, 26, 27, 28,
|
||||
29, 30, 31, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96,
|
||||
97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
|
||||
112, 113, 114, 115, 116, 117, 119, 120, 121, 122, 123, 124, 125, 126, 224,
|
||||
225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
|
||||
240, 241, 242, 244, 245, 246, 247, 248, 256, 257, 258, 259, 260, 261, 262,
|
||||
263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277,
|
||||
278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 63, 64, 65, 66, 67,
|
||||
68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82,
|
||||
83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97,
|
||||
98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112,
|
||||
113, 114, 115, 116, 117, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265,
|
||||
266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280,
|
||||
281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295,
|
||||
296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310,
|
||||
311, 312, 313, 314, 315, 316, 317, 318, 319, 53, 54, 55, 56, 57, 58,
|
||||
59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
|
||||
74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
|
||||
89, 90, 91, 92, 93, 94, 95, 288, 289, 290, 291, 292, 293, 294, 295,
|
||||
296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310,
|
||||
311, 312, 313, 314, 315, 316, 317, 318, 319, 32, 33, 34, 35, 36, 37,
|
||||
38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
|
||||
53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67,
|
||||
68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82,
|
||||
83, 84, 85, 86, 87, 88, 288, 289, 290, 291, 292, 293, 294, 295, 296,
|
||||
297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311,
|
||||
312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326,
|
||||
327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341,
|
||||
342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 0, 1, 2, 3, 4,
|
||||
5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
|
||||
20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
|
||||
35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
|
||||
50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 320,
|
||||
321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335,
|
||||
336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350,
|
||||
351, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
|
||||
14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
|
||||
29, 30, 31, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331,
|
||||
332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346,
|
||||
347, 348, 349, 350, 351, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
|
||||
10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
|
||||
25, 26, 27, 28, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144,
|
||||
145, 146, 147, 148, 149, 150, 151, 152, 166, 167, 168, 169, 170, 171, 173,
|
||||
174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 198, 199, 200, 201,
|
||||
202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216,
|
||||
231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245,
|
||||
246, 247, 175, 176, 140, 141, 142, 143, 144, 145, 169, 170, 171, 172, 173,
|
||||
174, 175, 176, 177, 178, 179, 180, 181, 199, 200, 201, 202, 203, 204, 205,
|
||||
206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 137, 138, 139, 140, 141,
|
||||
142, 143, 144, 145, 166, 167, 168, 169, 170, 173, 174, 175, 176, 182, 183,
|
||||
196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 214, 215,
|
||||
216, 217, 218, 241, 242, 243, 244, 245, 246, 247, 136, 137, 138, 139, 140,
|
||||
141, 142, 143, 144, 145, 165, 166, 167, 168, 174, 175, 178, 179, 180, 181,
|
||||
182, 183, 184, 195, 196, 197, 204, 216, 219, 227, 228, 229, 230, 231, 232,
|
||||
233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247,
|
||||
248, 249, 250, 251, 20, 21, 22, 23, 49, 50, 51, 52, 78, 79, 80,
|
||||
107, 108, 109, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 165, 166,
|
||||
167, 168, 174, 175, 178, 179, 180, 181, 182, 183, 184, 193, 194, 195, 196,
|
||||
197, 204, 216, 219, 224, 225, 227, 228, 229, 230, 231, 232, 233, 234, 235,
|
||||
236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250,
|
||||
251, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269,
|
||||
270, 271, 272, 273, 274, 275, 276, 320, 321, 322, 323, 324, 325, 326, 327,
|
||||
328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 15, 16,
|
||||
17, 18, 20, 21, 22, 23, 44, 45, 46, 47, 49, 50, 51, 52, 73,
|
||||
74, 75, 76, 78, 79, 80, 102, 103, 104, 107, 108, 109, 131, 132, 133,
|
||||
136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 160, 161, 162, 165, 166,
|
||||
167, 168, 169, 173, 175, 181, 183, 184, 185, 186, 187, 188, 189, 190, 191,
|
||||
193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207,
|
||||
208, 216, 217, 218, 224, 225, 242, 243, 244, 245, 246, 247, 256, 257, 258,
|
||||
259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273,
|
||||
274, 275, 276, 279, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298,
|
||||
299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 320, 321,
|
||||
322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336,
|
||||
337, 338, 339, 340, 13, 14, 15, 16, 17, 18, 42, 43, 44, 45, 46,
|
||||
47, 70, 71, 72, 73, 74, 75, 76, 99, 100, 101, 102, 103, 104, 128,
|
||||
129, 130, 131, 132, 133, 160, 161, 162, 183, 184, 185, 186, 187, 188, 189,
|
||||
190, 191, 208, 215, 216, 217, 247, 249, 279, 281, 288, 289, 290, 291, 292,
|
||||
293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307,
|
||||
308, 309, 310, 311, 312, 313, 8, 9, 10, 11, 13, 14, 15, 16, 37,
|
||||
38, 39, 40, 42, 43, 44, 45, 66, 67, 68, 69, 70, 71, 72, 73,
|
||||
96, 97, 98, 99, 100, 101, 102, 128, 129, 130, 131, 156, 157, 158, 159,
|
||||
160, 185, 186, 187, 188, 189, 190, 191, 208, 216, 217, 220, 249, 252, 281,
|
||||
284, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301,
|
||||
302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 316, 320, 321,
|
||||
322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336,
|
||||
337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 3, 4, 5,
|
||||
6, 8, 9, 10, 11, 32, 33, 34, 35, 37, 38, 39, 40, 64, 66,
|
||||
67, 68, 69, 96, 97, 98, 156, 157, 158, 159, 188, 189, 191, 206, 208,
|
||||
220, 223, 252, 255, 284, 287, 316, 319, 320, 321, 322, 323, 324, 325, 326,
|
||||
327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341,
|
||||
342, 343, 344, 345, 346, 347, 348, 351, 0, 1, 2, 3, 4, 5, 6,
|
||||
32, 33, 34, 35, 64, 159, 191, 205, 206, 223, 255, 287, 319, 351, 0,
|
||||
1, 2, 205, 207, 207, 216, 138, 139, 140, 141, 142, 143, 144, 145, 167,
|
||||
168, 169, 170, 171, 172, 173, 174, 175, 177, 178, 179, 180, 181, 182, 197,
|
||||
198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212,
|
||||
213, 214, 215, 216, 217, 241, 242, 243, 244, 245, 246,
|
||||
};
|
||||
|
||||
static const char change_vals[3221] = {
|
||||
0x18, 0x1C, 0xFC, 0xFC, 0xFC, 0x0F, 0x0F, 0x0F, 0xE0, 0xE0, 0xF0, 0xF0, 0xF0, 0xF8, 0xF8,
|
||||
0xFC, 0xFC, 0xFE, 0xFE, 0xFE, 0xFC, 0xFC, 0x03, 0x03, 0x03, 0x01, 0x01, 0x01, 0x00, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0x0F,
|
||||
0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0xF0, 0xF8, 0xF8, 0xF8, 0xFC, 0xFC, 0xFC, 0xFE, 0xFF, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0xFF, 0xFF, 0x1F,
|
||||
0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x00, 0xF0, 0xF0, 0xF0, 0xF8, 0xF8, 0xF8, 0xFC,
|
||||
0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0x00, 0x00, 0x03, 0x03, 0x01, 0x01, 0x00, 0x00,
|
||||
0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x00, 0x80, 0x80, 0x00, 0xE0, 0xE0, 0xE0, 0xE0,
|
||||
0xF0, 0xF0, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0x00, 0x03, 0x03, 0x03, 0x01, 0x03,
|
||||
0x07, 0x07, 0x07, 0x07, 0x07, 0x03, 0x80, 0x40, 0x20, 0x20, 0x10, 0x08, 0x04, 0x02, 0x02,
|
||||
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
|
||||
0x02, 0x02, 0x02, 0xFC, 0x00, 0xFF, 0xFF, 0x08, 0x04, 0x04, 0x02, 0xFE, 0xFF, 0xFF, 0xC0,
|
||||
0xC0, 0xE0, 0x00, 0xFF, 0xFF, 0x00, 0xFF, 0xFF, 0x00, 0xFF, 0xFF, 0x00, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x08, 0x08, 0x04, 0xFC, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00,
|
||||
0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00,
|
||||
0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x80, 0x80, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0xFF,
|
||||
0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xA0, 0x60, 0x80, 0xC0, 0xC0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xC0, 0xC0,
|
||||
0x80, 0x06, 0x0F, 0x0F, 0x0F, 0x0F, 0x03, 0x81, 0xC1, 0xC1, 0xE1, 0xFB, 0xFF, 0x7F, 0x3F,
|
||||
0x1F, 0x06, 0xF0, 0xF8, 0xFC, 0xFE, 0xFF, 0xFF, 0xFF, 0xF7, 0xF3, 0xF1, 0xF1, 0xF0, 0xF0,
|
||||
0xF0, 0xF0, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xE0, 0xF8, 0xFC, 0xFE, 0xFE, 0xFF,
|
||||
0xFF, 0xFF, 0x3F, 0x3F, 0x1F, 0x1F, 0x1F, 0x3F, 0x3F, 0x7F, 0xFF, 0xFF, 0xFF, 0xFE, 0xFE,
|
||||
0xFC, 0xF8, 0xC0, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x01, 0x00, 0x80, 0xC0, 0xC0,
|
||||
0xE0, 0xF0, 0xF8, 0xFC, 0xFF, 0xFF, 0xFF, 0x7F, 0x3F, 0x1F, 0x0F, 0x03, 0x80, 0xE0, 0xF0,
|
||||
0xF8, 0xF8, 0xFC, 0xFE, 0xFF, 0xBF, 0x9F, 0x9F, 0x8F, 0x87, 0x87, 0x83, 0x81, 0x81, 0x80,
|
||||
0x80, 0x80, 0x80, 0x80, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F,
|
||||
0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x80, 0x40,
|
||||
0x40, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x40, 0x40, 0x80, 0xC0, 0x18,
|
||||
0x04, 0x01, 0x04, 0xB0, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x20,
|
||||
0x08, 0x03, 0x00, 0xE0, 0xF0, 0xF8, 0xFC, 0xFE, 0xFE, 0xFE, 0x7E, 0x3E, 0x3F, 0xBF, 0x7F,
|
||||
0x7E, 0xFE, 0xFE, 0xFE, 0xFE, 0xFD, 0xF8, 0xF0, 0xC0, 0x00, 0x00, 0x43, 0x13, 0x0B, 0x07,
|
||||
0x02, 0x80, 0x7F, 0x07, 0x00, 0x02, 0x01, 0x00, 0xC0, 0xE0, 0xF0, 0xFE, 0x8F, 0x87, 0x83,
|
||||
0x81, 0x80, 0xC0, 0xA0, 0x10, 0x08, 0x04, 0x00, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F,
|
||||
0x8F, 0x4F, 0x2F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x00, 0x40,
|
||||
0x60, 0x04, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x60, 0x30, 0x18, 0x0C, 0x02, 0x00, 0x80,
|
||||
0x40, 0x40, 0x20, 0x10, 0x08, 0x08, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40,
|
||||
0xC0, 0xE0, 0xF0, 0xF8, 0xF8, 0xFC, 0xFE, 0xFE, 0x7D, 0x7C, 0x7C, 0x7C, 0xFC, 0xFC, 0xF8,
|
||||
0xF8, 0xF8, 0xF0, 0xE0, 0x80, 0x00, 0x04, 0x02, 0x01, 0x01, 0x00, 0x07, 0x07, 0x07, 0x07,
|
||||
0x07, 0x01, 0xFF, 0x3F, 0x1F, 0x07, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xFC, 0xFF, 0xCF, 0xCF,
|
||||
0xC7, 0xC3, 0xC3, 0xC1, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07,
|
||||
0x87, 0x87, 0x47, 0x27, 0x20, 0x10, 0x18, 0x08, 0x04, 0x06, 0x02, 0x00, 0x00, 0x00, 0x00,
|
||||
0x80, 0x40, 0x40, 0x20, 0x10, 0x08, 0x08, 0x04, 0x02, 0x02, 0x01, 0xC0, 0x60, 0x30, 0x18,
|
||||
0x0C, 0x04, 0x02, 0x01, 0x06, 0x01, 0x80, 0x40, 0x80, 0x80, 0x40, 0x20, 0x30, 0x18, 0x0C,
|
||||
0x04, 0x02, 0x01, 0x00, 0x00, 0x80, 0x80, 0x40, 0x60, 0x20, 0x10, 0x08, 0x0C, 0x04, 0x02,
|
||||
0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x40, 0x20, 0x30, 0x10, 0x08, 0x0C, 0x04, 0xC2, 0xF1,
|
||||
0xF1, 0xF8, 0xF8, 0xFC, 0x7C, 0xF8, 0xF0, 0xE0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F,
|
||||
0x0F, 0x00, 0x03, 0x07, 0x07, 0x07, 0x07, 0x00, 0x80, 0x80, 0x40, 0x60, 0x20, 0x30, 0x00,
|
||||
0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x60, 0x20, 0x10, 0x18, 0x08, 0x04, 0x06, 0x02, 0x01,
|
||||
0x01, 0x00, 0x00, 0x80, 0x80, 0x40, 0x20, 0x10, 0x18, 0x0C, 0x04, 0x02, 0x03, 0x01, 0x18,
|
||||
0x0C, 0x06, 0x03, 0x01, 0x80, 0xC0, 0x80, 0x80, 0xC0, 0x60, 0x30, 0x18, 0x18, 0x0C, 0x06,
|
||||
0x03, 0x01, 0x00, 0x80, 0x80, 0xC0, 0x60, 0x20, 0x30, 0x18, 0x0C, 0x04, 0x06, 0x03, 0x01,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x60, 0x30, 0x30, 0x18, 0x0C,
|
||||
0x04, 0x06, 0x03, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xF0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0xC0, 0x60,
|
||||
0x60, 0x30, 0x10, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xC0,
|
||||
0x60, 0x60, 0x30, 0x18, 0x18, 0x0C, 0x06, 0x06, 0x03, 0x01, 0x01, 0x00, 0x00, 0x00, 0x80,
|
||||
0xC0, 0x60, 0x30, 0x18, 0x18, 0x0C, 0x06, 0x03, 0x01, 0x01, 0x80, 0x80, 0xC0, 0x60, 0x70,
|
||||
0x30, 0x18, 0x0C, 0x0E, 0x07, 0x03, 0x01, 0x80, 0x80, 0xC0, 0xE0, 0x60, 0x30, 0x18, 0x1C,
|
||||
0x0C, 0x06, 0x03, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0,
|
||||
0x60, 0x70, 0x30, 0x18, 0x1C, 0x0C, 0x06, 0x07, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0xC0, 0xE0, 0x60, 0x30, 0x38, 0x18, 0x0C, 0x0C, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, 0xC0, 0x60, 0x70, 0x30, 0x18, 0x0C,
|
||||
0x0E, 0x06, 0x03, 0x03, 0x01, 0x80, 0xC0, 0xE0, 0x60, 0x70, 0x38, 0x1C, 0x0C, 0x0E, 0x07,
|
||||
0x03, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xE0, 0x60,
|
||||
0x70, 0x38, 0x1C, 0x0C, 0x0E, 0x07, 0x03, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, 0xC0, 0xE0, 0x70, 0x30, 0x38, 0x1C, 0x0C,
|
||||
0x0E, 0x07, 0xC0, 0xE0, 0xE0, 0x70, 0x38, 0x3C, 0x1C, 0x0E, 0x0F, 0x07, 0x03, 0x01, 0x01,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x80, 0x3C, 0x1E, 0x0E, 0x07, 0x07, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFC, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
|
||||
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xC0,
|
||||
0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xC0, 0xC0, 0x80, 0x07, 0x07, 0x07,
|
||||
0x07, 0x07, 0xE1, 0xE1, 0xE1, 0xE1, 0xF1, 0xFF, 0xFF, 0xFF, 0xBF, 0x1F, 0x38, 0x78, 0xFC,
|
||||
0xFC, 0xF8, 0xF0, 0xE1, 0xE0, 0xE1, 0xF1, 0xFF, 0xFF, 0xFF, 0x7F, 0x3F, 0x01, 0x01, 0x01,
|
||||
0x01, 0x01, 0x01, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xF0, 0xFC, 0xFE, 0xFE, 0xFF,
|
||||
0xFF, 0xFF, 0x7F, 0x3F, 0x3F, 0x1F, 0x1F, 0x1F, 0x3F, 0x3F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE,
|
||||
0xFC, 0xF8, 0xF0, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0xF8, 0xF8, 0xF8, 0xF8,
|
||||
0xF8, 0xF8, 0xFC, 0xFF, 0xFF, 0xBF, 0x9F, 0x1F, 0x07, 0x60, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0,
|
||||
0xF0, 0xF0, 0x80, 0x01, 0x01, 0x01, 0x01, 0x01, 0x03, 0x83, 0xC7, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0xFE, 0x30, 0x03, 0x07, 0x0F, 0x1F, 0x1F, 0x1F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F,
|
||||
0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x1F, 0x1F, 0x1F, 0x0F, 0x07, 0x03, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0xF8, 0xFC, 0xFE, 0x3F, 0xFE, 0xE0, 0x0F, 0x00, 0x81, 0xD7, 0x00, 0x0F,
|
||||
0x1F, 0x1F, 0x1F, 0x1F, 0x0F, 0x01, 0x80, 0x80, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20,
|
||||
0x20, 0x20, 0x20, 0x20, 0x20, 0x40, 0x40, 0x80, 0x02, 0x01, 0x01, 0x02, 0x08, 0xE0, 0x40,
|
||||
0x20, 0x0F, 0xF8, 0x08, 0x08, 0x08, 0xC8, 0xF8, 0xF8, 0xF8, 0xFC, 0xFC, 0xFC, 0x7E, 0x7E,
|
||||
0x7E, 0x3E, 0x7E, 0x7E, 0xFE, 0xFC, 0xFC, 0xFC, 0xFC, 0xFA, 0xF1, 0x80, 0x00, 0xFF, 0x00,
|
||||
0x03, 0x03, 0x03, 0x03, 0x03, 0x01, 0x60, 0xF0, 0xF0, 0xF0, 0xF0, 0xF8, 0xBF, 0x9F, 0x1F,
|
||||
0x07, 0x00, 0xFF, 0x00, 0xE0, 0xC1, 0x81, 0x81, 0x81, 0x81, 0x81, 0xC3, 0xFF, 0xFE, 0x00,
|
||||
0x01, 0x02, 0x02, 0x02, 0x03, 0x03, 0x07, 0x07, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F,
|
||||
0x0F, 0x0F, 0x0F, 0x0F, 0x07, 0x07, 0x07, 0x01, 0x08, 0x10, 0x40, 0xFF, 0x40, 0x80, 0x80,
|
||||
0x40, 0x20, 0x18, 0x07, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
|
||||
0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x02, 0x04, 0x0C, 0x18, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
|
||||
0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x20, 0x10,
|
||||
0x10, 0x08, 0x08, 0x0C, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xE0, 0xF0,
|
||||
0xF8, 0xF8, 0xF8, 0xF8, 0x7C, 0x7C, 0x7C, 0x7C, 0xFC, 0xF8, 0xF8, 0xF8, 0xF8, 0xF0, 0xE0,
|
||||
0xC0, 0x00, 0x00, 0x00, 0x03, 0x00, 0xF0, 0x1F, 0x0F, 0x00, 0x00, 0x00, 0x78, 0xF8, 0xF8,
|
||||
0xF8, 0xF8, 0xF0, 0xC0, 0xC1, 0xC1, 0xC1, 0xC1, 0xC1, 0xE3, 0x7E, 0x00, 0x40, 0x40, 0x40,
|
||||
0x40, 0x40, 0x40, 0x40, 0x41, 0x43, 0x43, 0x43, 0x47, 0x47, 0x47, 0x47, 0x47, 0x47, 0x47,
|
||||
0x47, 0x07, 0x87, 0x83, 0x83, 0x81, 0x80, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02,
|
||||
0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0xC0, 0x40, 0x40, 0x60, 0x20, 0x30, 0x10, 0x02,
|
||||
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x03, 0x03, 0x03, 0x03, 0x01,
|
||||
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x03, 0x03, 0x07, 0x07, 0x07, 0x07, 0x07,
|
||||
0x07, 0x07, 0x07, 0x07, 0x03, 0x03, 0x01, 0x00, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08,
|
||||
0x18, 0x08, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10,
|
||||
0x10, 0x30, 0x30, 0x20, 0x20, 0x20, 0x60, 0x40, 0x40, 0xC0, 0x80, 0x18, 0x18, 0x18, 0x18,
|
||||
0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x08, 0x08, 0x08, 0x08, 0x08,
|
||||
0x0C, 0x0C, 0x0C, 0x0C, 0x04, 0x04, 0x06, 0x06, 0x02, 0x03, 0x03, 0x01, 0x01, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
|
||||
0x03, 0x03, 0x03, 0x03, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x06, 0x06, 0x06, 0x06,
|
||||
0x06, 0x04, 0x04, 0x04, 0x0C, 0x0C, 0x0C, 0x08, 0x18, 0x80, 0x80, 0x80, 0x80, 0x80, 0xC0,
|
||||
0xC0, 0xC0, 0x40, 0x60, 0x60, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x03,
|
||||
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
|
||||
0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x10, 0x10, 0x10, 0x30,
|
||||
0x30, 0x30, 0x30, 0x30, 0x20, 0x20, 0x60, 0x60, 0x60, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
|
||||
0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x0C, 0x0C, 0x0C,
|
||||
0x0C, 0x0C, 0x0C, 0x0C, 0x06, 0x06, 0x06, 0x06, 0x03, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
|
||||
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
|
||||
0x06, 0x06, 0x06, 0x06, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0,
|
||||
0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xE0, 0xE0, 0xE0, 0xE0, 0x60, 0x60, 0x60,
|
||||
0x60, 0x60, 0x70, 0x70, 0x70, 0x30, 0x30, 0x30, 0x38, 0x38, 0x18, 0x18, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0,
|
||||
0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xC0, 0xC0, 0xC0, 0xC0,
|
||||
0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
|
||||
0x80, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07,
|
||||
0x07, 0x07, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x01, 0x01, 0x01, 0x01, 0x01,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0xC0, 0x80, 0xC0, 0xE0, 0xE0, 0xE0, 0xE0, 0x20, 0xE0, 0xF8, 0xFF, 0xFF, 0xFF,
|
||||
0x3F, 0x07, 0x01, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0x18, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3C,
|
||||
0x3C, 0x3C, 0x3C, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3C, 0x3C, 0xC0, 0xF0, 0xFC, 0xFE, 0xFC,
|
||||
0xFE, 0xFE, 0x7E, 0x0C, 0xC0, 0xF0, 0xFE, 0xFF, 0xFF, 0x3F, 0x0F, 0x01, 0x00, 0xC0, 0xC0,
|
||||
0xF8, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xF8, 0xF8, 0xF8, 0xF8, 0xFF, 0xFF,
|
||||
0xF8, 0xF8, 0xF8, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x80, 0xF0, 0xFE, 0xFF, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0x3F, 0x07, 0xC0, 0xF0, 0xFE, 0xFF, 0x07, 0x00, 0xE0, 0xE0, 0xE0, 0xE0,
|
||||
0xE0, 0xE0, 0xE0, 0xF8, 0xFE, 0xFF, 0xF8, 0xFF, 0xF8, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
|
||||
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F,
|
||||
0x1F, 0x01, 0x01, 0x01, 0x80, 0x30, 0x0C, 0x01, 0x80, 0x30, 0x04, 0x01, 0xC0, 0x10, 0x06,
|
||||
0xC0, 0x18, 0x06, 0x60, 0x98, 0xF3, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0x7C, 0x0C, 0x60, 0x88,
|
||||
0xF3, 0xFC, 0x0F, 0x01, 0xC0, 0xC0, 0xC0, 0xF0, 0xC0, 0xC0, 0x00, 0x80, 0x20, 0x0C, 0xF1,
|
||||
0xFE, 0xF9, 0xF8, 0x00, 0x0C, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x07, 0x00, 0x00, 0x00,
|
||||
0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
|
||||
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
|
||||
0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x80, 0x70,
|
||||
0x0C, 0x03, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x30, 0x0E, 0x01, 0x00, 0x00, 0x00, 0x00, 0xC0,
|
||||
0x38, 0x06, 0x01, 0x00, 0x00, 0x00, 0xC0, 0x38, 0x07, 0x00, 0x00, 0x00, 0xE0, 0x18, 0x07,
|
||||
0x00, 0x00, 0xC0, 0xF0, 0xF8, 0xF8, 0xF8, 0xF8, 0x78, 0x18, 0x60, 0x1C, 0x03, 0x00, 0x00,
|
||||
0xC0, 0xF8, 0xFE, 0x7F, 0x03, 0xC0, 0xFC, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,
|
||||
0x00, 0x00, 0x00, 0x00, 0x78, 0x7E, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7D, 0x7C, 0x7C, 0x7C,
|
||||
0x7C, 0xFC, 0x78, 0x00, 0x00, 0x00, 0x07, 0x07, 0x07, 0x07, 0x07, 0xFF, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0xFF, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
|
||||
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x03, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0xC0, 0x38, 0x07, 0x01, 0x00, 0x00, 0xE0, 0x38, 0x07, 0x01, 0x00,
|
||||
0x00, 0x80, 0xE0, 0x1C, 0x07, 0x00, 0x00, 0x00, 0x80, 0x70, 0x1C, 0x03, 0x00, 0x00, 0x80,
|
||||
0x70, 0x0E, 0x03, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x02, 0x02, 0x02, 0x02,
|
||||
0x02, 0x02, 0x78, 0x7C, 0x7C, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x20, 0x20, 0x20, 0x20, 0x20,
|
||||
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
|
||||
0x20, 0x20, 0x20, 0x20, 0x20, 0x3F, 0xC0, 0x78, 0x1E, 0x03, 0x00, 0x00, 0x00, 0x00, 0xC0,
|
||||
0x78, 0x0F, 0x03, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x38, 0x0F, 0x01, 0x00, 0x00, 0x00, 0x00,
|
||||
0x3C, 0x0F, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80,
|
||||
0x00, 0x00, 0x00, 0x00, 0xFF, 0x01, 0x00, 0x00, 0x7C, 0x78, 0x78, 0xFF, 0x00, 0xFF, 0x00,
|
||||
0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x30, 0x30,
|
||||
0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30,
|
||||
0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x3F, 0xC0, 0xF8, 0x1E,
|
||||
0x07, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x78, 0x1F, 0x03, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x00, 0x00, 0xFF, 0x78, 0x78,
|
||||
0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x3F, 0x07, 0x01, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x7C, 0x78, 0x7C, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
|
||||
uint16_t index_start2 = 0;
|
||||
uint16_t index_end2 = 0;
|
||||
void change_frame_up(uint8_t frame_number){
|
||||
// for n changes this frame, change those bytes by change_inds and change_vals
|
||||
index_start2 = cumsum_inds[frame_number-1];
|
||||
index_end2 = cumsum_inds[frame_number];
|
||||
if (index_start2 != index_end2){ // if a change in buffer
|
||||
for (uint16_t i=index_start2; i < index_end2; i++){
|
||||
oled_write_raw_byte(change_vals[i], change_inds[i]);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,461 +0,0 @@
|
|||
// Copyright 2022 Jose Pablo Ramirez (@jpe230)
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "indicators.h"
|
||||
|
||||
static const uint16_t cumsum_inds[IDLE_FRAMES+1] = {
|
||||
0, 50, 52, 54, 54, 54, 54, 57, 78, 149, 260, 337, 493, 607, 661,
|
||||
706, 742, 744, 817, 817, 817, 817, 846, 910, 1006, 1127, 1202, 1321, 1424, 1594,
|
||||
1730, 1755, 1853, 1903, 1977, 1978, 1978, 1979, 1979, 1986, 2002, 2049, 2136, 2251, 2377,
|
||||
2480, 2633, 2743, 2844, 2889, 2891, 2927, 2927, 2927, 2927, 2927, 2927, 2927, 2938, 2960,
|
||||
3022, 3080, 3108, 3139, 3171, 3213, 3221, 3221,
|
||||
};
|
||||
|
||||
static const uint16_t change_inds[3221] = {
|
||||
138, 139, 140, 141, 142, 143, 144, 145, 167, 168, 169, 170, 171, 172, 173,
|
||||
174, 175, 177, 178, 179, 180, 181, 182, 197, 198, 199, 200, 201, 202, 203,
|
||||
204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 241,
|
||||
242, 243, 244, 245, 246, 207, 216, 205, 207, 0, 1, 2, 0, 1, 2,
|
||||
3, 4, 5, 6, 32, 33, 34, 35, 64, 159, 191, 205, 206, 223, 255,
|
||||
287, 319, 351, 3, 4, 5, 6, 8, 9, 10, 11, 32, 33, 34, 35,
|
||||
37, 38, 39, 40, 64, 66, 67, 68, 69, 96, 97, 98, 156, 157, 158,
|
||||
159, 188, 189, 191, 206, 208, 220, 223, 252, 255, 284, 287, 316, 319, 320,
|
||||
321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335,
|
||||
336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 351, 8,
|
||||
9, 10, 11, 13, 14, 15, 16, 37, 38, 39, 40, 42, 43, 44, 45,
|
||||
66, 67, 68, 69, 70, 71, 72, 73, 96, 97, 98, 99, 100, 101, 102,
|
||||
128, 129, 130, 131, 156, 157, 158, 159, 160, 185, 186, 187, 188, 189, 190,
|
||||
191, 208, 216, 217, 220, 249, 252, 281, 284, 288, 289, 290, 291, 292, 293,
|
||||
294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308,
|
||||
309, 310, 311, 312, 313, 316, 320, 321, 322, 323, 324, 325, 326, 327, 328,
|
||||
329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343,
|
||||
344, 345, 346, 347, 348, 13, 14, 15, 16, 17, 18, 42, 43, 44, 45,
|
||||
46, 47, 70, 71, 72, 73, 74, 75, 76, 99, 100, 101, 102, 103, 104,
|
||||
128, 129, 130, 131, 132, 133, 160, 161, 162, 183, 184, 185, 186, 187, 188,
|
||||
189, 190, 191, 208, 215, 216, 217, 247, 249, 279, 281, 288, 289, 290, 291,
|
||||
292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306,
|
||||
307, 308, 309, 310, 311, 312, 313, 15, 16, 17, 18, 20, 21, 22, 23,
|
||||
44, 45, 46, 47, 49, 50, 51, 52, 73, 74, 75, 76, 78, 79, 80,
|
||||
102, 103, 104, 107, 108, 109, 131, 132, 133, 136, 137, 138, 139, 140, 141,
|
||||
142, 143, 144, 145, 160, 161, 162, 165, 166, 167, 168, 169, 173, 175, 181,
|
||||
183, 184, 185, 186, 187, 188, 189, 190, 191, 193, 194, 195, 196, 197, 198,
|
||||
199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 216, 217, 218, 224, 225,
|
||||
242, 243, 244, 245, 246, 247, 256, 257, 258, 259, 260, 261, 262, 263, 264,
|
||||
265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 279, 288, 289,
|
||||
290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
|
||||
305, 306, 307, 308, 309, 310, 311, 320, 321, 322, 323, 324, 325, 326, 327,
|
||||
328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 20, 21,
|
||||
22, 23, 49, 50, 51, 52, 78, 79, 80, 107, 108, 109, 136, 137, 138,
|
||||
139, 140, 141, 142, 143, 144, 145, 165, 166, 167, 168, 174, 175, 178, 179,
|
||||
180, 181, 182, 183, 184, 193, 194, 195, 196, 197, 204, 216, 219, 224, 225,
|
||||
227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241,
|
||||
242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 256, 257, 258, 259, 260,
|
||||
261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275,
|
||||
276, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333,
|
||||
334, 335, 336, 337, 338, 339, 340, 136, 137, 138, 139, 140, 141, 142, 143,
|
||||
144, 145, 165, 166, 167, 168, 174, 175, 178, 179, 180, 181, 182, 183, 184,
|
||||
195, 196, 197, 204, 216, 219, 227, 228, 229, 230, 231, 232, 233, 234, 235,
|
||||
236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250,
|
||||
251, 137, 138, 139, 140, 141, 142, 143, 144, 145, 166, 167, 168, 169, 170,
|
||||
173, 174, 175, 176, 182, 183, 196, 197, 198, 199, 200, 201, 202, 203, 204,
|
||||
205, 206, 207, 208, 214, 215, 216, 217, 218, 241, 242, 243, 244, 245, 246,
|
||||
247, 140, 141, 142, 143, 144, 145, 169, 170, 171, 172, 173, 174, 175, 176,
|
||||
177, 178, 179, 180, 181, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208,
|
||||
209, 210, 211, 212, 213, 214, 215, 175, 176, 134, 135, 136, 137, 138, 139,
|
||||
140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 166, 167,
|
||||
168, 169, 170, 171, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183,
|
||||
184, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211,
|
||||
212, 213, 214, 215, 216, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240,
|
||||
241, 242, 243, 244, 245, 246, 247, 0, 1, 2, 3, 4, 5, 6, 7,
|
||||
8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
|
||||
23, 24, 25, 26, 27, 28, 0, 1, 2, 3, 4, 5, 6, 7, 8,
|
||||
9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
|
||||
24, 25, 26, 27, 28, 29, 30, 31, 320, 321, 322, 323, 324, 325, 326,
|
||||
327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341,
|
||||
342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 0, 1, 2, 3, 4,
|
||||
5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
|
||||
20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
|
||||
35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
|
||||
50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 320,
|
||||
321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335,
|
||||
336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350,
|
||||
351, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
|
||||
46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
|
||||
61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75,
|
||||
76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 288, 289,
|
||||
290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
|
||||
305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319,
|
||||
320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
|
||||
335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349,
|
||||
350, 351, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
|
||||
66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
|
||||
81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
|
||||
288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302,
|
||||
303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317,
|
||||
318, 319, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75,
|
||||
76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
|
||||
91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105,
|
||||
106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 256, 257, 258,
|
||||
259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273,
|
||||
274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288,
|
||||
289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303,
|
||||
304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318,
|
||||
319, 26, 27, 28, 29, 30, 31, 85, 86, 87, 88, 89, 90, 91, 92,
|
||||
93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107,
|
||||
108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 119, 120, 121, 122, 123,
|
||||
124, 125, 126, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235,
|
||||
236, 237, 238, 239, 240, 241, 242, 244, 245, 246, 247, 248, 256, 257, 258,
|
||||
259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273,
|
||||
274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 26,
|
||||
27, 28, 29, 30, 31, 34, 35, 36, 37, 38, 41, 42, 43, 44, 45,
|
||||
46, 47, 48, 49, 52, 53, 55, 64, 65, 89, 90, 91, 92, 95, 96,
|
||||
97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
|
||||
112, 113, 114, 115, 116, 117, 119, 120, 121, 122, 123, 124, 125, 126, 129,
|
||||
130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144,
|
||||
145, 146, 147, 148, 149, 150, 151, 152, 153, 161, 165, 171, 172, 177, 183,
|
||||
184, 185, 193, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208,
|
||||
209, 210, 216, 217, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234,
|
||||
235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249,
|
||||
250, 252, 281, 282, 283, 284, 285, 286, 287, 288, 289, 313, 314, 315, 316,
|
||||
317, 323, 324, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338,
|
||||
339, 340, 342, 343, 34, 35, 36, 37, 38, 41, 42, 43, 44, 45, 46,
|
||||
47, 48, 49, 52, 53, 55, 64, 65, 89, 90, 91, 92, 122, 123, 124,
|
||||
129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
|
||||
144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 161, 164, 166, 167,
|
||||
168, 169, 170, 171, 172, 173, 174, 175, 176, 178, 182, 183, 184, 185, 186,
|
||||
193, 196, 203, 204, 205, 206, 207, 208, 209, 210, 211, 217, 218, 225, 227,
|
||||
228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242,
|
||||
243, 244, 245, 246, 247, 248, 249, 250, 252, 285, 288, 289, 313, 314, 315,
|
||||
316, 317, 323, 324, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337,
|
||||
338, 339, 340, 342, 343, 108, 109, 110, 111, 112, 113, 114, 133, 134, 136,
|
||||
144, 150, 154, 185, 195, 204, 211, 219, 231, 234, 235, 243, 244, 247, 250,
|
||||
108, 109, 110, 111, 112, 113, 114, 132, 133, 134, 135, 136, 137, 138, 139,
|
||||
140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154,
|
||||
164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178,
|
||||
181, 182, 183, 184, 185, 186, 195, 196, 197, 198, 199, 200, 201, 202, 203,
|
||||
204, 205, 206, 207, 208, 209, 210, 211, 213, 214, 215, 216, 217, 218, 219,
|
||||
228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242,
|
||||
243, 244, 245, 246, 247, 248, 249, 250, 137, 138, 139, 140, 141, 142, 143,
|
||||
144, 145, 146, 147, 148, 149, 150, 168, 169, 170, 171, 172, 173, 174, 175,
|
||||
176, 177, 178, 179, 180, 181, 182, 200, 201, 202, 203, 204, 205, 206, 207,
|
||||
208, 209, 210, 211, 212, 213, 214, 237, 238, 239, 240, 241, 242, 135, 136,
|
||||
137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151,
|
||||
152, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 177, 178, 179, 180,
|
||||
181, 182, 183, 184, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208,
|
||||
209, 210, 211, 212, 213, 214, 215, 216, 230, 231, 232, 233, 234, 235, 236,
|
||||
237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 146, 146, 0,
|
||||
1, 2, 3, 4, 5, 6, 0, 1, 2, 3, 4, 5, 6, 7, 8,
|
||||
9, 10, 11, 12, 32, 33, 351, 0, 1, 2, 3, 4, 5, 6, 7,
|
||||
8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
|
||||
32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 64, 341, 342,
|
||||
343, 344, 345, 346, 347, 348, 349, 350, 351, 10, 11, 12, 13, 14, 15,
|
||||
16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
|
||||
31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
|
||||
46, 47, 48, 49, 50, 51, 52, 53, 64, 65, 66, 67, 68, 69, 70,
|
||||
71, 72, 73, 74, 146, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319,
|
||||
331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345,
|
||||
346, 347, 348, 349, 350, 351, 20, 21, 22, 23, 24, 25, 26, 27, 28,
|
||||
29, 30, 31, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
|
||||
53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 64, 65, 66, 67, 68,
|
||||
69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83,
|
||||
84, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 146, 280, 281,
|
||||
282, 283, 284, 285, 286, 287, 301, 302, 303, 304, 305, 306, 307, 308, 309,
|
||||
310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 323, 324, 325, 326, 327,
|
||||
328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342,
|
||||
343, 30, 31, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
|
||||
73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
|
||||
88, 89, 90, 91, 92, 93, 96, 97, 98, 99, 100, 101, 102, 103, 104,
|
||||
105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 128, 129, 130,
|
||||
131, 132, 133, 134, 135, 136, 137, 250, 251, 252, 253, 254, 255, 270, 271,
|
||||
272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286,
|
||||
287, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305,
|
||||
306, 307, 308, 309, 310, 311, 312, 313, 320, 321, 322, 323, 324, 325, 326,
|
||||
327, 328, 329, 330, 331, 332, 333, 62, 63, 84, 85, 86, 87, 88, 89,
|
||||
90, 91, 92, 93, 94, 95, 105, 106, 107, 108, 109, 110, 111, 112, 113,
|
||||
114, 115, 116, 117, 118, 119, 120, 128, 129, 130, 131, 132, 133, 134, 135,
|
||||
136, 137, 139, 140, 141, 142, 147, 150, 151, 152, 153, 160, 161, 162, 163,
|
||||
181, 184, 185, 230, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255,
|
||||
266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280,
|
||||
281, 282, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302,
|
||||
320, 321, 322, 323, 324, 38, 39, 40, 42, 43, 44, 45, 46, 47, 48,
|
||||
50, 51, 54, 55, 56, 65, 66, 67, 89, 90, 91, 92, 93, 94, 95,
|
||||
97, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
|
||||
132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
|
||||
147, 148, 149, 150, 151, 152, 153, 154, 160, 161, 162, 163, 165, 166, 167,
|
||||
168, 169, 170, 172, 179, 183, 184, 185, 186, 193, 194, 197, 198, 202, 205,
|
||||
206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 220, 221,
|
||||
223, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242,
|
||||
243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 261, 262,
|
||||
264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 290, 291,
|
||||
292, 293, 294, 295, 296, 297, 320, 321, 38, 39, 40, 42, 43, 44, 45,
|
||||
46, 47, 48, 50, 51, 54, 55, 56, 65, 66, 67, 90, 91, 92, 97,
|
||||
108, 109, 110, 111, 112, 113, 114, 120, 121, 122, 123, 124, 132, 133, 134,
|
||||
135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 146, 147, 148, 149, 150,
|
||||
151, 152, 153, 154, 155, 164, 165, 168, 169, 171, 172, 174, 182, 186, 187,
|
||||
193, 194, 196, 197, 198, 199, 203, 207, 208, 210, 211, 213, 217, 218, 220,
|
||||
221, 223, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 241, 242,
|
||||
243, 244, 245, 246, 247, 248, 249, 250, 251, 261, 262, 264, 265, 108, 109,
|
||||
110, 111, 112, 113, 114, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141,
|
||||
142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 164,
|
||||
165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179,
|
||||
180, 181, 182, 183, 184, 185, 186, 187, 196, 197, 198, 199, 200, 201, 202,
|
||||
203, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218,
|
||||
228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242,
|
||||
243, 244, 245, 246, 247, 248, 249, 250, 251, 137, 138, 139, 140, 141, 142,
|
||||
143, 144, 145, 146, 147, 148, 149, 150, 168, 169, 170, 171, 172, 173, 174,
|
||||
175, 176, 177, 178, 179, 180, 181, 182, 183, 200, 201, 202, 203, 204, 205,
|
||||
206, 207, 208, 209, 210, 211, 212, 213, 214, 175, 176, 136, 137, 138, 139,
|
||||
140, 141, 142, 143, 144, 145, 146, 147, 168, 169, 170, 171, 172, 173, 174,
|
||||
175, 176, 177, 178, 179, 206, 207, 208, 209, 210, 211, 238, 239, 240, 241,
|
||||
242, 243, 32, 33, 65, 97, 129, 161, 193, 225, 257, 289, 321, 32, 33,
|
||||
64, 65, 66, 67, 97, 99, 129, 131, 161, 163, 193, 195, 225, 227, 257,
|
||||
259, 289, 291, 321, 323, 0, 2, 3, 4, 5, 7, 8, 10, 11, 12,
|
||||
13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
|
||||
28, 29, 30, 62, 64, 65, 66, 67, 94, 96, 97, 98, 99, 100, 102,
|
||||
126, 131, 134, 158, 163, 166, 190, 195, 198, 222, 227, 230, 254, 259, 262,
|
||||
286, 291, 294, 318, 323, 326, 350, 0, 2, 3, 4, 5, 7, 8, 10,
|
||||
11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
|
||||
26, 27, 28, 29, 30, 39, 62, 94, 96, 97, 98, 100, 102, 126, 134,
|
||||
136, 137, 140, 148, 158, 166, 180, 190, 198, 212, 222, 230, 244, 254, 262,
|
||||
286, 294, 318, 326, 350, 39, 102, 135, 136, 137, 138, 139, 140, 141, 142,
|
||||
143, 144, 145, 146, 147, 148, 167, 169, 170, 171, 173, 238, 239, 240, 241,
|
||||
242, 243, 244, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145,
|
||||
146, 147, 148, 149, 166, 167, 168, 171, 172, 181, 213, 238, 239, 240, 241,
|
||||
242, 243, 244, 245, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144,
|
||||
145, 146, 147, 148, 149, 166, 167, 168, 169, 171, 172, 181, 213, 238, 239,
|
||||
240, 241, 242, 243, 244, 245, 135, 136, 137, 138, 139, 140, 141, 142, 143,
|
||||
144, 145, 146, 147, 148, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176,
|
||||
177, 178, 179, 180, 206, 207, 208, 209, 210, 211, 212, 238, 239, 240, 241,
|
||||
242, 243, 244, 173, 174, 175, 176, 177, 207, 208, 209,
|
||||
};
|
||||
|
||||
static const char change_vals[3221] = {
|
||||
0xC0, 0xF0, 0xF8, 0xF8, 0xF8, 0xF8, 0x78, 0x18, 0xC0, 0xF8, 0xFE, 0xFF, 0xFF, 0xFF, 0x7F,
|
||||
0x0F, 0x03, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0x78, 0x7E, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F,
|
||||
0x7D, 0x7C, 0x7C, 0x7C, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7C, 0x7C, 0x78, 0x07,
|
||||
0x07, 0x07, 0x07, 0x07, 0x07, 0x78, 0x78, 0x78, 0x7C, 0x3F, 0x07, 0x01, 0x00, 0x00, 0x00,
|
||||
0xC0, 0xF8, 0x1E, 0x07, 0xE0, 0x78, 0x1F, 0x03, 0x03, 0xF0, 0xFF, 0x7C, 0x78, 0xFF, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x78, 0x1E, 0x03, 0x00, 0x00, 0x00, 0x00,
|
||||
0xC0, 0x78, 0x0F, 0x03, 0x00, 0xE0, 0x38, 0x0F, 0x01, 0x3C, 0x0F, 0x01, 0x80, 0x80, 0x80,
|
||||
0x80, 0xFF, 0x01, 0x00, 0x7C, 0x7C, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0x30,
|
||||
0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30,
|
||||
0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x3F, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0xC0, 0x38, 0x07, 0x01, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x38, 0x07, 0x01,
|
||||
0x00, 0x00, 0x00, 0x00, 0x80, 0xE0, 0x1C, 0x07, 0x00, 0x00, 0x00, 0x80, 0x70, 0x1C, 0x03,
|
||||
0x80, 0x70, 0x0E, 0x03, 0x00, 0x00, 0x00, 0x00, 0x03, 0xFE, 0x02, 0x02, 0x02, 0x02, 0x02,
|
||||
0x02, 0x78, 0x7C, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
|
||||
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
|
||||
0x20, 0x20, 0x20, 0x20, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x70, 0x0C, 0x03, 0x00, 0x00, 0xC0, 0x30,
|
||||
0x0E, 0x01, 0x00, 0x00, 0x00, 0xC0, 0x38, 0x06, 0x01, 0x00, 0x00, 0x00, 0xC0, 0x38, 0x07,
|
||||
0x00, 0x00, 0x00, 0xE0, 0x18, 0x07, 0x60, 0x1C, 0x03, 0xFC, 0x04, 0x04, 0x04, 0x04, 0x04,
|
||||
0x04, 0x04, 0x04, 0x7C, 0xFF, 0xFC, 0x78, 0xFF, 0x00, 0xFF, 0x00, 0x02, 0x02, 0x02, 0x02,
|
||||
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
|
||||
0x02, 0x02, 0x02, 0x02, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x30, 0x0C, 0x01,
|
||||
0x00, 0x00, 0x00, 0x00, 0x80, 0x30, 0x04, 0x01, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x10, 0x06,
|
||||
0x00, 0x00, 0x00, 0xC0, 0x18, 0x06, 0x00, 0x00, 0x00, 0x60, 0x98, 0xF3, 0xFC, 0xFC, 0xFC,
|
||||
0xFC, 0xFC, 0x7C, 0x0C, 0x00, 0x00, 0x00, 0x60, 0x88, 0xF3, 0xFC, 0xFF, 0x3F, 0x01, 0xF0,
|
||||
0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x20, 0x0C, 0xF1, 0xFE, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0x0C, 0x01,
|
||||
0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x07, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
|
||||
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
|
||||
0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xF0, 0xFE,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0x07, 0xC0, 0xF0, 0xFE, 0xFF, 0x07, 0x00, 0xE0, 0xE0,
|
||||
0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0x00, 0x00, 0xF8, 0xFE, 0xFF, 0xF8, 0xFF, 0xF8, 0x00, 0x00,
|
||||
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x1F,
|
||||
0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xF0, 0xFC, 0xFE, 0xFC, 0xFE, 0xFE,
|
||||
0x7E, 0x0C, 0x00, 0xC0, 0xF0, 0xFE, 0x0F, 0x01, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0x00,
|
||||
0x00, 0xF8, 0xFE, 0xF9, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0xC0, 0xE0, 0xE0, 0xE0, 0xE0, 0x20, 0x00, 0x00, 0x00, 0xE0, 0xF8,
|
||||
0xFF, 0x3F, 0x07, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F,
|
||||
0x3C, 0x3C, 0x3C, 0x3C, 0x3C, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x80,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xE0, 0xF0, 0xF8, 0xF8, 0xF8,
|
||||
0xF8, 0x7C, 0x7C, 0x7C, 0x7C, 0xFC, 0xF8, 0xF8, 0xF8, 0xF8, 0xF0, 0xE0, 0xC0, 0x03, 0x03,
|
||||
0x03, 0x03, 0x03, 0x03, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF8, 0xFF, 0xFF, 0xFF, 0xBF, 0x1F,
|
||||
0x0F, 0x78, 0xF8, 0xF8, 0xF8, 0xF8, 0xF0, 0xC0, 0xC1, 0xC1, 0xC1, 0xC1, 0xC1, 0xE3, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0x7E, 0x01, 0x03, 0x03, 0x03, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07,
|
||||
0x07, 0x07, 0x07, 0x07, 0x03, 0x03, 0x01, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07,
|
||||
0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
|
||||
0x03, 0x01, 0x01, 0x01, 0x01, 0x01, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0,
|
||||
0xC0, 0xC0, 0xC0, 0xC0, 0xE0, 0xE0, 0xE0, 0xE0, 0x60, 0x60, 0x60, 0x60, 0x60, 0x70, 0x70,
|
||||
0x70, 0x30, 0x30, 0x30, 0x38, 0x38, 0x18, 0x18, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0,
|
||||
0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0,
|
||||
0xC0, 0xC0, 0xC0, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18,
|
||||
0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
|
||||
0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x06, 0x06, 0x06, 0x06, 0x03, 0x03, 0x03, 0x03,
|
||||
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
|
||||
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C,
|
||||
0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0xC0, 0xC0, 0xC0,
|
||||
0x40, 0x60, 0x60, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x03, 0x03, 0x03,
|
||||
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x18, 0x18,
|
||||
0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
|
||||
0x18, 0x18, 0x10, 0x10, 0x10, 0x30, 0x30, 0x30, 0x30, 0x30, 0x20, 0x20, 0x60, 0x60, 0x60,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x18, 0x18,
|
||||
0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x08, 0x08, 0x08,
|
||||
0x08, 0x08, 0x0C, 0x0C, 0x0C, 0x0C, 0x04, 0x04, 0x06, 0x06, 0x02, 0x03, 0x03, 0x01, 0x01,
|
||||
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x02, 0x02, 0x02,
|
||||
0x02, 0x02, 0x02, 0x02, 0x06, 0x06, 0x06, 0x06, 0x06, 0x04, 0x04, 0x04, 0x0C, 0x0C, 0x0C,
|
||||
0x08, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0xC0, 0x40,
|
||||
0x40, 0x60, 0x20, 0x30, 0x10, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
|
||||
0x02, 0x03, 0x03, 0x03, 0x03, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x08, 0x08, 0x08,
|
||||
0x08, 0x08, 0x08, 0x08, 0x18, 0x08, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x10, 0x10,
|
||||
0x10, 0x10, 0x10, 0x10, 0x10, 0x30, 0x30, 0x20, 0x20, 0x20, 0x60, 0x40, 0x40, 0xC0, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x01, 0x01, 0x02, 0x04, 0x0C, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x80, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
|
||||
0x40, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x08, 0x08, 0x0C,
|
||||
0x04, 0x02, 0x01, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x41, 0x43, 0x43, 0x43, 0x47,
|
||||
0x47, 0x47, 0x47, 0x47, 0x47, 0x47, 0x47, 0x87, 0x83, 0x83, 0x81, 0x80, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x20,
|
||||
0x20, 0x20, 0x20, 0x20, 0x40, 0x40, 0x80, 0x02, 0x01, 0x01, 0x02, 0x08, 0xE0, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x20, 0x0F, 0x00, 0x00, 0xF8,
|
||||
0x08, 0x08, 0x08, 0xC8, 0xF8, 0xF8, 0xF8, 0xFC, 0xFC, 0xFC, 0x7E, 0x7E, 0x7E, 0x3E, 0x7E,
|
||||
0x7E, 0xFE, 0xFC, 0xFC, 0xFC, 0xFC, 0xFA, 0xF1, 0x80, 0xFF, 0x01, 0x01, 0x60, 0xF8, 0x9F,
|
||||
0x1F, 0x07, 0xFF, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xE0, 0xC1, 0x81, 0x81, 0x81, 0x81,
|
||||
0x81, 0xC3, 0xFF, 0xFE, 0x00, 0x01, 0x00, 0x02, 0x02, 0x02, 0x03, 0x03, 0x07, 0x07, 0x0F,
|
||||
0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x07, 0x07, 0x07, 0x01, 0x08,
|
||||
0x10, 0x40, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x40, 0x80, 0x80, 0x40, 0x20, 0x18,
|
||||
0x07, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
|
||||
0x02, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0xF0, 0xF8, 0xFC, 0xFE, 0xFE, 0xFF, 0xFF, 0x7F, 0x3F, 0x3F, 0x1F, 0x1F,
|
||||
0x3F, 0x3F, 0x3F, 0xFF, 0xFF, 0xFF, 0xFE, 0xFE, 0xFC, 0xF8, 0xE0, 0x00, 0x01, 0x01, 0x01,
|
||||
0x01, 0x01, 0x01, 0x00, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xFC, 0xFF, 0xBF, 0x9F, 0x0F, 0x07,
|
||||
0x00, 0xF0, 0x80, 0x81, 0x01, 0x01, 0x01, 0x01, 0x03, 0x83, 0xD7, 0xFF, 0xFE, 0x00, 0x00,
|
||||
0x03, 0x07, 0x0F, 0x0F, 0x1F, 0x1F, 0x1F, 0x1F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F,
|
||||
0x1F, 0x1F, 0x1F, 0x1F, 0x0F, 0x0F, 0x07, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xFC, 0xFE, 0xFF,
|
||||
0x1F, 0xFF, 0xF0, 0x1F, 0x60, 0x01, 0xC7, 0x30, 0x1F, 0x3F, 0x3F, 0x3F, 0x3F, 0x1F, 0x03,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xC0, 0xE0,
|
||||
0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xC0, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x07, 0x07, 0x07, 0x07, 0x07, 0xE1, 0xE1, 0xE1, 0xE1, 0xF1, 0xFF,
|
||||
0xBF, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x78, 0xFC, 0xFC,
|
||||
0xF8, 0xF0, 0xE1, 0xE0, 0xE1, 0xF1, 0xFF, 0xFF, 0x7F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20,
|
||||
0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
|
||||
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xF0,
|
||||
0xF0, 0xF8, 0xF8, 0xF8, 0xFC, 0x7C, 0x7C, 0x7C, 0x7C, 0xFC, 0xF8, 0xF8, 0xF8, 0xF0, 0xE0,
|
||||
0xC0, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x01, 0x80, 0x80, 0xC0, 0xF0, 0xF8, 0xFF, 0xFF,
|
||||
0x7F, 0x7F, 0x3F, 0x0F, 0xC0, 0xF0, 0xF8, 0xFC, 0xFC, 0xFE, 0xFF, 0xFF, 0xCF, 0xCF, 0xC7,
|
||||
0xC3, 0xC3, 0xC1, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0x03, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07,
|
||||
0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0xF8, 0xFC, 0x3C,
|
||||
0x1E, 0x0E, 0x07, 0x07, 0x03, 0x01, 0xC0, 0xE0, 0xE0, 0x70, 0x38, 0x3C, 0x1C, 0x0E, 0x0F,
|
||||
0x07, 0x03, 0x01, 0x01, 0x01, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x80, 0xC0, 0xE0, 0x60, 0x70, 0x38, 0x1C, 0x0C, 0x0E, 0x07, 0x03, 0x01, 0x01,
|
||||
0xC0, 0xE0, 0x60, 0x70, 0x38, 0x1C, 0x0C, 0x0E, 0x07, 0x03, 0x03, 0x01, 0x01, 0x80, 0xC0,
|
||||
0xC0, 0xE0, 0x70, 0x30, 0x38, 0x1C, 0x0C, 0x0E, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0xC0, 0x60, 0x70, 0x30, 0x18, 0x0C, 0x0E, 0x07, 0x03,
|
||||
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0xC0, 0xE0, 0x60,
|
||||
0x30, 0x18, 0x1C, 0x0C, 0x06, 0x03, 0x03, 0x01, 0xC0, 0x60, 0x70, 0x30, 0x18, 0x1C, 0x0C,
|
||||
0x06, 0x07, 0x03, 0x01, 0xF8, 0x80, 0x80, 0xC0, 0xE0, 0x60, 0x30, 0x38, 0x18, 0x0C, 0x0C,
|
||||
0x80, 0xC0, 0xC0, 0x60, 0x70, 0x30, 0x18, 0x0C, 0x0E, 0x06, 0x03, 0x03, 0x01, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x80, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
|
||||
0x80, 0xC0, 0x60, 0x30, 0x18, 0x18, 0x0C, 0x06, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0xC0, 0x60, 0x20, 0x30, 0x18, 0x0C, 0x04, 0x06, 0x03,
|
||||
0x01, 0xC0, 0x60, 0x30, 0x30, 0x18, 0x0C, 0x04, 0x06, 0x03, 0x01, 0x01, 0xFC, 0x80, 0x80,
|
||||
0xC0, 0x60, 0x60, 0x30, 0x10, 0x18, 0x80, 0xC0, 0x60, 0x60, 0x30, 0x18, 0x18, 0x0C, 0x06,
|
||||
0x06, 0x03, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, 0x60, 0x30, 0x18,
|
||||
0x18, 0x0C, 0x06, 0x03, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x20,
|
||||
0x30, 0x18, 0x0C, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x80, 0x80, 0x40, 0x60, 0x20, 0x10, 0x08, 0x0C, 0x04, 0x02, 0x01, 0x01, 0x40, 0x20, 0x30,
|
||||
0x10, 0x08, 0x0C, 0x04, 0xC2, 0xF1, 0xF1, 0x80, 0x80, 0x40, 0x60, 0x20, 0x30, 0x80, 0x80,
|
||||
0x40, 0x60, 0x20, 0x10, 0x18, 0x08, 0x04, 0x06, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x80, 0x80, 0x40, 0x20, 0x10, 0x18, 0x0C, 0x04, 0x02, 0x03, 0x01, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x0C, 0x06, 0x03, 0x01, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
|
||||
0x40, 0x60, 0x30, 0x18, 0x0C, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x40,
|
||||
0x20, 0x10, 0x08, 0x08, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0xC0, 0xE0,
|
||||
0xF0, 0xF8, 0xFC, 0xFE, 0xFE, 0x7D, 0xFC, 0xF8, 0xF0, 0xE0, 0x80, 0x04, 0x02, 0x01, 0x01,
|
||||
0xFF, 0x1F, 0x07, 0x07, 0x87, 0x87, 0x47, 0x27, 0x20, 0x10, 0x18, 0x08, 0x04, 0x06, 0x02,
|
||||
0x80, 0x40, 0x40, 0x20, 0x10, 0x08, 0x08, 0x04, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0xC0, 0x60, 0x30, 0x18, 0x0C, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x06, 0x01, 0x00, 0x00, 0x00, 0x80, 0x40, 0x40, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
|
||||
0x20, 0x20, 0x40, 0x40, 0x80, 0xC0, 0x18, 0x04, 0x00, 0x01, 0x04, 0xB0, 0x00, 0x00, 0x00,
|
||||
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x20, 0x08, 0x03,
|
||||
0x00, 0xE0, 0xF0, 0xF8, 0xFC, 0xFE, 0xFE, 0xFE, 0x7E, 0x3E, 0x3F, 0xBF, 0x7F, 0x3F, 0x7E,
|
||||
0xFE, 0xFE, 0xFE, 0xFE, 0xFD, 0xF8, 0xF0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x43, 0x03, 0x03,
|
||||
0x13, 0x0B, 0x03, 0x02, 0xFC, 0x7F, 0x3F, 0x1F, 0x07, 0x02, 0x01, 0xC0, 0xE0, 0xFE, 0xBF,
|
||||
0x9F, 0x8F, 0x87, 0x87, 0x83, 0x81, 0x81, 0x80, 0x80, 0x80, 0x80, 0xC0, 0xA0, 0x10, 0x08,
|
||||
0x04, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x8F, 0x4F, 0x2F, 0x1F, 0x1F, 0x0F, 0x0F,
|
||||
0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60,
|
||||
0x04, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xF8, 0xFC,
|
||||
0xFE, 0xFE, 0xFF, 0xFF, 0xFF, 0x3F, 0x3F, 0x1F, 0x1F, 0x1F, 0x3F, 0x7F, 0xFF, 0xFF, 0xFF,
|
||||
0xFE, 0xFE, 0xFC, 0xF8, 0xC0, 0x03, 0x03, 0x03, 0x03, 0x01, 0x00, 0xC0, 0xFF, 0x0F, 0x03,
|
||||
0x00, 0x00, 0x80, 0xE0, 0xF0, 0xF8, 0xFF, 0x9F, 0x8F, 0x87, 0x83, 0x81, 0x80, 0x80, 0x00,
|
||||
0x00, 0x00, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F,
|
||||
0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, 0xC0, 0xE0, 0xE0,
|
||||
0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xC0, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x06, 0x0F, 0x0F, 0x0F, 0x0F, 0x03, 0x81, 0xC1, 0xC1, 0xE1, 0xFB, 0xFF,
|
||||
0x7F, 0x3F, 0x1F, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0xF8, 0xFC,
|
||||
0xFE, 0xFF, 0xFF, 0xF7, 0xF3, 0xF1, 0xF1, 0xF0, 0xF0, 0xF0, 0xF0, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xA0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xC0, 0xE0, 0xE0,
|
||||
0xE0, 0xF0, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0x03, 0x03, 0x03, 0x03, 0x01, 0x01, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x03, 0x07, 0x07, 0x07,
|
||||
0x07, 0x07, 0x80, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00,
|
||||
0x08, 0x08, 0x04, 0xFC, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00,
|
||||
0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x80, 0x40, 0x20, 0x20, 0x10, 0x08, 0x04, 0x02, 0x02, 0x02,
|
||||
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
|
||||
0x02, 0x02, 0xFC, 0xFF, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x08, 0x04, 0x04, 0x00, 0x02, 0xFE,
|
||||
0xFF, 0x00, 0xFF, 0xFF, 0x00, 0xFF, 0xFF, 0x00, 0xFF, 0xFF, 0x00, 0xFF, 0xFF, 0x00, 0xFF,
|
||||
0xFF, 0x00, 0xFF, 0xFF, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00,
|
||||
0xE0, 0xE0, 0xF0, 0xF8, 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x03, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0xF0, 0xF0, 0xF8, 0xF8, 0xF8, 0xFC, 0xFE,
|
||||
0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0x03, 0x01, 0x01, 0x01, 0x00, 0x0F, 0x0F, 0x0F, 0x0F,
|
||||
0x0F, 0x0F, 0x0F, 0xF0, 0xF8, 0xF8, 0xF8, 0xFC, 0xFC, 0xFC, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x01, 0x01, 0x00, 0x00, 0xFF, 0xFF, 0x1F, 0x1F, 0x1F, 0x1F,
|
||||
0x1F, 0x1F, 0x1F, 0x1F, 0x00, 0xE0, 0xE0, 0xF0, 0xF0, 0xF0, 0xF8, 0xF8, 0xFC, 0xFC, 0xFE,
|
||||
0xFE, 0xFE, 0xFC, 0xFC, 0x00, 0x00, 0x03, 0x03, 0x03, 0x01, 0x01, 0x00, 0x00, 0x0F, 0x0F,
|
||||
0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x1C, 0xFC, 0xFC,
|
||||
0xFC, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
|
||||
uint16_t index_start = 0;
|
||||
uint16_t index_end = 0;
|
||||
void change_frame_down(uint8_t frame_number){
|
||||
// for n changes this frame, change those bytes by change_inds and change_vals
|
||||
index_start = cumsum_inds[frame_number-1];
|
||||
index_end = cumsum_inds[frame_number];
|
||||
if (index_start != index_end){ // if a change in buffer
|
||||
for (uint16_t i=index_start; i < index_end; i++){
|
||||
oled_write_raw_byte(change_vals[i], change_inds[i]);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,79 +0,0 @@
|
|||
// Copyright 2022 Jose Pablo Ramirez (@jpe230)
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "jpe230.h"
|
||||
#include "indicators.h"
|
||||
|
||||
extern uint8_t logged_row, logged_col;
|
||||
extern uint32_t oled_timer;
|
||||
extern const uint8_t key_frame[4];
|
||||
|
||||
static uint32_t frame_limiter;
|
||||
|
||||
void oled_render_layer_state(void) {
|
||||
int current_layer_idx = get_highest_layer(layer_state | default_layer_state);
|
||||
static int current_frame = 0;
|
||||
static bool first_run = 1;
|
||||
|
||||
if(first_run){
|
||||
first_run = 0;
|
||||
char clear[ANIM_SIZE] = {0};
|
||||
memset(clear, 0, ANIM_SIZE);
|
||||
oled_write_raw_P(clear, ANIM_SIZE);
|
||||
frame_limiter = timer_read();
|
||||
return;
|
||||
}
|
||||
|
||||
if (timer_elapsed(frame_limiter) < 12) {
|
||||
return;
|
||||
}
|
||||
|
||||
frame_limiter = timer_read();
|
||||
|
||||
if(current_frame < key_frame[current_layer_idx]){
|
||||
current_frame = (current_frame + 1) % IDLE_FRAMES;
|
||||
change_frame_up(current_frame);
|
||||
}else if(current_frame > key_frame[current_layer_idx]) {
|
||||
current_frame = (current_frame - 1) % IDLE_FRAMES;
|
||||
change_frame_down(IDLE_FRAMES - current_frame - 1);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void render_master_oled(void) {
|
||||
if (timer_elapsed32(oled_timer) > CUSTOM_OLED_TIMEOUT) {
|
||||
oled_off();
|
||||
return;
|
||||
}
|
||||
|
||||
oled_on();
|
||||
|
||||
/* Render the layar state */
|
||||
oled_render_layer_state();
|
||||
|
||||
/* Move cursor bellow the graphic */
|
||||
oled_set_cursor(0, 12);
|
||||
|
||||
/* Print logged col and row
|
||||
* Format: 00x00
|
||||
*/
|
||||
char logged_matrix[9] = {0};
|
||||
sprintf(logged_matrix, "%02dx%02d", logged_col, logged_row);
|
||||
|
||||
/* Write a separator char: ◆,
|
||||
* make sure to add a NULL terminator otherwise strlen could fail
|
||||
*/
|
||||
static const char PROGMEM separator[] = {4, 4, 4, 4, 4, 0};
|
||||
oled_write(separator, false);
|
||||
|
||||
/* Write logged matrix position */
|
||||
oled_write(logged_matrix, false);
|
||||
|
||||
/* Write another separator */
|
||||
oled_write(separator, false);
|
||||
|
||||
/* Write scanrate */
|
||||
oled_write(get_u16_str(get_matrix_scan_rate(), ' '), false);
|
||||
}
|
||||
|
||||
oled_rotation_t rotate_master(oled_rotation_t rotation) {return OLED_ROTATION_270;}
|
|
@ -1,533 +0,0 @@
|
|||
// Copyright 2022 Jose Pablo Ramirez (@jpe230)
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "ocean_dream.h"
|
||||
#include "quantum.h"
|
||||
#include "print.h"
|
||||
|
||||
// Calculated Parameters
|
||||
#define TWINKLE_PROBABILITY_MODULATOR 100 / TWINKLE_PROBABILITY // CALCULATED: Don't Touch
|
||||
#define TOTAL_STARS STARS_PER_LINE *NUMBER_OF_STAR_LINES // CALCULATED: Don't Touch
|
||||
#define OCEAN_ANIMATION_MODULATOR NUMBER_OF_FRAMES / OCEAN_ANIMATION_SPEED // CALCULATED: Don't Touch
|
||||
#define SHOOTING_STAR_ANIMATION_MODULATOR NUMBER_OF_FRAMES / SHOOTING_STAR_ANIMATION_SPEED // CALCULATED: Don't Touch
|
||||
#define STAR_ANIMATION_MODULATOR NUMBER_OF_FRAMES / STAR_ANIMATION_SPEED // CALCULATED: Don't Touch
|
||||
|
||||
uint8_t animation_counter = 0; // global animation counter.
|
||||
bool is_calm = false;
|
||||
uint32_t starry_night_anim_timer = 0;
|
||||
uint32_t starry_night_anim_sleep = 0;
|
||||
static int current_wpm = 0;
|
||||
|
||||
static uint8_t increment_counter(uint8_t counter, uint8_t max) {
|
||||
counter++;
|
||||
if (counter >= max) {
|
||||
return 0;
|
||||
} else {
|
||||
return counter;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef ENABLE_WAVE
|
||||
static uint8_t decrement_counter(uint8_t counter, uint8_t max) {
|
||||
counter--;
|
||||
if (counter < 0 || counter > max) {
|
||||
return max;
|
||||
} else {
|
||||
return counter;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_MOON // region
|
||||
# ifndef STATIC_MOON
|
||||
uint8_t moon_animation_frame = 0; // keeps track of current moon frame
|
||||
uint16_t moon_animation_counter = 0; // counts how many frames to wait before animating moon to next frame
|
||||
# endif
|
||||
|
||||
# ifdef STATIC_MOON
|
||||
static const char PROGMEM moon[6] = {
|
||||
0x18, 0x7E, 0xFF, 0xC3, 0x81, 0x81,
|
||||
};
|
||||
# endif
|
||||
|
||||
# ifndef STATIC_MOON
|
||||
static const char PROGMEM moon_animation[14][8] = {
|
||||
// clang-format off
|
||||
{ 0x3C, 0x7E, 0xFF, 0xFF, 0xFF, 0xFF, 0x7E, 0x3C, },
|
||||
{ 0x3C, 0x7E, 0xFF, 0xFF, 0xFF, 0xFF, 0x42, 0x00, },
|
||||
{ 0x3C, 0x7E, 0xFF, 0xFF, 0xFF, 0xC3, 0x00, 0x00, },
|
||||
{ 0x3C, 0x7E, 0xFF, 0xFF, 0xC3, 0x81, 0x00, 0x00, },
|
||||
{ 0x3C, 0x7E, 0xFF, 0xC3, 0x81, 0x00, 0x00, 0x00, },
|
||||
{ 0x3C, 0x7E, 0xC3, 0x81, 0x81, 0x00, 0x00, 0x00, },
|
||||
{ 0x3C, 0x42, 0x81, 0x81, 0x00, 0x00, 0x00, 0x00, },
|
||||
{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, },
|
||||
{ 0x00, 0x00, 0x00, 0x00, 0x81, 0x81, 0x42, 0x3C, },
|
||||
{ 0x00, 0x00, 0x00, 0x81, 0x81, 0xC3, 0x7E, 0x3C, },
|
||||
{ 0x00, 0x00, 0x00, 0x81, 0xC3, 0xFF, 0x7E, 0x3C, },
|
||||
{ 0x00, 0x00, 0x81, 0xC3, 0xFF, 0xFF, 0x7E, 0x3C, },
|
||||
{ 0x00, 0x00, 0xC3, 0xFF, 0xFF, 0xFF, 0x7E, 0x3C, },
|
||||
{ 0x00, 0x42, 0xFF, 0xFF, 0xFF, 0xFF, 0x7E, 0x3C, },
|
||||
// clang-format on
|
||||
};
|
||||
# endif
|
||||
|
||||
static void draw_moon(void) {
|
||||
# ifdef STATIC_MOON
|
||||
oled_set_cursor(MOON_COLUMN, MOON_LINE);
|
||||
oled_write_raw_P(moon, 6);
|
||||
# endif
|
||||
# ifndef STATIC_MOON
|
||||
moon_animation_counter = increment_counter(moon_animation_counter, ANIMATE_MOON_EVERY_N_FRAMES);
|
||||
if (moon_animation_counter == 0) {
|
||||
moon_animation_frame = increment_counter(moon_animation_frame, 14);
|
||||
oled_set_cursor(MOON_COLUMN, MOON_LINE);
|
||||
oled_write_raw_P(moon_animation[moon_animation_frame], 8);
|
||||
}
|
||||
# endif
|
||||
}
|
||||
#endif // endregion
|
||||
|
||||
#ifdef ENABLE_WAVE // region
|
||||
uint8_t starry_night_wave_frame_width_counter = 31;
|
||||
uint8_t rough_waves_frame_counter = 0;
|
||||
|
||||
// clang-format off
|
||||
static const char PROGMEM ocean_top[8][32] = {
|
||||
// still ocean
|
||||
{
|
||||
0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
|
||||
0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
|
||||
0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
|
||||
0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
|
||||
},
|
||||
// small ripples
|
||||
{
|
||||
0x20, 0x60, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
|
||||
0x20, 0x60, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
|
||||
0x20, 0x60, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
|
||||
0x20, 0x60, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
|
||||
},
|
||||
// level 2 ripples
|
||||
{
|
||||
0x20, 0x60, 0x40, 0x40, 0x20, 0x60, 0x40, 0x40,
|
||||
0x20, 0x60, 0x40, 0x40, 0x20, 0x60, 0x40, 0x40,
|
||||
0x20, 0x60, 0x40, 0x40, 0x20, 0x60, 0x40, 0x40,
|
||||
0x20, 0x60, 0x40, 0x40, 0x20, 0x60, 0x40, 0x40,
|
||||
},
|
||||
// level 3 waves
|
||||
{
|
||||
0x40, 0x20, 0x10, 0x20, 0x40, 0x40, 0x40, 0x40,
|
||||
0x40, 0x20, 0x10, 0x20, 0x40, 0x40, 0x40, 0x40,
|
||||
0x40, 0x20, 0x10, 0x20, 0x40, 0x40, 0x40, 0x40,
|
||||
0x40, 0x20, 0x10, 0x20, 0x40, 0x40, 0x40, 0x40,
|
||||
},
|
||||
{
|
||||
0x40, 0x40, 0x20, 0x10, 0x28, 0x50, 0x40, 0x40,
|
||||
0x40, 0x40, 0x20, 0x10, 0x28, 0x50, 0x40, 0x40,
|
||||
0x40, 0x40, 0x20, 0x10, 0x28, 0x50, 0x40, 0x40,
|
||||
0x40, 0x40, 0x20, 0x10, 0x28, 0x50, 0x40, 0x40,
|
||||
},
|
||||
{
|
||||
0x40, 0x40, 0x40, 0x20, 0x10, 0x30, 0x70, 0x60,
|
||||
0x40, 0x40, 0x40, 0x20, 0x10, 0x30, 0x70, 0x60,
|
||||
0x40, 0x40, 0x40, 0x20, 0x10, 0x30, 0x70, 0x60,
|
||||
0x40, 0x40, 0x40, 0x20, 0x10, 0x30, 0x70, 0x60,
|
||||
},
|
||||
};
|
||||
static const char PROGMEM ocean_bottom[8][32] = {
|
||||
// still ocean
|
||||
{
|
||||
0x00, 0x40, 0x40, 0x41, 0x01, 0x01, 0x01, 0x21,
|
||||
0x20, 0x00, 0x00, 0x04, 0x04, 0x04, 0x04, 0x44,
|
||||
0x44, 0x40, 0x40, 0x00, 0x00, 0x08, 0x08, 0x00,
|
||||
0x01, 0x01, 0x01, 0x00, 0x40, 0x40, 0x00, 0x00,
|
||||
},
|
||||
// small ripples
|
||||
{
|
||||
0x00, 0x00, 0x40, 0x40, 0x01, 0x01, 0x01, 0x20,
|
||||
0x20, 0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x04,
|
||||
0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00,
|
||||
0x00, 0x01, 0x01, 0x00, 0x00, 0x40, 0x00, 0x00,
|
||||
},
|
||||
// level 2 ripples
|
||||
{
|
||||
0x00, 0x00, 0x40, 0x40, 0x01, 0x01, 0x01, 0x20,
|
||||
0x20, 0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x04,
|
||||
0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00,
|
||||
0x00, 0x01, 0x01, 0x00, 0x00, 0x40, 0x00, 0x00,
|
||||
},
|
||||
// level 3 waves
|
||||
{
|
||||
0x00, 0x40, 0x40, 0x42, 0x42, 0x03, 0x11, 0x11,
|
||||
0x20, 0x20, 0x00, 0x00, 0x08, 0x0C, 0x0C, 0x04,
|
||||
0x05, 0x41, 0x41, 0x21, 0x20, 0x00, 0x00, 0x08,
|
||||
0x0A, 0x0A, 0x0B, 0x41, 0x41, 0x41, 0x41, 0x00,
|
||||
},
|
||||
{
|
||||
0x10, 0x10, 0x00, 0x80, 0x84, 0xC4, 0x02, 0x06,
|
||||
0x84, 0x44, 0xC0, 0x80, 0x80, 0x20, 0x20, 0x10,
|
||||
0x08, 0x12, 0x91, 0x81, 0x42, 0x40, 0x00, 0x00,
|
||||
0x10, 0x12, 0x22, 0x22, 0x24, 0x04, 0x84, 0x80,
|
||||
},
|
||||
{
|
||||
0x08, 0x80, 0x80, 0x82, 0x82, 0x03, 0x21, 0x21,
|
||||
0x10, 0x10, 0x00, 0x00, 0x04, 0x04, 0x0C, 0x08,
|
||||
0x09, 0x41, 0x42, 0x22, 0x20, 0x00, 0x00, 0x08,
|
||||
0x0A, 0x0A, 0x0B, 0x41, 0x43, 0x42, 0x42, 0x00,
|
||||
},
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
static void animate_waves(void) {
|
||||
starry_night_wave_frame_width_counter = decrement_counter(starry_night_wave_frame_width_counter, WIDTH - 1); // only 3 frames for last wave type
|
||||
rough_waves_frame_counter = increment_counter(rough_waves_frame_counter, 3); // only 3 frames for last wave type
|
||||
|
||||
void draw_ocean(uint8_t frame, uint16_t offset, uint8_t byte_index) {
|
||||
oled_write_raw_byte(pgm_read_byte(ocean_top[frame] + byte_index), offset);
|
||||
oled_write_raw_byte(pgm_read_byte(ocean_bottom[frame] + byte_index), offset + WIDTH);
|
||||
}
|
||||
|
||||
for (int i = 0; i < WIDTH; ++i) {
|
||||
uint16_t offset = OCEAN_LINE * WIDTH + i;
|
||||
uint8_t byte_index = starry_night_wave_frame_width_counter + i;
|
||||
if (byte_index >= WIDTH) {
|
||||
byte_index = byte_index - WIDTH;
|
||||
}
|
||||
if (is_calm || current_wpm <= WAVE_CALM) {
|
||||
draw_ocean(0, offset, byte_index);
|
||||
} else if (current_wpm <= WAVE_HEAVY_STORM) {
|
||||
draw_ocean(1, offset, byte_index);
|
||||
} else if (current_wpm <= WAVE_HURRICANE) {
|
||||
draw_ocean(2, offset, byte_index);
|
||||
} else {
|
||||
draw_ocean(3 + rough_waves_frame_counter, offset, byte_index);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // endregion
|
||||
|
||||
#ifdef ENABLE_ISLAND // region
|
||||
uint8_t island_frame_1 = 0;
|
||||
|
||||
// clang-format off
|
||||
// only use 46 bytes (first 18 are blank, so we don't write them, makes it smaller and we can see the shooting stars properly!)
|
||||
|
||||
// To save space and allow the shooting stars to be seen, only draw the tree on every frame.
|
||||
// Tree is only 14bytes wide so we save 108 bytes on just the first row. Second row, the
|
||||
// first 18 bytes is always the same piece of land, so only store that once, which saves 90 bytes
|
||||
static const char PROGMEM islandRightTop[6][14] = {
|
||||
{0x84, 0xEC, 0x6C, 0x3C, 0xF8, 0xFE, 0x3F, 0x6B, 0xDB, 0xB9, 0x30, 0x40, 0x00, 0x00,},
|
||||
{0x80, 0xC3, 0xEE, 0x7C, 0xB8, 0xFC, 0xFE, 0x6F, 0xDB, 0x9B, 0xB2, 0x30, 0x00, 0x00,},
|
||||
{0x00, 0xC0, 0xEE, 0x7F, 0x3D, 0xF8, 0xFC, 0x7E, 0x57, 0xDB, 0xDB, 0x8A, 0x00, 0x00,},
|
||||
{0x00, 0xC0, 0xE6, 0x7F, 0x3B, 0xF9, 0xFC, 0xFC, 0xB6, 0xB3, 0x33, 0x61, 0x00, 0x00,},
|
||||
{0x00, 0x00, 0x00, 0x00, 0x80, 0xEE, 0xFF, 0xFB, 0xF9, 0xFC, 0xDE, 0xB6, 0xB6, 0x24,},
|
||||
{0x00, 0x00, 0x00, 0x00, 0xC0, 0xEE, 0xFE, 0xFF, 0xFB, 0xFD, 0xEE, 0xB6, 0xB6, 0x92,},
|
||||
};
|
||||
static const char PROGMEM islandRightBottom[6][14] = {
|
||||
{0x41, 0x40, 0x60, 0x3E, 0x3F, 0x23, 0x20, 0x60, 0x41, 0x43, 0x40, 0x40, 0x40, 0x80,},
|
||||
{0x40, 0x41, 0x60, 0x3E, 0x3F, 0x23, 0x20, 0x60, 0x40, 0x40, 0x41, 0x41, 0x40, 0x80,},
|
||||
{0x40, 0x40, 0x61, 0x3D, 0x3F, 0x27, 0x21, 0x60, 0x40, 0x40, 0x40, 0x40, 0x40, 0x80,},
|
||||
{0x40, 0x43, 0x61, 0x3C, 0x3F, 0x27, 0x21, 0x60, 0x41, 0x43, 0x43, 0x42, 0x40, 0x80,},
|
||||
{0x40, 0x40, 0x60, 0x3C, 0x3F, 0x27, 0x23, 0x63, 0x44, 0x40, 0x41, 0x41, 0x41, 0x81,},
|
||||
{0x40, 0x40, 0x60, 0x3C, 0x3F, 0x27, 0x23, 0x63, 0x42, 0x42, 0x41, 0x41, 0x41, 0x80,},
|
||||
};
|
||||
static const char PROGMEM islandLeft[18] = {
|
||||
0x80, 0x40, 0x40, 0x40, 0x40, 0x60,
|
||||
0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
|
||||
0x20, 0x20, 0x20, 0x60, 0x40, 0x40,
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
static void animate_island(void) {
|
||||
if (animation_counter == 0) {
|
||||
island_frame_1 = increment_counter(island_frame_1, 2);
|
||||
}
|
||||
|
||||
void draw_island_parts(uint8_t frame) {
|
||||
oled_set_cursor(ISLAND_COLUMN + 3, ISLAND_LINE);
|
||||
oled_write_raw_P(islandRightTop[frame], 14);
|
||||
oled_set_cursor(ISLAND_COLUMN + 0, ISLAND_LINE + 1);
|
||||
oled_write_raw_P(islandLeft, 18);
|
||||
oled_set_cursor(ISLAND_COLUMN + 3, ISLAND_LINE + 1);
|
||||
oled_write_raw_P(islandRightBottom[frame], 14);
|
||||
}
|
||||
|
||||
if (is_calm || current_wpm < ISLAND_CALM) {
|
||||
draw_island_parts(0);
|
||||
} else if (current_wpm >= ISLAND_CALM && current_wpm < ISLAND_HEAVY_STORM) {
|
||||
draw_island_parts(island_frame_1 + 1);
|
||||
} else if (current_wpm >= ISLAND_HEAVY_STORM && current_wpm < ISLAND_HURRICANE) {
|
||||
draw_island_parts(island_frame_1 + 2);
|
||||
} else {
|
||||
draw_island_parts(island_frame_1 + 4);
|
||||
}
|
||||
}
|
||||
#endif // endregion
|
||||
|
||||
#ifdef ENABLE_STARS // region
|
||||
bool stars_setup = false; // only setup stars once, then we just twinkle them
|
||||
struct Coordinate {
|
||||
int x;
|
||||
int y;
|
||||
bool exists;
|
||||
};
|
||||
|
||||
struct Coordinate stars[TOTAL_STARS]; // tracks all stars/coordinates
|
||||
|
||||
/**
|
||||
* Setup all the initial stars on the screen
|
||||
* This function divides the screen into regions based on STARS_PER_LINE and NUMBER_OF_STAR_LINES
|
||||
* where each line is made up of 8x8 pixel groups, that are populated by a single star.
|
||||
*
|
||||
* Not sure how this function will work with larger or smaller screens.
|
||||
* It should be fine, as long as the screen width is a multiple of 8
|
||||
*/
|
||||
static void setup_stars(void) {
|
||||
// For every line, split the line into STARS_PER_LINE, find a random point in that region, and turn the pixel on
|
||||
// 36% probability it will not be added
|
||||
// (said another way, 80% chance it will start out lit in the x direction, then 80% chance it will start out lit in the y direction = 64% probability it will start out lit at all)
|
||||
for (int line = 0; line < NUMBER_OF_STAR_LINES; ++line) {
|
||||
for (int column_group = 0; column_group < STARS_PER_LINE; ++column_group) {
|
||||
uint8_t rand_column = rand() % 10;
|
||||
uint8_t rand_row = rand() % 10;
|
||||
if (rand_column < 8 && rand_row < 8) {
|
||||
int column_adder = column_group * 8;
|
||||
int line_adder = line * 8;
|
||||
int x = rand_column + column_adder;
|
||||
int y = rand_row + line_adder;
|
||||
oled_write_pixel(x, y, true);
|
||||
stars[column_group + (line * STARS_PER_LINE)].x = x;
|
||||
stars[column_group + (line * STARS_PER_LINE)].y = y;
|
||||
stars[column_group + (line * STARS_PER_LINE)].exists = true;
|
||||
} else {
|
||||
stars[column_group + (line * STARS_PER_LINE)].exists = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
stars_setup = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Twinkle the stars (move them one pixel in any direction) with a probability of 50% to twinkle any given star
|
||||
*/
|
||||
static void twinkle_stars(void) {
|
||||
for (int line = 0; line < NUMBER_OF_STAR_LINES; ++line) {
|
||||
for (int column_group = 0; column_group < STARS_PER_LINE; ++column_group) {
|
||||
struct Coordinate star = stars[column_group + (line * STARS_PER_LINE)];
|
||||
|
||||
// skip stars that were never added
|
||||
if (!star.exists) {
|
||||
continue;
|
||||
}
|
||||
if (rand() % TWINKLE_PROBABILITY_MODULATOR == 0) {
|
||||
oled_write_pixel(star.x, star.y, false); // black out pixel
|
||||
|
||||
// don't allow stars to leave their own region
|
||||
if (star.x == (column_group * 8)) { // star is the farthest left it can go in its region
|
||||
star.x++; // move it right immediately
|
||||
} else if (star.x == (((column_group + 1) * 8) - 1)) { // star is farthest right it can go in its region
|
||||
star.x--; // move it left immediately
|
||||
}
|
||||
if (star.y == (line * 8)) { // star is the farthest up it can go in its region
|
||||
star.y++; // move it down immediately
|
||||
} else if (star.y == (((line + 1) * 8) - 1)) { // star is farthest down it can go in its region
|
||||
star.y--; // move it up immediately
|
||||
}
|
||||
|
||||
// now decide direction
|
||||
int new_x;
|
||||
int x_choice = rand() % 3;
|
||||
if (x_choice == 0) {
|
||||
new_x = star.x - 1;
|
||||
} else if (x_choice == 1) {
|
||||
new_x = star.x + 1;
|
||||
} else {
|
||||
new_x = star.x;
|
||||
}
|
||||
|
||||
int new_y;
|
||||
int y_choice = rand() % 3;
|
||||
if (y_choice == 0) {
|
||||
new_y = star.y - 1;
|
||||
} else if (y_choice == 1) {
|
||||
new_y = star.y + 1;
|
||||
} else {
|
||||
new_y = star.y;
|
||||
}
|
||||
|
||||
star.x = new_x;
|
||||
star.y = new_y;
|
||||
oled_write_pixel(new_x, new_y, true);
|
||||
}
|
||||
|
||||
stars[column_group + (line * STARS_PER_LINE)] = star;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Setup the stars and then animate them on subsequent frames
|
||||
*/
|
||||
static void animate_stars(void) {
|
||||
if (!stars_setup) {
|
||||
setup_stars();
|
||||
} else {
|
||||
twinkle_stars();
|
||||
}
|
||||
}
|
||||
#endif // endregion
|
||||
|
||||
#ifdef ENABLE_SHOOTING_STARS // region
|
||||
bool shooting_stars_setup = false; // only setup shooting stars array once with defaults
|
||||
|
||||
struct ShootingStar {
|
||||
int x_1;
|
||||
int y_1;
|
||||
int x_2;
|
||||
int y_2;
|
||||
bool running;
|
||||
int frame;
|
||||
int delay;
|
||||
};
|
||||
|
||||
struct ShootingStar shooting_stars[MAX_NUMBER_OF_SHOOTING_STARS]; // tracks all the shooting stars
|
||||
|
||||
static void setup_shooting_star(struct ShootingStar *shooting_star) {
|
||||
int column_to_start = rand() % (WIDTH / 2);
|
||||
int row_to_start = rand() % (HEIGHT - 48); // shooting_stars travel diagonally 1 down, 1 across. So the lowest a shooting_star can start and not 'hit' the ocean is 32 above the ocean.
|
||||
|
||||
shooting_star->x_1 = column_to_start;
|
||||
shooting_star->y_1 = row_to_start;
|
||||
shooting_star->x_2 = column_to_start + 1;
|
||||
shooting_star->y_2 = row_to_start + 1;
|
||||
shooting_star->running = true;
|
||||
shooting_star->frame++;
|
||||
shooting_star->delay = rand() % SHOOTING_STAR_DELAY;
|
||||
}
|
||||
|
||||
static void move_shooting_star(struct ShootingStar *shooting_star) {
|
||||
oled_write_pixel(shooting_star->x_1, shooting_star->y_1, false);
|
||||
oled_write_pixel(shooting_star->x_2, shooting_star->y_2, false);
|
||||
|
||||
shooting_star->x_1++;
|
||||
shooting_star->y_1++;
|
||||
shooting_star->x_2++;
|
||||
shooting_star->y_2++;
|
||||
shooting_star->frame++;
|
||||
|
||||
oled_write_pixel(shooting_star->x_1, shooting_star->y_1, true);
|
||||
oled_write_pixel(shooting_star->x_2, shooting_star->y_2, true);
|
||||
}
|
||||
|
||||
static void finish_shooting_star(struct ShootingStar *shooting_star) {
|
||||
oled_write_pixel(shooting_star->x_1, shooting_star->y_1, false);
|
||||
oled_write_pixel(shooting_star->x_2, shooting_star->y_2, false);
|
||||
shooting_star->running = false;
|
||||
shooting_star->frame = 0;
|
||||
}
|
||||
|
||||
static void animate_shooting_star(struct ShootingStar *shooting_star) {
|
||||
if (shooting_star->frame > SHOOTING_STAR_FRAMES) {
|
||||
finish_shooting_star(shooting_star);
|
||||
return;
|
||||
} else if (!shooting_star->running) {
|
||||
setup_shooting_star(shooting_star);
|
||||
} else {
|
||||
if (shooting_star->delay == 0) {
|
||||
move_shooting_star(shooting_star);
|
||||
} else {
|
||||
shooting_star->delay--;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void animate_shooting_stars(void) {
|
||||
if (is_calm) {
|
||||
return;
|
||||
}
|
||||
if (!shooting_stars_setup) {
|
||||
for (int i = 0; i < MAX_NUMBER_OF_SHOOTING_STARS; ++i) {
|
||||
shooting_stars[i].running = false;
|
||||
}
|
||||
shooting_stars_setup = true;
|
||||
}
|
||||
/**
|
||||
* Fixes issue with stars that were falling _while_ the
|
||||
* wpm dropped below the condition for them to keep falling
|
||||
*/
|
||||
void end_extra_stars(uint8_t starting_index) {
|
||||
for (int shooting_star_index = starting_index; shooting_star_index < MAX_NUMBER_OF_SHOOTING_STARS; ++shooting_star_index) {
|
||||
struct ShootingStar shooting_star = shooting_stars[shooting_star_index];
|
||||
if (shooting_star.running) {
|
||||
finish_shooting_star(&shooting_star);
|
||||
shooting_stars[shooting_star_index] = shooting_star;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int number_of_shooting_stars = current_wpm / SHOOTING_STAR_WPM_INCREMENT;
|
||||
number_of_shooting_stars = (number_of_shooting_stars > MAX_NUMBER_OF_SHOOTING_STARS) ? MAX_NUMBER_OF_SHOOTING_STARS : number_of_shooting_stars;
|
||||
|
||||
if (number_of_shooting_stars == 0) {
|
||||
// make sure all shooting_stars are ended
|
||||
end_extra_stars(0);
|
||||
} else {
|
||||
for (int shooting_star_index = 0; shooting_star_index < number_of_shooting_stars; ++shooting_star_index) {
|
||||
struct ShootingStar shooting_star = shooting_stars[shooting_star_index];
|
||||
animate_shooting_star(&shooting_star);
|
||||
shooting_stars[shooting_star_index] = shooting_star;
|
||||
}
|
||||
end_extra_stars(number_of_shooting_stars);
|
||||
}
|
||||
}
|
||||
#endif // endregion
|
||||
|
||||
/**
|
||||
* Main rendering function
|
||||
*
|
||||
* Calls all different animations at different rates
|
||||
*/
|
||||
void render_stars(void) {
|
||||
// // animation timer
|
||||
if (timer_elapsed32(starry_night_anim_timer) > STARRY_NIGHT_ANIM_FRAME_DURATION) {
|
||||
starry_night_anim_timer = timer_read32();
|
||||
current_wpm = get_current_wpm();
|
||||
|
||||
#ifdef ENABLE_ISLAND
|
||||
animate_island();
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_SHOOTING_STARS
|
||||
if (animation_counter % SHOOTING_STAR_ANIMATION_MODULATOR == 0) {
|
||||
animate_shooting_stars();
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_STARS
|
||||
// TODO offsetting the star animation from the wave animation would look better,
|
||||
// but if I do that, then the stars appear in the water because
|
||||
// the ocean animation has to wait a bunch of frames to overwrite it.
|
||||
// Possible solutions:
|
||||
// 1. Only draw stars to the top of the island/ocean.
|
||||
// 2. Draw ocean every frame, only move ocean on frames matching modulus
|
||||
// Problems:
|
||||
// 1. What if someone wants to move the island up a bit, or they want to have the stars reflect in the water?
|
||||
// 2. More cpu intensive. And I'm already running out of cpu as it is...
|
||||
if (animation_counter % STAR_ANIMATION_MODULATOR == 0) {
|
||||
animate_stars();
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_WAVE
|
||||
if (animation_counter % OCEAN_ANIMATION_MODULATOR == 0) {
|
||||
animate_waves();
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_MOON
|
||||
draw_moon();
|
||||
#endif
|
||||
|
||||
animation_counter = increment_counter(animation_counter, NUMBER_OF_FRAMES);
|
||||
}
|
||||
}
|
|
@ -1,89 +0,0 @@
|
|||
// Copyright 2022 Jose Pablo Ramirez (@jpe230)
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
#include "quantum.h"
|
||||
|
||||
/**
|
||||
* Features:
|
||||
* You can turn on and off features in this section
|
||||
*/
|
||||
#define ENABLE_MOON // Uses 182 bytes
|
||||
#define ENABLE_WAVE // Uses 844 bytes
|
||||
#define ENABLE_SHOOTING_STARS // Uses 872 bytes
|
||||
#define ENABLE_ISLAND
|
||||
#define ENABLE_STARS // Uses 606 bytes
|
||||
|
||||
/**
|
||||
* Global Settings
|
||||
*/
|
||||
#define STARRY_NIGHT_ANIM_FRAME_DURATION 30 // how long each frame lasts in ms
|
||||
#define NUMBER_OF_FRAMES 20 // Self explanatory. Probably shouldn't touch this, not sure how stuff will work if it's changed. If changed should be multiple of 1, 2, 3, 4, and 5
|
||||
#define WIDTH OLED_DISPLAY_HEIGHT // for vertical displays
|
||||
#define HEIGHT OLED_DISPLAY_WIDTH // for vertical displays
|
||||
|
||||
/**
|
||||
* Moon Parameters
|
||||
*/
|
||||
#define MOON_LINE 4 // the line you want the moon to appear at
|
||||
#define MOON_COLUMN 4 // the column you want the moon to appear at
|
||||
//#define STATIC_MOON // uncomment this to make the moon a static image, no animation
|
||||
#ifndef STATIC_MOON
|
||||
# define ANIMATE_MOON_EVERY_N_FRAMES 100 // animate the moon every n frames
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Wave Parameters
|
||||
*/
|
||||
#define OCEAN_LINE 14 // Line you want to render the ocean starting at (best at oled_max_lines() - 2)
|
||||
#define WAVE_CALM 20 // render calm ocean under this WPM and ripple ocean at this WPM
|
||||
#define WAVE_HEAVY_STORM 40 // render medium ocean at this WPM
|
||||
#define WAVE_HURRICANE 60 // render heavy waves above this WPM
|
||||
// What number of frames you want to animate the ocean at.
|
||||
// Should be equal to or smaller than NUMBER_OF_FRAMES, e.g. 30, would animate on every other frame, 20, every third frame, etc
|
||||
// Don't set equal to 0.
|
||||
#define OCEAN_ANIMATION_SPEED 1
|
||||
|
||||
/**
|
||||
* Shooting Star Parameters
|
||||
*/
|
||||
#define SHOOTING_STAR_DELAY 12 // delay modulus for time between shooting stars. Decides number of frames to delay, e.g. 12 means 0-11 frames of delay between each shooting star
|
||||
#define SHOOTING_STAR_FRAMES 16 // how many 2 pixel frames per shooting star. Increment this for longer shooting stars
|
||||
#define MAX_NUMBER_OF_SHOOTING_STARS 12 // maximum number of shooting stars that can be on screen at the same time
|
||||
#define SHOOTING_STAR_WPM_INCREMENT 10 // every n WPM increase, add an extra star, up to MAX_NUMBER_OF_SHOOTING_STARS, e.g. an increment of 5 would result in 1 shooting star at 5-9wpm, 2 at 10-14, etc.
|
||||
// What number of frames you want to animate the shooting stars at.
|
||||
// Should be equal to or smaller than NUMBER_OF_FRAMES, e.g. 30, would animate on every other frame, 20, every third frame, etc
|
||||
// Don't set equal to 0.
|
||||
#define SHOOTING_STAR_ANIMATION_SPEED 30
|
||||
|
||||
/**
|
||||
* Star Parameters
|
||||
*/
|
||||
#define STARS_PER_LINE 4 // number of stars per line (for a display that is 128x32, this would be 4 stars spread out evenly over the 32byte width, one every 8 bytes)
|
||||
#define NUMBER_OF_STAR_LINES 16 // number of lines to fill up with stars (for a display that is 128x32, 16 bytes are filled with the ocean animation, so that leaves 112 pixels left over. The number of lines depends on your OLED_FONT_HEIGHT)
|
||||
#define TWINKLE_PROBABILITY 25 // probability that any star twinkles on a given frame
|
||||
// What number of frames you want to animate the stars at.
|
||||
// Should be equal to or smaller than NUMBER_OF_FRAMES, e.g. 20, would animate on every frame, 10, every other frame, etc
|
||||
// Don't set equal to 0.
|
||||
#define STAR_ANIMATION_SPEED 1
|
||||
|
||||
/**
|
||||
* Island Parameters
|
||||
*/
|
||||
#define ISLAND_LINE 12 // line that the island starts at. Island is 2 lines tall
|
||||
#define ISLAND_COLUMN 0 // column that the island starts at
|
||||
#define ISLAND_CALM 20 // WPM at which the palm tree calmly moves
|
||||
#define ISLAND_HEAVY_STORM 40 // WPM at which the heavy storm occurs
|
||||
#define ISLAND_HURRICANE 60 // WPM at which THE HURRICANE STARTS
|
||||
|
||||
/*
|
||||
* DON'T TOUCH
|
||||
*/
|
||||
|
||||
extern bool is_calm;
|
||||
|
||||
// timers
|
||||
extern uint32_t starry_night_anim_timer;
|
||||
extern uint32_t starry_night_anim_sleep;
|
||||
|
||||
void render_stars(void);
|
|
@ -1,11 +0,0 @@
|
|||
// Copyright 2022 Jose Pablo Ramirez (@jpe230)
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "jpe230.h"
|
||||
#include "ocean_dream.h"
|
||||
|
||||
void render_slave_oled(void) {
|
||||
render_stars();
|
||||
}
|
||||
|
||||
oled_rotation_t rotate_slave(oled_rotation_t rotation) {return OLED_ROTATION_270;}
|
|
@ -1,20 +0,0 @@
|
|||
// Copyright 2022 Jose Pablo Ramirez (@jpe230)
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "jpe230.h"
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
if (record->event.pressed) {
|
||||
oled_timer_reset();
|
||||
set_keylog(keycode, record);
|
||||
|
||||
switch (keycode) {
|
||||
case QK_BOOT:
|
||||
rgb_matrix_set_color_all(30, 0, 0);
|
||||
rgb_matrix_driver.flush();
|
||||
oled_off();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
|
@ -1,23 +0,0 @@
|
|||
# Jpe230's CRKBD Layout
|
||||
|
||||
## Layers
|
||||
The four layers:
|
||||
- BASE Layer: QWERTY
|
||||
- LOWER Layer: Numbers + Arrows
|
||||
- RAISE Layer: Symbols
|
||||
- ADJUST Layer: Numpad + Media Keys + Fn keys
|
||||
## OLED
|
||||
The graphics for the OLED varies depending on the target platform:
|
||||
|
||||
| Half | RP2040 | Pro Micro |
|
||||
|--------|--------------------------------------|--------------------------------------|
|
||||
| Master | ![](https://i.imgur.com/FF0EuWoh.png) | ![](https://i.imgur.com/stxRevvh.png) |
|
||||
| Slave | ![](https://i.imgur.com/hyjdDITh.png) | ![](https://i.imgur.com/UrTCd2sh.png) |
|
||||
|
||||
|
||||
## Flashing
|
||||
For Arduino Pro Micro:
|
||||
- `qmk compile -kb crkbd -km jpe230`
|
||||
|
||||
For Pro Micro Compatible board (See [Converters](https://docs.qmk.fm/#/feature_converters?id=converters)):
|
||||
- `qmk compile -kb crkbd -km jpe230 -e CONVERT_TO<target>`
|
|
@ -1,23 +0,0 @@
|
|||
# Shared rules for both of my Corne
|
||||
OLED_ENABLE = yes
|
||||
VIA_ENABLE = yes
|
||||
RGB_MATRIX_ENABLE = yes
|
||||
|
||||
SRC += oled/oled_handler.c process_record.c
|
||||
|
||||
ifneq ($(CONVERT_TO),)
|
||||
# Asume ARM
|
||||
DEBUG_MATRIX_SCAN_RATE_ENABLE = yes
|
||||
WPM_ENABLE = yes
|
||||
CONSOLE_ENABLE = yes
|
||||
SRC += oled/rp2040/master/oled_master_handler.c \
|
||||
oled/rp2040/master/indicators_down.c \
|
||||
oled/rp2040/master/indicators_up.c \
|
||||
oled/rp2040/slave/oled_slave_handler.c \
|
||||
oled/rp2040/slave/ocean_dream.c
|
||||
else
|
||||
# Asume AVR
|
||||
LTO_ENABLE = yes
|
||||
SRC += oled/avr/master/oled_master_handler.c \
|
||||
oled/avr/slave/oled_slave_handler.c
|
||||
endif
|
|
@ -1,19 +0,0 @@
|
|||
/* Copyright 2020 codecoffeecode
|
||||
*
|
||||
* 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
|
||||
|
||||
#define RGBLIGHT_HUE_STEP 8
|
|
@ -1,52 +0,0 @@
|
|||
/* Copyright 2020 codecoffeecode
|
||||
*
|
||||
* 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
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = LAYOUT(
|
||||
KC_HOME, KC_UP, KC_END, /*|*/ KC_TRNS,
|
||||
KC_LEFT, KC_DOWN, KC_RIGHT, /*|*/ KC_TRNS,
|
||||
KC_MPRV, KC_MPLY, KC_MNXT, /*|*/ KC_TRNS,
|
||||
LCTL(LSFT(KC_ESC)), RGB_TOG, LGUI(KC_L)
|
||||
),
|
||||
};
|
||||
|
||||
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
switch(index) {
|
||||
case 0:
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU); // Volume
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (clockwise) {
|
||||
tap_code(KC_MS_WH_DOWN); // Scroll
|
||||
} else {
|
||||
tap_code(KC_MS_WH_UP);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (clockwise) {
|
||||
rgblight_increase_hue(); // RGB Hue
|
||||
} else {
|
||||
rgblight_decrease_hue();
|
||||
}
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
# Mechmaster48 keymap
|
||||
|
||||
-Personal keyboard layout
|
||||
-Mainly following the default layout.
|
||||
-Picture of the map below with 3 total layers 0-2
|
||||
-More to come as I figure QMK out
|
||||
|
||||
## Layer 0
|
||||
![alt text](https://i.imgur.com/yi8BCCf.gif)
|
||||
|
||||
## Layer 1
|
||||
![alt text](https://i.imgur.com/aG2cCn9.gif)
|
||||
|
||||
## Layer 2
|
||||
![alt text](https://i.imgur.com/79RAh1G.gif)
|
|
@ -1,79 +0,0 @@
|
|||
/*
|
||||
Copyright 2021 MechMaster48 admin@mechbox.net
|
||||
|
||||
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/>.
|
||||
/*
|
||||
|
||||
-This is just a diagram that makes it easier for me to see what keys I have bound and where.
|
||||
-The README has a better image to see the exact keymap.
|
||||
|
||||
--Layer 0--
|
||||
_________________________________________________________________________________________________
|
||||
|[esc] [1!]-[2@]-[3#]-[4$]-[5%]-[6^]-[7&]-[8*]-[9(]-[0)]-[-_]-[+=] [ BackSpace ]|
|
||||
|[ Tab ] [Q]-[W]-[E]-[R]-[T]-[Y]-[U]-[I]-[O]-[P]-[[{]-[]}] [ |\ ]|
|
||||
|[CapsLock] [A]-[S]-[D]-[F]-[G]-[H]-[J]-[K]-[L]-[;/:]-['/"] [Enter]|
|
||||
|[ Shift ] [Z]-[X]-[C]-[V]-[B]-[N]-[M]-[</,]-[>/.]-[?//] [↑][del]|
|
||||
|[ctrl][win][alt] [____________________SPACE__________________][fn/OSL(1)][ctrl][←][↓][→] |
|
||||
|_________________________________________________________________________________________________|
|
||||
|
||||
|
||||
|
||||
|
||||
--Layer 1--
|
||||
_____________________________________________________________________________________
|
||||
|[TO(2)] [F1]-[F2]-[F3]-[F4]-[F5]-[F6]-[F7]-[F8]-[F9]-[F10]-[F11]-[F12] [ ▼ ]|
|
||||
|[ ▼ ] [~]-[▼]-[▼]-[▼]-[▼]-[▼]-[PS]-[▼]-[▼]-[▼]-[play/pause]-[▼] [ QK_BOOT ]|
|
||||
|[ ▼ ] [▼]-[▼]-[▼]-[▼]-[▼]-[▼]-[▼]-[▼]-[PU]-[▼]-[▼] [ ▼ ]|
|
||||
|[ Shift ] [▼]-[▼]-[▼]-[▼]-[▼]-[▼]-[▼]-[▼]-[PD]-[▼] [vol↑] [ ▼ ]|
|
||||
|[ctrl][ ▼ ][alt] [_________________▼________________] [▼][ ▼ ][←prvs][vol↓][next→]|
|
||||
|_____________________________________________________________________________________|
|
||||
|
||||
|
||||
|
||||
--Layer 2--
|
||||
_________________________________________________________________________________________________
|
||||
|[ ▼ ] [▼]-[▼]-[▼]-[▼]-[▼]-[▼]-[▼]-[▼]-[▼]-[▼]-[▼]-[▼] [ ▼ ]|
|
||||
|[ ▼ ] [RGBTgg]-[▼]-[Hue+]-[Hue-]-[Sat+]-[Sat-]-[Brt+]-[Brt-]-[RGBmd]-[▼]-[▼]-[▼] [ QK_BOOT ]|
|
||||
|[ ▼ ] [▼]-[▼]-[▼]-[▼]-[▼]-[▼]-[▼]-[▼]-[▼]-[▼]-[▼] [ ▼ ]|
|
||||
|[ ▼ ] [▼]-[▼]-[▼]-[▼]-[▼]-[▼]-[▼]-[▼]-[▼]-[▼] [ ▼ ][ ▼ ]|
|
||||
|[ ▼ ][ ▼ ][▼] [_______________TO(0)________________] [▼][ ▼ ] [ ▼ ][ ▼ ][ ▼ ]|
|
||||
|_________________________________________________________________________________________________|
|
||||
|
||||
*/
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = LAYOUT(
|
||||
QK_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, 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_LBRC, KC_RBRC, KC_BSLS,
|
||||
CTL_T(KC_CAPS), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, RSFT_T(KC_SLSH), KC_UP, LT(2, KC_DEL),
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, OSL(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
|
||||
),
|
||||
[1] = LAYOUT(
|
||||
TO(2), 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_DEL,
|
||||
_______, KC_GRV, _______, _______, _______, _______, _______, KC_PSCR, _______, _______, _______, KC_MPLY, _______, QK_BOOT,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______, _______, EE_CLR,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGDN, _______, KC_VOLU, KC_MUTE,
|
||||
KC_LCTL, _______, KC_LALT, TO(0), _______, _______, KC_MPRV, KC_VOLD, KC_MNXT
|
||||
),
|
||||
[2] = LAYOUT(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, RGB_TOG, _______, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_MOD, _______, _______, _______, QK_BOOT,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, RGB_SPI, RGB_SPD, _______, _______, EE_CLR,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, TO(0), _______, _______, _______, _______, _______
|
||||
)
|
||||
};
|
|
@ -1,67 +0,0 @@
|
|||
/* Copyright 2020 Jordan Egstad
|
||||
*
|
||||
* 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
|
||||
#define TAPPING_TERM 200
|
||||
#define RGBLIGHT_SLEEP
|
||||
|
||||
|
||||
|
||||
/* Leader Key
|
||||
========================================================================== */
|
||||
|
||||
// Activates the leader key
|
||||
// #define LEADER_PER_KEY_TIMING
|
||||
// resets the timeout after each key is tapped
|
||||
// #define LEADER_TIMEOUT 240
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* Autoshifting
|
||||
========================================================================== */
|
||||
|
||||
// This controls how long you have to hold a key before you get the shifted state.
|
||||
#define AUTO_SHIFT_TIMEOUT 150
|
||||
|
||||
// Do not Auto Shift special keys -_, =+, [{, ]}, ;:, '", ,<, .>, and /?
|
||||
// #define NO_AUTO_SHIFT_SPECIAL
|
||||
|
||||
// Do not Auto Shift numeric keys, zero through nine.
|
||||
#define NO_AUTO_SHIFT_NUMERIC
|
||||
|
||||
// Do not Auto Shift alpha characters, which include A through Z.
|
||||
// #define NO_AUTO_SHIFT_ALPHA
|
||||
|
||||
// Lower the Auto Shift timeout variable (down)
|
||||
// AS_DOWN
|
||||
|
||||
// Raise the Auto Shift timeout variable (up)
|
||||
// AS_UP
|
||||
|
||||
// Report your current Auto Shift timeout value
|
||||
// AS_RPT
|
||||
|
||||
// Turns on the Auto Shift Function
|
||||
// AS_ON
|
||||
|
||||
// Turns off the Auto Shift Function
|
||||
// AS_OFF
|
||||
|
||||
// Toggles the state of the Auto Shift feature
|
||||
// AS_TOGG
|
|
@ -1,267 +0,0 @@
|
|||
/* Copyright 2020 Jordan Egstad
|
||||
*
|
||||
* 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
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* ==========================================================================
|
||||
LAYERS
|
||||
========================================================================== */
|
||||
|
||||
// qwerty
|
||||
#define _QW 0
|
||||
// functions
|
||||
#define _FN 1
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* ==========================================================================
|
||||
CUSTOM KEYS
|
||||
========================================================================== */
|
||||
|
||||
// Tap dances
|
||||
#define TD_ESCP TD(TD_GV_ESC) // Tap for grave, twice for escape
|
||||
#define TD_MINS TD(TD_MIN) // Tap for minus, twice for equal
|
||||
#define TD_BRAC TD(TD_BRC) // Tap for open brace, twice for close
|
||||
|
||||
// Layers
|
||||
#define FN_SPC LT(_FN, KC_SPC) // Tap for space, hold for _FN
|
||||
|
||||
// Modifiers
|
||||
#define LG_ZMIN LGUI(KC_EQUAL) // Command + plus (zoom in)
|
||||
#define LG_ZMOT LGUI(KC_MINUS) // Command + minus (zoom out)
|
||||
#define MT_SHFT MT(MOD_RSFT, KC_ENT) // Tap for enter, hold for shift
|
||||
|
||||
// Tap Dances
|
||||
enum {
|
||||
TD_BRC = 0,
|
||||
TD_MIN,
|
||||
TD_GV_ESC,
|
||||
TD_BS
|
||||
};
|
||||
|
||||
// Tap Dance Definitions
|
||||
tap_dance_action_t tap_dance_actions[] = {
|
||||
// Tap once for Left Brace, twice for Right Brace
|
||||
[TD_BRC] = ACTION_TAP_DANCE_DOUBLE(KC_LBRC, KC_RBRC),
|
||||
//Tap once for Minus, twice for Equal
|
||||
[TD_MIN] = ACTION_TAP_DANCE_DOUBLE(KC_MINUS, KC_EQUAL),
|
||||
// Tap once for Grave, tap twice for Escape
|
||||
[TD_GV_ESC] = ACTION_TAP_DANCE_DOUBLE(KC_GRAVE, KC_ESCAPE)
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* ==========================================================================
|
||||
KEYMAPS
|
||||
========================================================================== */
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* QWERTY (_QW)
|
||||
* .--------------------------------------------------------------------------------------------------------------------------------------.
|
||||
* | ESC | 1 | 2 | 3 | 4 | 5 | - | ` | \| | 6 | 7 | 8 | 9 | 0 | - + |
|
||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
|
||||
* | TAB | Q | W | E | R | T | [ | \ | ] | Y | U | I | O | P | [ ] |
|
||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------|
|
||||
* | CAP LK | A | S | D | F | G | | | | H | J | K | L | ; | ' |
|
||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------|
|
||||
* | LSHIFT | Z | X | C | V | B | | | | N | M | , | . | / | RSHIFT |
|
||||
* |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+-----------------+--------+--------|
|
||||
* | ZOOM- | ZOOM+ | LALT | FN | CMD | BSPC | | | FN | SPACE | ENTER | LEFT | UP | DOWN | RIGHT |
|
||||
* '--------------------------------------------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
|
||||
[_QW] = LAYOUT_ortho_5x15( /* QWERTY */
|
||||
TD_ESCP, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_GRV, KC_PIPE, KC_6, KC_7, KC_8, KC_9, KC_0, TD_MINS,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_BSLS, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, TD_BRAC,
|
||||
_______, 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, MT_SHFT,
|
||||
LG_ZMOT, LG_ZMIN, KC_LCTL, KC_LALT, KC_LGUI, KC_BSPC, _______, QK_BOOT, _______, FN_SPC, KC_ENT, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT
|
||||
),
|
||||
|
||||
|
||||
/* FUNCTION (_FN)
|
||||
* .--------------------------------------------------------------------------------------------------------------------------------------.
|
||||
* | F1 | F2 | F3 | F4 | F5 | F6 | | P | | F7 | F8 | F9 | F10 | F11 | F12 |
|
||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
* | | | | | | | RGB HD | RGB HI | | | | | | | |
|
||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
* | A-SFT | | | | | | RGB SD | RGB SI | | | LEFT | UP | DOWN | RIGHT | |
|
||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
* | RGB | | | | | | RGB VD | RGB VI | | | | | | | |
|
||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
* | QK_BOOT | | | | | | RGB RMD| RGB MD | | | PLAY | PREV | VOL UP | VOL DN | NEXT |
|
||||
* '--------------------------------------------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
|
||||
[_FN] = LAYOUT_ortho_5x15( /* FUNCTION */
|
||||
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, _______, _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
|
||||
_______, _______, _______, _______, _______, _______, RGB_HUD, RGB_HUI, _______, _______, _______, _______, _______, _______, _______,
|
||||
AS_TOGG, _______, _______, _______, _______, _______, RGB_SAD, RGB_SAI, _______, _______, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT, _______,
|
||||
RGB_TOG, _______, _______, _______, _______, _______, RGB_VAD, RGB_VAI, _______, _______, _______, _______, _______, _______, _______,
|
||||
QK_BOOT, _______, _______, _______, _______, _______, RGB_RMOD,RGB_MOD, _______, _______, KC_MPLY, KC_MRWD, KC_VOLU, KC_VOLD, KC_MFFD
|
||||
),
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* ==========================================================================
|
||||
LEDs
|
||||
========================================================================== */
|
||||
|
||||
// RGB MODES
|
||||
// 1 = Static
|
||||
// 2-5 = Breathing
|
||||
// 6-8 = Rainbow
|
||||
// 9-14 = Swirl
|
||||
// 15-20 = Snake
|
||||
// 21-24 = Nightrider
|
||||
// 25 = Christmas
|
||||
// 26-30 = Static Gradient
|
||||
|
||||
// Default LED colors
|
||||
uint8_t h = 170;
|
||||
uint8_t s = 255;
|
||||
uint8_t v;
|
||||
|
||||
// default animation
|
||||
uint8_t rgbMode = RGBLIGHT_MODE_STATIC_LIGHT;
|
||||
// boot animation
|
||||
uint8_t rgbBootMode = RGBLIGHT_MODE_SNAKE;
|
||||
// boot timeout vars
|
||||
uint8_t bootComplete = 0;
|
||||
int bootTimeoutDuration = 2000;
|
||||
int bootTimeout;
|
||||
|
||||
|
||||
void init_hsv(void) {
|
||||
// fetch what the brightness was last sesion
|
||||
v = rgblight_get_val();
|
||||
rgblight_sethsv(h,s,v);
|
||||
}
|
||||
|
||||
// fetch current HSV vals
|
||||
void get_hsv(void) {
|
||||
h = rgblight_get_hue();
|
||||
s = rgblight_get_sat();
|
||||
v = rgblight_get_val();
|
||||
}
|
||||
|
||||
// reset HSV vals
|
||||
void reset_hsv(void) {
|
||||
int currentV = rgblight_get_val();
|
||||
rgblight_sethsv(h,s,currentV);
|
||||
}
|
||||
|
||||
// deterimes when to stop bootup animation
|
||||
void bootupAnimation(void) {
|
||||
bootComplete = (timer_elapsed(bootTimeout) > bootTimeoutDuration) ? 1 : 0;
|
||||
|
||||
if (bootComplete) {
|
||||
rgblight_mode(rgbMode);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* ==========================================================================
|
||||
INITIALIZATION FUNCTION
|
||||
========================================================================== */
|
||||
|
||||
void keyboard_post_init_user(void) {
|
||||
// start a timeout
|
||||
bootTimeout = timer_read();
|
||||
// set rgb color
|
||||
init_hsv();
|
||||
// init rgb
|
||||
rgblight_enable();
|
||||
// animate in snake ledGreende
|
||||
rgblight_mode(rgbBootMode);
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* ==========================================================================
|
||||
ALWAYS RUNNING
|
||||
========================================================================== */
|
||||
void matrix_scan_user(void) {
|
||||
// keep an eye on these layers
|
||||
uint8_t layer = get_highest_layer(layer_state);
|
||||
// handle boot-up sequence
|
||||
bootupAnimation();
|
||||
// watch the brightness for changes
|
||||
v = rgblight_get_val();
|
||||
|
||||
switch (layer) {
|
||||
case _FN:
|
||||
// set leds to white
|
||||
rgblight_sethsv_noeeprom(h,0,v);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* ==========================================================================
|
||||
KEYPRESS CALLBACKS
|
||||
========================================================================== */
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
// keep an eye on these layers
|
||||
uint8_t layer = get_highest_layer(layer_state);
|
||||
|
||||
switch (keycode) {
|
||||
case FN_SPC:
|
||||
// stash and pop color on key down and key up
|
||||
(record->event.pressed) ? get_hsv() : reset_hsv();
|
||||
return true;
|
||||
default:
|
||||
switch (layer) {
|
||||
case _QW:
|
||||
// tick the hue up with each keypress
|
||||
rgblight_increase_hue();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return true; // Process all other keycodes normally
|
||||
}
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
# Egstad's Idobo
|
||||
|
||||
## LEDs
|
||||
By default, LEDs are enabled. There is a short bootup animation (`bootupAnimation()`) to indicate that the keyboard has powered up correctly.
|
||||
|
||||
On each keypress, the LEDs hue increases. This increase is determined the the `RGBLIGHT_HUE_STEP` value, which is assigned in `../config.h` (parent idobo directory). My local copy has this value set to `1`, so the incremental color shift is rather slow.
|
||||
|
||||
|
||||
## Keeping up to date
|
||||
To update your fork’s master, run the following, hitting the Enter key after each line:
|
||||
|
||||
```bash
|
||||
git checkout master
|
||||
git fetch upstream
|
||||
git pull upstream master
|
||||
git push origin master
|
||||
```
|
|
@ -1,3 +0,0 @@
|
|||
TAP_DANCE_ENABLE = yes
|
||||
AUTO_SHIFT_ENABLE = yes
|
||||
RGBLIGHT_ENABLE = yes
|
|
@ -1,41 +0,0 @@
|
|||
#include QMK_KEYBOARD_H
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Base layer
|
||||
* ,--------------------------------------------------------------------------------------------------.
|
||||
* |Esc ~| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Backspace | Home |
|
||||
* |-------------------------------------------------------------------------------------------+------+
|
||||
* | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | End |
|
||||
* |-------------------------------------------------------------------------------------------+------+
|
||||
* | CtrlCaps | A | S | D | F | G | H | J | K | L | ; | ' | Enter | PgUp |
|
||||
* |-------------------------------------------------------------------------------------------+------+
|
||||
* | Shift | Z | X | C | V | B | N | M | , | . | / | MO(2) | Up | PgDn |
|
||||
* +-------------------------------------------------------------------------┬---┬-------------+------+
|
||||
* | LCtrl | LGUI | LAlt | Space | Btn2 | MO(1)| | Left |Down | Right|
|
||||
* `-------------------------------------------------------------------------┘ └-------------+------´
|
||||
*/
|
||||
[0] = LAYOUT_65_ansi_blocker( /* Base */
|
||||
QK_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_END,
|
||||
CTL_T(KC_CAPS),KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MO(2), KC_UP, KC_PGDN,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_BTN2, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT
|
||||
),
|
||||
|
||||
[1] = LAYOUT_65_ansi_blocker( /* MO(1) - Fn */
|
||||
KC_GRV, 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_DEL, KC_HOME,
|
||||
_______, RGB_TOG, RGB_MOD, RGB_HUI,RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, KC_PSCR, KC_SCRL, KC_PAUS, QK_BOOT, KC_PGUP,
|
||||
CTL_T(KC_CAPS),RGB_SPI, RGB_SPD, _______,_______, _______, _______, _______, _______, _______, _______, _______, EE_CLR, KC_PGDN,
|
||||
KC_LSFT, _______, _______, _______,_______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, KC_MUTE,
|
||||
_______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT
|
||||
),
|
||||
|
||||
[2] = LAYOUT_65_ansi_blocker( /* MO(2) - RShift */
|
||||
QK_GESC, _______, _______, _______,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
LCTL(KC_L), _______, _______, _______,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
)
|
||||
};
|
|
@ -1,2 +0,0 @@
|
|||
MOUSEKEY_ENABLE = yes
|
||||
NKRO_ENABLE = yes
|
|
@ -1,58 +0,0 @@
|
|||
#include QMK_KEYBOARD_H
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Layer 0
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Esc | A | S | D | F | G | H | J | K | L | ; | " |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Ctrl | GUI | Caps | Alt |Layer1| Space |Layer2| Left | Down | Up |Right |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[0] = LAYOUT_planck_mit(
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
|
||||
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
|
||||
KC_LCTL, KC_LGUI, KC_CAPS, KC_LALT, MO(1), KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
|
||||
),
|
||||
|
||||
/* Layer 1
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | Del |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | | Vol- | Vol+ | Mute | | | | F11 | F12 | | | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Reset| | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[1] = LAYOUT_planck_mit(
|
||||
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL,
|
||||
_______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, _______, KC_F11, KC_F12, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
/* Layer 2 (r_ Indicates RGB Controls)
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | |r_TOG |r_Mode|r_Hue+|r_Hue-| | | - | = | [ | ] | \ |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | |BL_TOG|BL_STEP| | | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[2] = LAYOUT_planck_mit(
|
||||
_______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______,
|
||||
_______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
|
||||
_______, BL_TOGG, BL_STEP, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
)
|
||||
};
|
|
@ -1,5 +0,0 @@
|
|||
## CodeCoffeeCode's 40% Keymap
|
||||
|
||||
- Added Delete to Layer 1
|
||||
- Swapped Tab and Esc like on the Planck EZ
|
||||
- Put all the Arrows on the bottom row, moving the Forward Slash to beside Enter
|
|
@ -1,12 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
/* For USB nonsense in various OSs */
|
||||
#define TAP_CODE_DELAY 10
|
||||
|
||||
/* For constant mouse speed */
|
||||
#define MOUSEKEY_DELAY 300
|
||||
#define MOUSEKEY_INTERVAL 50
|
||||
#define MOUSEKEY_MAX_SPEED 1
|
||||
#define MOUSEKEY_TIME_TO_MAX 0
|
||||
#define MOUSEKEY_WHEEL_MAX_SPEED 1
|
||||
#define MOUSEKEY_WHEEL_TIME_TO_MAX 0
|
|
@ -1,58 +0,0 @@
|
|||
/* Copyright 2019 Danny Nguyen <danny@keeb.io>
|
||||
*
|
||||
* 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
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/*
|
||||
| Knob 1: Scrl Dn/Up | | Knob 2: Vol Dn/Up |
|
||||
| Press: Mute | Up | Press: Play/Pause |
|
||||
| Left | Down | Right |
|
||||
| Media Previous | MO(1)| Media Next |
|
||||
*/
|
||||
[0] = LAYOUT(
|
||||
KC_MUTE, KC_UP, KC_MPLY,
|
||||
KC_LEFT, KC_DOWN, KC_RIGHT,
|
||||
KC_MPRV, MO(1), KC_MNXT
|
||||
),
|
||||
/*
|
||||
| QK_BOOT | Home | Media Stop |
|
||||
| | End | |
|
||||
| CTRL_END | | CTRL_HOME |
|
||||
*/
|
||||
[1] = LAYOUT(
|
||||
QK_BOOT, KC_HOME, KC_STOP,
|
||||
_______, KC_END, _______,
|
||||
LCTL(KC_END), _______, LCTL(KC_HOME)
|
||||
),
|
||||
};
|
||||
|
||||
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (index == 0) {
|
||||
if (clockwise) {
|
||||
tap_code(KC_MS_WH_UP);
|
||||
} else {
|
||||
tap_code(KC_MS_WH_DOWN);
|
||||
}
|
||||
}
|
||||
else if (index == 1) {
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
MOUSEKEY_ENABLE = yes
|
||||
ifneq (, $(findstring rev1, $(KEYBOARD)))
|
||||
CONVERT_TO=proton_c
|
||||
endif
|
|
@ -1,91 +0,0 @@
|
|||
# Pittyolo's Let's Split Layout
|
||||
|
||||
This is my Let's Split layout, modified for my ISO Hungarian taste :)
|
||||
|
||||
Added some layer feedback in the underglow, but it's still a WIP.
|
||||
|
||||
I wrote the keys that will appear when using Hungarian layout in Windows and the respective English keys in brackets.
|
||||
|
||||
|
||||
### Qwerty
|
||||
```
|
||||
,-----------------------------------------------------------------------------------.
|
||||
| Tab | Q | W | E | R | T | Z(Y)| U | I | O | P | Bksp |
|
||||
|------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
| Esc | A | S | D |LTVIMF| G | H | J | K | L | É(;)| Á(") |
|
||||
|------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
|Í/Shft| Y(Z) | X | C | V | B | N | M | , | . | -(/)| Shift|
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| Ctrl | GUI | Alt |ADJUST| Spc | LOWER| Bksp | Ent | Alt | =(&) | GAME | Del |
|
||||
`-----------------------------------------------------------------------------------'
|
||||
```
|
||||
|
||||
Tap left shift writes the missing ISO key, hold is Shift.
|
||||
|
||||
|
||||
### Gaming mode (Toggle layer)
|
||||
```
|
||||
,-----------------------------------------------------------------------------------.
|
||||
| | | | | | | | | | | |Lower |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| | | | | F | | | | | | | |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| Shift| | | | | | | | | | |QWERTY|
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| | | | | | | | | Left | Down | Up | Right|
|
||||
`-----------------------------------------------------------------------------------'
|
||||
```
|
||||
|
||||
Disabled some of the functions in the main layer to help with better gaming experience.
|
||||
|
||||
|
||||
### Lower (Hold down right Space)
|
||||
```
|
||||
,-----------------------------------------------------------------------------------.
|
||||
| 0(') | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Ö(0) | Ü(-) |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| F10 | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F11 | F12 |
|
||||
|------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
| | | | | | | | | Ins | Home | PgUp | Shift|
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| | | | | | | | | Del | End | PgDn | AltGr|
|
||||
`-----------------------------------------------------------------------------------'
|
||||
```
|
||||
|
||||
Function layer with everything that is missing from the main layer.
|
||||
|
||||
|
||||
### NAV (double tap toggles the layer, and hold for momentary switch)
|
||||
```
|
||||
,-----------------------------------------------------------------------------------.
|
||||
| | | Up | | F2 | | | 7 | 8 | 9 | / | |
|
||||
|------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
| | Left | Down | Right| | | | 4 | 5 | 6 | * | |
|
||||
|------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
| Shift| | | | | | | 1 | 2 | 3 | - | |
|
||||
|------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
| | | | | | | | 0 | . | = | + | |
|
||||
`-----------------------------------------------------------------------------------'
|
||||
```
|
||||
|
||||
Navigation layer with a numpad on the right side.
|
||||
|
||||
|
||||
|
||||
### Vim Movement (Hold down F)
|
||||
```
|
||||
,-----------------------------------------------------------------------------------.
|
||||
|RGBMOD|RGBTOG| | | | | | Ú | Í | Ó | Ő | Ű |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
|DM_stp| | | LCTRL| | | Left | Down | Up | Right| | |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
|DM_REC| | | | | | | | | | | |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| | | | | LShft| | | | | | | RESET|
|
||||
`-----------------------------------------------------------------------------------'
|
||||
```
|
||||
|
||||
Turns hjkl into vim movement. I moved accented Hungarian letters here.
|
||||
|
||||
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
#include "../../config.h"
|
||||
|
||||
/* Select hand configuration */
|
||||
|
||||
#define MASTER_LEFT
|
||||
// #define MASTER_RIGHT
|
||||
// #define EE_HANDS
|
||||
|
||||
#define TAPPING_TOGGLE 2
|
||||
|
||||
#undef RGBLED_NUM
|
||||
#define RGBLIGHT_EFFECT_BREATHING
|
||||
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
|
||||
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
|
||||
#define RGBLIGHT_EFFECT_SNAKE
|
||||
#define RGBLIGHT_EFFECT_KNIGHT
|
||||
#define RGBLIGHT_EFFECT_CHRISTMAS
|
||||
#define RGBLIGHT_EFFECT_STATIC_GRADIENT
|
||||
#define RGBLIGHT_EFFECT_RGB_TEST
|
||||
#define RGBLIGHT_EFFECT_ALTERNATING
|
||||
#define RGBLIGHT_EFFECT_TWINKLE
|
||||
#define RGBLED_NUM 2
|
||||
#define RGBLIGHT_HUE_STEP 8
|
||||
#define RGBLIGHT_SAT_STEP 8
|
||||
#define RGBLIGHT_VAL_STEP 8
|
||||
|
||||
#endif
|
|
@ -1,164 +0,0 @@
|
|||
#include QMK_KEYBOARD_H
|
||||
|
||||
|
||||
//Following line allows macro to read current RGB settings
|
||||
extern rgblight_config_t rgblight_config;
|
||||
|
||||
extern keymap_config_t keymap_config;
|
||||
|
||||
#define _QWERTY 0
|
||||
#define _GAME 1
|
||||
#define _LOWER 2
|
||||
#define _NAV 3
|
||||
#define _VIM 4
|
||||
|
||||
enum custom_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
GAME,
|
||||
LOWER,
|
||||
NAV,
|
||||
VIM,
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Qwerty
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | Tab | Q | W | E | R | T | Z(Y)| U | I | O | P | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Esc | A | S | D |LTVIMF| G | H | J | K | L | É(;)| Á(") |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* |Í/Shft| Y(Z) | X | C | V | B | N | M | , | . | -(/)| Shift|
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Ctrl | GUI | Alt |ADJUST| Spc | LOWER| Bksp | Ent | Alt | =(&) | GAME | Del |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_QWERTY] = LAYOUT(
|
||||
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, LT(_VIM, KC_F), KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
|
||||
MT(MOD_LSFT, KC_NUBS), 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, TT(_NAV), KC_SPC, LT(_LOWER, KC_SPC), KC_BSPC, KC_ENT, KC_RALT, KC_AMPERSAND, TG(_GAME), KC_DEL
|
||||
),
|
||||
|
||||
/* Gaming mode
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | | | | | | | | | | | |Lower |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | F | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Shift| | | | | | | | | | |QWERTY|
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | Left | Down | Up | Right|
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_GAME] = LAYOUT(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, OSL(_LOWER),
|
||||
_______, _______, _______, _______, KC_F, _______, _______, _______, _______, _______, _______, _______,
|
||||
KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, TO(_QWERTY),
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
|
||||
),
|
||||
|
||||
/* Lower
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | 0(') | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Ö(0) | Ü(-) |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | F10 | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F11 | F12 |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | | | | | | | | | Ins | Home | PgUp | Shift|
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | Del | End | PgDn | AltGr|
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_LOWER] = LAYOUT(
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS,
|
||||
KC_F10, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F11, KC_F12,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, KC_INS, KC_HOME, KC_PGUP, KC_RSFT,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, KC_END, KC_PGDN, KC_RALT
|
||||
),
|
||||
|
||||
|
||||
/* NAV
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | | | Up | | F2 | | | 7 | 8 | 9 | / | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | Left | Down | Right| | | | 4 | 5 | 6 | * | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| | | | | | | 1 | 2 | 3 | - | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | | | | | | | 0 | . | = | + | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_NAV] = LAYOUT(
|
||||
_______, _______, KC_UP, _______, KC_F2, _______, _______, KC_7, KC_8, KC_9, KC_KP_SLASH, _______,
|
||||
_______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, KC_4, KC_5, KC_6, KC_KP_ASTERISK, _______,
|
||||
KC_LSFT, _______, _______, _______, _______, _______, _______, KC_1, KC_2, KC_3, KC_KP_MINUS, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, KC_GRV, KC_KP_DOT, KC_KP_EQUAL, KC_KP_PLUS, _______
|
||||
),
|
||||
|
||||
/* Vim Movement (Hold down F)
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* |RGBMOD|RGBTOG| | | | | | Ú | Í | Ó | Ő | Ű |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* |DM_stp| | | LCTRL| | | Left | Down | Up | Right| | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* |DM_REC| | | | | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | LShft| | | | | | | QK_BOOT|
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_VIM] = LAYOUT(
|
||||
RGB_MOD, RGB_TOG, _______, _______, _______, _______, _______, KC_RBRC, KC_NUBS, KC_EQL , KC_LBRC, KC_NUHS,
|
||||
_______, _______, _______, KC_LCTL, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, KC_LSFT, _______, _______, _______, _______, _______, _______, QK_BOOT
|
||||
)
|
||||
|
||||
|
||||
};
|
||||
|
||||
// define variables for reactive RGB
|
||||
bool RGB_INIT = false;
|
||||
bool TOG_STATUS = false;
|
||||
int RGB_current_mode;
|
||||
|
||||
void persistent_default_layer_set(uint16_t default_layer) {
|
||||
eeconfig_update_default_layer(default_layer);
|
||||
default_layer_set(default_layer);
|
||||
}
|
||||
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
uint8_t layer = get_highest_layer(layer_state);
|
||||
switch (layer) {
|
||||
case _NAV:
|
||||
if (RGB_INIT) {} else {
|
||||
RGB_current_mode = rgblight_config.mode;
|
||||
RGB_INIT = true;
|
||||
}
|
||||
if (TOG_STATUS) { //TOG_STATUS checks is another reactive key currently pressed, only changes RGB mode if returns false
|
||||
} else {
|
||||
TOG_STATUS = !TOG_STATUS;
|
||||
rgblight_mode(29);
|
||||
}
|
||||
break;
|
||||
case _LOWER:
|
||||
if (RGB_INIT) {} else {
|
||||
RGB_current_mode = rgblight_config.mode;
|
||||
RGB_INIT = true;
|
||||
}
|
||||
if (TOG_STATUS) { //TOG_STATUS checks is another reactive key currently pressed, only changes RGB mode if returns false
|
||||
} else {
|
||||
TOG_STATUS = !TOG_STATUS;
|
||||
rgblight_mode(29);
|
||||
}
|
||||
break;
|
||||
case _QWERTY:
|
||||
if (RGB_INIT) {} else {
|
||||
RGB_current_mode = rgblight_config.mode;
|
||||
RGB_INIT = true;
|
||||
}
|
||||
rgblight_mode(RGB_current_mode); // revert RGB to initial mode prior to RGB mode change
|
||||
TOG_STATUS = false;
|
||||
break;
|
||||
}
|
||||
};
|
|
@ -1,3 +0,0 @@
|
|||
RGBLIGHT_ENABLE = yes
|
||||
NKRO_ENABLE = yes
|
||||
|
|
@ -1,52 +0,0 @@
|
|||
/*
|
||||
Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) 2020 Max Drasbeck
|
||||
*
|
||||
* You are free to:
|
||||
*
|
||||
* Share — copy and redistribute the material in any medium or format
|
||||
* Adapt — remix, transform, and build upon the material
|
||||
* for any purpose, even commercially.
|
||||
*
|
||||
* The licensor cannot revoke these freedoms as long as you follow the license terms.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
//#define USE_MATRIX_I2C
|
||||
|
||||
/* Select hand configuration */
|
||||
|
||||
#define MASTER_LEFT
|
||||
// #define MASTER_RIGHT
|
||||
// #define EE_HANDS
|
||||
|
||||
#define ENCODERS_PAD_A { F4 }
|
||||
#define ENCODERS_PAD_B { F5 }
|
||||
#define ENCODER_RESOLUTION 4
|
||||
|
||||
#define QUICK_TAP_TERM 0
|
||||
#define TAPPING_TERM 180
|
||||
|
||||
#undef RGBLED_NUM
|
||||
#define RGBLIGHT_EFFECT_BREATHING
|
||||
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
|
||||
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
|
||||
#define RGBLIGHT_EFFECT_SNAKE
|
||||
#define RGBLIGHT_EFFECT_KNIGHT
|
||||
#define RGBLIGHT_EFFECT_CHRISTMAS
|
||||
#define RGBLIGHT_EFFECT_STATIC_GRADIENT
|
||||
#define RGBLIGHT_EFFECT_RGB_TEST
|
||||
#define RGBLIGHT_EFFECT_ALTERNATING
|
||||
#define RGBLIGHT_EFFECT_TWINKLE
|
||||
#define RGBLED_NUM 27
|
||||
#define RGBLIGHT_LIMIT_VAL 120
|
||||
#define RGBLIGHT_HUE_STEP 10
|
||||
#define RGBLIGHT_SAT_STEP 17
|
||||
#define RGBLIGHT_VAL_STEP 17
|
||||
|
||||
// Underglow
|
||||
/*
|
||||
#undef RGBLED_NUM
|
||||
#define RGBLED_NUM 14 // Number of LEDs
|
||||
#define RGBLIGHT_SLEEP
|
||||
*/
|
|
@ -1,168 +0,0 @@
|
|||
/* Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) 2020 Max Drasbeck
|
||||
*
|
||||
* You are free to:
|
||||
*
|
||||
* Share — copy and redistribute the material in any medium or format
|
||||
* Adapt — remix, transform, and build upon the material
|
||||
* for any purpose, even commercially.
|
||||
*
|
||||
* The licensor cannot revoke these freedoms as long as you follow the license terms.
|
||||
*/
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
extern uint8_t is_master;
|
||||
|
||||
enum layers {
|
||||
_QWERTY,
|
||||
_LOWER,
|
||||
_RAISE,
|
||||
_ADJUST,
|
||||
};
|
||||
|
||||
enum custom_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
LOWER,
|
||||
RAISE,
|
||||
ADJUST,
|
||||
};
|
||||
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
[_QWERTY] = LAYOUT(
|
||||
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_LBRC,
|
||||
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_NO, KC_MUTE, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SC_SENT,
|
||||
KC_LALT, KC_LGUI, MO(1), KC_SPC, KC_SPC, MO(2), KC_NUBS, KC_LCTL
|
||||
),
|
||||
|
||||
[_LOWER] = LAYOUT(
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL,
|
||||
KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PGUP, KC_MINS, KC_EQL, KC_RBRC,
|
||||
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_NO, KC_HOME, KC_PGDN, KC_END, KC_NO, KC_NUHS,
|
||||
KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_INT1, KC_ENT,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
|
||||
[_RAISE] = LAYOUT(
|
||||
KC_TRNS, RALT(KC_1), RALT(KC_2), RALT(KC_3), RALT(KC_4), RALT(KC_5), RALT(KC_6), RALT(KC_7), RALT(KC_8), RALT(KC_9), RALT(KC_0), KC_DEL,
|
||||
KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_UP, KC_MINS, KC_EQL, KC_RBRC,
|
||||
KC_ESC, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_RGHT, KC_NO, KC_NUHS,
|
||||
KC_LSFT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_VOLD, KC_VOLU, KC_MUTE, KC_INT1, SC_SENT,
|
||||
KC_RALT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RALT(KC_NUBS), KC_TRNS
|
||||
),
|
||||
|
||||
[_ADJUST] = LAYOUT(
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______
|
||||
)
|
||||
};
|
||||
|
||||
int RGB_current_mode;
|
||||
|
||||
void matrix_init_user(void) {
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
RGB_current_mode = rgblight_config.mode;
|
||||
#endif
|
||||
}
|
||||
|
||||
//SSD1306 OLED update loop, make sure to enable OLED_ENABLE=yes in rules.mk
|
||||
#ifdef OLED_ENABLE
|
||||
|
||||
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
|
||||
if (!is_keyboard_master())
|
||||
return OLED_ROTATION_180; // flips the display 180 degrees if offhand
|
||||
return rotation;
|
||||
}
|
||||
|
||||
// When you add source files to SRC in rules.mk, you can use functions.
|
||||
const char *read_layer_state(void);
|
||||
const char *read_logo(void);
|
||||
void set_keylog(uint16_t keycode, keyrecord_t *record);
|
||||
//const char *read_keylog(void);
|
||||
//const char *read_keylogs(void);
|
||||
|
||||
// const char *read_mode_icon(bool swap);
|
||||
// const char *read_host_led_state(void);
|
||||
// void set_timelog(void);
|
||||
// const char *read_timelog(void);
|
||||
|
||||
bool oled_task_user(void) {
|
||||
if (is_keyboard_master()) {
|
||||
// If you want to change the display of OLED, you need to change here
|
||||
oled_write_ln(read_layer_state(), false);
|
||||
//oled_write_ln(read_keylog(), false);
|
||||
//oled_write_ln(read_keylogs(), false);
|
||||
//oled_write_ln(read_mode_icon(keymap_config.swap_lalt_lgui), false);
|
||||
//oled_write_ln(read_host_led_state(), false);
|
||||
//oled_write_ln(read_timelog(), false);
|
||||
} else {
|
||||
oled_write(read_logo(), false);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
#endif // OLED_ENABLE
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
if (record->event.pressed) {
|
||||
#ifdef OLED_ENABLE
|
||||
set_keylog(keycode, record);
|
||||
#endif
|
||||
// set_timelog();
|
||||
}
|
||||
|
||||
switch (keycode) {
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_QWERTY);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case LOWER:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_LOWER);
|
||||
} else {
|
||||
layer_off(_LOWER);
|
||||
}
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
return false;
|
||||
break;
|
||||
case RAISE:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_RAISE);
|
||||
} else {
|
||||
layer_off(_RAISE);
|
||||
}
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
return false;
|
||||
break;
|
||||
case ADJUST:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_ADJUST);
|
||||
} else {
|
||||
layer_off(_ADJUST);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef ENCODER_ENABLE
|
||||
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
// index 1 == minion side
|
||||
if (index == 1) {
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLD);
|
||||
} else {
|
||||
tap_code(KC_VOLU);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif
|
|
@ -1,14 +0,0 @@
|
|||
## Danish (Dansk) layout for the Lily58 Pro
|
||||
Keyboard: Lily58 Pro
|
||||
Keys: Lily58 Pro is 6×4+5keys column-staggered split keyboard, optinal with a rotary encoder.
|
||||
Flash instructions: Flash each side of the keyboard, minding whether the side uses a Pro Micro or Elite-C controller.
|
||||
|
||||
### Layout
|
||||
Danish special characters on main layer, moving other characters to mainly raised layer.
|
||||
|
||||
Layer 0 = default
|
||||
Layer 1 = lower
|
||||
Layer 2 = raise
|
||||
|
||||
![keymap](https://drasbeck.dk/public/keymap_lily58pro_danskish.png)
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
# Build Options
|
||||
# change yes to no to disable
|
||||
#
|
||||
BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
|
||||
MOUSEKEY_ENABLE = no # Mouse keys
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||
CONSOLE_ENABLE = no # Console for debug
|
||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||
NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||
AUDIO_ENABLE = no # Audio output
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth
|
||||
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
||||
SWAP_HANDS_ENABLE = no # Enable one-hand typing
|
||||
OLED_ENABLE = yes
|
||||
ENCODER_ENABLE = yes # Enable encoder
|
||||
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
|
||||
# If you want to change the display of OLED, you need to change here
|
||||
SRC += ./lib/rgb_state_reader.c \
|
||||
./lib/layer_state_reader.c \
|
||||
./lib/logo_reader.c \
|
||||
./lib/keylogger.c \
|
||||
# ./lib/mode_icon_reader.c \
|
||||
# ./lib/host_led_state_reader.c \
|
||||
# ./lib/timelogger.c \
|
|
@ -1,54 +0,0 @@
|
|||
/*
|
||||
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
|
||||
|
||||
#define _QWERTY 0
|
||||
#define _NMBR 1
|
||||
#define _NAV 2
|
||||
#define _MOUSE 3
|
||||
#define _FUNCT 4
|
||||
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_QWERTY] = LAYOUT_split_space(
|
||||
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, LT(_FUNCT, 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_LCTL, KC_LGUI, KC_LALT, LT(_NAV, KC_SPC), KC_BSPC, KC_RALT, TT(_MOUSE), TT(_NMBR)
|
||||
),
|
||||
[_NAV] = LAYOUT_split_space(
|
||||
_______, _______, KC_UP, _______, KC_LPRN, KC_RPRN, _______, KC_7, KC_8, KC_9, KC_KP_SLASH, KC_DEL,
|
||||
_______, KC_LEFT, KC_DOWN, KC_RIGHT, KC_LCBR, KC_RCBR, _______, KC_4, KC_5, KC_6, KC_KP_ASTERISK,
|
||||
_______, _______, _______, _______, KC_LABK, KC_RABK, KC_GRV, KC_1, KC_2, KC_3, KC_KP_MINUS,
|
||||
_______, _______, _______, _______, _______, _______, KC_KP_DOT, KC_KP_PLUS
|
||||
),
|
||||
[_NMBR] = LAYOUT_split_space(
|
||||
KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS,
|
||||
_______, KC_4, KC_5, KC_6, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, KC_7, KC_8, KC_9, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, TO(_QWERTY), _______, _______, _______
|
||||
),
|
||||
[_MOUSE] = LAYOUT_split_space(
|
||||
_______, KC_BTN1, KC_MS_U, KC_BTN2, _______, _______, _______, _______, KC_WH_U, _______, _______, _______,
|
||||
_______, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, _______, KC_WH_L, KC_WH_D, KC_WH_R, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, TO(_QWERTY), _______, _______, _______
|
||||
),
|
||||
[_FUNCT] = LAYOUT_split_space(
|
||||
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_INS, KC_HOME, KC_PGUP, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, KC_DEL, KC_END, KC_PGDN, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, RGB_TOG, RGB_MOD, _______, _______, QK_BOOT
|
||||
)
|
||||
};
|
|
@ -1,47 +0,0 @@
|
|||
/*
|
||||
Copyright 2018 Jordi Pakey-Rodriguez
|
||||
|
||||
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
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
[0] = LAYOUT(
|
||||
LT(1, KC_NUM), KC_PSLS, KC_PAST, KC_PMNS,
|
||||
KC_P7, KC_P8, KC_P9, KC_PPLS,
|
||||
KC_P4, KC_P5, KC_P6, KC_PEQL,
|
||||
KC_P1, KC_P2, KC_P3, KC_TAB,
|
||||
KC_PCMM, KC_P0, KC_PDOT, KC_PENT
|
||||
),
|
||||
|
||||
[1] = LAYOUT(
|
||||
_______, QK_BOOT, BL_STEP, RGB_TOG,
|
||||
RGB_HUI, RGB_SAI, RGB_VAI, RGB_MOD,
|
||||
RGB_HUD, RGB_SAD, RGB_VAD, RGB_RMOD,
|
||||
RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW,
|
||||
RGB_M_SN, RGB_M_K, RGB_M_X, RGB_M_G
|
||||
),
|
||||
|
||||
};
|
||||
|
||||
bool led_update_user(led_t led_state) {
|
||||
if (led_state.num_lock) {
|
||||
// Illuminate the LED under the Num Lock key
|
||||
rgblight_sethsv_at(0, 0, 127, 1);
|
||||
} else {
|
||||
rgblight_sethsv_at(0, 0, 0, 1);
|
||||
}
|
||||
return false;
|
||||
}
|
|
@ -1,30 +0,0 @@
|
|||
Ergonomic Colemak Keymap
|
||||
========================
|
||||
An ergonomically optimized Colemak keymap for the grid-layout Preonic
|
||||
|
||||
Modes
|
||||
----------
|
||||
|
||||
#### Colemak
|
||||
|
||||
> Base layer
|
||||
|
||||
- All alphanumerics and symbols available on the base layer
|
||||
|
||||
----------
|
||||
|
||||
#### Game
|
||||
|
||||
> QWERTY layout for use with games or number entry
|
||||
|
||||
- Standard QWERTY layout
|
||||
- Integrated right-hand numpad in phone layout
|
||||
|
||||
----------
|
||||
|
||||
#### Function (Raise)
|
||||
|
||||
> Functions and mode switching
|
||||
|
||||
- Turns NEIO into arrow cluster, with nav cluster below (Home, Page Down, Page Up, End)
|
||||
- Reset key at lower left (Esc)
|
|
@ -1,9 +0,0 @@
|
|||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
#include "../../config.h"
|
||||
|
||||
#undef BACKLIGHT_LEVELS
|
||||
#define BACKLIGHT_LEVELS 5
|
||||
|
||||
#endif
|
|
@ -1,137 +0,0 @@
|
|||
#include QMK_KEYBOARD_H
|
||||
|
||||
// Layer names
|
||||
#define _COLEMAK 0
|
||||
#define _GAME 1
|
||||
#define _RAISE 2
|
||||
|
||||
enum preonic_keycodes {
|
||||
COLEMAK = SAFE_RANGE,
|
||||
GAME,
|
||||
RAISE
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Colemak
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | \ |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | = | Q | W | F | P | G | J | L | U | Y | [ | ] |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | - | A | R | S | T | D | H | N | E | I | O | ' |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | ; | Z | X | C | V | B | K | M | , | . | / | ENTER|
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | ESC | ALT | GUI | SHIFT| CTRL | BKSP | SPACE| RAISE| SHIFT| | DEL | TAB |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_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_BSLS,
|
||||
KC_EQL ,KC_Q ,KC_W ,KC_F ,KC_P ,KC_G ,KC_J ,KC_L ,KC_U ,KC_Y ,KC_LBRC,KC_RBRC,
|
||||
KC_MINS,KC_A ,KC_R ,KC_S ,KC_T ,KC_D ,KC_H ,KC_N ,KC_E ,KC_I ,KC_O ,KC_QUOT,
|
||||
KC_SCLN,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_K ,KC_M ,KC_COMM,KC_DOT ,KC_SLSH,KC_ENT,
|
||||
KC_ESC ,KC_LALT,KC_LGUI,KC_LSFT,KC_LCTL,KC_BSPC,KC_SPC ,RAISE ,KC_RSFT,_______,KC_DEL ,KC_TAB
|
||||
),
|
||||
|
||||
/* Game
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 |NUM LK| ÷ | × | - |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+
|
||||
* | TAB | Q | W | E | R | T | Y | U | 1 | 2 | 3 | + |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+
|
||||
* | CTRL | A | S | D | F | G | H | J | 4 | 5 | 6 | = |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+
|
||||
* | SHIFT| Z | X | C | V | B | N | M | 7 | 8 | 9 | ENTER|
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+
|
||||
* | | ALT | GUI | SPACE| CTRL | BKSP | SPACE| RAISE| , | 0 | . | TAB |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_GAME] = LAYOUT_preonic_grid(
|
||||
KC_ESC ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 ,KC_6 ,KC_7 ,KC_NUM ,KC_PSLS,KC_PAST,KC_PMNS,
|
||||
KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_Y ,KC_U ,KC_P1 ,KC_P2 ,KC_P3 ,KC_PPLS,
|
||||
KC_LCTL,KC_A ,KC_S ,KC_D ,KC_F ,KC_G ,KC_H ,KC_J ,KC_P4 ,KC_P5 ,KC_P6 ,KC_PEQL,
|
||||
KC_LSFT,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_N ,KC_M ,KC_P7 ,KC_P8 ,KC_P9 ,KC_PENT,
|
||||
XXXXXXX,KC_LALT,KC_LGUI,KC_SPC ,KC_LCTL,KC_BSPC,KC_SPC ,RAISE ,KC_PCMM,KC_P0 ,KC_PDOT,KC_TAB
|
||||
),
|
||||
|
||||
/* Raise
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | SLEEP| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 |PRTSCR|
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | SYM | F11 | F12 | |AU TOG| VOL+ |BL INC|COLMAK| GAME | MUSIC| MENU |SCRLCK|
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | CAPS | PREV | STOP | PLAY | NEXT | VOL- |BL DEC| LEFT | DOWN | UP | RIGHT| PAUSE|
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | BACK | STOP | RFRSH| FRWRD| MUTE |BL TOG| HOME | PGDN | PGUP | END |INSERT|
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | QK_BOOT| | | | | DEL | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_RAISE] = LAYOUT_preonic_grid(
|
||||
KC_SLEP,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 ,KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_PSCR,
|
||||
XXXXXXX,KC_F11 ,KC_F12 ,XXXXXXX,AU_TOGG,KC_VOLU,BL_UP ,COLEMAK,GAME ,MU_TOGG,KC_MENU,KC_SCRL,
|
||||
KC_CAPS,KC_MPRV,KC_MSTP,KC_MPLY,KC_MNXT,KC_VOLD,BL_DOWN,KC_LEFT,KC_DOWN,KC_UP ,KC_RGHT,KC_PAUS,
|
||||
XXXXXXX,KC_WBAK,KC_WSTP,KC_WREF,KC_WFWD,KC_MUTE,BL_TOGG,KC_HOME,KC_PGDN,KC_PGUP,KC_END ,KC_INS,
|
||||
QK_BOOT,_______,_______,_______,_______,KC_DEL ,_______,_______,_______,_______,_______,_______
|
||||
)
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
float tone_colemak[][2] = SONG(COLEMAK_SOUND);
|
||||
float tone_game[][2] = {
|
||||
{NOTE_E6, 10} ,{NOTE_E6, 10} ,{NOTE_REST, 10} ,{NOTE_E6, 10} ,
|
||||
{NOTE_REST, 10} ,{NOTE_C6, 10} ,{NOTE_E6, 10} ,{NOTE_REST, 10} ,
|
||||
{NOTE_G6, 10} ,{NOTE_REST, 30},
|
||||
{NOTE_G5, 10} ,{NOTE_REST, 30}
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
void matrix_init_user(void) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
startup_user();
|
||||
#endif
|
||||
}
|
||||
|
||||
void persistent_default_layer_set(uint16_t default_layer) {
|
||||
eeconfig_update_default_layer(default_layer);
|
||||
default_layer_set(default_layer);
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case COLEMAK:
|
||||
if (record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(tone_colemak);
|
||||
#endif
|
||||
persistent_default_layer_set(1UL<<_COLEMAK);
|
||||
}
|
||||
break;
|
||||
case GAME:
|
||||
if (record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(tone_game);
|
||||
#endif
|
||||
persistent_default_layer_set(1UL<<_GAME);
|
||||
}
|
||||
break;
|
||||
case RAISE:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_RAISE);
|
||||
} else {
|
||||
layer_off(_RAISE);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return true;
|
||||
break;
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
|
@ -1,18 +0,0 @@
|
|||
# Build Options
|
||||
|
||||
BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
||||
MIDI_ENABLE = no # MIDI controls
|
||||
AUDIO_ENABLE = yes # Audio output on port C6
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
||||
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
|
|
@ -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
|
|
@ -1,80 +0,0 @@
|
|||
[
|
||||
{
|
||||
"name": "Plank Don Gato Programming Raise Layer"
|
||||
},
|
||||
[
|
||||
{
|
||||
"a": 7
|
||||
},
|
||||
"F1",
|
||||
"F2",
|
||||
"F3",
|
||||
"F4",
|
||||
"F5",
|
||||
"F6",
|
||||
"F7",
|
||||
"F8",
|
||||
"F9",
|
||||
"F10",
|
||||
"F11",
|
||||
"F12"
|
||||
],
|
||||
[
|
||||
"",
|
||||
"Reset",
|
||||
"Debug",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"Term On",
|
||||
"Term Off",
|
||||
"",
|
||||
"",
|
||||
""
|
||||
],
|
||||
[
|
||||
"",
|
||||
"",
|
||||
"Mu Mod",
|
||||
"Audio On",
|
||||
"Audio Off",
|
||||
"AG Norm",
|
||||
"AG Swap",
|
||||
"Qwerty",
|
||||
"Colemak",
|
||||
"Dvorak",
|
||||
"",
|
||||
""
|
||||
],
|
||||
[
|
||||
"",
|
||||
"Voice -",
|
||||
"Voice +",
|
||||
"Music On",
|
||||
"Music Off",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
""
|
||||
],
|
||||
[
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
{
|
||||
"w": 2
|
||||
},
|
||||
"",
|
||||
"",
|
||||
"Next",
|
||||
"Vol -",
|
||||
"Vol +",
|
||||
"Play"
|
||||
]
|
||||
]
|
|
@ -1,80 +0,0 @@
|
|||
[
|
||||
{
|
||||
"name": "Plank Don Gato Programming Lower Layer"
|
||||
},
|
||||
[
|
||||
{
|
||||
"a": 7
|
||||
},
|
||||
"Print Screen",
|
||||
"Page Up",
|
||||
"Page Down",
|
||||
"Home",
|
||||
"End",
|
||||
"Insert",
|
||||
"Scroll Lock",
|
||||
"Num Lock",
|
||||
"Pause",
|
||||
"]",
|
||||
"[",
|
||||
"-"
|
||||
],
|
||||
[
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"Delete"
|
||||
],
|
||||
[
|
||||
"Caps Lock",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
""
|
||||
],
|
||||
[
|
||||
"Right Shift",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"\\",
|
||||
"Menu"
|
||||
],
|
||||
[
|
||||
"Right Ctrl",
|
||||
"Right Alt",
|
||||
"Right Os",
|
||||
"",
|
||||
"",
|
||||
{
|
||||
"w": 2
|
||||
},
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
""
|
||||
]
|
||||
]
|
|
@ -1,95 +0,0 @@
|
|||
[
|
||||
{
|
||||
"name": "Plank Don Gato Programming Main Layer"
|
||||
},
|
||||
[
|
||||
{
|
||||
"a": 5
|
||||
},
|
||||
"~\n`",
|
||||
"!\n1",
|
||||
"@\n2",
|
||||
"#\n3",
|
||||
"$\n4",
|
||||
"%\n5",
|
||||
"^\n6",
|
||||
"&\n7",
|
||||
"*\n8",
|
||||
"(\n9",
|
||||
")\n0",
|
||||
"+\n="
|
||||
],
|
||||
[
|
||||
{
|
||||
"a": 7
|
||||
},
|
||||
"Tab",
|
||||
"Q",
|
||||
"W",
|
||||
"E",
|
||||
"R",
|
||||
"T",
|
||||
"Y",
|
||||
"U",
|
||||
"I",
|
||||
"O",
|
||||
"P",
|
||||
"Back Space"
|
||||
],
|
||||
[
|
||||
"Esc",
|
||||
"A",
|
||||
"S",
|
||||
"D",
|
||||
"F",
|
||||
"G",
|
||||
"H",
|
||||
"J",
|
||||
"K",
|
||||
"L",
|
||||
{
|
||||
"a": 5
|
||||
},
|
||||
":\n;",
|
||||
"\"\n'"
|
||||
],
|
||||
[
|
||||
{
|
||||
"a": 7
|
||||
},
|
||||
"Shift",
|
||||
"Z",
|
||||
"X",
|
||||
"C",
|
||||
"V",
|
||||
"B",
|
||||
"N",
|
||||
"M",
|
||||
{
|
||||
"a": 5
|
||||
},
|
||||
"<\n,",
|
||||
">\n.",
|
||||
{
|
||||
"a": 7
|
||||
},
|
||||
"/",
|
||||
"Return"
|
||||
],
|
||||
[
|
||||
"Ctrl",
|
||||
"Alt",
|
||||
"OS",
|
||||
"Super",
|
||||
"⇓",
|
||||
{
|
||||
"w": 2
|
||||
},
|
||||
"",
|
||||
"⇑",
|
||||
"←",
|
||||
"↓",
|
||||
"↑",
|
||||
"→"
|
||||
]
|
||||
]
|
|
@ -1,80 +0,0 @@
|
|||
[
|
||||
{
|
||||
"name": "Plank Don Gato Programming Raise Layer"
|
||||
},
|
||||
[
|
||||
{
|
||||
"a": 7
|
||||
},
|
||||
"Print Screen",
|
||||
"Page Up",
|
||||
"Page Down",
|
||||
"Home",
|
||||
"End",
|
||||
"Insert",
|
||||
"Scroll Lock",
|
||||
"Num Lock",
|
||||
"Pause",
|
||||
"{",
|
||||
"}",
|
||||
"_"
|
||||
],
|
||||
[
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"Delete"
|
||||
],
|
||||
[
|
||||
"Caps Lock",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
""
|
||||
],
|
||||
[
|
||||
"Right Shift",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"|",
|
||||
"Menu"
|
||||
],
|
||||
[
|
||||
"Right Ctrl",
|
||||
"Right Alt",
|
||||
"Right Os",
|
||||
"",
|
||||
"",
|
||||
{
|
||||
"w": 2
|
||||
},
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
""
|
||||
]
|
||||
]
|
|
@ -1,328 +0,0 @@
|
|||
/* Copyright 2020 Alex Daigre
|
||||
* Modified from layout provided by Jack Humbert
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "muse.h"
|
||||
|
||||
enum preonic_layers {
|
||||
_QWERTY,
|
||||
_COLEMAK,
|
||||
_DVORAK,
|
||||
_LOWER,
|
||||
_RAISE,
|
||||
_ADJUST
|
||||
};
|
||||
|
||||
enum preonic_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
COLEMAK,
|
||||
DVORAK,
|
||||
LOWER,
|
||||
RAISE,
|
||||
BACKLIT,
|
||||
ADJUST
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Qwerty
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | = |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Esc | A | S | D | F | G | H | J | K | L | ; | " |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Ctrl | Alt | GUI |Adjust| Lower| Space |Raise | Left | Down | Up |Right |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_QWERTY] = LAYOUT_preonic_grid(
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQUAL,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
|
||||
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
|
||||
KC_LCTL, KC_LALT, KC_LGUI, ADJUST, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
|
||||
),
|
||||
|
||||
/* Colemak
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | = |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Esc | A | R | S | T | D | H | N | E | I | O | " |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | K | M | , | . | / |Enter |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Ctrl | Alt | GUI |Adjust| Lower| Space |Raise | Left | Down | Up |Right |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_COLEMAK] = LAYOUT_preonic_grid(
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQUAL,
|
||||
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC,
|
||||
KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
|
||||
KC_LCTL, KC_LALT, KC_LGUI, ADJUST, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
|
||||
),
|
||||
|
||||
/* Dvorak
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | = |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Esc | A | O | E | U | I | D | H | T | N | S | / |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Ctrl | Alt | GUI |Adjust| Lower| Space |Raise | Left | Down | Up |Right |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_DVORAK] = LAYOUT_preonic_grid(
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQUAL,
|
||||
KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC,
|
||||
KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH,
|
||||
KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT,
|
||||
KC_LCTL, KC_LALT, KC_LGUI, ADJUST, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
|
||||
),
|
||||
|
||||
/* Lower
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* |PrtScr| PgUp | PgDw | Home | End |Insert|ScrlLk|NumLck|Pause | [ | ] | - |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | Del |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Caps | | | | | | | | | | | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | \ | Menu |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* |RCtrl | RAlt | RGui | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_LOWER] = LAYOUT_preonic_grid(
|
||||
KC_PSCR, KC_PGUP, KC_PGDN, KC_HOME, KC_END, KC_INSERT, KC_SCRL, KC_NUM, KC_PAUSE, KC_LBRC, KC_RBRC, KC_MINUS,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DELETE,
|
||||
KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
KC_RSFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BSLS, KC_MENU,
|
||||
KC_RCTL, KC_RALT, KC_RGUI, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
/* Raise
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* |PrtScr| PgUp | PgDw | Home | End |Insert|ScrlLk|NumLck|Pause | { | } | _ |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | Del |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Caps | | | | | | | | | | | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | | Menu |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* |RCtrl | RAlt | RGui | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_RAISE] = LAYOUT_preonic_grid(
|
||||
KC_PSCR, KC_PGUP, KC_PGDN, KC_HOME, KC_END, KC_INSERT, KC_SCRL, KC_NUM, KC_PAUSE, KC_LEFT_CURLY_BRACE, KC_RIGHT_CURLY_BRACE, KC_UNDERSCORE,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DELETE,
|
||||
KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
KC_RSFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PIPE, KC_MENU,
|
||||
KC_RCTL, KC_RALT, KC_RGUI, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
/* Adjust (Lower + Raise)
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | Reset| | | | | | | | | | Del |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | | | |Aud on|AudOff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Light| | | | | | | Next | Vol- | Vol+ | Play |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_ADJUST] = LAYOUT_preonic_grid(
|
||||
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
|
||||
_______, QK_BOOT, DB_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, 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, _______, _______, _______, _______, _______,
|
||||
BACKLIT, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
|
||||
)
|
||||
|
||||
|
||||
};
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_QWERTY);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case COLEMAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_COLEMAK);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case DVORAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_DVORAK);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case ADJUST:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_RAISE);
|
||||
layer_on(_LOWER);
|
||||
layer_on(_ADJUST);
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
} else {
|
||||
layer_off(_RAISE);
|
||||
layer_off(_LOWER);
|
||||
layer_off(_ADJUST);
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case LOWER:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_LOWER);
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
} else {
|
||||
layer_off(_LOWER);
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case RAISE:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_RAISE);
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
} else {
|
||||
layer_off(_RAISE);
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case BACKLIT:
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_RSFT);
|
||||
#ifdef BACKLIGHT_ENABLE
|
||||
backlight_step();
|
||||
#endif
|
||||
#ifdef __AVR__
|
||||
writePinLow(E6);
|
||||
#endif
|
||||
} else {
|
||||
unregister_code(KC_RSFT);
|
||||
#ifdef __AVR__
|
||||
writePinHigh(E6);
|
||||
#endif
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
bool muse_mode = false;
|
||||
uint8_t last_muse_note = 0;
|
||||
uint16_t muse_counter = 0;
|
||||
uint8_t muse_offset = 70;
|
||||
uint16_t muse_tempo = 50;
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
|
@ -1,19 +0,0 @@
|
|||
[Layout Images](https://imgur.com/a/k95XQlP)
|
||||
|
||||
# Alex Daigre's programming Layout
|
||||
|
||||
The default Preonic layout is suited to general english typing but not very convent to program on. This is my custom layout to re-optimise the keyboard for programming tasks.
|
||||
I have been programming with this keyboard layout at work and I found it much faster and easier to adjust to than the default layout.
|
||||
|
||||
- Removed keys on the RAISE, LOWER, and ADJUST layers that duplicated keys on the main QWERTY layout.
|
||||
- Moved the control, alt, and gui keys to a more natural position.
|
||||
- Added the Caps-lock key on RAISE and LOWER in its position on a standard keyboard.
|
||||
- Moved {}[], -_, and \| (on RAISE and LOWER) to be close to to similar keys on the QWERTY layout to make them easier to remember. They are kept as close as possible to their locations on a standard layout so users won't have to ADJUST their muscle memory much.
|
||||
- (), {}, and [] are all on the 9 and 0 keys. This is where () are placed naturally, so it is easy to find all of your braces.
|
||||
- -_ are moved to the += key. Now you can remember that -, +, and = are all together. The keys are also right next to each-other on a standard layout, so it is a very small move.
|
||||
- \ and | have beeb moved to the /? key. Easy to remember as / and \ are together.
|
||||
- Moved backspace to make room for +=.
|
||||
- Added delete to the backspace key on RAISE / LOWER
|
||||
- Removed backlight, from the main layer, and added an ADJUST key. As the Massdrop kits don't come with backlighting default, I think this is more useful for most users.
|
||||
- I have left the Colemak and Dvorak alternate layouts, but they won't map up as conveniently to the other layers.
|
||||
- I have included the keyboard layouts so that those wishing to make modifications or new versions of this layout can quickly update their images.
|
|
@ -1 +0,0 @@
|
|||
SRC += muse.c
|
|
@ -1,38 +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 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
|
||||
|
||||
#endif
|
|
@ -1,252 +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,
|
||||
_COLEMAK,
|
||||
_DVORAK,
|
||||
_NUMPAD,
|
||||
_LOWER,
|
||||
_RAISE,
|
||||
_ADJUST
|
||||
};
|
||||
|
||||
enum preonic_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
COLEMAK,
|
||||
DVORAK,
|
||||
NUMPAD,
|
||||
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 |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Bksp | A | S | D | F | G | H | J | K | L | ; | " |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | N | M | , | . | / | Shift|
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | | Alt | Ctrl | Shift|
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_QWERTY] = LAYOUT_preonic_1x2uC(
|
||||
KC_GRV, KC_1, KC_2, KC_5, 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_BSPC, 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,
|
||||
BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, RAISE, _______, KC_RALT, KC_RCTL, KC_RSFT
|
||||
),
|
||||
|
||||
/* Colemak
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Bksp | A | R | S | T | D | H | N | E | I | O | " |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | K | M | , | . | / | Shift|
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | | Alt | Ctrl | Shift|
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_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_BSPC, 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_RSFT,
|
||||
BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, RAISE, _______, KC_RALT, KC_RCTL, KC_RSFT
|
||||
),
|
||||
|
||||
/* Dvorak
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Bksp | A | O | E | U | I | D | H | T | N | S | / |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| ; | Q | J | K | X | B | M | W | V | Z | Shift|
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | | Alt | Ctrl | Shift|
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_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_BSPC, 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_RSFT,
|
||||
BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, RAISE, _______, KC_RALT, KC_RCTL, KC_RSFT
|
||||
),
|
||||
|
||||
/* Numpad
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | Esc | | | PgDn | PgUp | Home | End | | / | * | - | Del |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Tab | | Up | | | | | 7 | 8 | 9 | + | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Bksp | Left | Down | Right| | | | 4 | 5 | 6 | | " |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| | | | | | , | 1 | 2 | 3 | | Shift|
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | 0 | . | Ctrl | Shift|
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_NUMPAD] = LAYOUT_preonic_1x2uC(
|
||||
KC_ESC, _______, _______, KC_PGDN, KC_PGUP, KC_END, KC_HOME, _______, KC_PSLS, KC_PAST, KC_PMNS, KC_DEL,
|
||||
KC_TAB, _______, KC_UP, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, KC_PPLS, KC_BSPC,
|
||||
KC_BSPC, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, KC_P4, KC_P5, KC_P6, _______, KC_QUOT,
|
||||
KC_LSFT, _______, _______, _______, _______, _______, KC_COMM, KC_P1, KC_P2, KC_P3, _______, KC_RSFT,
|
||||
BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, RAISE, KC_P0, KC_PDOT, KC_RCTL, KC_RSFT
|
||||
),
|
||||
|
||||
|
||||
/* Lower
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Esc | | Up | | | | | -_ | - | + | = | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Bksp| Left | Down | Right| | | | { | } | [ | ] | \ |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| | | | | | | | | | ¢ | € | Shift|
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Brite| Ctrl | Alt | GUI |Lower | Enter |Raise | | Alt | Ctrl | Shift|
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_LOWER] = 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,
|
||||
KC_ESC, _______, KC_UP, _______, _______, _______, _______, KC_UNDS, KC_MINS, KC_PLUS, KC_EQL, KC_BSPC,
|
||||
KC_BSPC, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, KC_LCBR, KC_RCBR, KC_LBRC, KC_RBRC, KC_BSLS,
|
||||
KC_LSFT, KC_PIPE, _______, _______, _______, _______, _______, _______, ALGR_T(KC_4), ALGR_T(KC_5), _______, KC_RSFT,
|
||||
BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_ENT, RAISE, _______, KC_RALT, KC_RCTL, KC_RSFT
|
||||
),
|
||||
|
||||
/* Raise
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Esc | | Up | | | | | - | _ | = | + | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Bksp | Left | Down | Right| | | | [ | ] | { | } | | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| \ | | | | | | | | £ | $ | Shift|
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Brite| Ctrl | Alt | GUI |Lower | Enter |Raise | | Alt | Ctrl | Shift|
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_RAISE] = 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,
|
||||
KC_ESC, _______, KC_UP, _______, _______, _______, _______, KC_MINS, KC_UNDS, KC_EQL, KC_PLUS, KC_BSPC,
|
||||
KC_BSPC, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, KC_PIPE,
|
||||
KC_LSFT, KC_BSLS, _______, _______, _______, _______, _______, _______, _______, ALGR_T(KC_DLR), KC_DLR, KC_RSFT,
|
||||
BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_ENT, RAISE, _______, KC_RALT, KC_RCTL, KC_RSFT
|
||||
),
|
||||
|
||||
/* Adjust (Lower + Raise)
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | | | | | | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | Reset| Debug| | | | | | | aPscr| sPscr| Pscr |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Caps | | |Aud on|AudOff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|Numpad|Insert|
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_ADJUST] = LAYOUT_preonic_1x2uC(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, QK_BOOT, DB_TOGG, _______, _______, _______, _______, _______, _______, LALT(KC_PSCR), LCTL(KC_PSCR), KC_PSCR,
|
||||
KC_CAPS, _______, MU_NEXT, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, NUMPAD, KC_INS,
|
||||
_______, AU_PREV, AU_NEXT, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
|
||||
)
|
||||
|
||||
};
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_QWERTY);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case COLEMAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_COLEMAK);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case DVORAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_DVORAK);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case NUMPAD:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_NUMPAD);
|
||||
}
|
||||
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
|
||||
PORTE &= ~(1<<6);
|
||||
} else {
|
||||
unregister_code(KC_RSFT);
|
||||
PORTE |= (1<<6);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
};
|
|
@ -1,108 +0,0 @@
|
|||
# Preonic layout by [Blake Newman](https://github.com/blake-newman)
|
||||
|
||||
## Layouts
|
||||
|
||||
### Qwerty
|
||||
```
|
||||
,-----------------------------------------------------------------------------------.
|
||||
| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
|
||||
|------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
| Bksp | A | S | D | F | G | H | J | K | L | ; | " |
|
||||
|------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
| Shift| Z | X | C | V | B | N | M | , | . | / | Shift|
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| Brite| Ctrl | Alt | GUI |Lower | Space |Raise | | Alt | Ctrl | Shift|
|
||||
`-----------------------------------------------------------------------------------'
|
||||
```
|
||||
|
||||
### Colemak
|
||||
```
|
||||
,-----------------------------------------------------------------------------------.
|
||||
| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp |
|
||||
|------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
| Bksp | A | R | S | T | D | H | N | E | I | O | " |
|
||||
|------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
| Shift| Z | X | C | V | B | K | M | , | . | / | Shift|
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| Brite| Ctrl | Alt | GUI |Lower | Space |Raise | | Alt | Ctrl | Shift|
|
||||
`-----------------------------------------------------------------------------------'
|
||||
```
|
||||
|
||||
### Dvorak
|
||||
```
|
||||
,-----------------------------------------------------------------------------------.
|
||||
| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| Tab | " | , | . | P | Y | F | G | C | R | L | Bksp |
|
||||
|------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
| Bksp | A | O | E | U | I | D | H | T | N | S | / |
|
||||
|------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
| Shift| ; | Q | J | K | X | B | M | W | V | Z | Shift|
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| Brite| Ctrl | Alt | GUI |Lower | Space |Raise | | Alt | Ctrl | Shift|
|
||||
`-----------------------------------------------------------------------------------'
|
||||
```
|
||||
|
||||
### Numpad
|
||||
```
|
||||
,-----------------------------------------------------------------------------------.
|
||||
| Esc | | | PgDn | PgUp | Home | End | | / | * | - | Del |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| Tab | | Up | | | | | 7 | 8 | 9 | + | Bksp |
|
||||
|------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
| Bksp | Left | Down | Right| | | | 4 | 5 | 6 | | " |
|
||||
|------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
| Shift| | | | | | , | 1 | 2 | 3 | | Shift|
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| Brite| Ctrl | Alt | GUI |Lower | Space |Raise | 0 | . | Ctrl | Shift|
|
||||
`-----------------------------------------------------------------------------------'
|
||||
```
|
||||
|
||||
### Lower
|
||||
```
|
||||
,-----------------------------------------------------------------------------------.
|
||||
| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
|
||||
|------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
| Esc | | Up | | | | | -_ | - | + | = | Bksp |
|
||||
|------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
| Bksp| Left | Down | Right| | | | { | } | [ | ] | \ |
|
||||
|------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
| Shift| | | | | | | | | | ¢ | € | Shift|
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| Brite| Ctrl | Alt | GUI |Lower | Enter |Raise | | Alt | Ctrl | Shift|
|
||||
`-----------------------------------------------------------------------------------'
|
||||
```
|
||||
|
||||
### Raise
|
||||
```
|
||||
,-----------------------------------------------------------------------------------.
|
||||
| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
|
||||
|------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
| Esc | | Up | | | | | - | _ | = | + | Bksp |
|
||||
|------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
| Bksp | Left | Down | Right| | | | [ | ] | { | } | | |
|
||||
|------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
| Shift| \ | | | | | | | | £ | $ | Shift|
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| Brite| Ctrl | Alt | GUI |Lower | Enter |Raise | | Alt | Ctrl | Shift|
|
||||
`-----------------------------------------------------------------------------------'
|
||||
```
|
||||
|
||||
### Adjust (Lower + Raise)
|
||||
```
|
||||
,-----------------------------------------------------------------------------------.
|
||||
| | | | | | | | | | | | |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| | Reset| Debug| | | | | | | aPscr| sPscr| Pscr |
|
||||
|------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
| Caps | | |Aud on|AudOff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|Numpad|Insert|
|
||||
|------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
| |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| | | | | | | | Next | Vol- | Vol+ | Play |
|
||||
`-----------------------------------------------------------------------------------'
|
||||
```
|
|
@ -1,35 +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
|
||||
|
|
@ -1,225 +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
|
||||
|
||||
#define FN_CAPS LT(_FL, KC_CAPS)
|
||||
|
||||
// define layers
|
||||
#define _QWERTY 0
|
||||
#define _DVORAK 1
|
||||
#define _ARROWS 2
|
||||
#define _LOWER 10
|
||||
#define _RAISE 11
|
||||
#define _ADJUST 12
|
||||
|
||||
// macro shortcuts
|
||||
#define QWERTY TO(_QWERTY)
|
||||
#define DVORAK TO(_DVORAK)
|
||||
#define LOWER M(_LOWER)
|
||||
#define RAISE M(_RAISE)
|
||||
#define ARROWS TO(_ARROWS)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Qwerty
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Enter|
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Caps | A | S | D | F | G | H | J | K | L | ; | ' |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | N | M | , | . | / | Shift|
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Ctrl | Del | Alt | GUI |Lower | Raise| Space | Left | Down | Up |Right |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
|
||||
[_QWERTY] = LAYOUT_preonic_grid(
|
||||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_ENT,
|
||||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
|
||||
SC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SC_RSPC,
|
||||
KC_LCTL, KC_DEL, KC_LGUI, KC_LALT, LOWER, RAISE, KC_SPC, KC_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT
|
||||
),
|
||||
|
||||
/* Dvorak
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Tab | " | , | . | P | Y | F | G | C | R | L | / |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | CAPS | A | O | E | U | I | D | H | T | N | S | Enter|
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| ; | Q | J | K | X | B | M | W | V | Z | Shift|
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Ctrl | Del | Alt | GUI |Lower | Raise| Space | Left | Down | Up |Right |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
|
||||
[_DVORAK] = LAYOUT_preonic_grid(
|
||||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
|
||||
KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH,
|
||||
KC_CAPS, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_ENT,
|
||||
SC_LSPO, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SC_RSPC,
|
||||
KC_LCTL, KC_DEL, KC_LGUI, KC_LALT, LOWER, RAISE, KC_SPC, KC_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT
|
||||
),
|
||||
|
||||
/* ARROWS
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | | | | | | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | Up | | | |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | | | | | | | | Left | Down |Right | | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
|
||||
[_ARROWS] = LAYOUT_preonic_grid(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RIGHT,_______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
/* Lower
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ` | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | F7 | F8 | F9 | F10 | F11 | F12 | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
|
||||
[_LOWER] = LAYOUT_preonic_grid(
|
||||
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_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL,
|
||||
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_HOME, KC_END, _______,
|
||||
_______, XXXXXXX, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
|
||||
),
|
||||
|
||||
/* Raise
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | ` | | | Up | | | | | | | | Del |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Del | | Left | Down |Right | | | - | = | [ | ] | \ |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | | | | | | | | |PageDn|PageUP| |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | 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_UP, _______, _______, _______, _______, _______, _______, _______, KC_DEL,
|
||||
KC_DEL, _______, KC_LEFT, KC_DOWN,KC_RIGHT, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, 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 |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | Reset| | | | | | | | | | Del |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | | | |Aud on|AudOff|AGnorm|AGswap|Qwerty| | | | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff|Dvorak| | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | |ARROWS| | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
|
||||
[_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, DB_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL,
|
||||
_______, _______, MU_NEXT, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, _______, _______, _______,
|
||||
_______, AU_PREV, AU_NEXT, MU_ON, MU_OFF, MI_ON, MI_OFF, DVORAK, _______, _______, _______, _______,
|
||||
_______, ARROWS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
)
|
||||
|
||||
};
|
||||
|
||||
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 DVORAK:
|
||||
if (record->event.pressed)
|
||||
{
|
||||
set_single_persistent_default_layer(_DVORAK);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case ARROWS:
|
||||
if (record->event.pressed)
|
||||
{
|
||||
set_single_persistent_default_layer(_ARROWS);
|
||||
}
|
||||
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;
|
||||
};
|
|
@ -1,8 +0,0 @@
|
|||
# Boy_314's XD75RE Layout
|
||||
- NOTE: ONLY SUPPORTS DVORAK AT THE MOMENT, WILL UPDATE WITH QWERTY WHEN I GET THE TIME TO DO SO.
|
||||
- Features many symbols and function keys in secondary layers.
|
||||
- NOTE: WORK IN PROGRESS
|
||||
# THINGS TO DO
|
||||
- make better use of bottom row
|
||||
- add numpad toggle layer
|
||||
- explore rgb underglow options
|
|
@ -1,39 +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 DEFAULT_LAYER_SONGS \
|
||||
{ SONG(QWERTY_SOUND) }
|
||||
#endif
|
||||
|
||||
#define MUSIC_MASK (keycode != KC_NO)
|
||||
|
||||
#define PERMISSVE_HOLD
|
||||
#define HOLD_ON_OTHER_KEY_PRESS_PER_KEY
|
||||
|
||||
#define LEADER_PER_KEY_TIMING
|
||||
|
||||
#define LEADER_TIMEOUT 250
|
||||
|
||||
#define LEADER_NO_TIMEOUT
|
||||
|
||||
#define MK_3_SPEED
|
||||
#define MK_MOMENTARY_ACCEL
|
||||
|
||||
#define COMBO_NO_TIMER
|
|
@ -1,432 +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/>.
|
||||
*/
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "muse.h"
|
||||
|
||||
enum preonic_layers {
|
||||
_QWERTY,
|
||||
_LOWER,
|
||||
_RAISE,
|
||||
_MOUSE,
|
||||
_MANAGE,
|
||||
_COMPOSITOR,
|
||||
};
|
||||
|
||||
enum preonic_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
LOWER,
|
||||
RAISE,
|
||||
MOUSE,
|
||||
MANAGE,
|
||||
COMPOSITOR,
|
||||
};
|
||||
|
||||
#define MOD_TAP_LSFT_ESC LSFT_T(KC_ESC)
|
||||
#define MOD_TAP_LSFT_ENT LSFT_T(KC_ENT)
|
||||
|
||||
#define LT_COPY_Y LT(_QWERTY, KC_Y)
|
||||
#define LT_CUT_X LT(_QWERTY, KC_X)
|
||||
#define LT_PASTE_P LT(_QWERTY, KC_P)
|
||||
#define LT_AE_A LT(_QWERTY, KC_A)
|
||||
#define LT_OE_O LT(_QWERTY, KC_O)
|
||||
#define LT_UE_U LT(_QWERTY, KC_U)
|
||||
#define LT_SZ_S LT(_QWERTY, KC_S)
|
||||
#define LT_LOWER_SPC LT(_LOWER, KC_SPC)
|
||||
|
||||
#define LM_COMP_LALT LM(_COMPOSITOR, MOD_LALT)
|
||||
|
||||
#define KO_LAYER_MASK_EXCEPT(layer) ((~0) & ~(1 << layer))
|
||||
|
||||
enum combos {
|
||||
COMBO_LPRN_RPRN, /* (|) */
|
||||
COMBO_LBRC_RBRC, /* [|] */
|
||||
COMBO_LCBR_RCBR, /* {|} */
|
||||
COMBO_LT_GT, /* <|> */
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM combo_lprn_rprn[] = {KC_LPRN, KC_RPRN, COMBO_END};
|
||||
const uint16_t PROGMEM combo_lbrc_rbrc[] = {KC_LBRC, KC_RBRC, COMBO_END};
|
||||
const uint16_t PROGMEM combo_lcbr_rcbr[] = {KC_LCBR, KC_RCBR, COMBO_END};
|
||||
const uint16_t PROGMEM combo_lt_gt[] = {KC_LT, KC_GT, COMBO_END};
|
||||
|
||||
combo_t key_combos[] = {
|
||||
[COMBO_LPRN_RPRN] = COMBO_ACTION(combo_lprn_rprn),
|
||||
[COMBO_LBRC_RBRC] = COMBO_ACTION(combo_lbrc_rbrc),
|
||||
[COMBO_LCBR_RCBR] = COMBO_ACTION(combo_lcbr_rcbr),
|
||||
[COMBO_LT_GT] = COMBO_ACTION(combo_lt_gt),
|
||||
};
|
||||
|
||||
void process_combo_event(uint16_t combo_index, bool pressed) {
|
||||
switch (combo_index) {
|
||||
case COMBO_LPRN_RPRN:
|
||||
if (pressed) {
|
||||
tap_code16(KC_LPRN);
|
||||
tap_code16(KC_RPRN);
|
||||
tap_code16(KC_LEFT);
|
||||
}
|
||||
break;
|
||||
case COMBO_LBRC_RBRC:
|
||||
if (pressed) {
|
||||
tap_code16(KC_LBRC);
|
||||
tap_code16(KC_RBRC);
|
||||
tap_code16(KC_LEFT);
|
||||
}
|
||||
break;
|
||||
case COMBO_LCBR_RCBR:
|
||||
if (pressed) {
|
||||
tap_code16(KC_LCBR);
|
||||
tap_code16(KC_RCBR);
|
||||
tap_code16(KC_LEFT);
|
||||
}
|
||||
break;
|
||||
case COMBO_LT_GT:
|
||||
if (pressed) {
|
||||
tap_code16(KC_LT);
|
||||
tap_code16(KC_GT);
|
||||
tap_code16(KC_LEFT);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
const key_override_t nop_shift_quote = ko_make_with_layers(MOD_MASK_SHIFT, KC_QUOT, KC_NO, KO_LAYER_MASK_EXCEPT(_COMPOSITOR)); /* " */
|
||||
const key_override_t nop_shift_dot = ko_make_with_layers(MOD_MASK_SHIFT, KC_DOT, KC_NO, KO_LAYER_MASK_EXCEPT(_COMPOSITOR)); /* < */
|
||||
const key_override_t nop_shift_comma = ko_make_with_layers(MOD_MASK_SHIFT, KC_COMM, KC_NO, KO_LAYER_MASK_EXCEPT(_COMPOSITOR)); /* > */
|
||||
const key_override_t nop_shift_slash = ko_make_with_layers(MOD_MASK_SHIFT, KC_SLSH, KC_NO, KO_LAYER_MASK_EXCEPT(_COMPOSITOR)); /* ? */
|
||||
const key_override_t nop_shift_one = ko_make_with_layers(MOD_MASK_SHIFT, KC_1, KC_NO, KO_LAYER_MASK_EXCEPT(_COMPOSITOR)); /* ! */
|
||||
const key_override_t nop_shift_two = ko_make_with_layers(MOD_MASK_SHIFT, KC_2, KC_NO, KO_LAYER_MASK_EXCEPT(_COMPOSITOR)); /* override @ */
|
||||
const key_override_t nop_shift_three = ko_make_with_layers(MOD_MASK_SHIFT, KC_3, KC_NO, KO_LAYER_MASK_EXCEPT(_COMPOSITOR)); /* override # */
|
||||
const key_override_t nop_shift_four = ko_make_with_layers(MOD_MASK_SHIFT, KC_4, KC_NO, KO_LAYER_MASK_EXCEPT(_COMPOSITOR)); /* override $ */
|
||||
const key_override_t nop_shift_five = ko_make_with_layers(MOD_MASK_SHIFT, KC_5, KC_NO, KO_LAYER_MASK_EXCEPT(_COMPOSITOR)); /* override % */
|
||||
const key_override_t nop_shift_six = ko_make_with_layers(MOD_MASK_SHIFT, KC_6, KC_NO, KO_LAYER_MASK_EXCEPT(_COMPOSITOR)); /* override ^ */
|
||||
const key_override_t nop_shift_seven = ko_make_with_layers(MOD_MASK_SHIFT, KC_7, KC_NO, KO_LAYER_MASK_EXCEPT(_COMPOSITOR)); /* override & */
|
||||
const key_override_t nop_shift_eight = ko_make_with_layers(MOD_MASK_SHIFT, KC_8, KC_NO, KO_LAYER_MASK_EXCEPT(_COMPOSITOR)); /* override * */
|
||||
const key_override_t nop_shift_nine = ko_make_with_layers(MOD_MASK_SHIFT, KC_9, KC_NO, KO_LAYER_MASK_EXCEPT(_COMPOSITOR)); /* override ( */
|
||||
const key_override_t nop_shift_zero = ko_make_with_layers(MOD_MASK_SHIFT, KC_0, KC_NO, KO_LAYER_MASK_EXCEPT(_COMPOSITOR)); /* override ) */
|
||||
|
||||
const key_override_t **key_overrides = (const key_override_t *[]){
|
||||
&nop_shift_quote,
|
||||
&nop_shift_dot,
|
||||
&nop_shift_comma,
|
||||
&nop_shift_slash,
|
||||
&nop_shift_one,
|
||||
&nop_shift_two,
|
||||
&nop_shift_three,
|
||||
&nop_shift_four,
|
||||
&nop_shift_five,
|
||||
&nop_shift_six,
|
||||
&nop_shift_seven,
|
||||
&nop_shift_eight,
|
||||
&nop_shift_nine,
|
||||
&nop_shift_zero,
|
||||
NULL
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Qwerty
|
||||
* ,----------------------------------------------------------------------------------------------------------.
|
||||
* | Caps Lock | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Leader |
|
||||
* |--------------+-------+------+------+------+------+-----------+------+------+------+-------+--------------|
|
||||
* | Ctrl | Q | W | E | R | T | Y/Copy | U/Ü | I | O/Ö |P/Paste| Ctrl |
|
||||
* |--------------+-------+------+------+------+------+-----------+------+------+------+-------+--------------|
|
||||
* | Shift/Esc | A/Ä | S/ß | D | F | G | H | J | K | L | ' | Shift/Enter |
|
||||
* |--------------+-------+------+------+------+------+-----------+------+------+------+-------+--------------|
|
||||
* | Alt | Z |X/Cut | C | V | B | N | M | , | . | / | Alt |
|
||||
* |--------------+-------+------+------+------+------+-----------+------+------+------+-------+--------------|
|
||||
* | Mouse | | | |Raise |Lower |Lower/Space|Raise | | | | Manage |
|
||||
* `----------------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_QWERTY] = LAYOUT_preonic_grid(
|
||||
KC_CAPS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, QK_LEAD,
|
||||
KC_LCTL, KC_Q, KC_W, KC_E, KC_R, KC_T, LT_COPY_Y, LT_UE_U, KC_I, LT_OE_O, LT_PASTE_P, KC_RCTL,
|
||||
MOD_TAP_LSFT_ESC, LT_AE_A, LT_SZ_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOT, MOD_TAP_LSFT_ENT,
|
||||
LM_COMP_LALT, KC_Z, LT_CUT_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, LM_COMP_LALT,
|
||||
TG(_MOUSE), _______, _______, _______, RAISE, LOWER, LT_LOWER_SPC, RAISE, _______, _______, _______, MANAGE
|
||||
),
|
||||
/* Lower
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | | | | | | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | @ | % | ( | ) | | | + | < | > | | |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | | ~ | | [ | ] | | Left | Down | Up |Right | " | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | | | { | } | | | | : | ! | \ | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_LOWER] = LAYOUT_preonic_grid(
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, KC_AT, KC_PERC, KC_LPRN, KC_RPRN, XXXXXXX, XXXXXXX, KC_PLUS, KC_LT, KC_GT, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, KC_TILD, XXXXXXX, KC_LBRC, KC_RBRC, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_DQUO, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, KC_LCBR, KC_RCBR, XXXXXXX, XXXXXXX, XXXXXXX, KC_COLN, KC_EXLM, KC_BSLS, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
|
||||
),
|
||||
/* Raise
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | | | | | | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | # | & | | | | | * | - | _ | = | |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | | ` | | | | | Bspk |Pg Dn |Pg Up | Tab | $ | End |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | | | | | | | | ; | ? | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_RAISE] = LAYOUT_preonic_grid(
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, KC_HASH, KC_AMPR, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_ASTR, KC_MINS, KC_UNDS, KC_EQL, XXXXXXX,
|
||||
XXXXXXX, KC_GRV, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BSPC, KC_PGDN, KC_PGUP, KC_TAB, KC_DLR, KC_END,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_SCLN, KC_QUES, KC_PIPE, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
|
||||
),
|
||||
/* Mouse
|
||||
* ,-------------------------------------------------------------------------------------------------------------------------------------------------------.
|
||||
* | | | | | | | | | | | | |
|
||||
* |--------------+-------+--------------+--------------+--------------+--------------+-----------+-----------+---------+------------+------+--------------|
|
||||
* | | | | | | |Wheel Left |Wheel Down |Wheel Up |Wheel Right | | Ctrl |
|
||||
* |--------------+-------+--------------+--------------+--------------+--------------+-----------+-----------+---------+------------+------+--------------|
|
||||
* | | | Button 3 | Button 2 | Button 1 | |Cursor Left|Cursor Down|Cursor Up|Cursor Right| | |
|
||||
* |--------------+-------+--------------+--------------+--------------+--------------+-----------+-----------+---------+------------+------+--------------|
|
||||
* |Compositor+Alt| | | | | | | | | | |Compositor+Alt|
|
||||
* |--------------+-------+--------------+--------------+--------------+--------------+-----------+-----------+---------+------------+------+--------------|
|
||||
* |Mouse | | |Accelaration 2|Accelaration 1|Accelaration 0| | | | | | |
|
||||
* `-------------------------------------------------------------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_MOUSE] = LAYOUT_preonic_grid(
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MS_WH_LEFT, KC_MS_WH_DOWN, KC_MS_WH_UP, KC_MS_WH_RIGHT, XXXXXXX, _______,
|
||||
XXXXXXX, XXXXXXX, KC_MS_BTN3, KC_MS_BTN2, KC_MS_BTN1, XXXXXXX, KC_MS_LEFT, KC_MS_DOWN, KC_MS_UP, KC_MS_RIGHT, XXXXXXX, XXXXXXX,
|
||||
_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______,
|
||||
_______, XXXXXXX, XXXXXXX, KC_MS_ACCEL2, KC_MS_ACCEL1, KC_MS_ACCEL0, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
|
||||
),
|
||||
/* Manage
|
||||
* ,---------------------------------------------------------------------------------------.
|
||||
* | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
|
||||
* |------+--------+--------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | |
|
||||
* |------+--------+--------+------+------+-------------+------+------+------+------+------|
|
||||
* | |Aud prev|Aud next|Aud on|AudOff| | |Qwerty| | | | |
|
||||
* |------+--------+--------+------+------+------|------+------+------+------+------+------|
|
||||
* | | |Mus next|Mus on|MusOff| | | | | | | |
|
||||
* |------+--------+--------+------+------+------+------+------+------+------+------+------|
|
||||
* |Reset | | | | | | | | | | | |
|
||||
* `---------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_MANAGE] = 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,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, AU_PREV, AU_NEXT, AU_ON, AU_OFF, XXXXXXX, XXXXXXX, QWERTY, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, MU_NEXT, MU_ON, MU_OFF, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
QK_BOOT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
|
||||
),
|
||||
/* Compositor
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | Q | W | E | R | T | Y | U | I | O | P | |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* |Shift | A | S | D | F | G | H | J | K | L | ' |Enter |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | Z | X | C | V | B | N | M | , | . | / | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | |Space | | | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_COMPOSITOR] = LAYOUT_preonic_grid(
|
||||
XXXXXXX, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, XXXXXXX,
|
||||
XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, XXXXXXX,
|
||||
_______, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOT, _______,
|
||||
XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_SPC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
|
||||
)
|
||||
};
|
||||
|
||||
static inline bool base_layer_hold_key(uint16_t keycode, keyrecord_t *record) {
|
||||
if (!record->tap.count && record->event.pressed) {
|
||||
tap_code16(keycode);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
static inline bool toggle_layer(enum preonic_layers layer, keyrecord_t *record) {
|
||||
if (record->event.pressed) {
|
||||
layer_on(layer);
|
||||
} else {
|
||||
layer_off(layer);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool get_hold_on_other_key_press(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case MOD_TAP_LSFT_ENT:
|
||||
case MOD_TAP_LSFT_ESC:
|
||||
/* Immediately select the hold action when another key is pressed. */
|
||||
return true;
|
||||
default:
|
||||
/* Do not select the hold action when another key is pressed. */
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
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 LOWER:
|
||||
return toggle_layer(_LOWER, record);
|
||||
case RAISE:
|
||||
return toggle_layer(_RAISE, record);
|
||||
case MANAGE:
|
||||
return toggle_layer(_MANAGE, record);
|
||||
case COMPOSITOR:
|
||||
return toggle_layer(_COMPOSITOR, record);
|
||||
case LT_CUT_X:
|
||||
return base_layer_hold_key(C(KC_X), record); /* cut on hold */
|
||||
case LT_COPY_Y:
|
||||
return base_layer_hold_key(C(KC_C), record); /* copy on hold */
|
||||
case LT_PASTE_P:
|
||||
return base_layer_hold_key(C(KC_V), record); /* paste on hold */
|
||||
case LT_AE_A:
|
||||
return base_layer_hold_key(RALT(KC_Q), record); /* 'ä' on hold */
|
||||
case LT_OE_O:
|
||||
return base_layer_hold_key(RALT(KC_P), record); /* 'ö' on hold */
|
||||
case LT_UE_U:
|
||||
return base_layer_hold_key(RALT(KC_Y), record); /* 'ü' on hold */
|
||||
case LT_SZ_S:
|
||||
return base_layer_hold_key(RALT(KC_S), record); /* 'ß' on hold */
|
||||
}
|
||||
|
||||
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) {
|
||||
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(_MANAGE);
|
||||
} else {
|
||||
layer_off(_MANAGE);
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (active) {
|
||||
muse_mode = true;
|
||||
} else {
|
||||
muse_mode = false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
static inline void register_ctrl_sequence(uint16_t keycode) {
|
||||
tap_code16(RCTL(keycode));
|
||||
}
|
||||
|
||||
void leader_end_user(void) {
|
||||
if (leader_sequence_three_keys(KC_A, KC_C, KC_K)) {
|
||||
SEND_STRING("Acked-by: Christian Brauner <brauner@kernel.org>");
|
||||
}
|
||||
|
||||
if (leader_sequence_three_keys(KC_R, KC_V, KC_B)) {
|
||||
SEND_STRING("Reviewed-by: Christian Brauner <brauner@kernel.org>");
|
||||
}
|
||||
|
||||
if (leader_sequence_three_keys(KC_S, KC_O, KC_B)) {
|
||||
SEND_STRING("Signed-off-by: Christian Brauner <brauner@kernel.org>");
|
||||
}
|
||||
|
||||
/* Support vim-style copy. */
|
||||
if (leader_sequence_one_key(KC_Y)) {
|
||||
tap_code16(C(S(KC_C)));
|
||||
}
|
||||
|
||||
/* Support vim-style paste. */
|
||||
if (leader_sequence_one_key(KC_P)) {
|
||||
tap_code16(C(S(KC_V)));
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
|
@ -1,26 +0,0 @@
|
|||
# Brauner's Preonic Keymap
|
||||
|
||||
This is a keymap layout heavily optimized for vim.
|
||||
It mostly follows `QWERTY` but moves various symbols on to different layers.
|
||||
|
||||
* Number keys function only as number keys.
|
||||
Additional symbols they would produce when `Shift` is held are turned off as they are intercepted.
|
||||
* `Y`, `P`, and `X` function as `Ctrl+C`, `Ctrl+V`, and `Ctrl+X` when held.
|
||||
This avoids having to hold down `Ctrl` and also aligns regular copy and paste with vim functionality.
|
||||
* Various keys perform different functions when tapped than when held.
|
||||
* `!` and `?` are on top of `.` on different layers.
|
||||
* `\` and `|` are on top of `/` on different layers.
|
||||
* `:` and `;` are on top of `,` on different layers.
|
||||
* All navigation is done via `H`, `J`, `K`, and `L`.
|
||||
* `O`, `U`, `S`, and `A` produce the Umlauts `Ö`, `Ü`, `ß`, and `Ä` when held.
|
||||
This relies on the operating system keyboard layout to be set to US Intl.
|
||||
* Different layers will activate different types of navigation.
|
||||
For example, left, right, up, and down or backspace, page up, page down, and tab.
|
||||
* There's a dedicated mouse layer which can be activated allowing to navigate solely with the keyboard where otherwise a mouse or trackpad would be needed.
|
||||
* There's a dedicated management layer where the boot loader can be entered or music mode can be turned on or off.
|
||||
* Lastly, there's a compositor layer which is optimized for managing a tiling window manager.
|
||||
The layer is used specifically via layer-mod keys in the base layer.
|
||||
In other words, specific modifiers are held when this layer is accessed.
|
||||
* Opening and closing brackets are always located on adjacent keys on the same layer.
|
||||
Pressing a matching opening and closing bracket key at the same time will insert both brackets and move the cursor into the middle of the bracket pair.
|
||||
As should be obvious, this is useful when programming: `(|)`, `[|]`, `{|}`, `<|>`.
|
|
@ -1,7 +0,0 @@
|
|||
LEADER_ENABLE = yes
|
||||
MOUSEKEY_ENABLE = yes
|
||||
RGBLIGHT_ENABLE = no
|
||||
BACKLIGHT_ENABLE = no
|
||||
KEY_OVERRIDE_ENABLE = yes
|
||||
COMBO_ENABLE = yes
|
||||
SRC += muse.c
|
|
@ -1,8 +0,0 @@
|
|||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
#include "../../config.h"
|
||||
|
||||
#define FORCE_NKRO 1
|
||||
|
||||
#endif
|
|
@ -1,71 +0,0 @@
|
|||
#include QMK_KEYBOARD_H
|
||||
|
||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||
#define L_QWERTSPLITLY 0
|
||||
#define L_FN 1
|
||||
|
||||
// Defines for Mac specific key accelerators used in map. Some of these are very awkward to type.
|
||||
// These are the default bindings for Mac, some of which may be turned off or changed, check your
|
||||
// settings in System Preferences
|
||||
#define LS_TAB LSFT(KC_TAB) // Shift-TAB
|
||||
#define MF_MENU LCTL(KC_F2) // Move focus to menu bar default keybinding in MacOS
|
||||
#define MF_DOCK LCTL(KC_F3) // Move focus to dock
|
||||
#define MF_TOOL LCTL(KC_F5) // Move focus to window toolbar
|
||||
#define MF_STAT LCTL(KC_F8) // Move focus to status bar side of menu bar
|
||||
#define MF_DRWR LALT(LGUI(KC_QUOTE)) // Move focus to window drawer
|
||||
#define MF_LPAD LALT(LGUI(KC_Q)) // Show Launchpad
|
||||
#define MF_NOTI LALT(LGUI(LCTL(KC_B))) // Show Notification Center
|
||||
#define MF_DASH LALT(LGUI(LCTL(KC_C))) // Show Dashboard
|
||||
#define MF_HELP LSFT(LGUI(KC_SLASH)) // Position in menu Help search box
|
||||
|
||||
// Momentary/Tap Combos used by this layout
|
||||
#define LT_FNESC LT(L_FN, KC_ESC) // ESC when tapped, Fn layer when held
|
||||
#define MT_RGENT MT(MOD_RGUI, KC_ENTER) // Enter when tapped, right GUI when held
|
||||
#define LT_FNLFT LT(L_FN, KC_LEFT) // Left when tapped, Fn layer when held
|
||||
#define MT_RSDOT MT(MOD_RSFT, KC_DOT) // Dot when tapped, right shift when held
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* QwertSplitly
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | 1 | 2 | 3 | 4 | 5 | = | ` | 6 | 7 | 8 | 9 | 0 |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Q | W | E | R | T | [ | ] | Y | U | I | O | P |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | A | S | D | F | G | - | ' | H | J | K | L | ; |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* |LShift| Z | X | C | V | \ | / | B | N | M | , |./RSft|
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* |ESC/fn|LCtrl | LOpt | LCmd |Space | Tab | BkSp |Space |En/Cmd|<-/fn |CRSR v|CRSR->|
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[L_QWERTSPLITLY] = LAYOUT_preonic_grid(
|
||||
KC_1, KC_2, KC_3, KC_4, KC_5, KC_EQL ,KC_GRAVE,KC_6, KC_7, KC_8, KC_9, KC_0,
|
||||
KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P,
|
||||
KC_A, KC_S, KC_D, KC_F, KC_G, KC_MINUS,KC_QUOTE,KC_H, KC_J, KC_K, KC_L, KC_SCLN,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_BSLS, KC_SLASH,KC_B, KC_N, KC_M, KC_COMM, MT_RSDOT,
|
||||
LT_FNESC,KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_TAB, KC_BSPC, KC_SPC, MT_RGENT,LT_FNLFT,KC_DOWN, KC_RIGHT
|
||||
),
|
||||
|
||||
/* Fn
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | F1 | F2 | F3 | F4 | F5 | Vol+ | Mute | F6 | F7 | F8 | F9 | F10 |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | F11 | F12 | F13 | F14 | F15 |Track-|Track+|M:WhUp|M:Lclk| M:Up |M:Rclk| PgUp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Caps |^LPad |^DashB|^Help |^Drawr| Vol- | |>|| |M:WhDn|M:Left|M:Down|M:Rght| PgDn |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* |RShift|^Menu |^SMenu|^Dock |^Tools|^Notif| Ins |M:Slow|M:Norm|M:Fast| Home | End |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* |[ESC] |RCtrl | ROpt | RCmd |Space |Sh-Tab| Del |Space |PadEnt| [fn] | Up | Left |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[L_FN] = LAYOUT_preonic_grid(
|
||||
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_VOLU, KC_MUTE, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10,
|
||||
KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_MRWD, KC_MFFD, KC_WH_U, KC_BTN1, KC_MS_U, KC_BTN2, KC_PGUP,
|
||||
KC_CAPS, MF_LPAD, MF_DASH, MF_HELP, MF_DRWR, KC_VOLD, KC_MPLY, KC_WH_D, KC_MS_L, KC_MS_D, KC_MS_R, KC_PGDN,
|
||||
KC_RSFT, MF_MENU, MF_STAT, MF_DOCK, MF_TOOL, MF_NOTI, KC_INS, KC_ACL0, KC_ACL1, KC_ACL2, KC_HOME, KC_END,
|
||||
_______, KC_RCTL, KC_RALT, KC_RGUI, _______, LS_TAB, KC_DEL, _______, KC_PENT, _______, KC_UP, KC_LEFT
|
||||
)
|
||||
|
||||
};
|
|
@ -1,61 +0,0 @@
|
|||
# Bucktooth v2.0 (Mac)
|
||||
|
||||
Bucktooth is an alternate layout that pushes the letters to the edges and puts most punctuation in the center. It's derived in part from my experience with Ergodox boards. I call the main layer layout QWERTSplitlY, you may notice the right side punctuation moving to the center and the control keys missing from the left.
|
||||
|
||||
## Split QWERTY: Unorthodox
|
||||
|
||||
QwertSplitly
|
||||
,-----------------------------------------------------------------------------------.
|
||||
| 1 | 2 | 3 | 4 | 5 | + | ` | 6 | 7 | 8 | 9 | 0 |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| Q | W | E | R | T | [ | ] | Y | U | I | O | P |
|
||||
|------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
| A | S | D | F | G | - | ' | H | J | K | L | ; |
|
||||
|------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
|LShift| Z | X | C | V | \ | / | B | N | M | , |./RSft|
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
|ESC/fn|LCtrl | LOpt | LCmd |Space | Tab | BkSp |Space |En/Cmd|<-/fn |CRSR v|CRSR->|
|
||||
`-----------------------------------------------------------------------------------'
|
||||
|
||||
|
||||
It is a bit of a departure from normal Preonic layouts. You will notice that the bottom letter row is shifted right, and this is both an accomodation for the left shift and because I could never get used to C being directly under D and some other similar staggered keyboard tendencies. If you are used to the default ortho layouts you may want to adjust this back; but, you may find that it is slightly easier to move between a typical staggered layout and ortho boards in this layout. Plus, having a dedicated shift is a good thing, even though the dot key does double duty as a right shift.
|
||||
|
||||
That left shift is the only control or modifier key on the top four rows. All the modifiers and control keys are in the bottom row. Most Ergodox boards put the braces ({}[]) in the center and keep the hands apart. The hands aren't very far apart in this layout but you can imagine moving between this layout and the Ergodox easily, if you can get used to the lack of the extra 1.5U columns on the left and right!
|
||||
|
||||
With all control keys on the bottom row, the ESC key now lives in the bottom left and on my keyboard I actually put a very heavy keyswitch in that space to keep me from hitting it accidentally instead of ctrl. Hold it down and it becomes fn. I usually hit it with my whole hand since it is in the corner, without moving my fingers down to it.
|
||||
|
||||
## Revision 2 Changes
|
||||
|
||||
The move of B to the right side of the keyboard may be controversial but has felt more and more comfortable to me. Again if you split a staggered layout keyboard down a straight line B has more in common with Y than T. I don't understand breaking the board into left and right on anything but a vertical line despite the long history of bringing the staggered layout slewing left.
|
||||
|
||||
Revision 2 also changes the positions of -, =, and ~ for better compatibility with sculpted profile keysets which offer a Dvorak set option that provides the middle row dash because a middle row backtick/tilde is not found anywhere.
|
||||
|
||||
## Function Layer
|
||||
|
||||
There are no raise and lower or multiple function pages. The Preonic has enough keys to avoid more than a single function page, and I prefer to have spacebars for both thumbs so the "Bucktooth" name comes from the typical keyset with darker function keys and lighter alphas and space keys giving the keyboard fang-like appearance where the two spaces are.
|
||||
|
||||
|
||||
Fn
|
||||
,-----------------------------------------------------------------------------------.
|
||||
| F1 | F2 | F3 | F4 | F5 | Vol+ | Mute | F6 | F7 | F8 | F9 | F10 |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| F11 | F12 | F13 | F14 | F15 |Track-|Track+|M:WhUp|M:Lclk| M:Up |M:Rclk| PgUp |
|
||||
|------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
| Caps |^LPad |^DashB|^Help |^Drawr| Vol- | |>|| |M:WhDn|M:Left|M:Down|M:Rght| PgDn |
|
||||
|------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
|RShift|^Menu |^SMenu|^Dock |^Tools|^Notif| Ins |M:Slow|M:Norm|M:Fast| Home | End |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
|[ESC] |RCtrl | ROpt | RCmd |Space |Sh-Tab| Del |Space |PadEnt| [fn] | Up | Left |
|
||||
`-----------------------------------------------------------------------------------'
|
||||
|
||||
### Cursor Keys
|
||||
|
||||
The cursor keys are a design I stole from the old Commodore computers which had DOWN and RIGHT keys on the bottom right part of the board. When shifted, they would move the cursor in the opposite direction, and Commodore saved two keys. Since shifted arrows are a common use case in selecting text, emulating this exactly is not desirable so the fn key is placed next to the cursor down and right keys and holding down fn will reverse their meaning. Unlike the Commodore keys they will not invert just by releasing fn but it is close. Because QMK supports it I also allow use the tap mode for fn to move the cursor left, so only going up requires the fn. This is surely the weirdest part of the layout for most people. As someone who learned to type on a Commodore keyboard, it is second nature to me!
|
||||
|
||||
### Mac Keyboard navigation Combo Macros
|
||||
|
||||
On Fn layer ZXCVB and SDFG keys I have set up the default key bindings for Mac OS Keyboard Focus keys since they are obscure and require FKeys mostly. They are pretty convenient for using the keyboard to search the menus, go to the dock, etc. Some like the one to jump to a window's toolbar and the one to jump to a window's accessory drawer are less commonly used.
|
||||
|
||||
---
|
||||
|
||||
Contributed to QMK and released with the QMK license by Jeri C. Mason, 3/16/2018 - Revision 2 2/26/2019
|
|
@ -1,17 +0,0 @@
|
|||
|
||||
|
||||
BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||
MIDI_ENABLE = no # MIDI controls
|
||||
AUDIO_ENABLE = yes # Audio output on port C6
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
|
||||
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
|
|
@ -1,48 +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 DEFAULT_LAYER_SONGS { SONG(COLEMAK_SOUND), \
|
||||
SONG(QWERTY_SOUND), \
|
||||
SONG(AUDIO_ON_SOUND), \
|
||||
SONG(TERMINAL_SOUND), \
|
||||
SONG(NO_SOUND), \
|
||||
SONG(MUSIC_ON_SOUND) \
|
||||
}
|
||||
#endif
|
||||
|
||||
#define MUSIC_MASK (keycode != MU_TOGG)
|
||||
|
||||
|
||||
/*
|
||||
* 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
|
||||
|
||||
#ifndef TAPPING_TERM
|
||||
#define TAPPING_TERM 200
|
||||
|
||||
#endif
|
|
@ -1,174 +0,0 @@
|
|||
#include QMK_KEYBOARD_H
|
||||
|
||||
enum preonic_layers {
|
||||
_COLEMAK,
|
||||
_QWERTY,
|
||||
_FUNCT,
|
||||
_NUMPAD,
|
||||
_SYMB,
|
||||
_MUSIC
|
||||
};
|
||||
|
||||
enum preonic_keycodes {
|
||||
FUNCT
|
||||
};
|
||||
|
||||
//Tap Dance Declarations
|
||||
enum {
|
||||
G1 = 0,
|
||||
BRC,
|
||||
EQ
|
||||
};
|
||||
|
||||
//Tap Dance Definitions
|
||||
tap_dance_action_t tap_dance_actions[] = {
|
||||
//Tap once for 1, twice for Grave
|
||||
[G1] = ACTION_TAP_DANCE_DOUBLE(KC_1, KC_GRV),
|
||||
//Tap once for [, twice for ]
|
||||
[BRC] = ACTION_TAP_DANCE_DOUBLE(KC_LBRC, KC_RBRC),
|
||||
//Tap once for = twice for Backslash
|
||||
[EQ] = ACTION_TAP_DANCE_DOUBLE(KC_EQL, KC_BSLS)
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Colemak
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | 1 ` | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = \ |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Tab | Q | W | F | P | G | J | L | U | Y | ; | [ ] |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Esc | A | R | S | T | D | H | N | E | I | O | " |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | K | M | , | . | / |Numpad|
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* |Symbol| Ctrl | Alt | GUI | Bksp | Del |Enter |Space | Left | Down | Up |Right |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_COLEMAK] = LAYOUT_preonic_grid(
|
||||
TD(G1), KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, TD(EQ),
|
||||
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, TD(BRC),
|
||||
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, TG(_NUMPAD),
|
||||
OSL(_SYMB), KC_LCTL, KC_LALT, KC_LGUI, KC_BSPC, KC_DEL, KC_ENT, KC_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
|
||||
),
|
||||
|
||||
/* Qwerty
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | 1 ` | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = \ |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Tab | Q | W | E | R | T | Y | U | I | O | P | [ ] |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Esc | A | S | D | F | G | H | J | K | L | ; | " |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | N | M | , | . | / |Numpad|
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* |Symbol| Ctrl | Alt | GUI | Bksp | Del |Enter |Space | Left | Down | Up |Right |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_QWERTY] = LAYOUT_preonic_grid(
|
||||
TD(G1), KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, TD(EQ),
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, TD(BRC),
|
||||
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, TG(_NUMPAD),
|
||||
OSL(_SYMB), KC_LCTL, KC_LALT, KC_LGUI, KC_BSPC, KC_DEL, KC_ENT, KC_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
|
||||
),
|
||||
|
||||
/* Function
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* |Symbol| | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_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_F11, KC_F12,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
/* Numpad & Mouse
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ` | | |M-clic| | | | | / | * | - | \ |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | ACL0 |L-clck| Up |R-clck|Scrl U| | 7 | 8 | 9 | + | ] |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | ACL1 | Left | Down |Right |Scrl D| | 4 | 5 | 6 | + | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | ACL2 | VOLU | PREV |PAUSE | NEXT | | 1 | 2 | 3 |Enter | Back |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* |Symbol| | VOLD | MUTE | Bksp | Del |Enter |Space | 0 | . |Enter | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_NUMPAD] = LAYOUT_preonic_grid(
|
||||
KC_GRV, _______, _______, KC_BTN3, _______, _______, _______, KC_NUM, KC_SLSH, KC_ASTR, KC_MINS, KC_BSLS,
|
||||
_______, KC_ACL0, KC_BTN1, KC_MS_U, KC_BTN2, KC_WH_U, _______, KC_7, KC_8, KC_9, KC_PLUS, KC_RBRC,
|
||||
_______, KC_ACL1, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, _______, KC_4, KC_5, KC_6, KC_PLUS, _______,
|
||||
_______, KC_ACL2, KC_VOLU, KC_MPRV, KC_MPLY, KC_MNXT, _______, KC_1, KC_2, KC_3, KC_ENT, _______,
|
||||
OSL(_SYMB), _______, KC_VOLD, KC_MUTE, KC_BSPC, KC_DEL, KC_ENT, KC_SPC, KC_0, KC_DOT, KC_ENT, _______
|
||||
),
|
||||
|
||||
/* Symbol
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | + | < | > | # | ~ | ( | ) | \ | : | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | ! | - | = | % | @ | _ | { | } | / | ? | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* |MUSIC | * | & | / | $ | ^ | | | [ | ] | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | FN |COLMAK|QWERTY| | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_SYMB] = 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,
|
||||
_______, KC_PIPE, KC_PLUS, KC_LABK, KC_RABK, KC_HASH, KC_TILD, KC_LPRN, KC_RPRN, KC_BSLS, KC_COLN, _______,
|
||||
_______, KC_EXLM, KC_MINS, KC_EQL, KC_PERC, KC_AT, KC_UNDS, KC_LCBR, KC_RCBR, KC_SLSH, KC_QUES, _______,
|
||||
TO(_MUSIC), KC_ASTR, KC_AMPR, KC_SLSH, KC_DLR, KC_CIRC, KC_PIPE, KC_LBRC, KC_RBRC, _______, _______, _______,
|
||||
_______, FUNCT, TO(_COLEMAK), TO(_QWERTY), _______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
/* Music
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | | | | | | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* |COLMAK| | | | | | | | | | MOD | TOG |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_MUSIC] = LAYOUT_preonic_grid(
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
TO(_COLEMAK), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, MU_NEXT, MU_TOGG
|
||||
)
|
||||
|
||||
};
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case FUNCT:
|
||||
if (record->event.pressed) {
|
||||
layer_off(_SYMB);
|
||||
layer_on(_FUNCT);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
};
|
|
@ -1,95 +0,0 @@
|
|||
# Choromanski
|
||||
|
||||
## Features
|
||||
* Colemak
|
||||
* Qwerty
|
||||
* Toggable function row
|
||||
* Symbol layer programmer friendly
|
||||
* Numpad/Mouse layer with media controls
|
||||
|
||||
## Layers
|
||||
|
||||
### 0 Colemak
|
||||
```
|
||||
,-----------------------------------------------------------------------------------.
|
||||
| 1 ` | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = \ |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| Tab | Q | W | F | P | G | J | L | U | Y | ; | [ ] |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| Esc | A | R | S | T | D | H | N | E | I | O | " |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| Shift| Z | X | C | V | B | K | M | , | . | / |Numpad|
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
|Symbol| Ctrl | Alt | GUI | Bksp | Del |Enter |Space | Left | Down | Up |Right |
|
||||
`-----------------------------------------------------------------------------------'
|
||||
```
|
||||
### 1 Qwerty
|
||||
```
|
||||
,-----------------------------------------------------------------------------------.
|
||||
| 1 ` | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = \ |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| Tab | Q | W | E | R | T | Y | U | I | O | P | [ ] |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| Esc | A | S | D | F | G | H | J | K | L | ; | " |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| Shift| Z | X | C | V | B | N | M | , | . | / |Numpad|
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
|Symbol| Ctrl | Alt | GUI | Bksp | Del |Enter |Space | Left | Down | Up |Right |
|
||||
`-----------------------------------------------------------------------------------'
|
||||
```
|
||||
### 2 Function Lock
|
||||
```
|
||||
,-----------------------------------------------------------------------------------.
|
||||
| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| | | | | | | | | | | | |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| | | | | | | | | | | | |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| | | | | | | | | | | | |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
|Symbol| | | | | | | | | | | |
|
||||
`-----------------------------------------------------------------------------------'
|
||||
```
|
||||
### 3 Numpad/Mouse with Media Controls
|
||||
```
|
||||
,-----------------------------------------------------------------------------------.
|
||||
| ` | | |M-clic| | | | | / | | - | \ |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| | ACL0 |L-clck| Up |R-clck|Scrl U| | 7 | 8 | 9 | + | ] |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| | ACL1 | Left | Down |Right |Scrl D| | 4 | 5 | 6 | + | |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| | ACL2 | VOLU | PREV |PAUSE | NEXT | | 1 | 2 | 3 |Enter | Back |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
|Symbol| | VOLD | MUTE | Bksp | Del |Enter |Space | 0 | . |Enter | |
|
||||
`-----------------------------------------------------------------------------------'
|
||||
```
|
||||
### 4 Symbols
|
||||
```
|
||||
,-----------------------------------------------------------------------------------.
|
||||
| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| | | | + | < | > | # | ~ | ( | ) | \ | : | |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| | ! | - | = | % | @ | _ | { | } | / | ? | |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
|MUSIC | * | & | / | $ | ^ | | | [ | ] | | | |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| | FN |COLMAK|QWERTY| | | | | | | | |
|
||||
`-----------------------------------------------------------------------------------'
|
||||
```
|
||||
### 5 Music
|
||||
```
|
||||
,-----------------------------------------------------------------------------------.
|
||||
| | | | | | | | | | | | |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| | | | | | | | | | | | |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| | | | | | | | | | | | |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| | | | | | | | | | | | |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
|COLMAK| | | | | | | | | | MOD | TOG |
|
||||
`-----------------------------------------------------------------------------------'
|
||||
```
|
|
@ -1,3 +0,0 @@
|
|||
TAP_DANCE_ENABLE = yes
|
||||
MOUSEKEY_ENABLE = yes
|
||||
AUDIO_ENABLE = yes
|
|
@ -1,81 +0,0 @@
|
|||
/* Copyright 2020 codecoffeecode
|
||||
* 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
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Main Layer
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Del |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Esc | A | S | D | F | G | H | J | K | L | ; | " |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Ctrl | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[0] = LAYOUT_preonic_1x2uC(
|
||||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL,
|
||||
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
|
||||
KC_LCTL, KC_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
|
||||
),
|
||||
|
||||
/* Lower
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ` | | | | | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | | | | | | | | - | | | | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[1] = LAYOUT_preonic_1x2uC(
|
||||
KC_GRV, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
|
||||
),
|
||||
|
||||
/* Raise
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | Reset| | | | | | - | = | [ | ] | \ |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[2] = 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,
|
||||
_______, QK_BOOT, DB_TOGG, _______, _______, _______, _______, _______, _______, _______, KC_F12, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
)};
|
|
@ -1 +0,0 @@
|
|||
# This layout is largely based on codecoffeecode's niu_mini layout
|
|
@ -1,35 +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
|
|
@ -1,226 +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"
|
||||
|
||||
enum preonic_layers {
|
||||
_QWERTY,
|
||||
_LOWER,
|
||||
_RAISE,
|
||||
_ADJUST
|
||||
};
|
||||
|
||||
enum preonic_keycodes {
|
||||
LOWER = SAFE_RANGE,
|
||||
RAISE,
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Qwerty (base layer)
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Esc |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Esc |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Bksp | A | S | D | F | G | H | J | K | L | ; | " |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | N | M | , | . | / | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Ctrl | F12 | GUI | Alt |Lower | Space |Raise |AltGr | [ | ] |Enter |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_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_ESC,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_ESC,
|
||||
KC_BSPC, 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_BSLS,
|
||||
KC_LCTL, KC_F12, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_RALT, KC_LBRC, KC_RBRC, KC_ENT
|
||||
),
|
||||
|
||||
/* Lower
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ~ | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | + | = | | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | LGUI | F7 | F8 | F9 | F10 | F11 | F12 | 1 | 2 | 3 | 4 | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | _ | | | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_LOWER] = LAYOUT_preonic_grid(
|
||||
KC_TILD, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
|
||||
_______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL,
|
||||
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_PLUS, KC_EQL, _______, _______,
|
||||
KC_LGUI, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_1, KC_2, KC_3, KC_4, _______,
|
||||
_______, _______, _______, _______, _______, KC_UNDS, KC_UNDS, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
/* 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 | Up | Down | Left |Right | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | F7 | F8 | F9 | F10 | F11 | F12 | Home | End | | | Shift|
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | _ | | | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_RAISE] = LAYOUT_preonic_grid(
|
||||
_______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
|
||||
_______, 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_UP, KC_DOWN, KC_LEFT, KC_RIGHT,_______,
|
||||
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_HOME, KC_END, _______, _______, KC_RSFT,
|
||||
_______, _______, _______, _______, _______, KC_UNDS, KC_UNDS, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
/* Adjust (Lower + Raise)
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | | | | | | | | | | | | Sleep|
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | Reset| Debug| | | | | | | | | |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | | | |Aud on|AudOff|AGnorm|AGswap| Vol+ | Vol- | Prev | Next | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | Play | | | | | PrScr|
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_ADJUST] = LAYOUT_preonic_grid(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_SLEP,
|
||||
_______, QK_BOOT, DB_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, MU_NEXT, AU_ON, AU_OFF, AG_NORM, AG_SWAP, KC_VOLU, KC_VOLD, KC_MPRV, KC_MNXT, _______,
|
||||
_______, AU_PREV, AU_NEXT, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, KC_MPLY, KC_MPLY, _______, _______, _______, _______, KC_PSCR
|
||||
)
|
||||
|
||||
|
||||
};
|
||||
|
||||
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);
|
||||
} 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;
|
||||
};
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
|
@ -1,72 +0,0 @@
|
|||
# Cranium's Preonic layout
|
||||
|
||||
This layout is based on the Preonic default with some changes I find interesting to share.
|
||||
|
||||
## Default layer
|
||||
```
|
||||
,-----------------------------------------------------------------------------------.
|
||||
| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Esc |
|
||||
|------|------|------|------|------|------|------|------|------|------|------|------|
|
||||
| Tab | Q | W | E | R | T | Y | U | I | O | P | Esc |
|
||||
|------|------|------|------|------|-------------|------|------|------|------|------|
|
||||
| Bksp | A | S | D | F | G | H | J | K | L | ; | " |
|
||||
|------|------|------|------|------|------|------|------|------|------|------|------|
|
||||
| Shift| Z | X | C | V | B | N | M | , | . | / | | |
|
||||
|------|------|------|------|------|------|------|------|------|------|------|------|
|
||||
| Ctrl | F12 | GUI | Alt |Lower | Space |Raise |AltGr | [ | ] |Enter |
|
||||
`-----------------------------------------------------------------------------------'
|
||||
```
|
||||
- As a Colemak user, Capslock was rebound to Backspace.
|
||||
- Escape was moved to the top-right of the keyboard
|
||||
- Enter was moved to the bottom-right of the keyboard. It's now easy to hit and can even be activated with the palm.
|
||||
- An F12 was put next to the left CTRL => it's the shortcut I use to toggle the Guake terminal.
|
||||
- I don't really use the key below my Escape (top-right, 2nd row), so I'll consider any ideas for the moment.
|
||||
|
||||
|
||||
## Lower
|
||||
```
|
||||
,-----------------------------------------------------------------------------------.
|
||||
| ~ | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 |
|
||||
|------|------|------|------|------|-------------|------|------|------|------|------|
|
||||
| | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del |
|
||||
|------|------|------|------|------|-------------|------|------|------|------|------|
|
||||
| Del | F1 | F2 | F3 | F4 | F5 | F6 | - | + | = | | |
|
||||
|------|------|------|------|------|------|------|------|------|------|------|------|
|
||||
| LGUI | F7 | F8 | F9 | F10 | F11 | F12 | 1 | 2 | 3 | 4 | |
|
||||
|------|------|------|------|------|------|------|------|------|------|------|------|
|
||||
| | | | | | _ | | | | | |
|
||||
`-----------------------------------------------------------------------------------'
|
||||
```
|
||||
- Not much changes here
|
||||
|
||||
## 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 | Up | Down | Left |Right | |
|
||||
|------|------|------|------|------|------|------|------|------|------|------|------|
|
||||
| | F7 | F8 | F9 | F10 | F11 | F12 | Home | End | | | Shift|
|
||||
|------|------|------|------|------|------|------|------|------|------|------|------|
|
||||
| | | | | | _ | | | | | |
|
||||
`-----------------------------------------------------------------------------------'
|
||||
```
|
||||
- Perhaps one of the most interesting change: the arrow keys were moved to the right-hand home row, activated with the Raise layer. It means I can use the arrow keys without moving my hand from the home row, by activating the Raise layer with my thumb. It took a while to adapt but it was totally worth it. To note, I also put Home/End on the same layer but one row below, with I also find really useful.
|
||||
|
||||
## Adjust
|
||||
```
|
||||
,-----------------------------------------------------------------------------------.
|
||||
| | | | | | | | | | | | Sleep|
|
||||
|------|------|------|------|------|------|------|------|------|------|------|------|
|
||||
| | Reset| Debug| | | | | | | | | |
|
||||
|------|------|------|------|------|-------------|------|------|------|------|------|
|
||||
| | | |Aud on|AudOff|AGnorm|AGswap| Vol+ | Vol- | Prev | Next | |
|
||||
|------|------|------|------|------|------|------|------|------|------|------|------|
|
||||
| |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | |
|
||||
|------|------|------|------|------|------|------|------|------|------|------|------|
|
||||
| | | | | | Play | | | | | PrScr|
|
||||
`-----------------------------------------------------------------------------------'
|
||||
```
|
||||
- The "arrow" keys act as Vol+/Vol-/Previous/Next on the Adjust layer (which is quite a natural mapping for these media keys).
|
|
@ -1 +0,0 @@
|
|||
SRC += muse.c
|
|
@ -1,47 +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
|
||||
|
||||
#define HOLD_ON_OTHER_KEY_PRESS
|
|
@ -1,159 +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 7 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
|
||||
|
||||
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
// [0] = LAYOUT_ortho_5x12(
|
||||
[0] = LAYOUT_ortho_5x12(
|
||||
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_QUOT,
|
||||
KC_ESC, 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_UP, KC_RSFT,
|
||||
MO(2), KC_LCTL, KC_LALT, KC_LGUI, LT(1,KC_SPC), KC_SPC, KC_SPC, LT(1,KC_SPC), KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT
|
||||
),
|
||||
|
||||
[1] = LAYOUT_ortho_5x12(
|
||||
KC_TILD, KC_F1, KC_F2, KC_F3, KC_F4, LGUI(KC_MINS), LGUI(KC_EQL), KC_NO, KC_NO, KC_NO, KC_NO, KC_DEL,
|
||||
KC_NO, KC_F5, KC_F6, KC_F7, KC_F8, LGUI(KC_LCBR), LGUI(KC_RCBR), KC_LCBR, KC_RCBR, KC_DQUO, KC_QUOT, KC_BSLS,
|
||||
KC_NO, KC_F9, KC_F10, KC_F11, KC_F12, LGUI(KC_LBRC), LGUI(KC_RBRC), KC_LBRC, KC_RBRC, KC_LT, KC_GT, KC_PENT,
|
||||
KC_TRNS, KC_UNDS, KC_PLUS, KC_MINS, KC_EQL, LGUI(KC_QUES), LGUI(KC_SLSH), KC_QUES, KC_SLSH, KC_QUES, LCAG(KC_UP), KC_TRNS,
|
||||
MO(15), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, LGUI(KC_SPC), LGUI(KC_SPC), KC_TRNS, KC_TRNS, LGUI(KC_LBRC), LCAG(KC_DOWN), LGUI(KC_RBRC)
|
||||
),
|
||||
|
||||
[2] = LAYOUT_ortho_5x12(
|
||||
DB_TOGG, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL,
|
||||
RGB_TOG, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_NO,
|
||||
HYPR(KC_H), KC_MUTE, KC_VOLD, KC_VOLU, KC_NO, KC_NO, KC_F21, KC_F22, KC_F23, KC_F24, KC_NO, KC_NO,
|
||||
KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PGUP, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(15), KC_NO, KC_NO, MO(15), KC_TRNS, KC_HOME, KC_PGDN, KC_END
|
||||
),
|
||||
|
||||
|
||||
|
||||
|
||||
// Musical keys
|
||||
|
||||
[7] = LAYOUT_ortho_5x12(
|
||||
|
||||
// Chromatic Scale Vertical
|
||||
// 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
|
||||
KC_ESC, MI_C, MI_E, MI_Gs, MI_C1, MI_E1, MI_Gs1, MI_C2, MI_E2, MI_Gs2, MI_C3, MI_TR0,
|
||||
KC_TAB, MI_Cs, MI_F, MI_A, MI_Cs1, MI_F1, MI_A1, MI_Cs2, MI_F2, MI_A2, MI_Cs3, MI_TRSU,
|
||||
KC_SPC, MI_D, MI_Fs, MI_As, MI_D1, MI_Fs1, MI_As1, MI_D2, MI_Fs2, MI_As2, MI_D3, MI_TRSD,
|
||||
MI_SUST, MI_Ds, MI_G, MI_B, MI_Ds1, MI_G1, MI_B1, MI_Ds2, MI_G2, MI_B2, MI_Ds3, MI_OCTU,
|
||||
MO(15), KC_LCTL, KC_LALT, KC_LGUI, MI_BNDD, MI_SUST, MI_SUST, MI_BNDU, KC_NO, MI_MODD, MI_MODU, MI_OCTD
|
||||
),
|
||||
|
||||
|
||||
[8] = LAYOUT_ortho_5x12(
|
||||
// Pocket Operator Scale Vertical
|
||||
//1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
|
||||
KC_ESC, MI_C, MI_G, MI_C1, MI_G1, MI_C2, MI_G2, MI_C3, MI_G3, MI_C4, MI_G4, MI_TR0,
|
||||
KC_TAB, MI_D, MI_Gs, MI_D1, MI_Gs1, MI_D2, MI_Gs2, MI_D3, MI_Gs3, MI_D4, MI_Gs4, MI_TRSU,
|
||||
KC_SPC, MI_Ds, MI_As, MI_Ds1, MI_As1, MI_Ds2, MI_As2, MI_Ds3, MI_As3, MI_Ds4, MI_As4, MI_TRSD,
|
||||
MI_SUST, MI_F, MI_B, MI_F1, MI_B1, MI_F2, MI_B2, MI_F3, MI_B3, MI_F4, MI_B4, MI_OCTU,
|
||||
MO(15), KC_LCTL, KC_LALT, KC_LGUI, MI_BNDD, MI_SUST, MI_SUST, MI_BNDU, KC_NO, MI_MODD, MI_MODU, MI_OCTD
|
||||
),
|
||||
|
||||
[9] = LAYOUT_ortho_5x12(
|
||||
// Major scale Vertical
|
||||
// 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
|
||||
KC_ESC, MI_C, MI_G, MI_D1, MI_A1, MI_E2, MI_B2, MI_F3, MI_C4, MI_G4, MI_D5, MI_TR0,
|
||||
KC_TAB, MI_D, MI_A, MI_E1, MI_B1, MI_F2, MI_C3, MI_G3, MI_D4, MI_A4, MI_E5, MI_TRSU,
|
||||
KC_SPC, MI_E, MI_B, MI_F1, MI_C2, MI_G2, MI_D3, MI_A3, MI_E4, MI_B4, MI_F5, MI_TRSD,
|
||||
MI_SUST, MI_F, MI_C1, MI_G1, MI_D2, MI_A2, MI_E3, MI_B3, MI_F4, MI_C5, MI_G5, MI_OCTU,
|
||||
MO(15), KC_LCTL, KC_LALT, KC_LGUI, MI_BNDD, MI_SUST, MI_SUST, MI_BNDU, KC_NO, MI_MODD, MI_MODU, MI_OCTD
|
||||
),
|
||||
|
||||
[10] = LAYOUT_ortho_5x12(
|
||||
// Black Keys Vertical
|
||||
// 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
|
||||
KC_ESC, MI_C, MI_A, MI_G1, MI_F2, MI_D3, MI_C4, MI_A4, MI_G5, KC_NO, KC_NO, MI_TR0,
|
||||
KC_TAB, MI_D, MI_C1, MI_A1, MI_G2, MI_F3, MI_D4, MI_C5, MI_A5, KC_NO, KC_NO, MI_TRSU,
|
||||
KC_SPC, MI_F, MI_D1, MI_C2, MI_A2, MI_G3, MI_F4, MI_D5, KC_NO, KC_NO, KC_NO, MI_TRSD,
|
||||
MI_SUST, MI_G, MI_F1, MI_D2, MI_C3, MI_A3, MI_G4, MI_F5, KC_NO, KC_NO, KC_NO, MI_OCTU,
|
||||
MO(15), KC_LCTL, KC_LALT, KC_LGUI, MI_BNDD, MI_SUST, MI_SUST, MI_BNDU, KC_NO, MI_MODD, MI_MODU, MI_OCTD
|
||||
),
|
||||
|
||||
|
||||
[11] = LAYOUT_ortho_5x12(
|
||||
// Chromatic Scale Horizontal
|
||||
//1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
|
||||
KC_ESC, MI_C, MI_Cs, MI_D, MI_Ds, MI_E, MI_F, MI_Fs, MI_G, MI_Gs, MI_A, MI_TR0,
|
||||
KC_TAB, MI_As, MI_B, MI_C1, MI_Cs1, MI_D1, MI_Ds1, MI_E1, MI_F1, MI_Fs1, MI_G1, MI_TRSU,
|
||||
KC_SPC, MI_Gs1, MI_A1, MI_As1, MI_B1, MI_C2, MI_Cs2, MI_D2, MI_Ds2, MI_E2, MI_F2, MI_TRSD,
|
||||
MI_SUST, MI_Fs2, MI_G2, MI_Gs2, MI_A2, MI_As2, MI_B2, MI_C3, MI_Cs3, MI_D3, MI_Ds3, MI_OCTU,
|
||||
MO(15), KC_LCTL, KC_LALT, KC_LGUI, MI_BNDD, MI_SUST, MI_SUST, MI_BNDU, KC_NO, MI_MODD, MI_MODU, MI_OCTD
|
||||
|
||||
),
|
||||
[12] = LAYOUT_ortho_5x12(
|
||||
// Pocket Operator Scale Horizontal
|
||||
//1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
|
||||
KC_ESC, MI_C, MI_D, MI_Ds, MI_F, MI_G, MI_Gs, MI_As, MI_B, MI_C1, MI_D1, MI_TR0,
|
||||
KC_TAB, MI_Ds1, MI_F1, MI_G1, MI_Gs1, MI_As1, MI_B1, MI_C2, MI_D2, MI_Ds2, MI_F2, MI_TRSU,
|
||||
KC_SPC, MI_G2, MI_Gs2, MI_As2, MI_B2, MI_C3, MI_D3, MI_Ds3, MI_F3, MI_G3, MI_Gs3, MI_TRSD,
|
||||
MI_SUST, MI_As3, MI_B3, MI_C4, MI_D4, MI_Ds4, MI_F4, MI_G4, MI_Gs4, MI_As4, MI_B4, MI_OCTU,
|
||||
MO(15), KC_LCTL, KC_LALT, KC_LGUI, MI_BNDD, MI_SUST, MI_SUST, MI_BNDU, KC_NO, MI_MODD, MI_MODU, MI_OCTD
|
||||
|
||||
|
||||
|
||||
),
|
||||
|
||||
|
||||
[13] = LAYOUT_ortho_5x12(
|
||||
// Major scale Horizontal
|
||||
//1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
|
||||
KC_ESC, MI_C, MI_D, MI_E, MI_F, MI_G, MI_A, MI_B, MI_C1, MI_D1, MI_E1, MI_TR0,
|
||||
KC_TAB, MI_F1, MI_G1, MI_A1, MI_B1, MI_C2, MI_D2, MI_E2, MI_F2, MI_G2, MI_A2, MI_TRSU,
|
||||
KC_SPC, MI_B2, MI_C3, MI_D3, MI_E3, MI_F3, MI_G3, MI_A3, MI_B3, MI_C4, MI_D4, MI_TRSD,
|
||||
MI_SUST, MI_E4, MI_F4, MI_G4, MI_A4, MI_B4, MI_C5, MI_D5, MI_E5, MI_F5, MI_G5, MI_OCTU,
|
||||
MO(15), KC_LCTL, KC_LALT, KC_LGUI, MI_BNDD, MI_SUST, MI_SUST, MI_BNDU, KC_NO, MI_MODD, MI_MODU, MI_OCTD
|
||||
|
||||
|
||||
),
|
||||
[14] = LAYOUT_ortho_5x12(
|
||||
// Black Keys Horizontal
|
||||
//1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
|
||||
KC_ESC, MI_C, MI_D, MI_F, MI_G, MI_A, MI_C1, MI_D1, MI_F1, MI_G1, MI_A1, MI_TR0,
|
||||
KC_TAB, MI_C2, MI_D2, MI_F2, MI_G2, MI_A2, MI_C3, MI_D3, MI_F3, MI_G3, MI_A3, MI_TRSU,
|
||||
KC_SPC, MI_C4, MI_D4, MI_F4, MI_G4, MI_A4, MI_C, MI_D, MI_F, MI_G, MI_A, MI_TRSD,
|
||||
MI_SUST, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, MI_OCTU,
|
||||
MO(15), KC_LCTL, KC_LALT, KC_LGUI, MI_BNDD, MI_SUST, MI_SUST, MI_BNDU, KC_NO, MI_MODD, MI_MODU, MI_OCTD
|
||||
|
||||
),
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Settings
|
||||
[15] = LAYOUT_ortho_5x12(
|
||||
DB_TOGG, MI_CH1, MI_CH2, MI_CH3, MI_CH4, MI_CH5, MI_CH6, MI_CH7, MI_CH8, AU_TOGG, KC_NO, QK_BOOT,
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, KC_NO, DF(11), DF(12), DF(13), DF(14), KC_NO, DB_TOGG,
|
||||
RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, KC_NO, DF(7), DF(8), DF(9), DF(10), KC_NO, KC_NO,
|
||||
KC_TRNS, KC_NO, KC_NO, KC_NO, KC_TRNS, DF(0), DF(0), KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO
|
||||
)
|
||||
|
||||
|
||||
};
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
SRC += muse.c
|
||||
|
||||
MIDI_ENABLE = yes
|
|
@ -1,46 +0,0 @@
|
|||
/*
|
||||
Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) 2020 Max Drasbeck
|
||||
*
|
||||
* You are free to:
|
||||
*
|
||||
* Share — copy and redistribute the material in any medium or format
|
||||
* Adapt — remix, transform, and build upon the material
|
||||
* for any purpose, even commercially.
|
||||
*
|
||||
* The licensor cannot revoke these freedoms as long as you follow the license terms.
|
||||
*/
|
||||
|
||||
#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
|
|
@ -1,242 +0,0 @@
|
|||
/* Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) 2020 Max Drasbeck
|
||||
*
|
||||
* You are free to:
|
||||
*
|
||||
* Share — copy and redistribute the material in any medium or format
|
||||
* Adapt — remix, transform, and build upon the material
|
||||
* for any purpose, even commercially.
|
||||
*
|
||||
* The licensor cannot revoke these freedoms as long as you follow the license terms.
|
||||
*/
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "muse.h"
|
||||
|
||||
enum preonic_layers {
|
||||
_QWERTY,
|
||||
_COLEMAK,
|
||||
_DVORAK,
|
||||
_LOWER,
|
||||
_RAISE,
|
||||
_ADJUST
|
||||
};
|
||||
|
||||
enum preonic_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
COLEMAK,
|
||||
DVORAK,
|
||||
LOWER,
|
||||
RAISE,
|
||||
BACKLIT
|
||||
};
|
||||
|
||||
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, 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_LBRC,
|
||||
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, SC_SENT,
|
||||
KC_LCTL, KC_NO, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_NUBS, KC_LCTL, KC_NO, KC_NO
|
||||
),
|
||||
|
||||
[_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] = 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] = LAYOUT_preonic_grid(
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL,
|
||||
KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO , KC_PGUP, KC_MINS, KC_EQL, KC_RBRC,
|
||||
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_NO, KC_HOME, KC_PGDN, KC_END, KC_NO, KC_NUHS,
|
||||
KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO, KC_NO, KC_NO, KC_INT1, KC_ENT,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_MPLY
|
||||
),
|
||||
|
||||
[_RAISE] = LAYOUT_preonic_grid(
|
||||
KC_TRNS, RALT(KC_1), RALT(KC_2), RALT(KC_3), RALT(KC_4), RALT(KC_5), RALT(KC_6), RALT(KC_7), RALT(KC_8), RALT(KC_9), RALT(KC_0), KC_DEL,
|
||||
KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_UP, KC_MINS, KC_EQL, KC_RBRC,
|
||||
KC_ESC, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_RGHT, KC_NO, KC_NUHS,
|
||||
KC_LSFT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_VOLD, KC_VOLU, KC_MUTE, KC_INT1, SC_SENT,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_RALT, KC_TRNS, KC_TRNS, KC_TRNS, RALT(KC_NUBS), KC_TRNS, KC_VOLD, KC_VOLU, KC_MPLY
|
||||
),
|
||||
|
||||
/* Adjust (Lower + Raise)
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | Reset| | | | | | | | | | Del |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | | | |Aud on|AudOff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_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, 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) {
|
||||
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;
|
||||
}
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
# drasbeck's Preonic keymap
|
||||
Danish layout with Danish characters on default layer.
|
||||
|
||||
```
|
||||
Default
|
||||
,-----------------------------------------------------------------------------------.
|
||||
|KC_GRV| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | BSPC |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| TAB | q | w | e | r | t | y | u | i | o | p | å |
|
||||
|------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
| ESC | a | s | d | f | g | h | j | k | l | æ | ø |
|
||||
|------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
|L SHFT| z | x | c | v | b | n | m | , | . | - |SFTENT|
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
|L CTRL| | L ALT| L GUI| LOWER| SPACE | RAISE| NUBS | L CTL| | |
|
||||
`-----------------------------------------------------------------------------------'
|
||||
```
|
|
@ -1 +0,0 @@
|
|||
SRC += muse.c
|
|
@ -1,87 +0,0 @@
|
|||
#pragma once
|
||||
#define TAPPING_TERM 200
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* Leader Key
|
||||
========================================================================== */
|
||||
|
||||
// Activates the leader key
|
||||
// #define LEADER_PER_KEY_TIMING
|
||||
// resets the timeout after each key is tapped
|
||||
// #define LEADER_TIMEOUT 240
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* Autoshifting
|
||||
========================================================================== */
|
||||
|
||||
// This controls how long you have to hold a key before you get the shifted state.
|
||||
#define AUTO_SHIFT_TIMEOUT 150
|
||||
|
||||
// Do not Auto Shift special keys -_, =+, [{, ]}, ;:, '", ,<, .>, and /?
|
||||
// #define NO_AUTO_SHIFT_SPECIAL
|
||||
|
||||
// Do not Auto Shift numeric keys, zero through nine.
|
||||
#define NO_AUTO_SHIFT_NUMERIC
|
||||
|
||||
// Do not Auto Shift alpha characters, which include A through Z.
|
||||
// #define NO_AUTO_SHIFT_ALPHA
|
||||
|
||||
// Lower the Auto Shift timeout variable (down)
|
||||
// AS_DOWN
|
||||
|
||||
// Raise the Auto Shift timeout variable (up)
|
||||
// AS_UP
|
||||
|
||||
// Report your current Auto Shift timeout value
|
||||
// AS_RPT
|
||||
|
||||
// Turns on the Auto Shift Function
|
||||
// AS_ON
|
||||
|
||||
// Turns off the Auto Shift Function
|
||||
// AS_OFF
|
||||
|
||||
// Toggles the state of the Auto Shift feature
|
||||
// AS_TOGG
|
||||
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
#define STARTUP_SONG SONG(COIN_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
|
||||
|
|
@ -1,229 +0,0 @@
|
|||
#include QMK_KEYBOARD_H
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* LAYER NAMES
|
||||
==========================================================================
|
||||
1. To create a layer, define a (readable) name and set layer value
|
||||
2. Under "Layer definitions" section, define keymaps
|
||||
========================================================================== */
|
||||
|
||||
enum layer_names {
|
||||
L_QWERTY,
|
||||
L_LOWER,
|
||||
L_RAISE,
|
||||
L_ADJUST,
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
/* TAP DANCE
|
||||
==========================================================================
|
||||
1. Define TD names here
|
||||
2. Register action in tap_dance_actions[]
|
||||
========================================================================== */
|
||||
|
||||
enum {
|
||||
TD_BRC = 0,
|
||||
TD_MIN,
|
||||
TD_GV_ESC,
|
||||
TD_BS
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
/* CUSTOM KEYMAPS
|
||||
========================================================================== */
|
||||
|
||||
// Tap dances
|
||||
#define TD_ESCP TD(TD_GV_ESC) // Tap for grave, twice for escape
|
||||
#define TD_MINS TD(TD_MIN) // Tap for minus, twice for equal
|
||||
#define TD_BRAC TD(TD_BRC) // Tap for open brace, twice for close
|
||||
|
||||
// Layers
|
||||
#define LT2_TAB LT(L_RAISE, KC_TAB) // Tap for tab, hold for RAISE
|
||||
#define LT2_ENT LT(L_RAISE, KC_ENT) // Tap for enter, hold for RAISE
|
||||
#define LT1_BSP LT(L_LOWER, KC_BSPC) // Tap for backspace, hold for LOWER
|
||||
#define LT1_SPC LT(L_LOWER, KC_SPC) // Tap for space, hold for LOWER
|
||||
|
||||
// Modifiers
|
||||
#define LG_ZMIN LGUI(KC_EQUAL) // Command + plus (zoom in)
|
||||
#define LG_ZMOT LGUI(KC_MINUS) // Command + minus (zoom out)
|
||||
#define MT_SHFT MT(MOD_RSFT, KC_ENT) // Tap for enter, hold for shift
|
||||
#define MT_HILF S(A(KC_LEFT)) // Press for shift + alt + left
|
||||
#define MT_HIRT S(A(KC_RGHT)) // Press for shift + alt + right
|
||||
#define MT_UNTB S(KC_TAB) // Press for shift + tab
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* Layer definitions
|
||||
========================================================================== */
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* QWERTY
|
||||
* ,-----------------------------------------------------------------------------------------------.
|
||||
* | ` ESC | 1 ! | 2 @ | 3 # | 4 $ | 5 % | 6 ^ | 7 & | 8 * | 9 ( | 0 ) | -_ =+ |
|
||||
* |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------|
|
||||
* | TB/RS | Q | W | E | R | T | Y | U | I | O | P | [{ }] |
|
||||
* |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------|
|
||||
* | BS/LW | A | S | D | F | G | H | J | K | L | ; | ' |
|
||||
* |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------|
|
||||
* | SFT | Z | X | C | V | B | N | M | , | . | / | SF/RN |
|
||||
* |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------|
|
||||
* | LEADR | | CTL | ALT | CMD | BSP | SP/LW | RN/RS | ← | ↑ | ↓ | → |
|
||||
* `-----------------------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
[L_QWERTY] = LAYOUT_preonic_grid(
|
||||
/*01 02 03 04 05 06 07 08 09 10 11 12 */
|
||||
TD_ESCP, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, TD_MINS,
|
||||
LT2_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, TD_BRAC,
|
||||
LT1_BSP, 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, MT_SHFT,
|
||||
LG_ZMOT, LG_ZMIN, KC_LCTL, KC_LALT, KC_LGUI, KC_BSPC, LT1_SPC, LT2_ENT, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT
|
||||
),
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* LOWER
|
||||
* ,-----------------------------------------------------------------------------------------------.
|
||||
* | ASHFT | | | | | | | | | | | BSP |
|
||||
* |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------|
|
||||
* | UNTAB | | | | | | | - | + | * | / | |
|
||||
* |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------|
|
||||
* | | S+A+← | S+A+→ | | | | | ← | ↑ | ↓ | → | RTN |
|
||||
* |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------|
|
||||
* | | | | | | | | [ { | ] } | ( | ) | \ | |
|
||||
* |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------|
|
||||
* | | | | | | | >|| | | << | Vol-U | Vol-D | >> |
|
||||
* `-----------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
|
||||
[L_LOWER] = LAYOUT_preonic_grid(
|
||||
/*01 02 03 04 05 06 07 08 09 10 11 12 */
|
||||
AS_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BSPC,
|
||||
MT_UNTB, _______, _______, _______, _______, _______, _______, KC_MINUS, KC_PLUS, KC_PAST, KC_PSLS, _______,
|
||||
_______, MT_HILF, MT_HIRT, _______, _______, _______, _______, KC_LEFT, KC_UP, KC_DOWN, KC_RIGHT, KC_ENTER,
|
||||
_______, _______, _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, KC_LPRN, KC_RPRN, KC_BSLS,
|
||||
_______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_MRWD, KC_VOLU, KC_VOLD, KC_MFFD
|
||||
),
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* RAISE
|
||||
* ,-----------------------------------------------------------------------------------------------.
|
||||
* | ASHFT | BTSDN | BTSUP | VUP | VDN | | | / | * | ( | ) | |
|
||||
* |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------|
|
||||
* | | | | | | | | 7 | 8 | 9 | + | |
|
||||
* |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------|
|
||||
* | | | | | | | | 4 | 5 | 6 | - | |
|
||||
* |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------|
|
||||
* | CAP | | | | | | | 1 | 2 | 3 | / | |
|
||||
* |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------|
|
||||
* | | | | | | | | | 0 | . | , | |
|
||||
* `-----------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[L_RAISE] = LAYOUT_preonic_grid(
|
||||
/*01 02 03 04 05 06 07 08 09 10 11 12 */
|
||||
AS_TOGG, KC_F1, KC_F2, KC_VOLU, KC_VOLD, _______, _______, KC_PSLS, KC_PAST, KC_LPRN, KC_RPRN, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, KC_PLUS, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, KC_P4, KC_P5, KC_P6, KC_MINUS, _______,
|
||||
KC_CAPS, _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, KC_PSLS, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, KC_P0, KC_PDOT, KC_COMM, _______
|
||||
),
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* Adjust (Raise + Lower together)
|
||||
* ,-----------------------------------------------------------------------------------------------.
|
||||
* | F12 | FN2 | FN3 | FN4 | FN5 | FN6 | FN7 | FN8 | FN9 | F10 | F11 | FN1 |
|
||||
* |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------|
|
||||
* | | | | | | | | | | | | |
|
||||
* |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------|
|
||||
* | | | | | | | | | | | | |
|
||||
* |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------|
|
||||
* | TOG SF| | | | | | | | | | | |
|
||||
* |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------|
|
||||
* | DESGN | | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
|
||||
[L_ADJUST] = LAYOUT_preonic_grid(
|
||||
/*01 02 03 04 05 06 07 08 09 10 11 12 */
|
||||
KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
AS_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
)
|
||||
|
||||
};
|
||||
|
||||
// this function
|
||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
return update_tri_layer_state(state, L_LOWER, L_RAISE, L_ADJUST);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* BLANK
|
||||
* ,-----------------------------------------------------------------------------------------------.
|
||||
* | | | | | | | | | | | | |
|
||||
* |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------|
|
||||
* | | | | | | | | | | | | |
|
||||
* |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------|
|
||||
* | | | | | | | | | | | | |
|
||||
* |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------|
|
||||
* | | | | | | | | | | | | |
|
||||
* |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------|
|
||||
* | | | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
/*
|
||||
[L_BLANK] = LAYOUT_preonic_grid(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* Tap Dance Definitions
|
||||
========================================================================== */
|
||||
|
||||
tap_dance_action_t tap_dance_actions[] = {
|
||||
// Tap once for Left Brace, twice for Right Brace
|
||||
[TD_BRC] = ACTION_TAP_DANCE_DOUBLE(KC_LBRC, KC_RBRC),
|
||||
//Tap once for Minus, twice for Equal
|
||||
[TD_MIN] = ACTION_TAP_DANCE_DOUBLE(KC_MINUS, KC_EQUAL),
|
||||
// Tap once for Grave, tap twice for Escape
|
||||
[TD_GV_ESC] = ACTION_TAP_DANCE_DOUBLE(KC_GRAVE, KC_ESCAPE)
|
||||
};
|
|
@ -1,11 +0,0 @@
|
|||
# Egstad's Layout
|
||||
|
||||
## Build
|
||||
|
||||
- Cd into this directory, run `npm start`
|
||||
- Cd into root with `npm run qmk`, locate bin file "preonic_rev3_egstad.bin"
|
||||
- Drop that bin into QMK Toolbox and flash Keeb
|
||||
|
||||
## Learnings
|
||||
|
||||
1. Combos — Don't fuck with 'em. They made my keys feel sticky and increased typos. Would be great on macropad or something tho!
|
|
@ -1,3 +0,0 @@
|
|||
SRC += muse.c
|
||||
TAP_DANCE_ENABLE = yes
|
||||
AUTO_SHIFT_ENABLE = yes
|
|
@ -1,38 +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 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
|
||||
|
||||
#endif
|
|
@ -1,222 +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,
|
||||
_COLEMAK,
|
||||
_DVORAK,
|
||||
_LOWER,
|
||||
_RAISE,
|
||||
_ADJUST
|
||||
};
|
||||
|
||||
enum preonic_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
COLEMAK,
|
||||
DVORAK,
|
||||
LOWER,
|
||||
RAISE,
|
||||
BACKLIT
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Qwerty
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | `Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | \ |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Ctrl | A | S | D | F | G | H | J | K | L | ; | " |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_QWERTY] = LAYOUT_preonic_1x2uC(
|
||||
QK_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS,
|
||||
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_LCTL, 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,
|
||||
BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
|
||||
),
|
||||
|
||||
/* Colemak
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | `Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | \ |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Ctrl | 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_1x2uC(
|
||||
QK_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS,
|
||||
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_LCTL, 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, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
|
||||
),
|
||||
|
||||
/* Dvorak
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | `ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | \ |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Ctrl | 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_1x2uC(
|
||||
QK_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS,
|
||||
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_LCTL, 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, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
|
||||
),
|
||||
|
||||
/* Lower
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_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_BSPC,
|
||||
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_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 | Bksp |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_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_BSPC,
|
||||
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_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 |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | Reset| | | | | | | | | | Del |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | | | |Aud on|AudOff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | |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,
|
||||
_______, _______, 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
|
||||
PORTE &= ~(1<<6);
|
||||
} else {
|
||||
unregister_code(KC_RSFT);
|
||||
PORTE |= (1<<6);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
};
|
|
@ -1 +0,0 @@
|
|||
# The default Preonic layout - largely based on the Planck's
|
|
@ -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
|
|
@ -1,309 +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"
|
||||
|
||||
enum preonic_layers {
|
||||
_QWERTY,
|
||||
_COLEMAK,
|
||||
_DVORAK,
|
||||
_LOWER,
|
||||
_RAISE,
|
||||
_ADJUST,
|
||||
_MOUSE
|
||||
};
|
||||
|
||||
enum preonic_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
COLEMAK,
|
||||
DVORAK,
|
||||
LOWER,
|
||||
RAISE,
|
||||
EMOJI
|
||||
};
|
||||
|
||||
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 |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Esc | A | S | D | F | G | H | J | K | L | ; | " |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
// replaced BACKLIT with EMOJI since I have no LEDs
|
||||
[_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,
|
||||
CTL_T(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),
|
||||
EMOJI, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
|
||||
),
|
||||
|
||||
/* Colemak
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | 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,
|
||||
CTL_T(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),
|
||||
EMOJI, 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,
|
||||
CTL_T(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),
|
||||
EMOJI, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
|
||||
),
|
||||
|
||||
/* Lower
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | 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_DEL,
|
||||
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
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ` | ! | @ | # | $ | % | 6 | 7 | SCLK | UP | PAUS | PGUP |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | LFT | DOWN | RGT | PGDN |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_RAISE] = LAYOUT_preonic_grid(
|
||||
KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_6, KC_7, KC_SCRL, KC_UP, KC_PAUS, KC_PGUP,
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_LEFT, KC_DOWN, KC_RIGHT, KC_PGDN,
|
||||
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 |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | Reset| | | | | | | | | | Del |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | | | |Aud on|AudOff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| Mouse| | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_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, 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, TG(_MOUSE), _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
|
||||
[_MOUSE] = LAYOUT_preonic_grid(
|
||||
_______, KC_ACL0, KC_ACL1, KC_ACL2, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BTN3, XXXXXXX, XXXXXXX,
|
||||
_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BTN1, KC_MS_U, KC_BTN2, KC_WH_U,
|
||||
_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D,
|
||||
_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, KC_WH_L, XXXXXXX, KC_WH_R, XXXXXXX,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
)
|
||||
|
||||
};
|
||||
|
||||
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 EMOJI:
|
||||
if (record->event.pressed) {
|
||||
tap_code16(C(G(KC_SPC)));
|
||||
}
|
||||
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;
|
||||
}
|
||||
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) {
|
||||
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;
|
||||
}
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
# Elisiano's Preonic layout - largely based on the Planck's
|
||||
|
||||
All layouts are documented in comments
|
|
@ -1 +0,0 @@
|
|||
SRC += muse.c
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue