Changed a lot...

This commit is contained in:
Frederik Baerentsen 2020-05-26 22:31:54 +02:00
parent 2c5ed295f0
commit 7e9bd7264a
465 changed files with 1451 additions and 33148 deletions

View File

@ -37,3 +37,5 @@
// If you are using an Elite C rev3 on the slave side, uncomment the lines below:
#define SPLIT_USB_DETECT
#define SPLIT_USB_TIMEOUT 1000
#define KEYLOGGER_LENGTH 10

View File

@ -2,35 +2,6 @@
uint8_t is_master;
#ifdef OLED_DRIVER_ENABLE
# define KEYLOGGER_LENGTH 10
static uint32_t oled_timer = 0;
static char keylog_str[KEYLOGGER_LENGTH + 1] = {"\n"};
static uint16_t log_timer = 0;
// clang-format off
static const char PROGMEM code_to_name[0xFF] = {
// 0 1 2 3 4 5 6 7 8 9 A B c D E F
' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', // 0x
'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '1', '2', // 1x
'3', '4', '5', '6', '7', '8', '9', '0', 20, 19, 27, 26, 22, '-', '=', '[', // 2x
']','\\', '#', ';','\'', '`', ',', '.', '/', 128, ' ', ' ', ' ', ' ', ' ', ' ', // 3x
' ', ' ', ' ', ' ', ' ', ' ', 'P', 'S', ' ', ' ', ' ', ' ', 16, ' ', ' ', ' ', // 4x
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 5x
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 6x
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 7x
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 8x
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 9x
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Ax
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Bx
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Cx
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Dx
'C', 'S', 'A', 'C', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Ex
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' // Fx
};
void add_keylog(uint16_t keycode);
#endif
#ifndef UNICODE_ENABLE
# define UC(x) KC_NO
#endif
@ -52,7 +23,7 @@ void add_keylog(uint16_t keycode);
LAYOUT_wrapper( \
KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_MINS, \
LALT_T(KC_TAB), K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \
OS_LSFT, CTL_T(K21), K22, K23, K24, K25, KC_NO, KC_NO, MEH(KC_MINS), KC_NO, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \
OS_LSFT, CTL_T(K21), K22, K23, K24, K25, KC_NO, MEH(KC_MINS), TG(_DIABLO), KC_NO, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \
KC_MUTE, OS_LALT, KC_GRV, KC_SPC, BK_LWER, DL_RAIS, KC_ENT, OS_RGUI, UC(0x03A8), UC(0x2E2E) \
)
/* Re-pass though to allow templates to be used */
@ -107,12 +78,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_____________CARPLAX_QFMLWY_L2_____________, _____________CARPLAX_QFMLWY_R2_____________,
_____________CARPLAX_QFMLWY_L3_____________, _____________CARPLAX_QFMLWY_R3_____________
),
[_MODS] = LAYOUT_wrapper(
_______, ___________________BLANK___________________, ___________________BLANK___________________, _______,
_______, ___________________BLANK___________________, ___________________BLANK___________________, _______,
KC_LSFT, ___________________BLANK___________________, _______, _______, _______, _______, ___________________BLANK___________________, KC_RSFT,
_______, _______, KC_LALT, _______, _______, _______, _______, KC_RGUI, _______, _______
),
[_DIABLO] = LAYOUT_wrapper(
KC_ESC, KC_S, KC_I, KC_F, KC_M, KC_T, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO,
KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_G, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
KC_LCTL, KC_D3_1, KC_D3_2, KC_D3_3, KC_D3_4, KC_Z, KC_J, KC_L, TG(_DIABLO), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
KC_DIABLO_CLEAR, KC_J, KC_NO, SFT_T(KC_SPACE), ALT_T(KC_Q), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO
),
[_LOWER] = LAYOUT_wrapper(
KC_F12, _________________LOWER_L1__________________, _________________LOWER_R1__________________, KC_F11,
_______, _________________LOWER_L2__________________, _________________LOWER_R2__________________, KC_PIPE,
@ -142,10 +120,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
if (record->event.pressed) {
#ifdef OLED_DRIVER_ENABLE
oled_timer = timer_read32();
add_keylog(keycode);
#endif
#ifndef SPLIT_KEYBOARD
if (keycode == RESET && !is_master) {
return false;
@ -154,133 +128,16 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
}
return true;
}
void matrix_init_keymap(void) { is_master = (uint8_t)is_keyboard_master(); }
#ifdef OLED_DRIVER_ENABLE
oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; }
void add_keylog(uint16_t keycode) {
if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX) || (keycode >= QK_MODS && keycode <= QK_MODS_MAX)) {
keycode = keycode & 0xFF;
} else if (keycode > 0xFF) {
keycode = 0;
}
for (uint8_t i = (KEYLOGGER_LENGTH - 1); i > 0; --i) {
keylog_str[i] = keylog_str[i - 1];
}
if (keycode < (sizeof(code_to_name) / sizeof(char))) {
keylog_str[0] = pgm_read_byte(&code_to_name[keycode]);
}
log_timer = timer_read();
}
void update_log(void) {
if (timer_elapsed(log_timer) > 750) {
// add_keylog(0);
}
}
void render_keylogger_status(void) {
oled_write_P(PSTR("Keylogger: "), false);
oled_write(keylog_str, false);
}
void render_default_layer_state(void) {
oled_write_P(PSTR("Layout: "), false);
switch (get_highest_layer(default_layer_state)) {
case _QWERTY: oled_write_ln_P(PSTR("Qwerty"), false); break;
case _COLEMAK: oled_write_ln_P(PSTR("Colemak"), false); break;
case _DVORAK: oled_write_ln_P(PSTR("Dvorak"), false); break;
case _WORKMAN: oled_write_ln_P(PSTR("Workman"), false); break;
case _NORMAN: oled_write_ln_P(PSTR("Norman"), false); break;
case _MALTRON: oled_write_ln_P(PSTR("Maltron"), false); break;
case _EUCALYN: oled_write_ln_P(PSTR("Eucalyn"), false); break;
case _CARPLAX: oled_write_ln_P(PSTR("Carplax"), false); break;
}
}
void render_layer_state(void) {
oled_write_ln_P(PSTR("Layer:"), false);
oled_write_P(PSTR(" "), false);
oled_write_P(PSTR("Lower"), layer_state_is(_LOWER));
oled_write_P(PSTR(" "), false);
oled_write_P(PSTR("Raise"), layer_state_is(_RAISE));
oled_write_P(PSTR(" "), false);
oled_write_ln_P(PSTR("Mods"), layer_state_is(_MODS));
}
void render_keylock_status(uint8_t led_usb_state) {
oled_write_P(PSTR("Lock: "), false);
oled_write_P(PSTR("NUML"), led_usb_state & (1 << USB_LED_NUM_LOCK));
oled_write_P(PSTR(" "), false);
oled_write_P(PSTR("CAPS"), led_usb_state & (1 << USB_LED_CAPS_LOCK));
oled_write_P(PSTR(" "), false);
oled_write_ln_P(PSTR("SCLK"), led_usb_state & (1 << USB_LED_SCROLL_LOCK));
}
void render_mod_status(uint8_t modifiers) {
oled_write_P(PSTR("Mods: "), false);
oled_write_P(PSTR("Sft"), (modifiers & MOD_MASK_SHIFT));
oled_write_P(PSTR(" "), false);
oled_write_P(PSTR("Ctl"), (modifiers & MOD_MASK_CTRL));
oled_write_P(PSTR(" "), false);
oled_write_P(PSTR("Alt"), (modifiers & MOD_MASK_ALT));
oled_write_P(PSTR(" "), false);
oled_write_P(PSTR("GUI"), (modifiers & MOD_MASK_GUI));
}
void render_bootmagic_status(void) {
/* Show Ctrl-Gui Swap options */
static const char PROGMEM logo[][2][3] = {
{{0x97, 0x98, 0}, {0xb7, 0xb8, 0}},
{{0x95, 0x96, 0}, {0xb5, 0xb6, 0}},
};
oled_write_P(PSTR("Boot "), false);
if (keymap_config.swap_lctl_lgui) {
oled_write_P(logo[1][0], false);
} else {
oled_write_P(logo[0][0], false);
}
oled_write_P(PSTR(" "), false);
oled_write_P(PSTR("NKRO"), keymap_config.nkro);
oled_write_P(PSTR(" "), false);
oled_write_ln_P(PSTR("GUI"), !keymap_config.no_gui);
oled_write_P(PSTR("Magic "), false);
if (keymap_config.swap_lctl_lgui) {
oled_write_P(logo[1][1], false);
} else {
oled_write_P(logo[0][1], false);
}
oled_write_P(PSTR(" "), false);
oled_write_P(PSTR("GRV"), keymap_config.swap_grave_esc);
oled_write_P(PSTR(" "), false);
oled_write_ln_P(PSTR("CAPS"), keymap_config.swap_control_capslock);
}
void render_user_status(void) {
oled_write_P(PSTR("USER: "), false);
oled_write_P(PSTR("Anim"), userspace_config.rgb_matrix_idle_anim);
oled_write_P(PSTR(" "), false);
oled_write_P(PSTR("Layr"), userspace_config.rgb_layer_change);
oled_write_P(PSTR(" "), false);
oled_write_ln_P(PSTR("Nuke"), userspace_config.nuke_switch);
}
// clang-format off
void render_logo(void) {
static const char PROGMEM qmk_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(qmk_logo, false);
}
# ifndef SPLIT_TRANSPORT_MIRROR
void render_kyria_logo(void) {
void oled_driver_render_logo(void) {
static const char PROGMEM kyria_logo[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128,192,224,240,112,120, 56, 60, 28, 30, 14, 14, 14, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 14, 14, 14, 30, 28, 60, 56,120,112,240,224,192,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0,192,224,240,124, 62, 31, 15, 7, 3, 1,128,192,224,240,120, 56, 60, 28, 30, 14, 14, 7, 7,135,231,127, 31,255,255, 31,127,231,135, 7, 7, 14, 14, 30, 28, 60, 56,120,240,224,192,128, 1, 3, 7, 15, 31, 62,124,240,224,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@ -294,51 +151,6 @@ void render_kyria_logo(void) {
oled_write_raw_P(kyria_logo, sizeof(kyria_logo));
}
# endif
// clang-format on
void render_status_main(void) {
/* Show Keyboard Layout */
render_default_layer_state();
render_keylock_status(host_keyboard_leds());
render_bootmagic_status();
render_user_status();
render_keylogger_status();
}
void render_status_secondary(void) {
/* Show Keyboard Layout */
render_logo();
render_default_layer_state();
render_layer_state();
render_mod_status(get_mods() | get_oneshot_mods());
render_keylogger_status();
}
void oled_task_user(void) {
if (timer_elapsed32(oled_timer) > 30000) {
oled_off();
return;
}
# ifndef SPLIT_KEYBOARD
else {
oled_on();
}
# endif
update_log();
if (is_master) {
render_status_main(); // Renders the current keyboard state (layer, lock, caps, scroll, etc)
} else {
# ifdef SPLIT_TRANSPORT_MIRROR
render_status_secondary();
# else
render_kyria_logo();
# endif
}
}
#endif
#ifdef ENCODER_ENABLE

View File

@ -20,3 +20,5 @@ HD44780_ENABLE = no # Enable support for HD44780 based LCDs
BOOTLOADER = atmel-dfu
SPLIT_TRANSPORT = mirror
TAP_DANCE_ENABLE = yes

View File

@ -18,14 +18,17 @@
#ifdef OLED_DRIVER_ENABLE
# define OLED_DISPLAY_128X64
# define OLED_DISABLE_TIMEOUT
# define OLED_SCROLL_TIMEOUT_RIGHT 60000
#endif
#ifdef RGBLIGHT_ENABLE
#define RGBLIGHT_ANIMATIONS
#define RGBLIGHT_LIMIT_VAL 200
#define RGBLIGHT_HUE_STEP 8
#define RGBLIGHT_SAT_STEP 8
#define RGBLIGHT_VAL_STEP 8
#define RGBLIGHT_SLEEP
#define RGBLIGHT_SPLIT
#define RGBLIGHT_LAYERS
#endif
@ -46,3 +49,7 @@
// Allows media codes to properly register in macros and rotary encoder code
#define TAP_CODE_DELAY 10
#define SPLIT_USB_DETECT
#define SPLIT_USB_TIMEOUT 1000
#define KEYLOGGER_LENGTH 10

View File

@ -13,7 +13,7 @@
* 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 "frederik.h"
bool is_alt_tab_active = false;
uint16_t alt_tab_timer = 0;
@ -23,51 +23,37 @@ uint16_t ctrl_tab_timer = 0;
uint16_t copy_paste_timer;
enum layers {
QWERTY,
LOWER,
RAISE,
NAV,
ADJUST,
WoW
};
enum custom_keycodes {
KC_CCCV = SAFE_RANGE,
KC_ENT_LAY
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/*
* Base Layer: QWERTY
*
* ,-------------------------------------------. ,-------------------------------------------.
* | ESC | Q | W | E | R | T | | Y | U | I | O | P | | \ |
* | ESC | Q | W | E | R | T | | Y | U | I | O | P | BKSP |
* |--------+------+------+------+------+------| |------+------+------+------+------+--------|
* | LSFT | A | S | D | F | G | | H | J | K | L | ; : | ' " |
* |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------|
* | LCTL | Z | X | C | V | B | WoW | | | Del |Leader| N | M | , < | . > | / ? | - _ |
* | LCTL | Z | X | C | V | B | CCCV | | |Leader| WoW | N | M | , < | . > | / ? | - _ |
* `----------------------+------+------+------+------+ | |------+------+------+------+------+----------------------'
* | GUI | Alt | | Space| Enter| |Enter | Space| | Tab | AltGr|
* | GUI | Alt | | Space| Enter| | Del | Space| | Tab | AltGr|
* | | | Lower| | | | | Nav | Raise| | |
* `----------------------------------' `----------------------------------'
*/
[QWERTY] = LAYOUT(
[_QWERTY] = LAYOUT(
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, TG(WoW), XXXXXXX, /*--*/ KC_DEL, KC_LEAD, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_MINS,
KC_LGUI,KC_LALT,MO(LOWER), LT(KC_LSFT, KC_SPC), KC_ENT, /*--*/ KC_ENT, LT(NAV, KC_SPC), MO(RAISE), KC_TAB, KC_RALT
KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_CCCV, XXXXXXX, /*--*/ KC_LEAD, TG(_WoW), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_MINS,
KC_LGUI,KC_LALT,MO(_LOWER), KC_SPC, KC_ENT, /*--*/ KC_DEL, LT(_NAV, KC_SPC), MO(_RAISE),KC_TAB, KC_RALT
),
/*
* Lower Layer: Numpad, Media
*
* ,-------------------------------------------. ,-------------------------------------------.
* | | | | VolUp| | | | / ? | 7 & | 8 * | 9 ( | - _ | |
* | | | | | | | | / ? | 7 & | 8 * | 9 ( | - _ | |
* |--------+------+------+------+------+------| |------+------+------+------+------+--------|
* | | | Prev | Play | Next | | | * | 4 $ | 5 % | 6 ^ | , < | + |
* | | | Prev | Play | Next | | | * | 4 $ | 5 % | 6 ^ | , < | |
* |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------|
* | | | | VolDn| Mute | | | | | | | 0 ) | 1 ! | 2 @ | 3 # | = + | |
* | | | | | | | | | | | | 0 ) | 1 ! | 2 @ | 3 # | = + | |
* `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------'
* | | | | | | | | | | | |
* | | | Lower| | | | | Nav | Raise| | MUTE |
@ -75,30 +61,30 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/
[LOWER] = LAYOUT(
[_LOWER] = LAYOUT(
_______, _______, _______, KC_VOLU, _______, _______, KC_SLSH, KC_7, KC_8, KC_9, KC_MINS, _______,
_______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, KC_ASTR, KC_4, KC_5, KC_6, KC_COMM, KC_PLUS,
_______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, KC_ASTR, KC_4, KC_5, KC_6, KC_COMM, _______,
_______, _______, _______, KC_VOLD, KC_MUTE, _______, _______, _______, _______, _______, KC_0, KC_1, KC_2, KC_3, KC_EQL, _______,
_______, _______, _______, _______, RGB_TOG, _______, _______, _______, _______, KC_MUTE
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE
),
/*
* Raise Layer: Symbols
*
* ,-------------------------------------------. ,-------------------------------------------.
* | | ! | @ | { | } | | | | | _ | | | | \ |
* | | ! | @ | ( | ) | | | | | _ | | | \ | |
* |--------+------+------+------+------+------| |------+------+------+------+------+--------|
* | | # | $ | ( | ) | ` | | + | - | / | * | % | ' " |
* | | # | $ | [ | ] | ` | | + | - | / | * | % | ' " |
* |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------|
* | | % | ^ | [ | ] | ~ | | | | | | & | = | , | . | / ? | - _ |
* | | % | ^ | { | } | ~ | | | | | | & | = | , | . | / ? | - _ |
* `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------'
* | | | | | | | | | | | |
* | | | Lower| | | | | Nav | Raise| | |
* `----------------------------------' `----------------------------------'
*/
[RAISE] = LAYOUT(
_______, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, _______, KC_UNDS, ALGR(KC_5),_______,_______,KC_BSLS,
_______, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV, KC_PLUS, KC_MINS, KC_SLSH, KC_ASTR, KC_PERC, KC_QUOT,
_______, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, _______, _______, _______, _______, KC_AMPR, KC_EQL, KC_COMM, KC_DOT, KC_SLSH, KC_MINS,
[_RAISE] = LAYOUT(
_______, KC_EXLM, KC_AT, KC_LPRN, KC_RPRN, KC_PIPE, _______, KC_UNDS, ALGR(KC_5),_______,KC_BSLS,_______,
_______, KC_HASH, KC_DLR, KC_LBRC, KC_RBRC, KC_GRV, KC_PLUS, KC_MINS, KC_SLSH, KC_ASTR, KC_PERC, KC_QUOT,
_______, KC_PERC, KC_CIRC, KC_LCBR, KC_RCBR, KC_TILD, _______, _______, _______, _______, KC_AMPR, KC_EQL, KC_COMM, KC_DOT, KC_SLSH, KC_MINS,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
/*
@ -115,9 +101,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | Lower| | | | | Nav | Raise| | |
* `----------------------------------' `----------------------------------'
*/
[NAV] = LAYOUT(
_______, _______, _______, _______, _______, _______, KC_PGUP, KC_HOME, KC_UP, KC_END, _______, KC_SLCK,
_______, _______, _______, KC_UP , _______, _______, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_CAPS,
[_NAV] = LAYOUT(
_______, _______, _______, _______, _______, _______, KC_PGUP, KC_HOME, KC_UP, KC_END, _______, _______,
KC_CAPS, _______, _______, KC_UP , _______, _______, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______,
_______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
@ -125,7 +111,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* Adjust Layer
*
* ,-------------------------------------------. ,-------------------------------------------.
* | | | | | | | | | F7 | F8 | F9 | F10 | |
* | | | | | | | | RGB | F7 | F8 | F9 | F10 | |
* |--------+------+------+------+------+------| |------+------+------+------+------+--------|
* | | | SAI | HUI | VAI | | | | F4 | F5 | F6 | F11 | |
* |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------|
@ -135,10 +121,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | | | | | | | | |
* `----------------------------------' `----------------------------------'
*/
[ADJUST] = LAYOUT(
_______, _______, _______, _______, _______, _______, _______, KC_F7, KC_F8, KC_F9, KC_F10, _______,
_______, _______, RGB_SAI, RGB_HUI, RGB_VAI, _______, _______, KC_F4, KC_F5, KC_F6, KC_F11, _______,
_______, _______, RGB_SAD, RGB_HUD, RGB_VAD, _______, _______, _______, _______, _______, _______, KC_F1, KC_F2, KC_F3, KC_F12, _______,
[_ADJUST] = LAYOUT(
_______, _______, _______, _______, _______, _______, RGB_TOG, KC_F7, KC_F8, KC_F9, KC_F10, ae,
_______, _______, RGB_SAI, RGB_HUI, RGB_VAI, _______, _______, KC_F4, KC_F5, KC_F6, KC_F11, oe,
_______, _______, RGB_SAD, RGB_HUD, RGB_VAD, _______, _______, _______, _______, _______, _______, KC_F1, KC_F2, KC_F3, KC_F12, aa,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
@ -150,16 +136,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// * |--------+------+------+------+------+------| |------+------+------+------+------+--------|
// * | SHIFT |SHIFT+`| Q | W | E |SHIFT+R| | | | | | | |
// * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------|
// * | CTRL | F | A | S | D | F | | | | M | Y | | | | | | |
// * | CTRL | F | A | S | D |SHIFT+F| | | | M | WoW | | | | | | |
// * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------'
// * | | TAB |SPACE | C | T | | B | I | | . | |
// * | | TAB |SPACE | C | T | | B | I | Y | . | |
// * | | | | | | | | | | | |
// * `----------------------------------' `----------------------------------'
// */
[WoW] = LAYOUT(
[_WoW] = LAYOUT(
KC_ESC , KC_GRV , KC_1 , KC_2 , KC_3 , KC_4 , _______, _______, _______, _______, _______, _______,
KC_LSFT, LSFT(KC_GRV), KC_Q , KC_W , KC_E , LSFT(KC_R) , _______, _______, _______, _______, _______, _______,
KC_LCTL, KC_F , KC_A , KC_S , KC_D , LSFT(KC_F) , _______, _______, KC_M , KC_Y , _______, _______, _______, _______, _______, _______,
KC_LCTL, KC_F , KC_A , KC_S , KC_D , LSFT(KC_F) , _______, _______, KC_M , TG(_WoW),_______, _______, _______, _______, _______, _______,
_______, KC_TAB , KC_SPC , KC_C , KC_T , KC_B , KC_I , _______, KC_DOT , _______
),
@ -189,6 +175,73 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// return update_tri_layer_state(state, LOWER, RAISE, ADJUST);
// }
#ifdef RGBLIGHT_ENABLE
const rgblight_segment_t PROGMEM _QWERTY_layer[] = RGBLIGHT_LAYER_SEGMENTS(
{0, 10, HSV_GREEN}
);
const rgblight_segment_t PROGMEM _LOWER_layer[] = RGBLIGHT_LAYER_SEGMENTS(
{0, 10, HSV_CYAN}
);
const rgblight_segment_t PROGMEM _RAISE_layer[] = RGBLIGHT_LAYER_SEGMENTS(
{0, 10, HSV_PURPLE}
);
const rgblight_segment_t PROGMEM _NAV_layer[] = RGBLIGHT_LAYER_SEGMENTS(
{0, 10, HSV_TEAL}
);
const rgblight_segment_t PROGMEM _ADJUST_layer[] = RGBLIGHT_LAYER_SEGMENTS(
{0, 10, HSV_YELLOW}
);
const rgblight_segment_t PROGMEM _WoW_layer[] = RGBLIGHT_LAYER_SEGMENTS(
{0, 10, HSV_ORANGE}
);
const rgblight_segment_t PROGMEM _CAPS_layer[] = RGBLIGHT_LAYER_SEGMENTS(
{0, 10, HSV_RED}
);
const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST(
_QWERTY_layer,
_LOWER_layer, // Overrides caps lock layer
_RAISE_layer,
_NAV_layer,
//_ADJUST_layer,
_WoW_layer,
_CAPS_layer
// Overrides other layers
);
void keyboard_post_init_user(void) {
rgblight_layers = my_rgb_layers;
// rgblight_enable_noeeprom(); // Enables RGB, without saving settings
// rgblight_sethsv_noeeprom(HSV_BLUE);
// rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
}
layer_state_t layer_state_set_user(layer_state_t state) {
for (int i = 0; i < sizeof(my_rgb_layers)/sizeof(my_rgb_layers[0]); i++) {
rgblight_set_layer_state(i, layer_state_cmp(state, i));
}
return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
}
bool led_update_user(led_t led_state) {
rgblight_set_layer_state(0, layer_state_cmp(_QWERTY, 0));
// rgblight_set_layer_state(1, layer_state_cmp(LOWER, 1));
// rgblight_set_layer_state(2, layer_state_cmp(RAISE, 2));
// rgblight_set_layer_state(3, layer_state_cmp(NAV, 3));
// rgblight_set_layer_state(4, layer_state_cmp(ADJUST, 4));
// rgblight_set_layer_state(5, layer_state_cmp(WoW, 5));
rgblight_set_layer_state(6, led_state.caps_lock);
return true;
}
#endif
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case KC_CCCV: // One key copy/paste
@ -202,6 +255,72 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
}
break;
case OE:
if (record->event.pressed) {
SEND_STRING(SS_DOWN(X_RALT));
SEND_STRING(SS_TAP(X_KP_0));
SEND_STRING(SS_TAP(X_KP_2));
SEND_STRING(SS_TAP(X_KP_1));
SEND_STRING(SS_TAP(X_KP_6));
SEND_STRING(SS_UP(X_RALT));
return false;
}
break;
case oe:
if (record->event.pressed) {
SEND_STRING(SS_DOWN(X_RALT));
SEND_STRING(SS_TAP(X_KP_0));
SEND_STRING(SS_TAP(X_KP_2));
SEND_STRING(SS_TAP(X_KP_4));
SEND_STRING(SS_TAP(X_KP_8));
SEND_STRING(SS_UP(X_RALT));
return false;
}
break;
case AE:
if (record->event.pressed) {
SEND_STRING(SS_DOWN(X_RALT));
SEND_STRING(SS_TAP(X_KP_0));
SEND_STRING(SS_TAP(X_KP_1));
SEND_STRING(SS_TAP(X_KP_9));
SEND_STRING(SS_TAP(X_KP_8));
SEND_STRING(SS_UP(X_RALT));
return false;
}
break;
case ae:
if (record->event.pressed) {
SEND_STRING(SS_DOWN(X_RALT));
SEND_STRING(SS_TAP(X_KP_0));
SEND_STRING(SS_TAP(X_KP_2));
SEND_STRING(SS_TAP(X_KP_3));
SEND_STRING(SS_TAP(X_KP_0));
SEND_STRING(SS_UP(X_RALT));
return false;
}
break;
case AA:
if (record->event.pressed) {
SEND_STRING(SS_DOWN(X_RALT));
SEND_STRING(SS_TAP(X_KP_0));
SEND_STRING(SS_TAP(X_KP_1));
SEND_STRING(SS_TAP(X_KP_9));
SEND_STRING(SS_TAP(X_KP_7));
SEND_STRING(SS_UP(X_RALT));
return false;
}
break;
case aa:
if (record->event.pressed) {
SEND_STRING(SS_DOWN(X_RALT));
SEND_STRING(SS_TAP(X_KP_0));
SEND_STRING(SS_TAP(X_KP_2));
SEND_STRING(SS_TAP(X_KP_2));
SEND_STRING(SS_TAP(X_KP_9));
SEND_STRING(SS_UP(X_RALT));
return false;
}
break;
}
return true;
}
@ -263,6 +382,11 @@ void matrix_scan_user(void) {
}
}
// layer_state_t layer_state_set_user(layer_state_t state) {
// return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
// }
#ifdef OLED_DRIVER_ENABLE
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
return OLED_ROTATION_180;
@ -282,182 +406,15 @@ static void render_kyria_logo(void) {
oled_write_raw_P(kyria_logo, sizeof(kyria_logo));
}
#ifdef RGBLIGHT_ENABLE
// layer_state_t layer_state_set_user(layer_state_t state) {
const rgblight_segment_t PROGMEM QWERTY_layer[] = RGBLIGHT_LAYER_SEGMENTS(
{0, 10, HSV_BLUE}
);
const rgblight_segment_t PROGMEM LOWER_layer[] = RGBLIGHT_LAYER_SEGMENTS(
{0, 10, HSV_CYAN}
);
const rgblight_segment_t PROGMEM RAISE_layer[] = RGBLIGHT_LAYER_SEGMENTS(
{0, 10, HSV_PURPLE}
);
const rgblight_segment_t PROGMEM NAV_layer[] = RGBLIGHT_LAYER_SEGMENTS(
{0, 10, HSV_GREEN}
);
const rgblight_segment_t PROGMEM ADJUST_layer[] = RGBLIGHT_LAYER_SEGMENTS(
{0, 10, HSV_YELLOW}
);
const rgblight_segment_t PROGMEM WoW_layer[] = RGBLIGHT_LAYER_SEGMENTS(
{0, 10, HSV_ORANGE}
);
const rgblight_segment_t PROGMEM CAPS_layer[] = RGBLIGHT_LAYER_SEGMENTS(
{0, 10, HSV_RED}
);
// return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST(
QWERTY_layer,
LOWER_layer, // Overrides caps lock layer
RAISE_layer,
NAV_layer,
ADJUST_layer,
WoW_layer,
CAPS_layer
// Overrides other layers
);
void keyboard_post_init_user(void) {
rgblight_layers = my_rgb_layers;
// rgblight_enable_noeeprom(); // Enables RGB, without saving settings
// rgblight_sethsv_noeeprom(HSV_BLUE);
// rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
}
layer_state_t layer_state_set_user(layer_state_t state) {
for (int i = 0; i < sizeof(my_rgb_layers)/sizeof(my_rgb_layers[0]); i++) {
rgblight_set_layer_state(i, layer_state_cmp(state, i));
}
return update_tri_layer_state(state, LOWER, RAISE, ADJUST);
}
bool led_update_user(led_t led_state) {
rgblight_set_layer_state(0, layer_state_cmp(QWERTY, 0));
// rgblight_set_layer_state(1, layer_state_cmp(LOWER, 1));
// rgblight_set_layer_state(2, layer_state_cmp(RAISE, 2));
// rgblight_set_layer_state(3, layer_state_cmp(NAV, 3));
// rgblight_set_layer_state(4, layer_state_cmp(ADJUST, 4));
// rgblight_set_layer_state(5, layer_state_cmp(WoW, 5));
rgblight_set_layer_state(6, led_state.caps_lock);
return true;
}
#endif
// static void render_wow_logo(void) {
// static const char PROGMEM wow_logo[] = {
// 0x00, 0xFE, 0x02, 0x02, 0x02, 0x02, 0x02, 0x82, 0x82, 0x82,
// 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0xC2, 0xE2, 0xE2, 0xF2,
// 0xF2, 0xFA, 0xFA, 0xFA, 0xFA, 0xFE, 0xFC, 0xFC, 0xFC, 0xDC,
// 0xDC, 0xDC, 0xDC, 0xDC, 0xDC, 0x9C, 0x1C, 0x1C, 0x3C, 0x3A,
// 0x3A, 0x3A, 0x72, 0x72, 0x72, 0xE2, 0x42, 0x42, 0x02, 0x02,
// 0x02, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x02, 0x02,
// 0x02, 0x02, 0x02, 0xFE, 0x00, 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, 0x00, 0x00,
// 0x00, 0x00, 0x00, 0x00, 0x00, 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,
// 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F,
// 0x3F, 0x1F, 0x0F, 0x1F, 0x1F, 0x3F, 0x7F, 0x7F, 0x7F, 0x7F,
// 0x7F, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x13,
// 0x3F, 0x03, 0x21, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
// 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
// 0x01, 0x03, 0x07, 0x07, 0x0F, 0x03, 0x00, 0x00, 0x00, 0x00,
// 0x00, 0xFF, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
// 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xC0,
// 0x80, 0x00, 0x80, 0xC0, 0xC0, 0x80, 0x00, 0x80, 0xC0, 0xC0,
// 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
// 0x00, 0x00, 0xE0, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0,
// 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
// 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0xC0,
// 0xF8, 0xFE, 0xFF, 0x3F, 0x0F, 0x13, 0x78, 0x10, 0x00, 0x00,
// 0x81, 0x07, 0x7F, 0xFF, 0xFF, 0xFF, 0xF3, 0xE3, 0xF1, 0xE1,
// 0x00, 0x0F, 0xFF, 0xFF, 0xFF, 0x7F, 0x1F, 0xCF, 0xFC, 0x00,
// 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0xFF, 0xFF, 0xFF,
// 0xFF, 0x0F, 0x03, 0x03, 0x03, 0x01, 0x01, 0x00, 0x00, 0x00,
// 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
// 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
// 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x1F, 0x7F, 0x78,
// 0x7F, 0x07, 0x0F, 0x7F, 0x78, 0x7F, 0x0F, 0x3E, 0x7F, 0x77,
// 0x63, 0x63, 0x7F, 0x3E, 0x00, 0x7F, 0x7F, 0x03, 0x01, 0x00,
// 0x7F, 0x7F, 0x3E, 0x7F, 0x77, 0x63, 0x63, 0x7F, 0x7F, 0x00,
// 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
// 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xFE, 0xFF, 0xFF, 0x0F,
// 0x60, 0x7E, 0xFE, 0xFC, 0xFC, 0xFC, 0xF0, 0xF0, 0xE0, 0x80,
// 0x00, 0x03, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xE0,
// 0x00, 0x00, 0x00, 0xC0, 0xFC, 0xFF, 0xDF, 0xF8, 0xF8, 0xE0,
// 0x00, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC,
// 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
// 0x00, 0x00, 0x00, 0x0E, 0xFE, 0xFE, 0xC0, 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, 0x80, 0x80, 0x80, 0x80,
// 0x80, 0x00, 0x80, 0xF0, 0xF0, 0xB0, 0x90, 0x00, 0x00, 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, 0x3F, 0xFF, 0x7F, 0x00, 0x00, 0x01,
// 0x03, 0x03, 0x03, 0x00, 0x05, 0x19, 0x01, 0x00, 0x00, 0x00,
// 0x00, 0x07, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xC0,
// 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xF0,
// 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0x00, 0x00,
// 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
// 0x00, 0xF8, 0xFF, 0xFF, 0x1F, 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, 0x1F, 0x3F, 0x3B, 0x31, 0x31, 0x3F, 0x1F,
// 0x00, 0x3F, 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, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
// 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
// 0x00, 0x0F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
// 0xFF, 0x0F, 0x00, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
// 0xFF, 0x3F, 0x1F, 0x3F, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
// 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xE0, 0xF8, 0xFF, 0x7F,
// 0x0F, 0x03, 0xF0, 0xCF, 0xF0, 0xF0, 0x00, 0x00, 0x00, 0x00,
// 0x00, 0x70, 0xF0, 0xE0, 0x00, 0xE0, 0xF0, 0xF0, 0xE0, 0x00,
// 0xE0, 0xF0, 0x30, 0x40, 0x40, 0xC0, 0xC0, 0xC0, 0x80, 0x00,
// 0xC0, 0xC0, 0xC0, 0x40, 0x80, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0,
// 0x00, 0x00, 0xC0, 0xC0, 0xC0, 0x40, 0x00, 0x40, 0x40, 0xC0,
// 0xC0, 0xC0, 0x80, 0x40, 0xF8, 0xF8, 0x58, 0x48, 0xF0, 0xF0,
// 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
// 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xE0, 0xC0, 0xC0, 0x80,
// 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04,
// 0x07, 0x03, 0x03, 0x01, 0x01, 0x01, 0x03, 0x03, 0x07, 0x00,
// 0x00, 0x00, 0x06, 0x07, 0x03, 0x03, 0x01, 0x01, 0x01, 0x03,
// 0x02, 0x00, 0x00, 0x00, 0x80, 0x80, 0xC0, 0xE0, 0xF0, 0xF0,
// 0xFC, 0xFE, 0xFF, 0xFF, 0xFF, 0xE3, 0x00, 0x00, 0x00, 0x00,
// 0xFF, 0x0F, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
// 0x07, 0x1F, 0x1E, 0x1F, 0x01, 0x03, 0x1F, 0x1E, 0x1F, 0x03,
// 0x0C, 0x1E, 0x1E, 0x1E, 0x1A, 0x1F, 0x1F, 0x00, 0x1F, 0x1F,
// 0x00, 0x00, 0x0F, 0x1F, 0x1D, 0x18, 0x18, 0x18, 0x00, 0x00,
// 0x1F, 0x1F, 0x00, 0x00, 0x0C, 0x1E, 0x1E, 0x1E, 0x1A, 0x1F,
// 0x1F, 0x00, 0x1F, 0x1F, 0x00, 0x00, 0x1F, 0x1F, 0x18, 0x10,
// 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x80, 0x80,
// 0x80, 0x80, 0x80, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x80,
// 0x80, 0x80, 0x80, 0x80, 0x85, 0x86, 0x8E, 0x8E, 0x9C, 0x9C,
// 0xBC, 0xB8, 0x38, 0x38, 0x38, 0x78, 0x78, 0x70, 0x70, 0x78,
// 0x78, 0x78, 0x78, 0x38, 0x38, 0xBC, 0xBC, 0xBC, 0x9E, 0x9E,
// 0x9E, 0x8F, 0x8F, 0x87, 0x83, 0x83, 0x81, 0x83, 0x83, 0x83,
// 0x83, 0x83, 0x83, 0x81, 0x80, 0x80, 0x80, 0x80, 0x7F, 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,
// 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
// 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
// 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
// 0x00, 0x00, 0x00, 0x00
// };
// oled_write_raw_P(wow_logo, sizeof(wow_logo));
// }
static void render_qmk_logo(void) {
static const char PROGMEM qmk_logo[] = {
0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94,
@ -476,22 +433,22 @@ static void render_status(void) {
// Host Keyboard Layer Status
oled_write_P(PSTR("Layer: "), false);
switch (get_highest_layer(layer_state)) {
case QWERTY:
case _QWERTY:
oled_write_P(PSTR("Default\n"), false);
break;
case LOWER:
case _LOWER:
oled_write_P(PSTR("Lower\n"), false);
break;
case RAISE:
case _RAISE:
oled_write_P(PSTR("Raise\n"), false);
break;
case NAV:
case _NAV:
oled_write_P(PSTR("Navigation\n"), false);
break;
case ADJUST:
case _ADJUST:
oled_write_P(PSTR("Adjust\n"), false);
break;
case WoW:
case _WoW:
oled_write_P(PSTR("Warcraft\n"), false);
break;
default:
@ -518,8 +475,8 @@ void oled_task_user(void) {
void encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
switch (biton32(layer_state)) {
case WoW:
case QWERTY:
case _WoW:
case _QWERTY:
// Move whole words. Hold shift to select while moving.
if (!clockwise) {
if (!is_alt_tab_active) {
@ -537,7 +494,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
tap_code16(S(KC_TAB));
}
break;
case RAISE:
case _RAISE:
if (!clockwise) {
if (!is_ctrl_tab_active) {
is_ctrl_tab_active = true;
@ -566,7 +523,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
}
} else if (index == 1) {
switch (biton32(layer_state)) {
case QWERTY:
case _QWERTY:
// Scrolling with Mouse wheel.
if (clockwise) {
tap_code(KC_WH_D);

View File

@ -1,5 +1,9 @@
OLED_DRIVER_ENABLE = yes # Enables the use of OLED displays
ENCODER_ENABLE = yes # Enables the use of one or more encoders
ENCODER_ENABLE = yes # ENables the use of one or more encoders
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
LEADER_ENABLE = yes # Enable the Leader Key feature
MOUSEKEY_ENABLE = no
RGBLIGHT_STARTUP_ANIMATION = yes
LEADER_ENABLE = yes
MOUSEKEY_ENABLE = no # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control

View File

@ -1,122 +0,0 @@
#include "333fred.h"
#include "quantum.h"
#include "action.h"
typedef enum {
SINGLE_TAP, SINGLE_HOLD, DOUBLE
} tap_dance_state_enum;
static tap_dance_state_enum tap_dance_state;
static bool tap_dance_active = false;
void tap_dance_sym_vim_finished(qk_tap_dance_state_t *state, void *user_data) {
// Determine the current state
if (state->count == 1) {
if (state->interrupted || state->pressed == 0) tap_dance_state = SINGLE_TAP;
else tap_dance_state = SINGLE_HOLD;
} else {
// Handle any number of other taps as a VIM movement hold
tap_dance_state = DOUBLE;
}
switch (tap_dance_state) {
case SINGLE_TAP:
if (tap_dance_active) {
reset_oneshot_layer();
tap_dance_active = false;
} else {
set_oneshot_layer(SYMB, ONESHOT_START);
tap_dance_active = true;
}
break;
case SINGLE_HOLD:
layer_on(SYMB);
break;
case DOUBLE:
layer_on(VIM);
break;
}
}
void tap_dance_sym_vim_reset(qk_tap_dance_state_t *state, void *user_data) {
switch(tap_dance_state) {
case SINGLE_TAP:
clear_oneshot_layer_state(ONESHOT_PRESSED);
break;
case SINGLE_HOLD:
layer_off(SYMB);
break;
case DOUBLE:
layer_off(VIM);
break;
}
}
void tap_dance_copy_paste_finished(qk_tap_dance_state_t *state, void *user_data) {
bool is_paste = state->count == 2;
// If either the one-shot shift is set, or if shift is being held, count as shift being held.
// We'll clear the one-shot shift if it was held
uint8_t one_shot_mods = get_oneshot_mods();
bool is_shift = false;
if (get_mods() & MOD_MASK_SHIFT) {
is_shift = true;
} else if (one_shot_mods & MOD_MASK_SHIFT) {
set_oneshot_mods(one_shot_mods & ~MOD_MASK_SHIFT);
is_shift = true;
}
if (is_paste) {
if (is_shift) {
SEND_STRING(SS_LSFT(SS_TAP(X_INSERT)));
} else {
SEND_STRING(SS_LCTRL("v"));
}
} else {
if (is_shift) {
SEND_STRING(SS_LCTRL(SS_TAP(X_INSERT)));
} else {
SEND_STRING(SS_LCTRL("c"));
}
}
}
qk_tap_dance_action_t tap_dance_actions[] = {
[TD_SYM_VIM] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, tap_dance_sym_vim_finished, tap_dance_sym_vim_reset),
[TD_COPY_PASTE] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, tap_dance_copy_paste_finished, NULL)
};
void tap_dance_process_keycode(uint16_t keycode) {
if (tap_dance_state == SINGLE_TAP && keycode != TD(TD_SYM_VIM)) {
tap_dance_active = false;
}
}
__attribute__ ((weak))
void layer_state_set_rgb(uint32_t state) {}
uint32_t layer_state_set_user(uint32_t state) {
layer_state_set_rgb(state);
return state;
}
bool try_handle_macro(uint16_t keycode, keyrecord_t *record) {
switch (keycode)
{
case DLEFT:
if (record->event.pressed)
SEND_STRING(SS_LGUI(SS_LALT(SS_TAP(X_LEFT))));
return true;
case DRIGHT:
if (record->event.pressed)
SEND_STRING(SS_LGUI(SS_LALT(SS_TAP(X_RIGHT))));
return true;
case PSCREEN_APP:
if (record->event.pressed)
SEND_STRING(SS_LALT(SS_TAP(X_PSCREEN)));
return true;
default:
return false;
}
}

View File

@ -1,30 +0,0 @@
#pragma once
#include "quantum.h"
#include "layout_macros.h"
#define BASE 0
#define CODE 1 // code layer
#define CODEFLOW 2
#define SYMB 3
#define MDIA 4 // media keys
#define VIM 5
#define GAME 6
#define GAME_ARROW 7
// Tap dance config shared between my keyboards
enum tap_dance_declarations {
TD_SYM_VIM = 0,
TD_COPY_PASTE,
};
enum custom_keys {
DLEFT = SAFE_RANGE,
DRIGHT,
PSCREEN_APP
};
void tap_dance_sym_vim_finished(qk_tap_dance_state_t*, void*);
void tap_dance_sym_vim_reset(qk_tap_dance_state_t*, void*);
void tap_dance_process_keycode(uint16_t);
bool try_handle_macro(uint16_t keycode, keyrecord_t *record);

View File

@ -1,4 +0,0 @@
#pragma once
#define PERMISSIVE_HOLD
#define NO_ACTION_MACRO

View File

@ -1,44 +0,0 @@
#pragma once
#define SIX_TRNS _______, _______, _______, _______, _______, _______
#define FOUR_TRNS _______, _______, _______, _______
// Row 5: 6 keys
#define ROW5_LEFT_BASE KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5
#define ROW5_RGHT_BASE KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS
#define ROW5_LEFT_SYMB _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5
#define ROW5_RGHT_SYMB KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11
#define ROW5_LEFT_VIM SIX_TRNS
#define ROW5_RGHT_VIM SIX_TRNS
// Row 4: 6 keys
#define ROW4_LEFT_BASE KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T
#define ROW4_RGHT_BASE KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS
#define ROW4_LEFT_SYMB _______, KC_EXLM, KC_AT, KC_LPRN, KC_RPRN, KC_PIPE
#define ROW4_RGHT_SYMB KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12
#define ROW4_LEFT_VIM SIX_TRNS
#define ROW4_RGHT_VIM SIX_TRNS
// Row 3: 6 keys
#define ROW3_LEFT_BASE CTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G
#define ROW3_RGHT_BASE KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT
#define ROW3_LEFT_SYMB _______, KC_HASH, KC_DLR, KC_LCBR, KC_RCBR, KC_GRV
#define ROW3_RGHT_SYMB KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, _______
#define ROW3_LEFT_VIM _______, DLEFT, DRIGHT, KC_LCTL, KC_LGUI, _______
#define ROW3_RGHT_VIM KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______
// Row 2: 6 keys
#define ROW2_LEFT_BASE OSM(MOD_LSFT), CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B
#define ROW2_RGHT_BASE KC_N, KC_M, KC_COMM, KC_DOT, CTL_T(KC_SLSH), OSM(MOD_RSFT)
#define ROW2_LEFT_SYMB _______, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD
#define ROW2_RGHT_SYMB KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, _______
#define ROW2_LEFT_VIM _______, _______, KC_TAB, _______, _______, _______
#define ROW2_RGHT_VIM SIX_TRNS
// Row 1: 4 keys
#define ROW1_LEFT_BASE OSM(MOD_LCTL), KC_F4, KC_F5, KC_LALT
#define ROW1_RGHT_BASE KC_DOWN, KC_EQL, KC_RIGHT, KC_RGUI
#define ROW1_LEFT_SYMB _______, _______, _______, _______
#define ROW1_RGHT_SYMB KC_0, KC_DOT, KC_EQL, _______
#define ROW1_LEFT_VIM FOUR_TRNS
#define ROW1_RGHT_VIM FOUR_TRNS

View File

@ -1,28 +0,0 @@
#include "quantum.h"
#include "333fred.h"
void layer_state_set_rgb(uint32_t state) {
switch (biton32(state)) {
case BASE:
// purple
rgblight_sethsv_noeeprom(210, 255, 20);
break;
case SYMB:
// blue
rgblight_sethsv_noeeprom(191, 255, 20);
break;
case VIM:
// green
rgblight_sethsv_noeeprom(85, 255, 20);
break;
case GAME:
// red
rgblight_sethsv_noeeprom(0, 255, 20);
break;
}
}
void keyboard_post_init_user(void) {
rgblight_enable_noeeprom();
layer_state_set_rgb(1); // Set layer 0 (bit 1) on
}

View File

@ -1,5 +0,0 @@
SRC += 333fred.c
ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
SRC += rgb.c
endif

View File

@ -1,5 +0,0 @@
#include "_example.h"
void my_custom_function(void) {
}

View File

@ -1,8 +0,0 @@
#ifndef USERSPACE
#define USERSPACE
#include "quantum.h"
void my_custom_function(void);
#endif

View File

@ -1,14 +0,0 @@
Copyright <year> <name> <email> @<github_username>
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/>.

View File

@ -1 +0,0 @@
SRC += _example.c

View File

@ -1,95 +0,0 @@
#include "alfrdmalr.h"
#include "muse.h"
bool muse_mode = false;
uint8_t last_muse_note = 0;
uint16_t muse_counter = 0;
uint8_t muse_offset = 70;
uint16_t muse_tempo = 50;
LEADER_EXTERNS();
void matrix_scan_user(void) {
#ifdef AUDIO_ENABLE
if (muse_mode) {
if (muse_counter == 0) {
uint8_t muse_note = muse_offset + SCALE[muse_clock_pulse()];
if (muse_note != last_muse_note) {
stop_note(compute_freq_for_midi_note(last_muse_note));
play_note(compute_freq_for_midi_note(muse_note), 0xF);
last_muse_note = muse_note;
}
}
muse_counter = (muse_counter + 1) % muse_tempo;
} else {
if (muse_counter) {
stop_all_notes();
muse_counter = 0;
}
}
#endif
LEADER_DICTIONARY() {
leading = false;
// reset keyboard to bootloader
SEQ_FIVE_KEYS(KC_R, KC_E, KC_S, KC_E, KC_T) {
reset_keyboard();
}
leader_end();
}
}
bool syml_pressed = false;
bool symr_pressed = false;
bool settings_active = false;
bool symbols_active = false;
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch(keycode) {
case SYML:
if (record->event.pressed) {
syml_pressed = true;
} else {
syml_pressed = false;
}
break;
case SYMR:
if (record->event.pressed) {
symr_pressed = true;
} else {
symr_pressed = false;
}
break;
}
// trilayer-esque behavior. If both SYMBOL layer keys are held, then the
// settings layer is open. If only one is held, SYMBOL is active.
if (syml_pressed && symr_pressed) {
layer_on(_SETTINGS);
settings_active = true;
} else if (syml_pressed || symr_pressed) {
if (settings_active) {
layer_off(_SETTINGS);
settings_active = false;
}
layer_on(_SYMBOL);
symbols_active = true;
} else {
if (symbols_active) {
layer_off(_SYMBOL);
symbols_active = false;
}
}
return true;
}
// allow access to the settings layer to turn music mode back off
bool music_mask_user(uint16_t keycode) {
switch (keycode) {
case SYML:
case SYMR:
return false;
default:
return true;
}
}

View File

@ -1,286 +0,0 @@
/*
Copyright 2020 Alfred Maler @alfrdmalr
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTIBILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu/org/licenses/>.
*/
#pragma once
#include QMK_KEYBOARD_H
enum shared_layers {
_QWERTY,
_SYMBOL,
_NAVIGATION,
_NUMPAD,
_SETTINGS
};
// KEYCODES ============================================================================
// the SYML and SYMR keycodes are just used to activate the symbols layer.
// they're distinct so that I can hit both of them to activate a trilayer
enum alfrdmalr_keycodes {
SYML = SAFE_RANGE,
SYMR
};
#define NUMSPACE LT(_NUMPAD, KC_SPC)
#define NAVLAYER MO(_NAVIGATION)
#define SYMLAYER MO(_SYMBOL)
#define SETLAYER MO(_SETTINGS)
#define CTRLSHFT C(KC_LSFT)
#define WINUNDO C(KC_Z)
#define WINCOPY C(KC_C)
#define WINCUT C(KC_X)
#define WINPASTE C(KC_V)
// convenience keycodes/aliases for base modifiers
// bottom row
#define K41 CTRLSHFT
#define K42 KC_LGUI
#define K43 KC_LALT
// #define K44 SYMLAYER
#define K44 SYML
#define K45 NUMSPACE
#define K46 NUMSPACE
// #define K47 SYMLAYER
#define K47 SYMR
#define K48 KC_RALT
#define K49 SETLAYER
#define K4A MU_TOG
// leftmost column
#define K00 KC_ESC
#define K10 KC_TAB
#define K20 NAVLAYER
#define K30 KC_LSFT
#define K40 KC_LCTL
// rightmost column
#define K0B KC_BSPC
#define K1B KC_BSPC
#define K1B_ALT KC_DEL // for 5x12 boards, keep backspace as the top-left key and add delete key
#define K2B KC_QUOT
#define K3B KC_RSFT
#define K4B KC_LEAD
// LAYOUT WRAPPERS =====================================================================
#if (!defined(LAYOUT) && defined(KEYMAP))
# define LAYOUT KEYMAP
#endif
#define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__)
#define LAYOUT_ortho_4x12_wrapper(...) LAYOUT_ortho_4x12(__VA_ARGS__)
#define LAYOUT_ortho_5x12_wrapper(...) LAYOUT_ortho_5x12(__VA_ARGS__)
// KEYCODE GROUPS ======================================================================
// MISC
#define ______TRANS______ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
#define ____NUMROW_L0____ KC_1, KC_2, KC_3, KC_4, KC_5
#define ____NUMROW_R0____ KC_6, KC_7, KC_8, KC_9, KC_0
#define _____BASE_L4_____ K41, K42, K43, K44, K45
#define _____BASE_R4_____ K46, K47, K48, K49, K4A
/* QWERTY ==============================================================================
* ,-----------------------------------------------------------------------------------.
* | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | BKSP |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | TAB | Q | W | E | R | T | Y | U | I | O | P | BKSP |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | NAV | A | S | D | F | G | H | J | K | L | ; | " |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | SHFT | Z | X | C | V | B | N | M | , | . | / | SHFT |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | CTRL | C/S | LGUI | LALT | SYMB | NUM/SPACE | SYMB | RALT | SETT | MUTG | LEAD |
* `-----------------------------------------------------------------------------------'
*/
// LEFT
// - CORE
#define ____QWERTY_L1____ KC_Q, KC_W, KC_E, KC_R, KC_T
#define ____QWERTY_L2____ KC_A, KC_S, KC_D, KC_F, KC_G
#define ____QWERTY_L3____ KC_Z, KC_X, KC_C, KC_V, KC_B
// RIGHT
// - CORE
#define ____QWERTY_R1____ KC_Y, KC_U, KC_I, KC_O, KC_P
#define ____QWERTY_R2____ KC_H, KC_J, KC_K, KC_L, KC_SCLN
#define ____QWERTY_R3____ KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH
/* NUMPAD ==============================================================================
* ,-----------------------------------------------------------------------------------.
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | TRNS |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | TRNS | F9 | F10 | F11 | F12 | | NLCK | 7 | 8 | 9 | - | TRNS |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | ESC | F5 | F6 | F7 | F8 | SPC | SPC | 4 | 5 | 6 | + | ENTR |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | TRNS | F1 | F2 | F3 | F4 | ALT | | 1 | 2 | 3 | / | TRNS |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | 0 | , | . | * | TRNS |
* `-----------------------------------------------------------------------------------'
*/
// LEFT
// - CORE
#define ____NUMPAD_L1____ KC_F9, KC_F10, KC_F11, KC_F12, KC_NO
#define ____NUMPAD_L2____ KC_F5, KC_F6, KC_F7, KC_F8, KC_SPC
#define ____NUMPAD_L3____ KC_F1, KC_F2, KC_F3, KC_F4, KC_LALT
// - MODS
#define ____NUMPAD_L4____ ______TRANS______
#define K00_NUM KC_TRNS
#define K10_NUM KC_TRNS
#define K20_NUM KC_TRNS
#define K30_NUM KC_TRNS
#define K40_NUM KC_TRNS
// RIGHT
// - CORE
#define ____NUMPAD_R1____ KC_NLCK, KC_7, KC_8, KC_9, KC_MINS
#define ____NUMPAD_R2____ KC_SPC, KC_4, KC_5, KC_6, KC_PLUS
#define ____NUMPAD_R3____ KC_NO, KC_1, KC_2, KC_3, KC_SLSH
// - MODS
#define ____NUMPAD_R4____ KC_TRNS, KC_0, KC_COMM, KC_DOT, KC_ASTR
#define K0B_NUM KC_TRNS
#define K1B_NUM KC_TRNS
#define K2B_NUM KC_ENT
#define K3B_NUM KC_TRNS
#define K4B_NUM KC_TRNS
/* SYMBOL ==============================================================================
* ,-----------------------------------------------------------------------------------.
* | TRNS | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | TRNS |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | TRNS | ! | @ | { | } | | | ^ | $ | & | | | DEL |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | TRNS | < | > | ( | ) | | | - | + | = | \ | ` |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | TRNS | ~ | # | [ | ] | | | _ | * | % | / | TRNS |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS |
* `-----------------------------------------------------------------------------------'
*/
// LEFT
// - CORE
#define ____SYMBOL_L1____ KC_EXCLAIM, KC_AT, KC_LCBR, KC_RCBR, KC_NO
#define ____SYMBOL_L2____ KC_LABK, KC_RABK, KC_LPRN, KC_RPRN, KC_NO
#define ____SYMBOL_L3____ KC_TILD, KC_HASH, KC_LBRC, KC_RBRC, KC_NO
// - MODS
#define ____SYMBOL_L4____ ______TRANS______
#define K00_SYM KC_TRNS
#define K10_SYM KC_TRNS
#define K20_SYM KC_TRNS
#define K30_SYM KC_TRNS
#define K40_SYM KC_TRNS
// RIGHT
// - CORE
#define ____SYMBOL_R1____ KC_NO, KC_CIRC, KC_DOLLAR, KC_AMPR, KC_PIPE
#define ____SYMBOL_R2____ KC_NO, KC_MINS, KC_PLUS, KC_EQL, KC_BSLS
#define ____SYMBOL_R3____ KC_NO, KC_UNDS, KC_ASTR, KC_PERC, KC_SLSH
// - MODS
#define ____SYMBOL_R4____ ______TRANS______
#define K0B_SYM KC_TRNS
#define K1B_SYM KC_DEL
#define K2B_SYM KC_GRV
#define K3B_SYM KC_TRNS
#define K4B_SYM KC_TRNS
/* NAVIGATION ==========================================================================
* ,-----------------------------------------------------------------------------------.
* | TRNS | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | TRNS |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | TRNS | | | SPC | F5 | | INS | HOME | END | TAB | DEL | TRNS |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | TRNS | SHFT | CTRl | ALT | GUI | | LEFT | DOWN | UP | RGHT | | ENTR |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | TRNS | UNDO | CUT | COPY | PSTE | | | PGDO | PGUP | CAPS | | TRNS |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | TRNS | TRNS | TRNS | TRNS | TRNS | ESC | TRNS | TRNS | TRNS | TRNS | TRNS |
* `-----------------------------------------------------------------------------------'
*/
// LEFT
// - CORE
#define __NAVIGATION_L1__ KC_NO, KC_NO, KC_SPC, KC_F5, KC_NO
#define __NAVIGATION_L2__ KC_LSFT, KC_LCTRL, KC_LALT, KC_LGUI, KC_NO
#define __NAVIGATION_L3__ WINUNDO, WINCUT, WINCOPY, WINPASTE, KC_NO
// - MODS
#define __NAVIGATION_L4__ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_ESC
#define K00_NAV KC_TRNS
#define K10_NAV KC_TRNS
#define K20_NAV KC_TRNS
#define K30_NAV KC_TRNS
#define K40_NAV KC_TRNS
// RIGHT
// - CORE
#define __NAVIGATION_R1__ KC_INS, KC_HOME, KC_END, KC_TAB, KC_DEL
#define __NAVIGATION_R2__ KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_NO
#define __NAVIGATION_R3__ KC_NO, KC_PGDN, KC_PGUP, KC_CAPS, KC_NO
// - MODS
#define __NAVIGATION_R4__ KC_ESC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
#define K0B_NAV KC_TRNS
#define K1B_NAV KC_TRNS
#define K2B_NAV KC_ENT
#define K3B_NAV KC_TRNS
#define K4B_NAV KC_TRNS
/* SETTINGS ============================================================================
* ,-----------------------------------------------------------------------------------.
* | | | | | | | | | | BRID | BRIU | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | | | | | |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | | | | | | | MPRV | MPLY | MUTE | MNXT | | |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | ASTG | MUTO | AUOF | AUON | | | | VOLD | VOLU | | | ASTG |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | TRNS | | TRNS | | | | |
* `-----------------------------------------------------------------------------------'
*/
// LEFT
// - CORE
#define ___SETTINGS_L1___ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO
#define ___SETTINGS_L2___ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO
#define ___SETTINGS_L3___ MU_TOG, AU_OFF, AU_ON, KC_NO, KC_NO
// - MODS
#define ___SETTINGS_L4___ KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO
#define K00_SET KC_NO
#define K10_SET KC_NO
#define K20_SET KC_NO
#define K30_SET KC_ASTG
#define K40_SET KC_NO
// RIGHT
// - CORE
#define ___SETTINGS_R1___ KC_NO, KC_NO, KC_NO, KC_BRID, KC_BRIU
#define ___SETTINGS_R2___ KC_MPRV, KC_MPLY, KC_MUTE, KC_MNXT, KC_NO
#define ___SETTINGS_R3___ KC_NO, KC_VOLD, KC_VOLU, KC_NO, KC_NO
// - MODS
#define ___SETTINGS_R4___ KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO
#define K0B_SET KC_NO
#define K1B_SET KC_NO
#define K2B_SET KC_NO
#define K3B_SET KC_ASTG
#define K4B_SET KC_NO

View File

@ -1,7 +0,0 @@
#pragma once
#define MUSIC_MASK (keycode != KC_NO)
#define MIDI_BASIC
#define LEADER_TIMEOUT 400
#define LEADER_PER_KEY_TIMING

View File

@ -1,46 +0,0 @@
# alfrdmalr's userspace
## Overview
The alphanumeric characters and symbols are spread between three main 'typing' layers: REGULAR, NUMPAD, and SYMBOL.
A fourth layer, NAVIGATION, contains useful modifiers, shortcuts, and navigation functions like the arrow keys and page up/down. This layer also provides access to the `ENTER` and `ESC` keys.
Finally, a SETTINGS layer can be used to adjust certain keyboard-related options.
A visual representation of each layer can be found in [alfrdmalr.h](./alfrdmalr.h)
### Layers
#### REGULAR
Right now this is just a QWERTY layer, but other layouts (DVORAK, COLEMAK, etc.) could easily be added. The REGULAR layer uses the default modifiers.
The default modifiers are defined in the style `K00`, where the first digit is the row index and the second digit is the column index. These indices are based on the Preonic's 5x12 grid, and are **not** adjusted for a board of different size; for instance, the upper-leftmost key in the preonic layout is `K00`, whereas the upper-leftmost key on a Planck would be `K10`.
This convention is designed to work nicely with layout wrappers.
#### NUMPAD
The NUMPAD layer puts a numpad under the right hand, surrounding the home row position. Several basic arithmetic operators are also provided, as well as comma/decimal symbols, to emulate a traditional numpad. The numlock/capslock keys are accessible from this layer as well, though it should be noted that the actual keycodes being sent by the numpad are NOT the numpad versions of the numbers - this is to prevent the normal numlock behavior from blocking numbers from being sent.
This layer also holds the first twelve function keys.
#### SYMBOL
This layer holds all the symbols that are not accessible from the REGULAR layer. There is some redundancy (for instance, `/` exists in both the REGULAR and SYMBOL layer; its position, however, remains consistent) but with the exception of single and double quotes, all symbols are available from this layer.
#### NAVIGATION
Over time, this layer has become a general utility layer, though its primary function of is still to provide arrow keys under hjkl. The surrounding keys contain similar functionality - for instance, the keys directly below `DOWN` and `UP` are `PAGEDOWN` and `PAGEUP`, respectively. `HOME` and `END` are inverted from this convention, simply because I kept hitting the wrong key when trying to jump to the beginning/end of lines when editing text.
To the immediate right of the NAVIGATION layer key are the following modifiers: `SHIFT`, `CONTROL`, `ALT`, `GUI`. All modifiers are the "left" variants. The idea is to use the left hand to hold different modifiers as necessary while using the right hand to navigate and format.
`ESCAPE` is located on the spacebar from this layer, and `DELETE` is placed next to `BACKSPACE`, for convenience when formatting text. There are also four Windows shortcuts for undo, cut, copy, and paste, located in the same position as the relevant keys on the base layer (undo, for example, is in the same place as the `Z` key). Again, this is for convenience when formatting text.
#### SETTINGS
The SETTINGS layer can be accessed by pressing both SYMBOL layer keys at once. This is functionally the same as a trilayer, though because both keys are activating the same layer it doesn't actually use the trilayer feature.
This layer contains things like feature toggles, media controls, and other infrequently-used options.
### Leader Key Sequences
A complete list of leader sequences can be found below. The LEAD key that begins each sequence has been omitted.
| Sequence | Function |
| :------: | -------------------------------- |
| R-E-S-E-T | Reset the keyboard into DFU mode |

View File

@ -1,8 +0,0 @@
SRC += alfrdmalr.c
ifdef AUDIO_ENABLE
SRC += muse.c
endif
AUTO_SHIFT_ENABLE = yes
LEADER_ENABLE = yes

View File

@ -1,630 +0,0 @@
#include "arkag.h"
/*
Current Layout and Keeb:
https://github.com/arkag/qmk_firmware/blob/master/keyboards/mechmini/v2/keymaps/arkag/keymap.c
*/
#include <stdbool.h>
// Start: Written by Chris Lewis
#ifndef MIN
#define MIN(a,b) (((a)<(b))?(a):(b))
#endif
#ifndef MAX
#define MAX(a,b) (((a)>(b))?(a):(b))
#endif
#define TYPING_SPEED_MAX_VALUE 200
uint8_t typing_speed = 0;
void velocikey_accelerate() {
if (typing_speed < TYPING_SPEED_MAX_VALUE) typing_speed += (TYPING_SPEED_MAX_VALUE / 50);
}
void velocikey_decelerate() {
static uint16_t decay_timer = 0;
if (timer_elapsed(decay_timer) > 500 || decay_timer == 0) {
if (typing_speed > 0) typing_speed -= 1;
//Decay a little faster at half of max speed
if (typing_speed > TYPING_SPEED_MAX_VALUE / 2) typing_speed -= 1;
//Decay even faster at 3/4 of max speed
if (typing_speed > TYPING_SPEED_MAX_VALUE / 4 * 3) typing_speed -= 3;
decay_timer = timer_read();
}
}
uint8_t velocikey_match_speed(uint8_t minValue, uint8_t maxValue) {
return MAX(minValue, maxValue - (maxValue - minValue) * ((float)typing_speed / TYPING_SPEED_MAX_VALUE));
}
// End: Written by Chris Lewis
uint8_t current_os,
mod_primary_mask,
fade_interval,
num_extra_flashes_off = 0;
Color underglow,
flash_color,
saved_color,
hsv_none = {0,0,0};
flashState flash_state = no_flash;
fadeState fade_state = add_fade;
activityState state = boot;
bool aesthetic = false,
shifty = false;
void set_color (Color new, bool update) {
rgblight_sethsv_eeprom_helper(new.h, new.s, new.v, update);
}
void save_color(Color to_save) {
saved_color = to_save;
}
void reset_color(void) {
underglow = saved_color;
}
Color mod_color(Color current_color, bool should_add, uint8_t change_amount) {
save_color(underglow);
int addlim = 359 - change_amount;
int sublim = change_amount;
int leftovers;
if (should_add) {
if (current_color.h <= addlim) {
current_color.h += change_amount;
} else {
leftovers = (359 + change_amount) % 359;
current_color.h = 0 + leftovers;
}
} else {
if (current_color.h >= sublim) {
current_color.h -= change_amount;
} else {
leftovers = change_amount - current_color.h;
current_color.h = 359 - leftovers;
}
}
return current_color;
}
void check_state (void) {
static uint16_t active_timer;
if (!active_timer) {active_timer = timer_read();}
static bool activated, deactivated, slept;
switch (state) {
case active:
if (!activated) {
if (slept) {rgblight_mode_noeeprom(1);}
activated = true;
deactivated = false;
slept = false;
}
fade_interval = velocikey_match_speed(1, 25);
if (timer_elapsed(active_timer) < INACTIVE_DELAY) {return;}
active_timer = timer_read();
state = inactive;
return;
case inactive:
if (!deactivated) {
deactivated = true;
activated = false;
slept = false;
}
velocikey_decelerate();
fade_interval = velocikey_match_speed(1, 25);
if (timer_elapsed(active_timer) < SLEEP_DELAY) {return;}
state = sleeping;
return;
case sleeping:
if (!slept) {
rgblight_mode_noeeprom(5);
slept = true;
activated = false;
deactivated = false;
}
return;
case boot:
return;
}
}
void fade_rgb (void) {
static uint16_t fade_timer;
if (state == boot) {return;}
if (!fade_timer) {fade_timer = timer_read();}
if (timer_elapsed(fade_timer) < fade_interval) {return;}
switch (fade_state) {
case add_fade:
if (underglow.h == 359) {
fade_state = sub_fade;
return;
}
underglow.h = underglow.h + 1;
break;
case sub_fade:
if (underglow.h == 0) {
fade_state = add_fade;
return;
}
underglow.h = underglow.h - 1;
break;
}
fade_timer = timer_read();
if (flash_state == no_flash) {
set_color(underglow, false);
}
}
void flash_rgb (void) {
static uint16_t flash_timer;
switch(flash_state) {
case no_flash:
return;
case flash_off:
if (!flash_timer) {flash_timer = timer_read();}
if (timer_elapsed(flash_timer) >= LED_FLASH_DELAY) {
set_color(hsv_none, false);
flash_timer = timer_read();
flash_state = flash_on;
}
return;
case flash_on:
if (timer_elapsed(flash_timer) >= LED_FLASH_DELAY) {
set_color(flash_color, false);
flash_timer = timer_read();
if (num_extra_flashes_off > 0) {
flash_state = flash_off;
num_extra_flashes_off--;
} else {
set_color(underglow, false);
flash_state = no_flash;
}
}
return;
}
}
void set_os (uint8_t os, bool update) {
current_os = os;
if (update) {
eeprom_update_byte(EECONFIG_USERSPACE, current_os);
}
switch (os) {
case OS_MAC:
set_unicode_input_mode(UC_OSX);
underglow = (Color){ 300, 255, 255 };
mod_primary_mask = MOD_GUI_MASK;
break;
case OS_WIN:
set_unicode_input_mode(UC_WINC);
underglow = (Color){ 180, 255, 255 };
mod_primary_mask = MOD_CTL_MASK;
break;
case OS_NIX:
set_unicode_input_mode(UC_LNX);
underglow = (Color){ 60, 255, 255 };
mod_primary_mask = MOD_CTL_MASK;
break;
default:
underglow = (Color){ 0, 0, 255 };
mod_primary_mask = MOD_CTL_MASK;
}
set_color(underglow, update);
flash_color = underglow;
flash_state = flash_off;
state = boot;
num_extra_flashes_off = 1;
}
// register GUI if Mac or Ctrl if other
void pri_mod(bool press) {
if (press) {
if (current_os == OS_MAC) {
register_code(KC_LGUI);
} else {
register_code(KC_LCTL);
}
} else {
if (current_os == OS_MAC) {
unregister_code(KC_LGUI);
} else {
unregister_code(KC_LCTL);
}
}
}
// register Ctrl if Mac or GUI if other
void sec_mod(bool press) {
if (press) {
if (current_os == OS_MAC) {
register_code(KC_LCTL);
} else {
register_code(KC_LGUI);
}
} else {
if (current_os == OS_MAC) {
unregister_code(KC_LCTL);
} else {
unregister_code(KC_LGUI);
}
}
}
void surround_type(uint8_t num_of_chars, uint16_t keycode, bool use_shift) {
if (use_shift) {
register_code(KC_LSFT);
}
for (int i = 0; i < num_of_chars; i++) {
tap_code(keycode);
}
if (use_shift) {
unregister_code(KC_LSFT);
}
for (int i = 0; i < (num_of_chars/2); i++) {
tap_code(KC_LEFT);
}
}
void long_keystroke(size_t num_of_keys, uint16_t keys[]) {
for (int i = 0; i < num_of_keys-1; i++) {
register_code(keys[i]);
}
tap_code(keys[num_of_keys-1]);
for (int i = 0; i < num_of_keys-1; i++) {
unregister_code(keys[i]);
}
}
void dance_grv (qk_tap_dance_state_t *state, void *user_data) {
if (state->count == 1) {
tap_code(KC_GRV);
if (aesthetic) {
tap_code(KC_SPACE);
}
} else if (state->count == 2) {
surround_type(2, KC_GRAVE, false);
} else {
surround_type(6, KC_GRAVE, false);
}
}
void dance_quot (qk_tap_dance_state_t *state, void *user_data) {
if (state->count == 1) {
tap_code(KC_QUOT);
if (aesthetic) {
tap_code(KC_SPACE);
}
} else if (state->count == 2) {
surround_type(2, KC_QUOTE, false);
} else if (state->count == 3) {
surround_type(2, KC_QUOTE, true);
}
}
void dance_hyph (qk_tap_dance_state_t *state, void *user_data) {
if (state->count == 1) {
tap_code(KC_MINS);
if (aesthetic) {
tap_code(KC_SPACE);
}
} else if (state->count == 2) {
register_code(KC_LSFT);
tap_code(KC_MINS);
if (aesthetic) {
tap_code(KC_SPACE);
}
unregister_code(KC_LSFT);
} else if (state->count == 3) {
send_unicode_hex_string("2014");
}
}
void dance_obrck (qk_tap_dance_state_t *state, void *user_data) {
if (state->count == 1) {
tap_code(KC_LBRC);
if (aesthetic) {
tap_code(KC_SPACE);
}
} else if (state->count == 2) {
register_code(KC_LSFT);
tap_code(KC_9);
if (aesthetic) {
tap_code(KC_SPACE);
}
unregister_code(KC_LSFT);
}
}
void dance_cbrck (qk_tap_dance_state_t *state, void *user_data) {
if (state->count == 1) {
tap_code(KC_RBRC);
if (aesthetic) {
tap_code(KC_SPACE);
}
} else if (state->count == 2) {
register_code(KC_LSFT);
tap_code(KC_0);
if (aesthetic) {
tap_code(KC_SPACE);
}
unregister_code(KC_LSFT);
}
}
void dance_game (qk_tap_dance_state_t *state, void *user_data) {
if (state->count == 1) {
} else if (state->count == 2) {
} else if (state->count == 3) {
uint8_t layer = biton32(layer_state);
if (layer == _QWERTY) {
layer_off(_QWERTY);
layer_on(_GAMING);
// swirling rgb
rgblight_mode_noeeprom(12);
} else {
layer_off(_GAMING);
layer_on(_QWERTY);
rgblight_mode_noeeprom(1);
}
}
}
void matrix_init_user(void) {
current_os = eeprom_read_byte(EECONFIG_USERSPACE);
set_os(current_os, false);
}
LEADER_EXTERNS();
void matrix_scan_user(void) {
check_state();
flash_rgb();
fade_rgb();
LEADER_DICTIONARY() {
leading = false;
leader_end();
// begin OS functions
SEQ_TWO_KEYS(KC_P, KC_B) {
if (current_os == OS_WIN) {
long_keystroke(2, (uint16_t[]){KC_LGUI, KC_PAUSE});
} else {
return;
}
}
SEQ_TWO_KEYS(KC_LSFT, M_PMOD) {
if (current_os == OS_WIN) {
long_keystroke(3, (uint16_t[]){KC_LCTL, KC_LSFT, KC_ESC});
} else {
}
}
SEQ_TWO_KEYS(KC_S, KC_S) {
if (current_os == OS_MAC) {
long_keystroke(3, (uint16_t[]){KC_LGUI, KC_LSFT, KC_4});
} else if (current_os == OS_WIN) {
long_keystroke(3, (uint16_t[]){KC_LGUI, KC_LSFT, KC_S});
} else {
return;
}
}
SEQ_THREE_KEYS(KC_C, KC_A, KC_D) {
if (current_os == OS_WIN) {
long_keystroke(3, (uint16_t[]){KC_LCTL, KC_LALT, KC_DEL});
} else {
}
}
SEQ_FOUR_KEYS(KC_C, KC_A, KC_L, KC_C) {
if (current_os == OS_WIN) {
SEND_STRING(SS_TAP(X_CALCULATOR));
} else if (current_os == OS_MAC) {
SEND_STRING(SS_DOWN(X_LGUI) SS_TAP(X_SPACE) SS_UP(X_LGUI) "calculator" SS_TAP(X_ENTER));
}
}
// end OS functions
// begin format functions
SEQ_ONE_KEY(KC_B) {
surround_type(4, KC_8, true);
}
SEQ_ONE_KEY(KC_I) {
surround_type(2, KC_8, true);
}
SEQ_ONE_KEY(KC_U) {
surround_type(4, KC_MINS, true);
}
SEQ_ONE_KEY(KC_S) {
surround_type(4, KC_GRAVE, true);
}
SEQ_ONE_KEY(KC_C) {
send_unicode_hex_string("00E7");
}
SEQ_TWO_KEYS(KC_C, KC_C) {
surround_type(2, KC_GRAVE, false);
}
SEQ_THREE_KEYS(KC_C, KC_C, KC_C) {
surround_type(6, KC_GRAVE, false);
}
SEQ_ONE_KEY(KC_E) {
send_unicode_hex_string("00E8");
}
SEQ_TWO_KEYS(KC_E, KC_E) {
send_unicode_hex_string("00E9");
}
// end format functions
// start fancy functions
SEQ_THREE_KEYS(KC_C, KC_C, KC_ENT) {
surround_type(6, KC_GRAVE, false);
pri_mod(true);
tap_code(KC_V);
pri_mod(false);
tap_code(KC_RGHT);
tap_code(KC_RGHT);
tap_code(KC_RGHT);
tap_code(KC_ENTER);
}
// end fancy functions
// start typing functions
SEQ_TWO_KEYS(KC_T, KC_M) {
// ™
send_unicode_hex_string("2122");
}
SEQ_TWO_KEYS(KC_D, KC_D) {
SEND_STRING(".\\Administrator");
}
SEQ_THREE_KEYS(KC_L, KC_O, KC_D) {
// ಠ__ಠ
send_unicode_hex_string("0CA0 005F 005F 0CA0");
}
SEQ_FOUR_KEYS(KC_R, KC_E, KC_P, KC_O) {
SEND_STRING("https://github.com/qmk/qmk_firmware/tree/master/users/arkag");
}
SEQ_FOUR_KEYS(KC_F, KC_L, KC_I, KC_P) {
// (╯‵Д′)╯彡┻━┻
send_unicode_hex_string("0028 256F 2035 0414 2032 0029 256F 5F61 253B 2501 253B");
}
SEQ_FIVE_KEYS(KC_U, KC_F, KC_L, KC_I, KC_P) {
// ┬─┬ノ( º _ º )
send_unicode_hex_string("252C 2500 252C 30CE 0028 0020 00BA 0020 005F 0020 00BA 0020 30CE 0029");
}
SEQ_FIVE_KEYS(KC_L, KC_E, KC_N, KC_N, KC_Y) {
// ( ͡° ͜ʖ ͡°)
send_unicode_hex_string("0028 0020 0361 00B0 0020 035C 0296 0020 0361 00B0 0029");
}
SEQ_FIVE_KEYS(KC_S, KC_H, KC_R, KC_U, KC_G) {
// ¯\_(ツ)_/¯
send_unicode_hex_string("00AF 005C 005F 0028 30C4 0029 005F 002F 00AF");
}
// end typing functions
}
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if (aesthetic) {
switch (keycode) {
case KC_A ... KC_0:
case KC_SPACE ... KC_SLASH:
if (record->event.pressed) {
state = active;
velocikey_accelerate();
tap_code(keycode);
tap_code(KC_SPACE);
}
return false;
case KC_BSPACE:
if (record->event.pressed) {
state = active;
velocikey_accelerate();
tap_code(keycode);
tap_code(keycode);
}
return false;
default: // Do nothing
break;
}
}
if (shifty) {
switch (keycode) {
case KC_A ... KC_Z:
if (record->event.pressed) {
int shift = rand() % 2;
state = active;
velocikey_accelerate();
if (shift == 1){
register_code(KC_LSFT);
}
tap_code(keycode);
if (shift == 1){
unregister_code(KC_LSFT);
}
}
return false;
case KC_SPC:
if (record->event.pressed) {
state = active;
velocikey_accelerate();
tap_code(keycode);
}
return false;
default: // Do nothing
break;
}
}
switch (keycode) {
case M_PMOD:
pri_mod(record->event.pressed);
return false;
case M_SMOD:
sec_mod(record->event.pressed);
return false;
case M_OS:
if (record->event.pressed){
set_os((current_os+1) % _OS_COUNT, true);
}
return false;
case M_SPC:
if(record->event.pressed){
if (aesthetic) {
aesthetic = false;
rgblight_mode_noeeprom(1);
} else {
aesthetic = true;
shifty = false;
// snake mode
rgblight_mode_noeeprom(20);
}
return false;
}
case M_SFT:
if(record->event.pressed){
if (shifty) {
shifty = false;
rgblight_mode_noeeprom(1);
} else {
shifty = true;
aesthetic = false;
// knight mode
rgblight_mode_noeeprom(23);
}
return false;
}
default:
if (record->event.pressed) {
state = active;
velocikey_accelerate();
}
return true;
}
}
//Tap Dance Definitions
qk_tap_dance_action_t tap_dance_actions[] = {
[TD_GRV_3GRV] = ACTION_TAP_DANCE_FN (dance_grv),
[TD_SING_DOUB] = ACTION_TAP_DANCE_FN (dance_quot),
[TD_HYPH_UNDR] = ACTION_TAP_DANCE_FN (dance_hyph),
[TD_BRCK_PARN_O] = ACTION_TAP_DANCE_FN (dance_obrck),
[TD_BRCK_PARN_C] = ACTION_TAP_DANCE_FN (dance_cbrck),
[TD_LALT_RALT] = ACTION_TAP_DANCE_DOUBLE (KC_LALT, KC_RALT),
[TD_GAME] = ACTION_TAP_DANCE_FN (dance_game),
};

View File

@ -1,139 +0,0 @@
#pragma once
#include "quantum.h"
#include "process_keycode/process_tap_dance.h"
#define EECONFIG_USERSPACE (uint8_t *)20
#define LRALT TD(TD_LALT_RALT)
#define QUOTE TD(TD_SING_DOUB)
#define GRAVE TD(TD_GRV_3GRV)
#define OBRACK TD(TD_BRCK_PARN_O)
#define CBRACK TD(TD_BRCK_PARN_C)
#define THREE TD(TD_3_GRV_ACT)
#define STRIKE TD(TD_STRK_SHOT)
#define HYPHEN TD(TD_HYPH_UNDR)
#define CEDILLA TD(TD_C_CED)
#define GAME TD(TD_GAME)
#define RAISE MO(1)
#define LOWER MO(2)
#define MEDIA MO(3)
#define FUNCT MO(4)
#define KEEB MO(5)
#define MOD_CTL_MASK (MOD_BIT(KC_LCTL) | MOD_BIT(KC_RCTL))
#define MOD_GUI_MASK (MOD_BIT(KC_LGUI) | MOD_BIT(KC_RGUI))
#define MOD_SFT_MASK (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT))
#define LED_FLASH_DELAY 150
#define ACCEL_DELAY 500
#define DEACCEL_DELAY 500
#define INACTIVE_DELAY 250
#define SLEEP_DELAY 180000
enum {
_QWERTY = 0,
_RAISE,
_LOWER,
_MEDIA,
_FUNCT,
_KEEB,
_GAMING,
};
typedef enum {
OS_MAC, // Don't assign values
OS_WIN,
OS_NIX,
_OS_COUNT,
} OS;
typedef struct {
uint16_t h;
uint8_t s;
uint8_t v;
} Color;
typedef enum {
no_flash = 0,
flash_off,
flash_on,
} flashState;
typedef enum {
add_fade = 0,
sub_fade,
} fadeState;
typedef enum {
active = 0,
inactive,
sleeping,
boot,
} activityState;
enum custom_keycodes {
M_PMOD = SAFE_RANGE,
M_SMOD,
M_OS,
M_SFT,
M_SPC,
};
enum tapdances {
TD_3_GRV_ACT = 0,
TD_C_CED,
TD_GRV_3GRV,
TD_SLSH_HTTP,
TD_SING_DOUB,
TD_HYPH_UNDR,
TD_SPECIAL,
TD_BRCK_PARN_O,
TD_BRCK_PARN_C,
TD_LALT_RALT,
TD_GAME,
};
void velocikey_accelerate(void);
void velocikey_decelerate(void);
uint8_t velocikey_match_speed(uint8_t minValue, uint8_t maxValue);
void set_color (Color new, bool update);
void save_color(Color to_save);
void reset_color(void);
Color mod_color(Color current_color, bool should_add, uint8_t change_amount);
void reverse_fade (void);
void check_state (void);
void fade_rgb (void);
void flash_rgb (void);
void set_os (uint8_t os, bool update);
void tap_key(uint8_t keycode);
void pri_mod(bool press);
void sec_mod(bool press);
void surround_type(uint8_t num_of_chars, uint16_t keycode, bool use_shift);
void long_keystroke(size_t num_of_keys, uint16_t keys[]);
void dance_grv (qk_tap_dance_state_t *state, void *user_data);
void dance_quot (qk_tap_dance_state_t *state, void *user_data);
void dance_strk (qk_tap_dance_state_t *state, void *user_data);
void dance_3 (qk_tap_dance_state_t *state, void *user_data);
void dance_c (qk_tap_dance_state_t *state, void *user_data);
void dance_game (qk_tap_dance_state_t *state, void *user_data);
int cur_dance (qk_tap_dance_state_t *state);
void spc_finished (qk_tap_dance_state_t *state, void *user_data);
void spc_reset (qk_tap_dance_state_t *state, void *user_data);

View File

@ -1,6 +0,0 @@
#pragma once
#define TAPPING_TERM 200
#define LEADER_TIMEOUT 300
#define LEADER_PER_KEY_TIMING

View File

@ -1,42 +0,0 @@
# Shot on Pixel 2 XL with Cheap Lamp at Work
![mmm, tasty](mechmini2.jpg)
# I don't know what I'm doing
Some links:
* [Layout File: Mech Mini 2](layout_mm2)
* [Userspace Header](arkag_h)
* [Userspace Main](arkag_c)
Here's a list of some things I have working with my currently [keyboard](mm2_home):
* Reactive (sort of) fading while typing, ported from [Velocikey](https://github.com/qmk/qmk_firmware/pull/3754).
* OS Switching, storing to EEPROM
* OS Specific Macros and Shortcuts(WIN+SHIFT+S for Windows and CMD+SHIFT+4 for MacOS)
* Flashing RGB LED on OS change
* Hex Unicode Macros dependent on OS(half works on Windows due to [WinCompose](https://github.com/SamHocevar/wincompose) not functioning properly just yet).
* "Sleep" function activates after 3 minutes (breathing).
* Markdown style macros for surround type __eve__ ~~ryw~~ *her* **eee** (apparently only certain places support underline and strikethrough ಠ__ಠ)
# License Stuff
Copyright 2018 arkag arkag@pm.me
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/>.
[arkag_c]: /users/arkag/arkag.c
[arkag_h]: /users/arkag/arkag.h
[layout_mm2]: /keyboards/mechmini/v2/keymaps/arkag/keymap.c
[mm2_home]: https://cartel.ltd/projects/mechmini2/

View File

@ -1 +0,0 @@
SRC += arkag.c

View File

@ -1,51 +0,0 @@
# Overview
I have mostly ortholinear keyboards, which share a lot of functions.
For this purpose, I collected them here.
I have the following keymaps:
* Gherkin (Does not use the user space)
* XD75RE (Uses different keymap)
* Let's Split
* Let's Split It Up
* Planck
# Layout
I use DVORAK with an unorthodox Turkish layout.
If you wanna grab my code, and you used a layout with a persistent base
layer change, change it to layer 0 before proceeding.
# Layers
* **Dvorak**: Base layer,with dvorak layout.
* **Alternative**: Has alternate characters.
* **Game**: Toggled from *Function*, comfortable for gaming use.
* **Numeric**: Has numericals and symbols. Can be locked.
* **Function**: Layer has media and function keys.
* **Mouse**: Manipulates mouse. Can be locked.
* **Music** Allows playing sounds.
# Functionality
* **RGB Backlight**: With layer indication, and ability to change base layer lighting mode.
* **Secrets**: By placing a secrets.h, and not tracking it, passwords can be stored.
* **Mouse**: Mouse emulation, complete with diagonal keys.
* **Turkish**: An AltGr-like overlay that allows some non-common letters, in unicode.
I suggest checking out how I enabled Turkish keys,
how I planned out RGB lighting,
and my mouse implementation;
they might offer some insight into fringe user cases.
# Issues
All features are too big for the 32kB bootloader.
Offenders are audio and rgb lights; it comes down to one or the other.
~The Proton board, and rev 6 might fix that.~
# Credits
I have previously written my keymap by myself before, but I rewrote it here,

View File

@ -1,633 +0,0 @@
#include "bbaserdem.h"
/*---------------*\
|*-----MOUSE-----*|
\*---------------*/
#ifdef MOUSEKEY_ENABLE
#include "mousekey.h"
#endif
/*-------------*\
|*-----RGB-----*|
\*-------------*/
#ifdef RGBLIGHT_ENABLE
#include "rgblight.h"
#endif
/*-------------*\
|*---UNICODE---*|
\*-------------*/
#ifdef UNICODE_ENABLE
#endif
/*-----------------*\
|*-----SECRETS-----*|
\*-----------------*/
// Enabled by adding a non-tracked secrets.h to this dir.
#if (__has_include("secrets.h"))
#include "secrets.h"
#endif
/*---------------*\
|*-----MUSIC-----*|
\*---------------*/
#ifdef AUDIO_ENABLE
float tone_game[][2] = SONG(ZELDA_PUZZLE);
float tone_return[][2] = SONG(ZELDA_TREASURE);
float tone_linux[][2] = SONG(UNICODE_LINUX);
float tone_windows[][2] = SONG(UNICODE_WINDOWS);
#endif
/*-------------------*\
|*-----TAP-DANCE-----*|
\*-------------------*/
#ifdef TAP_DANCE_ENABLE
qk_tap_dance_action_t tap_dance_actions[] = {
// Shift on double tap of semicolon
[SCL] = ACTION_TAP_DANCE_DOUBLE( KC_SCLN, KC_COLN )
};
#endif
/* In keymaps, instead of writing _user functions, write _keymap functions
* The __attribute__((weak)) allows for empty definitions here, and during
* compilation, if these functions are defined elsewhere, they are written
* over. This allows to include custom code from keymaps in the generic code
* in this file.
*/
__attribute__ ((weak)) void matrix_init_keymap(void) { }
__attribute__ ((weak)) void matrix_scan_keymap(void) { }
__attribute__ ((weak)) bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
return true;
}
__attribute__ ((weak)) uint32_t layer_state_set_keymap (uint32_t state) {
return state;
}
__attribute__ ((weak)) void led_set_keymap(uint8_t usb_led) { }
/* ----------------------- *\
* -----RGB Functions----- *
\* ----------------------- */
#ifdef RGBLIGHT_ENABLE
// Storage variables
extern rgblight_config_t rgblight_config;
bool base_sta; // Keeps track if in saveable state
bool base_tog; // Whether base state is active or not
int base_hue; // Hue value of base state
int base_sat; // Saturation value of base state
int base_val; // Brightness value of base state
uint8_t base_mod; // Animation mode of the base state
// Save the current state of the rgb mode
void rgblight_saveBase(void) {
base_hue = rgblight_config.hue;
base_sat = rgblight_config.sat;
base_val = rgblight_config.val;
base_mod = rgblight_config.mode;
base_tog = rgblight_config.enable;
base_sta = false; // If saving, that means base layer is being left
}
// Load the base state back
void rgblight_loadBase(void) {
// Don't do anything if not enabled
if ( !base_sta ) {
if ( base_tog ) {
rgblight_enable();
rgblight_mode( base_mod );
rgblight_sethsv( base_hue, base_sat, base_val );
} else {
rgblight_disable();
}
}
// Mark that base is loaded, and to be saved before leaving
base_sta = true;
}
// Set to plain HSV color
void rgblight_colorStatic( int hu, int sa, int va ) {
// First, it must be enabled or color change is not written
rgblight_enable();
rgblight_mode(1);
rgblight_sethsv(hu,sa,va);
}
/* HSV values
* white ( 0, 0, 255)
* red ( 0, 255, 255)
* coral ( 16, 176, 255)
* orange ( 39, 255, 255)
* goldenrod ( 43, 218, 218)
* gold ( 51, 255, 255)
* yellow ( 60, 255, 255)
* chartreuse ( 90, 255, 255)
* green (120, 255, 255)
* springgreen (150, 255, 255)
* turquoise (174, 90, 112)
* teal (180, 255, 128)
* cyan (180, 255, 255)
* azure (186, 102, 255)
* blue (240, 255, 255)
* purple (270, 255, 255)
* magenta (300, 255, 255)
* pink (330, 128, 255)
*/
// Set RGBLIGHT state depending on layer
void rgblight_change( uint8_t this_layer ) {
// Save state, if saving is requested
if ( base_sta ) {
rgblight_saveBase();
}
// Change RGB light
switch ( this_layer ) {
case _DV:
// Load base layer
rgblight_loadBase();
break;
case _AL:
// Do yellow for alternate
rgblight_colorStatic( 60,255,255);
break;
case _GA:
// Do purple for game
rgblight_colorStatic(285,255,255);
break;
case _NU:
// Do azure for number
rgblight_colorStatic(186,200,255);
break;
case _SE:
// Do red for settings
rgblight_colorStatic( 16,255,255);
break;
case _MO:
// Do green for mouse
rgblight_colorStatic(120,255,255);
break;
case _MU:
// Do orange for music
rgblight_colorStatic( 39,255,255);
break;
default:
// Something went wrong
rgblight_colorStatic( 0,255,255);
break;
}
}
#endif
/*---------------------*\
|*-----MATRIX INIT-----*|
\*---------------------*/
void matrix_init_user (void) {
// Keymap specific things, do it first thing to allow for delays etc
matrix_init_keymap();
// Correct unicode
#ifdef UNICODE_ENABLE
set_unicode_input_mode(UC_LNX);
#endif
// Make beginning layer DVORAK
set_single_persistent_default_layer(_DV);
//--RGB light initialize base layer
#ifdef RGBLIGHT_ENABLE
// Base hue is white, and RGB disabled
base_hue = 100;
base_sat = 0;
base_val = 255;
base_mod = 2;
base_tog = false;
rgblight_enable();
rgblight_mode(base_mod);
rgblight_sethsv(base_hue,base_sat,base_val);
rgblight_disable();
rgblight_loadBase();
#endif
}
/*---------------------*\
|*-----MATRIX SCAN-----*|
\*---------------------*/
void matrix_scan_user (void) {
// Keymap specific, do it first
matrix_scan_keymap();
}
/*------------------*\
|*-----KEYCODES-----*|
\*------------------*/
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
// Shift check
bool is_capital = ( keyboard_report->mods & (MOD_BIT(KC_LSFT)|MOD_BIT(KC_RSFT)) );
static bool lock_flag = false;
uint8_t layer = biton32 (layer_state);
switch (keycode) {
// Secrets implementation
#if (__has_include("secrets.h"))
case SECRET1:
if( !record->event.pressed ) {
send_string_P( secret[ keycode - SECRET1 ] );
}
return false;
break;
case SECRET2:
if( !record->event.pressed ) {
send_string_P( secret[ keycode - SECRET2 ] );
}
return false;
break;
case SECRET3:
if( !record->event.pressed ) {
send_string_P( secret[ keycode - SECRET3 ] );
}
return false;
break;
#endif
// If these keys are pressed, load base layer config, and mark saving
#ifdef RGBLIGHT_ENABLE
case RGB_TOG:
case RGB_MOD:
case RGB_VAI:
case RGB_VAD:
case RGB_SAI:
case RGB_SAD:
case RGB_HUI:
case RGB_HUD:
if ( !base_sta ) {
rgblight_loadBase();
}
return true;
break;
#endif
// Lock functionality: These layers are locked if the LOCKED buttons are
// pressed. Otherwise, they are momentary toggles
case K_LOCK:
if (record->event.pressed) {
lock_flag = !lock_flag;
}
return false;
break;
case K_MOUSE:
if (record->event.pressed) {
layer_on(_MO);
lock_flag = false;
} else {
if ( lock_flag ) {
lock_flag = false;
} else {
layer_off(_MO);
}
}
return false;
break;
case K_NUMBR:
if (record->event.pressed) {
layer_on(_NU);
lock_flag = false;
} else {
if ( lock_flag ) {
lock_flag = false;
} else {
layer_off(_NU);
}
}
return false;
break;
// Layer switches with sound
case K_GAMES:
if (record->event.pressed) {
// On press, turn off layer if active
if ( layer == _GA ) {
#ifdef AUDIO_ENABLE
stop_all_notes();
PLAY_SONG(tone_return);
#endif
layer_off(_GA);
}
} else {
// After click, turn on layer if accessed from setting
if ( layer == _SE ) {
#ifdef AUDIO_ENABLE
stop_all_notes();
PLAY_SONG(tone_game);
#endif
layer_on(_GA);
layer_off(_SE);
}
}
return false;
break;
case MU_TOG:
if (record->event.pressed) {
// On press, turn off layer if active
if ( layer == _SE ) {
layer_off(_SE);
layer_on(_MU);
} else {
layer_off(_MU);
}
}
return true;
break;
//------UNICODE
// Unicode switches with sound
#ifdef UNICODE_ENABLE
case UNI_LI:
if (record->event.pressed) {
#ifdef AUDIO_ENABLE
stop_all_notes();
PLAY_SONG(tone_linux);
#endif
set_unicode_input_mode(UC_LNX);
}
return false;
break;
case UNI_WN:
if (record->event.pressed) {
#ifdef AUDIO_ENABLE
stop_all_notes();
PLAY_SONG(tone_windows);
#endif
set_unicode_input_mode(UC_WIN);
}
return false;
break;
// Turkish letters, with capital functionality
case TUR_A:
if (record->event.pressed) {
if ( is_capital ) {
unicode_input_start();
register_hex(0x00c2);
unicode_input_finish();
} else {
unicode_input_start();
register_hex(0x00e2);
unicode_input_finish();
}
}
return false;
break;
case TUR_O:
if (record->event.pressed) {
if ( is_capital ) {
unicode_input_start();
register_hex(0x00d6);
unicode_input_finish();
} else {
unicode_input_start();
register_hex(0x00f6);
unicode_input_finish();
}
}
return false;
break;
case TUR_U:
if (record->event.pressed) {
if ( is_capital ) {
unicode_input_start();
register_hex(0x00dc);
unicode_input_finish();
} else {
unicode_input_start();
register_hex(0x00fc);
unicode_input_finish();
}
}
return false;
break;
case TUR_I:
if (record->event.pressed) {
if ( is_capital ) {
unicode_input_start();
register_hex(0x0130);
unicode_input_finish();
} else {
unicode_input_start();
register_hex(0x0131);
unicode_input_finish();
}
}
return false;
break;
case TUR_G:
if (record->event.pressed) {
if ( is_capital ) {
unicode_input_start();
register_hex(0x011e);
unicode_input_finish();
} else {
unicode_input_start();
register_hex(0x011f);
unicode_input_finish();
}
}
return false;
break;
case TUR_C:
if (record->event.pressed) {
if ( is_capital ) {
unicode_input_start();
register_hex(0x00c7);
unicode_input_finish();
} else {
unicode_input_start();
register_hex(0x00e7);
unicode_input_finish();
}
}
return false;
break;
case TUR_S:
if (record->event.pressed) {
if ( is_capital ) {
unicode_input_start();
register_hex(0x015e);
unicode_input_finish();
} else {
unicode_input_start();
register_hex(0x015f);
unicode_input_finish();
}
}
return false;
break;
#endif
//-------Diagonal mouse movements
#ifdef MOUSEKEY_ENABLE
case MO_NE:
if( record->event.pressed ) {
mousekey_on(MO_N);
mousekey_on(MO_E);
mousekey_send();
} else {
mousekey_off(MO_N);
mousekey_off(MO_E);
mousekey_send();
}
return false;
break;
case MO_NW:
if( record->event.pressed ) {
mousekey_on(MO_N);
mousekey_on(MO_W);
mousekey_send();
} else {
mousekey_off(MO_N);
mousekey_off(MO_W);
mousekey_send();
}
return false;
break;
case MO_SE:
if( record->event.pressed ) {
mousekey_on(MO_S);
mousekey_on(MO_E);
mousekey_send();
} else {
mousekey_off(MO_S);
mousekey_off(MO_E);
mousekey_send();
}
return false;
break;
case MO_SW:
if( record->event.pressed ) {
mousekey_on(MO_S);
mousekey_on(MO_W);
mousekey_send();
} else {
mousekey_off(MO_S);
mousekey_off(MO_W);
mousekey_send();
}
return false;
break;
case MO_S_NE:
if( record->event.pressed ) {
mousekey_on(MO_S_N);
mousekey_on(MO_S_E);
mousekey_send();
} else {
mousekey_off(MO_S_N);
mousekey_off(MO_S_E);
mousekey_send();
}
return false;
break;
case MO_S_NW:
if( record->event.pressed ) {
mousekey_on(MO_S_N);
mousekey_on(MO_S_W);
mousekey_send();
} else {
mousekey_off(MO_S_N);
mousekey_off(MO_S_W);
mousekey_send();
}
return false;
break;
case MO_S_SE:
if( record->event.pressed ) {
mousekey_on(MO_S_S);
mousekey_on(MO_S_E);
mousekey_send();
} else {
mousekey_off(MO_S_S);
mousekey_off(MO_S_E);
mousekey_send();
}
return false;
break;
case MO_S_SW:
if( record->event.pressed ) {
mousekey_on(MO_S_S);
mousekey_on(MO_S_W);
mousekey_send();
} else {
mousekey_off(MO_S_S);
mousekey_off(MO_S_W);
mousekey_send();
}
return false;
break;
#endif
//------DOUBLE PRESS, with added left navigation
case DBL_SPC:
if( record->event.pressed ) {
SEND_STRING(" "SS_TAP(X_LEFT));
}
return false;
break;
case DBL_ANG:
if( record->event.pressed ) {
SEND_STRING("<>"SS_TAP(X_LEFT));
}
return false;
break;
case DBL_PAR:
if( record->event.pressed ) {
SEND_STRING("()"SS_TAP(X_LEFT));
}
return false;
break;
case DBL_SQR:
if( record->event.pressed ) {
SEND_STRING("[]"SS_TAP(X_LEFT));
}
return false;
break;
case DBL_BRC:
if( record->event.pressed ) {
SEND_STRING("{}"SS_TAP(X_LEFT));
}
return false;
break;
case DBL_QUO:
if( record->event.pressed ) {
SEND_STRING("\'\'"SS_TAP(X_LEFT));
}
return false;
break;
case DBL_DQT:
if( record->event.pressed ) {
SEND_STRING("\"\""SS_TAP(X_LEFT));
}
return false;
break;
case DBL_GRV:
if( record->event.pressed ) {
SEND_STRING("``"SS_TAP(X_LEFT));
}
return false;
break;
// END OF KEYCODES
}
return process_record_keymap(keycode, record);
}
/*----------------------*\
|*-----LAYER CHANGE-----*|
\*----------------------*/
uint32_t layer_state_set_user(uint32_t state) {
state = layer_state_set_keymap (state);
#ifdef RGBLIGHT_ENABLE
// Change RGB lighting depending on the last layer activated
rgblight_change( biton32(state) );
#endif
return state;
}

View File

@ -1,268 +0,0 @@
#ifndef USERSPACE
#define USERSPACE
#include "quantum.h"
#define XXX KC_NO
// Layers
#define _DV 0 // Base layer
#define _AL 1 // Alt char overlay
#define _GA 2 // Game layer
#define _NU 3 // Numbers layer
#define _SE 4 // Settings layer
#define _MO 5 // Mouse emulation
#define _MU 6 // Music mode
// Define short macros
#define UNDO LCTL(KC_Z)
#define REDO LCTL(KC_Y)
#define COPY LCTL(KC_C)
#define CUT LCTL(KC_X)
#define PASTE LCTL(KC_V)
// Rename mouse keys with 7 letters
#ifdef MOUSEKEY_ENABLE
#define MO_S_N KC_MS_WH_UP
#define MO_S_S KC_MS_WH_DOWN
#define MO_S_E KC_MS_WH_RIGHT
#define MO_S_W KC_MS_WH_LEFT
#define MO_N KC_MS_UP
#define MO_S KC_MS_DOWN
#define MO_E KC_MS_RIGHT
#define MO_W KC_MS_LEFT
#define MO_CL_L KC_MS_BTN1
#define MO_CL_R KC_MS_BTN2
#define MO_CL_M KC_MS_BTN3
#define MO_CL_4 KC_MS_BTN4
#define MO_CL_5 KC_MS_BTN5
#define MO_AC_0 KC_MS_ACCEL0
#define MO_AC_1 KC_MS_ACCEL1
#define MO_AC_2 KC_MS_ACCEL2
#else
#define MO_S_N KC_NO
#define MO_S_S KC_NO
#define MO_S_E KC_NO
#define MO_S_W KC_NO
#define MO_N KC_NO
#define MO_S KC_NO
#define MO_E KC_NO
#define MO_W KC_NO
#define MO_CL_L KC_NO
#define MO_CL_R KC_NO
#define MO_CL_M KC_NO
#define MO_CL_1 KC_NO
#define MO_CL_2 KC_NO
#define MO_AC_0 KC_NO
#define MO_AC_1 KC_NO
#define MO_AC_2 KC_NO
#endif
// Rename music keys with <8 letters
#ifdef AUDIO_ENABLE
#define MU_REC KC_LCTL
#define MU_STOP KC_LALT
#define MU_PLAY KC_LGUI
#define MU_PLAY KC_LGUI
#define MU_FAST KC_UP
#define MU_SLOW KC_DOWN
#define MU_MASK KC_A
#else
#define MU_REC KC_NO
#define MU_STOP KC_NO
#define MU_PLAY KC_NO
#define MU_PLAY KC_NO
#define MU_FAST KC_NO
#define MU_SLOW KC_NO
#define MU_MASK KC_NO
#endif
// Define non-capitalized UTF shortcuts here
#ifdef UNICODE_ENABLE
#define PHY_HBR UC(0x0127)
#define PHY_DEG UC(0x00b0)
#define CUR_LIR UC(0x20ba)
#define CUR_BIT UC(0x20bf)
#define CUR_EUR UC(0x20ac)
#define CUR_BPN UC(0x00a3)
#define CUR_YEN UC(0x00a5)
#else
#define PHY_HBR KC_NO
#define PHY_DEG KC_NO
#define CUR_LIR KC_NO
#define CUR_BIT KC_NO
#define CUR_EUR KC_NO
#define CUR_BPN KC_NO
#define CUR_YEN KC_NO
#endif
// Custom keycodes
enum userspace_custom_keycodes {
// Turkish letters, with shifting
TUR_A = SAFE_RANGE,
TUR_C,
TUR_G,
TUR_I,
TUR_O,
TUR_S,
TUR_U,
// Unicode mode switch
UNI_LI,
UNI_WN,
// Double keys
DBL_SPC,
DBL_ANG,
DBL_PAR,
DBL_SQR,
DBL_BRC,
DBL_QUO,
DBL_DQT,
DBL_GRV,
// Diagonal mouse movements
MO_NE,
MO_NW,
MO_SE,
MO_SW,
MO_S_NE,
MO_S_NW,
MO_S_SE,
MO_S_SW,
// Layer switches and lock functionality
K_MOUSE,
K_NUMBR,
K_LOCK,
K_GAMES,
// Secret macros
SECRET1,
SECRET2,
SECRET3
};
// Do tap dancable semicolon key if available
#ifdef TAP_DANCE_ENABLE
enum {
SCL = 0
};
#define MY_SCL TD(SCL)
#else
#define MY_SCL KC_SCLN
#endif
// Shared keymaps
#define LAYOUT_planck_wrapper(...) LAYOUT_planck_grid(__VA_ARGS__)
#define LAYOUT_letssplit_wrapper(...) LAYOUT_ortho_4x12(__VA_ARGS__)
/* Dvorak
* ,------------------------------------------------------------------------.
* | Esc | ' " | , | . | P | Y || F | G | C | R | L | Bkp |
* |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----|
* | Tab | A | O | E | U | I || D | H | T | N | S | / ? |
* |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----|
* | SYM | ; : | Q | J | K | X || B | M | W | V | Z | SET |
* |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----|
* | TUR | OS | Ctrl| Alt | Shf | Spc || Ent | Lft | Dwn | Up | Rght| MSE |
* `------------------------------------------------------------------------' */
#define DVORAK \
KC_ESC, KC_QUOT,KC_COMM,KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \
KC_TAB, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \
K_NUMBR,MY_SCL, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, MO(_SE), \
MO(_AL),KC_LGUI,KC_LCTL,KC_LALT,KC_LSFT,KC_SPC, KC_ENT, KC_LEFT,KC_DOWN,KC_UP, KC_RGHT,K_MOUSE
/* Alternative character overlay
* ,------------------------------------------------------------------------.
* | | ' ' | Undo| Redo|Pound| Yen || | G | C | |TLira| Del |
* |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----|
* | | A | O | Euro| U | I ||Degre|Plank| | | S | Ins |
* |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----|
* | | " " | Cut | Copy|Paste| || BTC | < > | ( ) | [ ] | { } | PgUp|
* |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----|
* | | | | | | || | Home|PgDwn| PgUp| End | |
* `------------------------------------------------------------------------' */
#define ALTCHAR \
_______,DBL_QUO,UNDO, REDO, CUR_BPN,CUR_YEN,_______,TUR_G, TUR_C, _______,CUR_LIR,KC_DEL , \
_______,TUR_A, TUR_O, CUR_EUR,TUR_U, TUR_I, PHY_DEG,PHY_HBR,_______,_______,TUR_S, KC_INS , \
_______,DBL_DQT,CUT, COPY, PASTE, DBL_GRV,CUR_BIT,DBL_ANG,DBL_PAR,DBL_SQR,DBL_BRC,_______, \
_______,_______,_______,_______,_______,DBL_SPC,_______,KC_HOME,KC_PGDN,KC_PGUP,KC_END, _______
/* Game layer
* ,------------------------------------------------------------------------.
* | OFF | Q | W | E | R | T || Esc | 7 | 8 | 9 |NumLk|Bkspc|
* |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----|
* | Tab | A | S | D | F | G || F1 | 4 | 5 | 6 | \ | Ent |
* |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----|
* | | Z | X | C | V | B || F2 | 1 | 2 | 3 | ^ | |
* |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----|
* | / | ` | | | | Spc || Spc | Ent | 0 | < | v | > |
* `------------------------------------------------------------------------' */
#define GAME \
K_GAMES,KC_Q, KC_W, KC_E, KC_R, KC_T, KC_ESC, KC_P7, KC_P8, KC_P9, KC_NLCK,KC_BSPC, \
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_F1, KC_P4, KC_P5, KC_P6, KC_BSLS,KC_ENT , \
_______,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_F2, KC_P1, KC_P2, KC_P3, KC_UP, _______, \
KC_SLSH,KC_GRV, _______,_______,_______,KC_SPC, KC_SPC, KC_ENT, KC_P0, KC_LEFT,KC_DOWN,KC_RGHT
/* Symbols layer
* ,------------------------------------------------------------------------.
* | OFF | ` | ~ | [ | ] | { || } | - | _ | = | + | |
* |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----|
* | | 1 | 2 | 3 | 4 | 5 || 6 | 7 | 8 | 9 | 0 | \ |
* |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----|
* | | ! | @ | # | $ | % || ^ | & | * | ( | ) | LCK |
* |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----|
* | | | | | | | || | | | | | |
* `------------------------------------------------------------------------' */
#define NUMBERS \
K_NUMBR,KC_GRV, KC_TILD,KC_LBRC,KC_RBRC,KC_LCBR,KC_RCBR,KC_MINS,KC_UNDS,KC_EQL, KC_PLUS,_______, \
_______,KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, \
_______,KC_EXLM,KC_AT, KC_HASH,KC_DLR, KC_PERC,KC_CIRC,KC_AMPR,KC_ASTR,KC_LPRN,KC_RPRN,K_LOCK , \
KC_PIPE,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______
/* Settings layer
* ,------------------------------------------------------------------------.
* |BLLed| F1 | F2 | F3 | F4 | Lin || Win | Wake| |Hue -|Hue +|Reset|
* |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----|
* | | F5 | F6 | F7 | F8 | || | |RGBto|Sat -|Sat +| |
* |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----|
* | Game| F9 | F10 | F11 | F12 |Vol 0||PrtSc| |RGBan|Bri -|Bri +| |
* |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----|
* |Musir| | | | |Vol -||Vol +| Prev| Stop|TogMu| Next| |
* `------------------------------------------------------------------------' */
#define SETTINGS \
BL_STEP,KC_F1, KC_F2, KC_F3, KC_F4, UNI_LI, UNI_WN, KC_WAKE,_______,RGB_HUD,RGB_HUI,RESET , \
_______,KC_F5, KC_F6, KC_F7, KC_F8, _______,_______,_______,RGB_TOG,RGB_SAD,RGB_SAI,_______, \
K_GAMES,KC_F9, KC_F10, KC_F11, KC_F12, KC_MUTE,KC_PSCR,_______,RGB_MOD,RGB_VAD,RGB_VAI,_______, \
MU_TOG, _______,_______,_______,_______,KC_VOLD,KC_VOLU,KC_MPRV,KC_MSTP,KC_MPLY,KC_MNXT,_______
/* Mouse layer
* ,------------------------------------------------------------------------.
* |Ulock| \ | ^ | / |.....|.....||.....|.....| |\|.| |^| | |/|.| |
* |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----|
* | | < | Mid | > |Btn 4|.....||.....|Btn 5| <-- | Mid | --> | |
* |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----|
* | | / | v | \ |.....|.....||.....|.....| |/| | |v| | |\| | LCK |
* |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----|
* | | | | | | Left||Right| | |Accl0|Accl1|Accl2|
* `------------------------------------------------------------------------' */
#define MOUSE \
K_MOUSE,MO_NW, MO_N, MO_NE, XXX, XXX ,XXX, XXX, MO_S_NW,MO_S_N, MO_S_NE,_______, \
_______,MO_W, MO_CL_M,MO_E, MO_CL_4,XXX ,XXX, MO_CL_5,MO_S_W, MO_CL_M,MO_S_E, _______, \
_______,MO_SW, MO_S, MO_SE, XXX, XXX ,XXX, XXX, MO_S_SW,MO_S_S, MO_S_SE,K_LOCK , \
_______,_______,_______,_______,_______,MO_CL_L,MO_CL_R,_______,MO_AC_0,MO_AC_1,MO_AC_2,_______
/* Music layer
* ,------------------------------------------------------------------------.
* |.....|.....|.....|.....|.....|.....||.....|.....|.....|.....|.....|.....|
* |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----|
* |.....|.....|.....|.....|.....|.....||.....|.....|.....|.....|.....|.....|
* |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----|
* |.....|.....|.....|.....|.....|.....||.....|.....|.....|.....|.....|.....|
* |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----|
* | togg| rec | stop| play| slow| fast||modes|.....|.....|.....|.....|.....|
* `------------------------------------------------------------------------'
*/
#define MUSIC \
MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK, \
MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK, \
MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK, \
MU_TOG, MU_REC, MU_STOP,MU_PLAY,MU_SLOW,MU_FAST,MU_MOD, MU_MASK,MU_MASK,MU_MASK,MU_MASK,MU_MASK
#endif

View File

@ -1,9 +0,0 @@
#ifndef USERSPACE_CONFIG_H
#define USERSPACE_CONFIG_H
#ifdef TAP_DANCE_ENABLE
#define TAPPING_TERM 300
#define TAPPING_TOGGLE 1
#endif
#endif // !USERSPACE_CONFIG_H

View File

@ -1,24 +0,0 @@
SRC += bbaserdem.c
EXTRAFLAGS += -flto # Used to make code smaller
# ENABLE
UNICODE_ENABLE = yes # Used for unicode character emulation
EXTRAKEY_ENABLE = yes # OS signals like volume control
# DISABLE
ifndef BLUETOOTH_ENABLE
BLUETOOTH_ENABLE = no # No bluetooth
endif
COMMAND_ENABLE = no # Some bootmagic thing i dont use
BOOTMAGIC_ENABLE = no # Access to EEPROM settings, not needed
CONSOLE_ENABLE = no # Allows console output with a command
SLEEP_LED_ENABLE = no # Breathes LED's when computer is asleep. Untested.
NKRO_ENABLE = no # Default is 6KRO which is plenty
MIDI_ENABLE = no # Untested feature
FAUXCLICKY_ENABLE = no # Emulates clicks using speaker
KEY_LOCK_ENABLE = no # Allows locking any key. Not used
API_SYSEX_ENABLE = no # Allows OS to send signals.
KEY_LOCK_ENABLE = no # Allows locking any key. Not used
# Disabling this makes it compile, i dont know why
# VARIABLE_TRACE = no # Allows debugging variables

View File

@ -1,6 +0,0 @@
#include "quantum.h"
#if defined(RGBLIGHT_ENABLE)
/* Adjust RGB static hue ranges for shorter gradients than default. */
const uint8_t RGBLED_GRADIENT_RANGES[] PROGMEM = {255, 127, 63, 31, 15};
#endif

View File

@ -1,90 +0,0 @@
/* Wait between tap_code register and unregister to fix flaky media keys. */
#undef TAP_CODE_DELAY
#define TAP_CODE_DELAY 20
/*
* Force the default tapping term since some keyboards make it way too short
* (*cough*Lily58*cough*).
*/
#undef TAPPING_TERM
#define TAPPING_TERM 200
/*
* Treat mod-tap keys as holds even if the mod-tap key and the key being
* modified are both relased within TAPPING_TERM. This assumes the mod-tap key
* isn't usually pressed in quick succession with other tapped keys, which is
* good when the tap keycode is something like KC_ESC rather than a letter.
*/
#define PERMISSIVE_HOLD
/*
* Turn off key repeat support of the tap keycode for tap-hold keys, enabling
* holds to work correctly in quick succession after taps.
*/
#define TAPPING_FORCE_HOLD
#if defined(RGB_MATRIX_ENABLE)
/* Turn off per-key RGB when the host goes to sleep. */
#define RGB_DISABLE_WHEN_USB_SUSPENDED true
/* Keep per-key RGB increments consistent across keyboards. */
#undef RGB_MATRIX_HUE_STEP
#undef RGB_MATRIX_SAT_STEP
#undef RGB_MATRIX_VAL_STEP
#undef RGB_MATRIX_SPD_STEP
#define RGB_MATRIX_HUE_STEP 8
#define RGB_MATRIX_SAT_STEP 17
#define RGB_MATRIX_VAL_STEP 17
#define RGB_MATRIX_SPD_STEP 17
/* Turn on additional RGB animations. */
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
#define RGB_MATRIX_KEYPRESSES
#endif
#if defined(RGBLIGHT_ENABLE)
/* Turn off RGB underglow when the host goes to sleep. */
#define RGBLIGHT_SLEEP
/* Keep RGB underglow level increments consistent across keyboards. */
#undef RGBLIGHT_HUE_STEP
#undef RGBLIGHT_SAT_STEP
#undef RGBLIGHT_VAL_STEP
#define RGBLIGHT_HUE_STEP 8
#define RGBLIGHT_SAT_STEP 17
#define RGBLIGHT_VAL_STEP 17
#endif
#if defined(BACKLIGHT_ENABLE)
/* Enable backlight breathing across the board. */
#define BACKLIGHT_BREATHING
/* Keep backlight level increments consistent across keyboards. */
#undef BACKLIGHT_LEVELS
#define BACKLIGHT_LEVELS 7
#endif
#if defined(MOUSEKEY_ENABLE)
/* Make mouse operation smoother. */
#undef MOUSEKEY_DELAY
#undef MOUSEKEY_INTERVAL
#define MOUSEKEY_DELAY 0
#define MOUSEKEY_INTERVAL 16
/* Lower mouse speed to adjust for reduced MOUSEKEY_INTERVAL. */
#undef MOUSEKEY_MAX_SPEED
#undef MOUSEKEY_TIME_TO_MAX
#undef MOUSEKEY_WHEEL_MAX_SPEED
#undef MOUSEKEY_WHEEL_TIME_TO_MAX
#define MOUSEKEY_MAX_SPEED 7
#define MOUSEKEY_TIME_TO_MAX 150
#define MOUSEKEY_WHEEL_MAX_SPEED 3
#define MOUSEKEY_WHEEL_TIME_TO_MAX 150
#endif

View File

@ -1,23 +0,0 @@
SRC += bcat.c
# Enable Bootmagic Lite to consistently reset to bootloader and clear EEPROM.
BOOTMAGIC_ENABLE = lite
# Enable mouse and media keys on all keyboards.
EXTRAKEY_ENABLE = yes
MOUSEKEY_ENABLE = yes
# Disable some unwanted features on all keyboards.
API_SYSEX_ENABLE = no
COMMAND_ENABLE = no
CONSOLE_ENABLE = no
FAUXCLICKY_ENABLE = no
MIDI_ENABLE = no
NKRO_ENABLE = no
SLEEP_LED_ENABLE = no
UCIS_ENABLE = no
UNICODE_ENABLE = no
UNICODEMAP_ENABLE = no
# Enable link-time optimization to reduce binary size.
LINK_TIME_OPTIMIZATION_ENABLE = yes

View File

@ -1,32 +0,0 @@
#include "billypython.h"
__attribute__((weak))
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
return true;
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if (!process_record_keymap(keycode, record)) {
return false;
}
switch (keycode) {
case CLEAR:
if (record->event.pressed) {
SEND_STRING(SS_LCTRL("a") SS_TAP(X_DELETE));
}
return false;
default:
return true;
}
}
__attribute__((weak))
uint32_t layer_state_set_keymap(uint32_t state) {
return state;
}
uint32_t layer_state_set_user(uint32_t state) {
return layer_state_set_keymap(state);
}

View File

@ -1,34 +0,0 @@
#pragma once
#include "quantum.h"
#ifdef TAP_DANCE_ENABLE
#include "tap_dance.h"
#endif
#ifdef LAYER_FN
#define FN MO(L_FN)
#define FN_CAPS LT(L_FN, KC_CAPS)
#define FN_FNLK TT(L_FN)
#endif
#define TOP LCTL(KC_HOME)
#define BOTTOM LCTL(KC_END)
enum keycodes_user {
CLEAR = SAFE_RANGE,
RANGE_KEYMAP,
};
enum layers_user {
L_BASE,
#ifdef LAYER_FN
L_FN,
#endif
L_RANGE_KEYMAP,
};
bool process_record_keymap(uint16_t keycode, keyrecord_t *record);
uint32_t layer_state_set_keymap(uint32_t state);

View File

@ -1,17 +0,0 @@
#pragma once
#define FORCE_NKRO
#define MOUSEKEY_DELAY 50
#define MOUSEKEY_INTERVAL 15
#define MOUSEKEY_MAX_SPEED 4
#define MOUSEKEY_TIME_TO_MAX 50
#define MOUSEKEY_WHEEL_MAX_SPEED 1
#define MOUSEKEY_WHEEL_TIME_TO_MAX 50
#define NO_ACTION_FUNCTION
#define NO_ACTION_MACRO
#define PERMISSIVE_HOLD
#define TAPPING_TERM 200
#define TAPPING_TOGGLE 2

View File

@ -1,6 +0,0 @@
SRC += billypython.c
ifeq ($(strip $(TAP_DANCE_ENABLE)), yes)
SRC += tap_dance.c
endif
EXTRAFLAGS += -flto

View File

@ -1,33 +0,0 @@
#include "tap_dance.h"
#define ACTION_TAP_DANCE_DOUBLE_MODS(mod1, mod2) { \
.fn = { td_double_mods_each, NULL, td_double_mods_reset }, \
.user_data = &(qk_tap_dance_pair_t){ mod1, mod2 }, \
}
void td_double_mods_each(qk_tap_dance_state_t *state, void *user_data) {
qk_tap_dance_pair_t *mods = (qk_tap_dance_pair_t *)user_data;
// Single tap → mod1, double tap → mod2, triple tap etc. → mod1+mod2
if (state->count == 1 || state->count == 3) {
register_code(mods->kc1);
} else if (state->count == 2) {
unregister_code(mods->kc1);
register_code(mods->kc2);
}
// Prevent tap dance from sending kc1 and kc2 as weak mods
state->weak_mods &= ~(MOD_BIT(mods->kc1) | MOD_BIT(mods->kc2));
}
void td_double_mods_reset(qk_tap_dance_state_t *state, void *user_data) {
qk_tap_dance_pair_t *mods = (qk_tap_dance_pair_t *)user_data;
if (state->count == 1 || state->count >= 3) {
unregister_code(mods->kc1);
}
if (state->count >= 2) {
unregister_code(mods->kc2);
}
}
qk_tap_dance_action_t tap_dance_actions[] = {
[TD_RSF_RCT] = ACTION_TAP_DANCE_DOUBLE_MODS(KC_RSFT, KC_RCTL),
};

View File

@ -1,9 +0,0 @@
#pragma once
#include "quantum.h"
#define RSF_RCT TD(TD_RSF_RCT)
enum tap_dance {
TD_RSF_RCT,
};

View File

@ -1,189 +0,0 @@
/*
Copyright 2018 Jacob Jerrell <jacob.jerrell@gmail.com> @JacobJerrell
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 "bocaj.h"
userspace_config_t userspace_config;
#if (defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE))
#define BOCAJ_UNICODE_MODE UC_OSX
#else
// set to 2 for UC_WIN, set to 4 for UC_WINC
#define BOCAJ_UNICODE_MODE 2
#endif
void tap(uint16_t keycode){ register_code(keycode); unregister_code(keycode); };
// Add reconfigurable functions here, for keymap customization
// This allows for a global, userspace functions, and continued
// customization of the keymap. Use _keymap instead of _user
// functions in the keymaps
__attribute__ ((weak))
void matrix_init_keymap(void) {}
__attribute__ ((weak))
void startup_keymap(void) {}
__attribute__ ((weak))
void suspend_power_down_keymap(void) {}
__attribute__ ((weak))
void suspend_wakeup_init_keymap(void) {}
__attribute__ ((weak))
void matrix_scan_keymap(void) {}
__attribute__ ((weak))
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
return true;
}
__attribute__ ((weak))
void matrix_scan_secrets(void) {}
__attribute__ ((weak))
uint32_t layer_state_set_keymap (uint32_t state) {
return state;
}
__attribute__ ((weak))
uint32_t default_layer_state_set_keymap (uint32_t state) {
return state;
}
__attribute__ ((weak))
void led_set_keymap(uint8_t usb_led) {}
// Call user matrix init, set default RGB colors and then
// call the keymap's init function
void matrix_init_user(void) {
userspace_config.raw = eeconfig_read_user();
#if (defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE))
set_unicode_input_mode(BOCAJ_UNICODE_MODE);
get_unicode_input_mode();
#endif //UNICODE_ENABLE
matrix_init_keymap();
}
void startup_user (void) {
startup_keymap();
}
void suspend_power_down_user(void)
{
suspend_power_down_keymap();
}
void suspend_wakeup_init_user(void)
{
suspend_wakeup_init_keymap();
#ifdef KEYBOARD_ergodox_ez
wait_ms(10);
#endif
}
void eeconfig_init_user(void) {
userspace_config.raw = 0;
eeconfig_update_user(userspace_config.raw);
#if (defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE))
set_unicode_input_mode(BOCAJ_UNICODE_MODE);
get_unicode_input_mode();
#else
eeprom_update_byte(EECONFIG_UNICODEMODE, BOCAJ_UNICODE_MODE);
#endif
}
LEADER_EXTERNS();
// No global matrix scan code, so just run keymap's matrix
// scan function
void matrix_scan_user(void) {
static bool has_ran_yet;
if (!has_ran_yet) {
has_ran_yet = true;
startup_user();
}
LEADER_DICTIONARY() {
leading = false;
leader_end();
// Mac Save (Leader -> s)
SEQ_ONE_KEY(KC_S) {
SEND_STRING(SS_LGUI("s"));
}
// Mac copy line down (Leader -> d, d)
SEQ_TWO_KEYS(KC_D, KC_D) {
register_code(KC_LSHIFT);
register_code(KC_HOME);
unregister_code(KC_HOME);
unregister_code(KC_LSHIFT);
SEND_STRING(SS_LGUI("c"));
tap(KC_END);
tap(KC_ENTER);
SEND_STRING(SS_LGUI("v"));
}
// Mac copy line up (Leader -> u, u)
SEQ_TWO_KEYS(KC_U, KC_U) {
register_code(KC_LSHIFT);
register_code(KC_HOME);
unregister_code(KC_HOME);
unregister_code(KC_LSHIFT);
SEND_STRING(SS_LGUI("c"));
tap(KC_UP);
tap(KC_END);
tap(KC_ENTER);
SEND_STRING(SS_LGUI("v"));
}
// Mac VS Debug
SEQ_ONE_KEY(KC_D) {
tap(KC_F5);
}
// Mac VS Stop Debug
SEQ_TWO_KEYS(KC_S, KC_D) {
register_code(KC_LSHIFT);
tap(KC_F5);
unregister_code(KC_LSHIFT);
}
// Start Diablo 3
SEQ_ONE_KEY(KC_3) {
SEND_STRING(SS_LCTRL(" "));
SEND_STRING("Diablo");
tap(KC_ENTER);
}
SEQ_ONE_KEY(KC_B) {
SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION " ");
tap(KC_ENTER);
SEND_STRING ("Built at: " QMK_BUILDDATE);
}
#ifndef NO_SECRETS
matrix_scan_secrets();
#endif // !NO_SECRETS
}
#ifdef TAP_DANCE_ENABLE // Run Diablo 3 macro checking code.
run_diablo_macro_check();
#endif // TAP_DANCE_ENABLE
matrix_scan_keymap();
}

View File

@ -1,85 +0,0 @@
/*
Copyright 2018 Jacob Jerrell <jacob.jerrell@gmail.com> @JacobJerrell
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
#include "quantum.h"
#include "version.h"
#include "eeprom.h"
#include "wrappers.h"
#include "process_records.h"
#ifdef TAP_DANCE_ENABLE
#include "tap_dances.h"
#endif // TAP_DANCE_ENABLE
/* Layer Names */
enum userspace_layers {
_WORKMAN = 0,
_WINWORKMAN,
_QWERTY,
_LOWER,
_ADJUST,
_DIABLO,
};
#if (defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE))
#define BOCAJ_UNICODE_MODE UC_OSX
#else
// set to 2 for UC_WIN, set to 4 for UC_WINC
#define BOCAJ_UNICODE_MODE 2
#endif
/*
define modifiers here, since MOD_* doesn't seem to work for these
*/
#define MODS_SHIFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT))
#define MODS_CTRL_MASK (MOD_BIT(KC_LCTL)|MOD_BIT(KC_RCTRL))
#define MODS_ALT_MASK (MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT))
#define MODS_GUI_MASK (MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI))
bool mod_key_press_timer (uint16_t code, uint16_t mod_code, bool pressed);
bool mod_key_press (uint16_t code, uint16_t mod_code, bool pressed, uint16_t this_timer);
bool send_game_macro(const char *str, keyrecord_t *record, bool override);
void matrix_init_keymap(void);
void shutdown_keymap(void);
void suspend_power_down_keymap(void);
void suspend_wakeup_init_keymap(void);
void matrix_scan_keymap(void);
uint32_t layer_state_set_keymap (uint32_t state);
uint32_t default_layer_state_set_keymap (uint32_t state);
void led_set_keymap(uint8_t usb_led);
void eeconfig_init_keymap(void);
void tap(uint16_t keycode);
typedef union {
uint8_t raw;
} userspace_config_t;
extern userspace_config_t userspace_config;
// If Tap Dancing is enabled, we manage that here.
// If it is not, then we define the KC_D3_# codes gracefully
#ifdef TAP_DANCE_ENABLE
#define KC_D3_1 TD(TD_D3_1)
#define KC_D3_2 TD(TD_D3_2)
#define KC_D3_3 TD(TD_D3_3)
#define KC_D3_4 TD(TD_D3_4)
#else // !TAP_DANCE_ENABLE
#define KC_D3_1 KC_1
#define KC_D3_2 KC_2
#define KC_D3_3 KC_3
#define KC_D3_4 KC_4
#endif // TAP_DANCE_ENABLE

View File

@ -1,33 +0,0 @@
#pragma once
#ifndef QMK_KEYS_PER_SCAN
#define QMK_KEYS_PER_SCAN 4
#endif // QMK KEYS PER SCAN
// this makes it possible to do rolling combos (zx) with keys that
// convert to other keys on hold (z becomes ctrl when you hold it,
// and when this option isn't enabled, z rapidly followed by x
// actually sends Ctrl-x. That's bad.)
#define IGNORE_MOD_TAP_INTERRUPT
#undef PERMISSIVE_HOLD
#define PREVENT_STUCK_MODIFIERS
#ifdef TAPPING_TERM
#undef TAPPING_TERM
#endif // TAPPING_TERM
#define TAPPING_TERM 175
#define RETRO_TAPPING
// Disable action_get_macro and fn_actions, since we don't use these
// and it saves on space in the firmware.
#ifndef NO_DEBUG
#define NO_DEBUG
#endif // !NO_DEBUG
#if !defined(NO_PRINT) && !defined(CONSOLE_ENABLE)
#define NO_PRINT
#endif // !NO_PRINT
#define NO_ACTION_MACRO
#define NO_ACTION_FUNCTION
#define MACRO_TIMER 5

View File

@ -1,149 +0,0 @@
#include "bocaj.h"
#include QMK_KEYBOARD_H
uint16_t copy_paste_timer;
uint16_t grave_layer_timer;
uint16_t heal_layer_timer;
__attribute__ ((weak))
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
return true;
}
// Defines actions tor my global custom keycodes. Defined in bocaj.h file
// Then runs the _keymap's record handler if not processed here
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case KC_MWRK:
if (!record->event.pressed) {
set_single_persistent_default_layer(_WORKMAN);
#if (defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE))
set_unicode_input_mode(0);
#endif
layer_move(0);
ergodox_blink_all_leds();
}
break;
case KC_WWRK:
if (!record->event.pressed) {
set_single_persistent_default_layer(_WINWORKMAN);
#if (defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE))
set_unicode_input_mode(4);
#endif
layer_move(0);
ergodox_blink_all_leds();
}
break;
case KC_MQWR:
if (!record->event.pressed) {
set_single_persistent_default_layer(_QWERTY);
#if (defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE))
set_unicode_input_mode(0);
#endif
layer_move(0);
ergodox_blink_all_leds();
}
break;
case MC_LOCK:
if (!record->event.pressed) {
layer_move(0);
SEND_STRING(SS_LCTRL(SS_LGUI("q")));
}
break;
case KC_MAKE: // Compiles the firmware, and adds the flash command based on keyboard bootloader
if (!record->event.pressed) {
uint8_t temp_mod = get_mods();
uint8_t temp_osm = get_oneshot_mods();
clear_mods();
clear_oneshot_mods();
if (biton32(default_layer_state) == _WINWORKMAN) {
send_string_with_delay_P(PSTR("make " QMK_KEYBOARD ":" QMK_KEYMAP), 10);
} else {
send_string_with_delay_P(PSTR("util/docker_build.sh " QMK_KEYBOARD ":" QMK_KEYMAP), 10);
}
if (temp_mod & MODS_SHIFT_MASK) {
send_string_with_delay_P(PSTR(":teensy"), 10);
}
if (temp_mod & MODS_CTRL_MASK) {
send_string_with_delay_P(PSTR(" -j8 --output-sync"), 10);
}
send_string_with_delay_P(PSTR(SS_TAP(X_ENTER)), 10);
set_mods(temp_mod);
layer_move(0);
}
break;
case KC_DCLR: // reset all Diablo timers, disabling them
#ifdef TAP_DANCE_ENABLE
if (record->event.pressed) {
uint8_t dtime;
for (dtime = 0; dtime < 4; dtime++) {
diablo_key_time[dtime] = diablo_times[0];
}
}
#endif // TAP_DANCE_ENABLE
break;
case JJ_ARRW:
if (!record->event.pressed) {
SEND_STRING("->");
}
return false;
break;
case LM_GRAVE:
if (record->event.pressed) {
grave_layer_timer = timer_read();
} else {
if (timer_elapsed(grave_layer_timer) < TAPPING_TERM) {
uint8_t temp_mod = get_mods();
uint8_t one_shot = get_oneshot_mods();
clear_mods();
if (temp_mod & MODS_SHIFT_MASK || one_shot & MODS_SHIFT_MASK) {
register_code(KC_LSFT);
tap(KC_GRAVE);
unregister_code(KC_LSFT);
} else {
tap(KC_GRAVE);
}
set_mods(temp_mod);
} else {
layer_move(0);
}
}
return false;
break;
case KC_CCCV:
if (record->event.pressed) {
copy_paste_timer = timer_read();
} else {
if (timer_elapsed(copy_paste_timer) > TAPPING_TERM) { // Hold, copy
SEND_STRING(SS_LGUI("c"));
} else {
SEND_STRING(SS_LGUI("v"));
}
}
return false;
break;
#ifdef UNICODE_ENABLE
case UC_FLIP: // (ノಠ痊ಠ)ノ彡┻━┻
if (record->event.pressed) {
send_unicode_hex_string("0028 30CE 0CA0 75CA 0CA0 0029 30CE 5F61 253B 2501 253B");
}
break;
case UC_TABL: // ┬─┬ノ( º _ ºノ)
if (record->event.pressed) {
send_unicode_hex_string("252C 2500 252C 30CE 0028 0020 00BA 0020 005F 0020 00BA 30CE 0029");
}
break;
case UC_SHRG: // ¯\_(ツ)_/¯
if (record->event.pressed) {
send_unicode_hex_string("00AF 005C 005F 0028 30C4 0029 005F 002F 00AF");
}
break;
case UC_DISA: // ಠ_ಠ
if (record->event.pressed) {
send_unicode_hex_string("0CA0 005F 0CA0");
}
break;
#endif
}
return process_record_keymap(keycode, record);
}

View File

@ -1,50 +0,0 @@
#pragma once
#include "bocaj.h"
#if defined(KEYMAP_SAFE_RANGE)
#define PLACEHOLDER_SAFE_RANGE KEYMAP_SAFE_RANGE
#else
#define PLACEHOLDER_SAFE_RANGE SAFE_RANGE
#endif
enum userspace_custom_keycodes {
KC_EPRM = PLACEHOLDER_SAFE_RANGE, // can always be here
KC_MWRK,
KC_WWRK,
KC_MQWR,
KC_VRSN,
LM_GRAVE, // Shift if held, layer change if tapped
JJ_COPY,
JJ_PSTE,
JJ_ARRW,
KC_CCCV,
MC_LOCK,
KC_DCLR,
KC_MAKE,
UC_FLIP, // (ಠ痊ಠ)┻━┻
UC_TABL, // ┬─┬ノ( º _ ºノ)
UC_SHRG, // ¯\_(ツ)_/¯
UC_DISA, // ಠ_ಠ
NEW_SAFE_RANGE //use "NEWPLACEHOLDER for keymap specific codes
};
bool process_record_keymap(uint16_t keycode, keyrecord_t *record);
// One Shot
#define OS_LSFT OSM(MOD_LSFT)
// Space Cadet Hyper/Meh and [/]
#define HYP_LBK ALL_T(KC_LBRACKET)
#define MEH_RBK MEH_T(KC_RBRACKET)
#define GUI_CTR(os, kc) MT( (os == 0) ? (MOD_LGUI) : (MOD_LCTL), kc )
// Layout beauti-/simpli-fication
#define KC_LWEN LT(_LOWER, KC_ENTER)
#define KC_ADJS TT(_ADJUST)
#define KC_NUMS TT(_LOWER)
#define KC_GAME TT(_DIABLO)
// Other Keycodes
#define KC_RST RESET
#define KC_BS KC_BSLASH

View File

@ -1,102 +0,0 @@
# Overview
My personal QMK userspace. First, I must say that the credit for a majority of the code found here belongs to Drashna and/or the people he derived his code from. My Ergodox layout is briefly described in its respective folder. As for explaining this userspace, you could honestly go to Drashna's userspace and read his well put together readme. Regardless, I am mostly writing this as an excercise for myself to better understand what is going on, and where applicable, describe things that I innovated on my own.
## Bocaj.c
### Unicode
I've always had difficulty implementing unicode in QMK, all of this code is literally copy/pasted from Drashna's userspace and lies dormant here until I can take the time to figure it out.
Update: Got it to work in Mac OS which is more important to me than Windows (probably pretty easy to figure out at this point). So I'm a happy table flipping person now!
(ノಠ痊ಠ)ノ彡┻━┻
┬─┬ノ( º _ ºノ)
### Tap Macro
Not sure why this doesn't exist in QMK already (maybe it does?)
```c
void tap(uint16_t keycode){ register_code(keycode); unregister_code(keycode); };
```
### *_keymap functions
We're running *_user functions in the userspace, that way we can add to or reconfigure at the keyboard level. Any *_user functions should call the equivalent *_keymap function at the end. If the *_keymap function isn't defined in the keymap, the `__attribute__ ((weak))` will prevent build problems.
### Startup/Suspend/Shutdown Functions
I have no idea what these do. Non-Ergodox keyboard functions?
### Matrix Scan User
Leader key defines, Diablo macro ancillary function, run matrix_scan_keymap.
#### Leader Key
I've always been interested in this feature, but I've had 0 experience with applications that have similar behavior. My implementation seeks to implement features that I feel VS2017 lacks
## Secrets
Hacked Drashna's secret macro implementation to work with the leader key instead.
TODO: Finish documentation
## Bocaj.h
Layer defines, some macro ancillary defines, setup Diablo macros and failsafe
## Process_Records.c/.h
Again, taking ideas from Drashna to make maintenance simpler. A couple of things that I'm proud of here, but nothing really ground breaking.
* Features
* Change default layer
* KC_MWRK, KC_WWRK, KC_MQWR
* MacOS Lock Screen Macro
* Make macro (Credit: Drashna)
* Need to reconfigure so it runs the docker command if one of the Mac OS layers are default because the AVR install fails on the corporate laptop
* Arrow macro (->) because I find myself telling people how to get to something quite frequently and typing this manually requires moving the right hand to the top-left of the ergodox and then to the bottom right, which feels unnatural.
* LM_GRAVE
* While combining _NUMS and _LOWER, I also needed a place to put F1-12 keys. This required me to relocate the grave key. The most comfortable place to put it was over a key that I frequently use to toggle the numpad. I do have other ways to get to/from this layer but my mind has been wired to use them for different workflows, so I would sit here frozen for a moment trying to tell my fingers where to go
* How it works
* A timer starts when pressed down
* If the timer at release was less than the TAPPING_TERM define
* Get mods
* If Shift was held or one-shot shift was active
* Send `~`
* Else
* Send `
* Else (timer at released was greater than the TAPPING_TERM define)
* Move to the default layer
* KC_CCCV
* Another neat idea I found in Drashna's userspace... highly underutilized in my layout but the inspiration for LM_GRAVE was obviously derived from this code
* Unicode stuff
* All I've ever wanted was a table-flip macro... I managed to get about half of it to work before I gave up and disabled it
## Send_Unicode.c/.h
I have some basic understanding of this, Drashna may already have it documented in his userspace. I'll put it in my own words when I get around to making it work and understanding it better.
## Tap_Dances.c/h
Again, building on Drashna's userspace organization to simplify maintenance of a heavily configured layout. This is all the stuff for the Diablo 3 macros that spam a given skill (1-4) every ~1 second
## Wrappers.h
Traditionally, you would put all of this into the \<username>.h file. But I liked the idea of separating it to simplify modification in the future.
### GUI_CTR(os, kc)
A notable mention in this file is the GUI_CTR(os, kc) custom keycode defined in process_records.h as:
```c
#define GUI_CTR(os, kc) MT( (os == 0) ? (MOD_LGUI) : (MOD_LCTL), kc )
```
I tried several things before coming to this one-liner conclusion. I believe it is quite elegant and it definitely solves the problem I had (separate wrappers for Windows/MacOS layers). But I would love to make this into something more intuitive, like a macro that detects which layer you're on and sends the applicable hotkey when held, or keycode when tapped. Ultimately, I was too tired of thinking about it to come up with a solution like that at this time.
Anyhow, if you set `os == 1`, it sends the Windows CTRL hotkey when held. If you set `os == 0`, it sends the Mac OS GUI hotkey when held. If tapped, it sends the keycode.
This is effectively a slightly more advanced `MOD_T(kc)` keycode.

View File

@ -1,33 +0,0 @@
SRC += bocaj.c \
process_records.c
ifneq ("$(wildcard $(USER_PATH)/secrets.c)","")
SRC += secrets.c
endif
ifeq ($(strip $(TAP_DANCE_ENABLE)), yes)
SRC += tap_dances.c
endif
# Caused problems when building via docker on Mac OS
# EXTRAFLAGS += -flto
ifeq ($(strip $(NO_SECRETS)), yes)
OPT_DEFS += -DNO_SECRETS
endif
ifeq ($(strip $(MACROS_ENABLED)), yes)
OPT_DEFS += -DMACROS_ENABLED
endif
ifeq ($(strip $(UCIS_ENABLE)), yes)
SRC += send_unicode.c
endif
ifeq ($(strip $(UNICODEMAP_ENABLE)), yes)
SRC += send_unicode.c
endif
ifeq ($(strip $(UNICODE_ENABLE)), yes)
SRC += send_unicode.c
endif

View File

@ -1,106 +0,0 @@
// Written by konstantin: vomindoraan
#include "send_unicode.h"
#include <ctype.h>
#include <string.h>
__attribute__((weak))
void send_unicode_hex_string(const char* str) {
if (!str) { return; } // Safety net
while (*str) {
// Find the next code point (token) in the string
for (; *str == ' '; str++);
size_t n = strcspn(str, " "); // Length of the current token
char code_point[n+1];
strncpy(code_point, str, n);
code_point[n] = '\0'; // Make sure it's null-terminated
// Normalize the code point: make all hex digits lowercase
for (char *p = code_point; *p; p++) {
*p = tolower((unsigned char)*p);
}
// Send the code point as a Unicode input string
unicode_input_start();
send_string(code_point);
unicode_input_finish();
str += n; // Move to the first ' ' (or '\0') after the current token
}
}
// (ノಠ痊ಠ)ノ彡┻━┻
// send_unicode_hex_string("0028 30CE 0CA0 75CA 0CA0 0029 30CE 5F61 253B 2501 253B");
//Old code
// (╯°□°)╯ ︵ ┻━┻
#if 0
register_code(KC_RSFT);
tap(KC_9);
unregister_code(KC_RSFT);
process_unicode((0x256F | QK_UNICODE), record); // Arm
process_unicode((0x00B0 | QK_UNICODE), record); // Eye
process_unicode((0x25A1 | QK_UNICODE), record); // Mouth
process_unicode((0x00B0 | QK_UNICODE), record); // Eye
register_code(KC_RSFT);
tap(KC_0);
unregister_code(KC_RSFT);
process_unicode((0x256F | QK_UNICODE), record); // Arm
tap(KC_SPC);
process_unicode((0x0361 | QK_UNICODE), record); // Flippy
tap(KC_SPC);
process_unicode((0x253B | QK_UNICODE), record); // Table
process_unicode((0x2501 | QK_UNICODE), record); // Table
process_unicode((0x253B | QK_UNICODE), record); // Table
#endif
// If you need a good converter: https://r12a.github.io/app-conversion/
uint8_t saved_mods;
void unicode_input_start (void) {
// save current mods
saved_mods = get_mods(); // Save current mods
clear_mods(); // Unregister mods to start from a clean state
switch(get_unicode_input_mode()) {
case UC_OSX:
register_code(KC_LALT);
break;
case UC_LNX:
register_code(KC_LCTL);
register_code(KC_LSFT);
register_code(KC_U);
unregister_code(KC_U);
unregister_code(KC_LSFT);
unregister_code(KC_LCTL);
break;
case UC_WIN:
register_code(KC_LALT);
register_code(KC_PPLS);
unregister_code(KC_PPLS);
break;
case UC_WINC:
register_code(KC_RALT);
unregister_code(KC_RALT);
register_code(KC_U);
unregister_code(KC_U);
break;
}
wait_ms(UNICODE_TYPE_DELAY);
}
void unicode_input_finish (void) {
switch(get_unicode_input_mode()) {
case UC_OSX:
case UC_WIN:
unregister_code(KC_LALT);
break;
case UC_LNX:
register_code(KC_SPC);
unregister_code(KC_SPC);
break;
}
set_mods(saved_mods); // Reregister previously set mods
}

View File

@ -1,71 +0,0 @@
#pragma once
#include "quantum.h"
void send_unicode_hex_string(const char* str);
/* use X(n) to call the */
#ifdef UNICODEMAP_ENABLE
enum unicode_name {
THINK, // thinking face 🤔
GRIN, // grinning face 😊
SMRK, // smirk 😏
WEARY, // good shit 😩
UNAMU, // unamused 😒
SNEK, // snke 🐍
PENGUIN, // 🐧
DRAGON, // 🐉
MONKEY, // 🐒
CHICK, // 🐥
BOAR, // 🐗
OKOK, // 👌
EFFU, // 🖕
INUP, // 👆
THUP, // 👍
THDN, // 👎
BBB, // dat B 🅱
POO, // poop 💩
HUNDR, // 100 💯
EGGPL, // EGGPLANT 🍆
WATER, // wet 💦
TUMBLER, // 🥃
LIT, // fire 🔥
BANG, // ‽
IRONY, // ⸮
DEGREE // °
};
const uint32_t PROGMEM unicode_map[] = {
[THINK] = 0x1F914,
[GRIN] = 0x1F600,
[BBB] = 0x1F171,
[POO] = 0x1F4A9,
[HUNDR] = 0x1F4AF,
[SMRK] = 0x1F60F,
[WEARY] = 0x1F629,
[EGGPL] = 0x1F346,
[WATER] = 0x1F4A6,
[LIT] = 0x1F525,
[UNAMU] = 0x1F612,
[SNEK] = 0x1F40D,
[PENGUIN] = 0x1F427,
[BOAR] = 0x1F417,
[MONKEY] = 0x1F412,
[CHICK] = 0x1F425,
[DRAGON] = 0x1F409,
[OKOK] = 0x1F44C,
[EFFU] = 0x1F595,
[INUP] = 0x1F446,
[THDN] = 0x1F44E,
[THUP] = 0x1F44D,
[TUMBLER] = 0x1F943,
[BANG] = 0x0203D,
[IRONY] = 0x02E2E,
[DEGREE] = 0x000B0
};
#endif // UNICODEMAP_ENABLE

View File

@ -1,64 +0,0 @@
#include "tap_dances.h"
//define diablo macro timer variables
uint16_t diablo_timer[4];
uint8_t diablo_times[] = { 0, 1, 3, 5, 10, 30 };
uint8_t diablo_key_time[4];
// has the correct number of seconds elapsed (as defined by diablo_times)
bool check_dtimer(uint8_t dtimer) { return (timer_elapsed(diablo_timer[dtimer]) < (diablo_key_time[dtimer] * 1000)) ? false : true; };
// Cycle through the times for the macro, starting at 0, for disabled.
// Max of six values, so don't exceed
void diablo_tapdance_master(qk_tap_dance_state_t *state, void *user_data, uint8_t diablo_key) {
if (state->count >= 7) {
diablo_key_time[diablo_key] = diablo_times[0];
reset_tap_dance(state);
} else {
diablo_key_time[diablo_key] = diablo_times[state->count - 1];
}
}
// Would rather have one function for all of this, but no idea how to do that...
void diablo_tapdance1(qk_tap_dance_state_t *state, void *user_data) { diablo_tapdance_master(state, user_data, 0); }
void diablo_tapdance2(qk_tap_dance_state_t *state, void *user_data) { diablo_tapdance_master(state, user_data, 1); }
void diablo_tapdance3(qk_tap_dance_state_t *state, void *user_data) { diablo_tapdance_master(state, user_data, 2); }
void diablo_tapdance4(qk_tap_dance_state_t *state, void *user_data) { diablo_tapdance_master(state, user_data, 3); }
//Tap Dance Definitions
qk_tap_dance_action_t tap_dance_actions[] = {
// tap once to disable, and more to enable timed micros
[TD_D3_1] = ACTION_TAP_DANCE_FN(diablo_tapdance1),
[TD_D3_2] = ACTION_TAP_DANCE_FN(diablo_tapdance2),
[TD_D3_3] = ACTION_TAP_DANCE_FN(diablo_tapdance3),
[TD_D3_4] = ACTION_TAP_DANCE_FN(diablo_tapdance4),
};
// Sends the key press to system, but only if on the Diablo layer
void send_diablo_keystroke(uint8_t diablo_key) {
if (biton32(layer_state) == _DIABLO) {
switch (diablo_key) {
case 0:
tap(KC_1); break;
case 1:
tap(KC_2); break;
case 2:
tap(KC_3); break;
case 3:
tap(KC_4); break;
}
}
}
// Checks each of the 4 timers/keys to see if enough time has elapsed
// Runs the "send string" command if enough time has passed, and resets the timer.
void run_diablo_macro_check(void) {
uint8_t dtime;
for (dtime = 0; dtime < 4; dtime++) {
if (check_dtimer(dtime) && diablo_key_time[dtime]) {
diablo_timer[dtime] = timer_read();
send_diablo_keystroke(dtime);
}
}
}

View File

@ -1,19 +0,0 @@
#pragma once
#include "bocaj.h"
//define diablo macro timer variables
extern uint16_t diablo_timer[4];
extern uint8_t diablo_times[];
extern uint8_t diablo_key_time[4];
void run_diablo_macro_check(void);
#ifdef TAP_DANCE_ENABLE
enum {
TD_D3_1 = 0,
TD_D3_2,
TD_D3_3,
TD_D3_4
};
#endif // TAP_DANCE_ENABLE

View File

@ -1,37 +0,0 @@
#pragma once
#include "bocaj.h"
#if (!defined(LAYOUT) && defined(KEYMAP))
#define LAYOUT KEYMAP
#endif
#define LAYOUT_ergodox_wrapper(...) LAYOUT_ergodox(__VA_ARGS__)
#define LAYOUT_ergodox_pretty_wrapper(...) LAYOUT_ergodox_pretty(__VA_ARGS__)
#define _________________QWERTY_L1__________________ KC_Q, KC_W, KC_E, KC_R, KC_T
#define _________________QWERTY_L2__________________ KC_A, KC_S, GUI_CTR(0, KC_D), KC_F, KC_G
#define _________________QWERTY_L3__________________ KC_Z, KC_X, KC_C, KC_V, KC_B
#define _________________QWERTY_R1__________________ KC_Y, KC_U, KC_I, KC_O, KC_P
#define _________________QWERTY_R2__________________ KC_H, KC_J, GUI_CTR(0, KC_K), KC_L, KC_SCLN
#define _________________QWERTY_R3__________________ KC_N, KC_M, KC_COMM, KC_DOT, KC_SLASH
// Hardware Driven Workman
#define _________________WORKMAN_L1_________________ KC_Q, KC_D, KC_R, KC_W, KC_B
#define _________________WORKMAN_L2_________________ KC_A, KC_S, GUI_CTR(0, KC_H), KC_T, KC_G // GUI_CTR(0, kc) behaves as GUI_T(kc)
#define ________________WWORKMAN_L2_________________ KC_A, KC_S, GUI_CTR(1, KC_H), KC_T, KC_G // GUI_CTR(1, kc) behaves as CTR_T(kc)
#define _________________WORKMAN_L3_________________ KC_Z, KC_X, KC_M, KC_C, KC_V
#define _________________WORKMAN_R1_________________ KC_J, KC_F, KC_U, KC_P, KC_SCLN
#define _________________WORKMAN_R2_________________ KC_Y, KC_N, GUI_CTR(0, KC_E), KC_O, KC_I // GUI_CTR(0, kc) behaves as GUI_T(kc)
#define ________________WWORKMAN_R2_________________ KC_Y, KC_N, GUI_CTR(1, KC_E), KC_O, KC_I // GUI_CTR(1, kc) behaves as CTR_T(kc)
#define _________________WORKMAN_R3_________________ KC_K, KC_L, KC_COMM, KC_DOT, KC_SLASH
#define __________________NUMBER_LEFT_______________ KC_1, KC_2, KC_3, KC_4, KC_5
#define __________________NUMBER_RIGHT______________ KC_6, KC_7, KC_8, KC_9, KC_0
#define __________________FUNCTION_LEFT_____________ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5
#define __________________FUNCTION_RIGHT____________ KC_F6, KC_F7, KC_F8, KC_F9, KC_F10
#define ____________________BLANK___________________ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS

View File

@ -1,61 +0,0 @@
#include "brett.h"
char * get_key(uint16_t keycode) {
switch (keycode) {
case FAT_ARROW:
return "=>";
case SKINNY_ARROW:
return "->";
case REVERSE_ARROW:
return "<-";
case CONCAT:
return "<>";
case MAP:
return "<$>";
case MAP_FLIPPED:
return "<#>";
case FLAP:
return "<@>";
case PIPE:
return "|>";
case ALT:
return "<|>";
case APPLY:
return "<*>";
case AND:
return "&&";
case OR:
return "||";
case BIND:
return ">>=";
case BIND_FLIPPED:
return "=<<";
case DOUBLE_COLON:
return "::";
case VOID_LEFT:
return "<$";
case VOID_RIGHT:
return "$>";
default:
return "";
}
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
bool pressed = record->event.pressed;
switch (keycode) {
case FAT_ARROW ... DOUBLE_COLON:
if (pressed) {
send_string(get_key(keycode));
}
return false;
case FLASH:
if (!pressed) {
SEND_STRING("make -j8 --output-sync " QMK_KEYBOARD ":" QMK_KEYMAP ":flash" SS_TAP(X_ENTER));
reset_keyboard();
}
return false;
default:
return true;
}
}

View File

@ -1,25 +0,0 @@
#pragma once
enum userspace_custom_keycodes {
PLACEHOLDER = SAFE_RANGE, // Can always be here
FAT_ARROW, // =>
SKINNY_ARROW, // ->
REVERSE_ARROW, // <-
CONCAT, // <>
MAP, // <$>
MAP_FLIPPED, // <#>
FLAP, // <@>
PIPE, // |>
ALT, // <|>
APPLY, // <*>
AND, // &&
OR, // ||
BIND, // >>=
BIND_FLIPPED, // =<<
VOID_LEFT, // <$
VOID_RIGHT, // $>
DOUBLE_COLON, // ::
FLASH // Handle keyboard flashing
};
bool process_record_keymap(uint16_t keycode, keyrecord_t *record);

View File

@ -1 +0,0 @@
SRC += brett.c

View File

@ -1,39 +0,0 @@
#ifndef USERSPACE
#define USERSPACE
#ifdef BACKLIGHT_ENABLE
#include "backlight.h"
#endif
#include "quantum.h"
#include "config.h"
#ifndef CONFIG_USER_H
#define CONFIG_USER_H
#ifndef NO_DEBUG
#define NO_DEBUG
#endif
#ifndef NO_PRINT
#define NO_PRINT
#endif
/* cbbrowne user configuration */
#define randadd 53
#define randmul 181
#define randmod 167
/* Filler to make layering a bit clearer *
* borrowed from basic keymap */
#define _______ KC_TRNS
#define _____ KC_NO
#define LEADER_TIMEOUT 300
#ifndef LIGHT_CONFIG_H
#define BACKLIGHT_BREATHING
#endif
#endif
#endif

View File

@ -1 +0,0 @@
SRC += cbbrowne.c

View File

@ -1,13 +0,0 @@
#include "cjuniet.h"
void render_status_bar(void) {
uint8_t modifiers = get_mods();
led_t led_state = host_keyboard_led_state();
oled_write_P(PSTR("\325\326"), (modifiers & MOD_MASK_SHIFT));
oled_write_P(PSTR("\327\330"), (modifiers & MOD_MASK_CTRL));
oled_write_P(PSTR("\331\332"), (modifiers & MOD_MASK_ALT));
oled_write_P(PSTR("\333\334"), (modifiers & MOD_MASK_GUI));
oled_write_P(PSTR(" "), false);
oled_write_P(PSTR("\235\236"), led_state.caps_lock);
oled_write_P(PSTR("\275\276"), led_state.num_lock);
}

View File

@ -1,5 +0,0 @@
#pragma once
#include "quantum.h"
void render_status_bar(void);

View File

@ -1,230 +0,0 @@
#include "progmem.h"
// Online editor: https://helixfonteditor.netlify.com/
static const unsigned char font[] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00,
0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00,
0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00,
0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00,
0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00,
0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00,
0x00, 0x18, 0x3C, 0x18, 0x00, 0x00,
0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00,
0x00, 0x18, 0x24, 0x18, 0x00, 0x00,
0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00,
0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00,
0x26, 0x29, 0x79, 0x29, 0x26, 0x00,
0x40, 0x7F, 0x05, 0x05, 0x07, 0x00,
0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00,
0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00,
0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00,
0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00,
0x14, 0x22, 0x7F, 0x22, 0x14, 0x00,
0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00,
0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00,
0x00, 0x66, 0x89, 0x95, 0x6A, 0x00,
0x60, 0x60, 0x60, 0x60, 0x60, 0x00,
0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00,
0x08, 0x04, 0x7E, 0x04, 0x08, 0x00,
0x10, 0x20, 0x7E, 0x20, 0x10, 0x00,
0x08, 0x08, 0x2A, 0x1C, 0x08, 0x00,
0x08, 0x1C, 0x2A, 0x08, 0x08, 0x00,
0x1E, 0x10, 0x10, 0x10, 0x10, 0x00,
0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00,
0x30, 0x38, 0x3E, 0x38, 0x30, 0x00,
0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x5F, 0x00, 0x00, 0x00,
0x00, 0x07, 0x00, 0x07, 0x00, 0x00,
0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00,
0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00,
0x23, 0x13, 0x08, 0x64, 0x62, 0x00,
0x36, 0x49, 0x56, 0x20, 0x50, 0x00,
0x00, 0x08, 0x07, 0x03, 0x00, 0x00,
0x00, 0x1C, 0x22, 0x41, 0x00, 0x00,
0x00, 0x41, 0x22, 0x1C, 0x00, 0x00,
0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00,
0x08, 0x08, 0x3E, 0x08, 0x08, 0x00,
0x00, 0x80, 0x70, 0x30, 0x00, 0x00,
0x08, 0x08, 0x08, 0x08, 0x08, 0x00,
0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
0x20, 0x10, 0x08, 0x04, 0x02, 0x00,
0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00,
0x00, 0x42, 0x7F, 0x40, 0x00, 0x00,
0x72, 0x49, 0x49, 0x49, 0x46, 0x00,
0x21, 0x41, 0x49, 0x4D, 0x33, 0x00,
0x18, 0x14, 0x12, 0x7F, 0x10, 0x00,
0x27, 0x45, 0x45, 0x45, 0x39, 0x00,
0x3C, 0x4A, 0x49, 0x49, 0x31, 0x00,
0x41, 0x21, 0x11, 0x09, 0x07, 0x00,
0x36, 0x49, 0x49, 0x49, 0x36, 0x00,
0x46, 0x49, 0x49, 0x29, 0x1E, 0x00,
0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
0x00, 0x40, 0x34, 0x00, 0x00, 0x00,
0x00, 0x08, 0x14, 0x22, 0x41, 0x00,
0x14, 0x14, 0x14, 0x14, 0x14, 0x00,
0x00, 0x41, 0x22, 0x14, 0x08, 0x00,
0x02, 0x01, 0x59, 0x09, 0x06, 0x00,
0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x00,
0x7C, 0x12, 0x11, 0x12, 0x7C, 0x00,
0x7F, 0x49, 0x49, 0x49, 0x36, 0x00,
0x3E, 0x41, 0x41, 0x41, 0x22, 0x00,
0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00,
0x7F, 0x49, 0x49, 0x49, 0x41, 0x00,
0x7F, 0x09, 0x09, 0x09, 0x01, 0x00,
0x3E, 0x41, 0x41, 0x51, 0x73, 0x00,
0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00,
0x00, 0x41, 0x7F, 0x41, 0x00, 0x00,
0x20, 0x40, 0x41, 0x3F, 0x01, 0x00,
0x7F, 0x08, 0x14, 0x22, 0x41, 0x00,
0x7F, 0x40, 0x40, 0x40, 0x40, 0x00,
0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00,
0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00,
0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00,
0x7F, 0x09, 0x09, 0x09, 0x06, 0x00,
0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00,
0x7F, 0x09, 0x19, 0x29, 0x46, 0x00,
0x26, 0x49, 0x49, 0x49, 0x32, 0x00,
0x03, 0x01, 0x7F, 0x01, 0x03, 0x00,
0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00,
0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00,
0x3F, 0x40, 0x38, 0x40, 0x3F, 0x00,
0x63, 0x14, 0x08, 0x14, 0x63, 0x00,
0x03, 0x04, 0x78, 0x04, 0x03, 0x00,
0x61, 0x59, 0x49, 0x4D, 0x43, 0x00,
0x00, 0x7F, 0x41, 0x41, 0x41, 0x00,
0x02, 0x04, 0x08, 0x10, 0x20, 0x00,
0x00, 0x41, 0x41, 0x41, 0x7F, 0x00,
0x04, 0x02, 0x01, 0x02, 0x04, 0x00,
0x40, 0x40, 0x40, 0x40, 0x40, 0x00,
0x00, 0x03, 0x07, 0x08, 0x00, 0x00,
0x20, 0x54, 0x54, 0x78, 0x40, 0x00,
0x7F, 0x28, 0x44, 0x44, 0x38, 0x00,
0x38, 0x44, 0x44, 0x44, 0x20, 0x00,
0x38, 0x44, 0x44, 0x28, 0x7F, 0x00,
0x38, 0x54, 0x54, 0x54, 0x18, 0x00,
0x00, 0x08, 0x7E, 0x09, 0x02, 0x00,
0x18, 0xA4, 0xA4, 0x9C, 0x78, 0x00,
0x7F, 0x08, 0x04, 0x04, 0x78, 0x00,
0x00, 0x44, 0x7D, 0x40, 0x00, 0x00,
0x20, 0x40, 0x40, 0x3D, 0x00, 0x00,
0x7F, 0x10, 0x28, 0x44, 0x00, 0x00,
0x00, 0x41, 0x7F, 0x40, 0x00, 0x00,
0x7C, 0x04, 0x78, 0x04, 0x78, 0x00,
0x7C, 0x08, 0x04, 0x04, 0x78, 0x00,
0x38, 0x44, 0x44, 0x44, 0x38, 0x00,
0xFC, 0x18, 0x24, 0x24, 0x18, 0x00,
0x18, 0x24, 0x24, 0x18, 0xFC, 0x00,
0x7C, 0x08, 0x04, 0x04, 0x08, 0x00,
0x48, 0x54, 0x54, 0x54, 0x24, 0x00,
0x04, 0x04, 0x3F, 0x44, 0x24, 0x00,
0x3C, 0x40, 0x40, 0x20, 0x7C, 0x00,
0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00,
0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00,
0x44, 0x28, 0x10, 0x28, 0x44, 0x00,
0x4C, 0x90, 0x90, 0x90, 0x7C, 0x00,
0x44, 0x64, 0x54, 0x4C, 0x44, 0x00,
0x00, 0x08, 0x36, 0x41, 0x00, 0x00,
0x00, 0x00, 0x77, 0x00, 0x00, 0x00,
0x00, 0x41, 0x36, 0x08, 0x00, 0x00,
0x02, 0x01, 0x02, 0x04, 0x02, 0x00,
0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x40, 0x40, 0x40, 0xF0, 0xF8, 0xF8,
0xFF, 0x38, 0xFF, 0xF8, 0xF8, 0x3F,
0xF8, 0xF8, 0xFF, 0x38, 0xFF, 0xF8,
0xF8, 0xF0, 0x40, 0x40, 0x40, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
0xC0, 0xC0, 0xC0, 0x80, 0x00, 0x00,
0xC0, 0xC0, 0x80, 0x00, 0x00, 0x00,
0x80, 0xC0, 0xC0, 0x00, 0xC0, 0xC0,
0x00, 0x00, 0x80, 0xC0, 0xC0, 0x00,
0x00, 0x00, 0x00, 0x00, 0xC0, 0xC0,
0xC0, 0xC0, 0xC0, 0x00, 0xC0, 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, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xE0, 0xF0, 0xF0, 0xF0, 0xE0, 0xEC,
0xEE, 0xF7, 0xF3, 0x70, 0x20, 0x00,
0x7C, 0x7C, 0x7C, 0x7E, 0x00, 0x7E,
0x7E, 0x7E, 0x7F, 0x7F, 0x7F, 0x00,
0x00, 0x80, 0xC0, 0xE0, 0x7E, 0x5B,
0x4F, 0x5B, 0xFE, 0xC0, 0x00, 0x00,
0xC0, 0x00, 0xDC, 0xD7, 0xDE, 0xDE,
0xDE, 0xD7, 0xDC, 0x00, 0xC0, 0x00,
0x00, 0x00, 0x00, 0x04, 0xFA, 0xA1,
0xFA, 0x04, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x49, 0x49, 0x49, 0xFF, 0xFF, 0xFF,
0xFF, 0xE0, 0xDF, 0xBF, 0xBF, 0x00,
0xBF, 0xBF, 0xDF, 0xE0, 0xFF, 0xFF,
0xFF, 0xFF, 0x49, 0x49, 0x49, 0x00,
0x00, 0x00, 0x00, 0x00, 0x1F, 0x3F,
0x60, 0x60, 0xE0, 0xBF, 0x1F, 0x00,
0x7F, 0x7F, 0x07, 0x1E, 0x38, 0x1E,
0x07, 0x7F, 0x7F, 0x00, 0x7F, 0x7F,
0x0E, 0x1F, 0x3B, 0x71, 0x60, 0x00,
0x00, 0x00, 0x00, 0x00, 0x7F, 0x7F,
0x0C, 0x0C, 0x0C, 0x00, 0x7E, 0x7E,
0x00, 0x7F, 0x7E, 0x03, 0x03, 0x00,
0x7F, 0x7E, 0x03, 0x03, 0x7E, 0x7E,
0x03, 0x03, 0x7F, 0x7E, 0x00, 0x0F,
0x3E, 0x70, 0x3C, 0x06, 0x3C, 0x70,
0x3E, 0x0F, 0x00, 0x32, 0x7B, 0x49,
0x49, 0x3F, 0x7E, 0x00, 0x7F, 0x7E,
0x03, 0x03, 0x00, 0x1E, 0x3F, 0x69,
0x69, 0x6F, 0x26, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x0F, 0x1F, 0x3F, 0x7F, 0x7F, 0x7F,
0x7F, 0x7F, 0x3F, 0x1E, 0x0C, 0x00,
0x1F, 0x1F, 0x1F, 0x3F, 0x00, 0x3F,
0x3F, 0x3F, 0x7F, 0x7F, 0x7F, 0x00,
0x30, 0x7B, 0x7F, 0x78, 0x30, 0x20,
0x20, 0x30, 0x78, 0x7F, 0x3B, 0x00,
0x03, 0x00, 0x0F, 0x7F, 0x0F, 0x0F,
0x0F, 0x7F, 0x0F, 0x00, 0x03, 0x00,
0x00, 0x00, 0x00, 0xFC, 0x87, 0x95,
0xB5, 0x87, 0xFC, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x01, 0x01, 0x01, 0x07, 0x0F, 0x0F,
0x7F, 0x0F, 0x7F, 0x0F, 0x0F, 0x7E,
0x0F, 0x0F, 0x7F, 0x0F, 0x7F, 0x0F,
0x0F, 0x07, 0x01, 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, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 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, 0x74, 0x42,
0x74, 0x08, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x10, 0x18, 0x0C, 0x06,
0x0C, 0x18, 0x10, 0x00, 0x00, 0x00,
0x00, 0x00, 0x04, 0x04, 0x08, 0x10,
0x24, 0x24, 0x24, 0x24, 0x00, 0x00,
0x00, 0x00, 0xE7, 0xA5, 0xFF, 0x24,
0x24, 0xFF, 0xA5, 0xE7, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};

View File

@ -1,14 +0,0 @@
Copyright 2020 Christophe Juniet <cjuniet@users.noreply.github.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.

View File

@ -1 +0,0 @@
SRC += cjuniet.c

View File

@ -1,53 +0,0 @@
#include "csc027.h"
// Declare the strings in PROGMEM using the convenience macro
CUSTOM_MACROS(CUSTOM_DEF, CUSTOM_MACRO_STRING, SEMI_DELIM);
static const char* const custom_macros[] PROGMEM = {
// Declare the pointer to the strings in PROGMEM
CUSTOM_MACROS(CUSTOM_VAR, DROP, COMMA_DELIM)
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch(keycode) {
case LOWER:
if(record->event.pressed) {
layer_on(_LW);
} else {
layer_off(_LW);
}
update_tri_layer(_LW, _RS, _MS);
return false;
case RAISE:
if(record->event.pressed) {
layer_on(_RS);
} else {
layer_off(_RS);
}
update_tri_layer(_LW, _RS, _MS);
return false;
case (MC_first + 1)...(MC_last - 1):
if(record->event.pressed) {
send_string_P(
#if defined(__AVR__)
// The accessor here first reads from the pointer array that is located
// in PROGMEM. The pointer is taken and passed to the send_string_P
// function, which is aware of the difference between RAM and PROGMEM
// pointers.
(char*)pgm_read_word(&custom_macros[keycode - MC_first - 1])
#else
// For non-AVR MCUs, the PROGMEM macro is defined as nothing. So, the strings are
// declared in RAM instead of flash. The send_string_P function, when compiled for
// non-AVR targets, uses a different definition of pgm_read_byte internally. This
// definition uses RAM pointers instead. This is why the raw pointer is passed for
// non-AVR MCUs.
custom_macros[keycode - MC_first - 1]
#endif
);
return true;
}
return false;
default:
return true;
}
}

View File

@ -1,29 +0,0 @@
#pragma once
#include "quantum.h"
#include "defines.h"
enum custom_keycodes {
// Layer Keycodes
LOWER = SAFE_RANGE,
RAISE,
MC_first,
// Macro Keycodes
CUSTOM_MACROS(CUSTOM_ENUM, DROP, COMMA_DELIM),
MC_last
};
enum custom_layers {
_QW = 0, // Qwerty
_RS, // Raise
_LW, // Lower
_MS, // Mouse
_GT, // Git
_CN, // Convenience
_GW, // Guild Wars 2
_CS // Counter-Strike: Global Offensive
};

View File

@ -1,17 +0,0 @@
#include "csc027.h"
#include "custom_audio.h"
#if defined(AUDIO_ENABLE)
float tone_on[][2] = SONG(E__NOTE(_G6));
float tone_off[][2] = SONG(E__NOTE(_D5));
void on_usb_led_off(void) {
PLAY_SONG(tone_off);
}
void on_usb_led_on(void) {
PLAY_SONG(tone_on);
}
#endif

View File

@ -1,8 +0,0 @@
#pragma once
#if defined(AUDIO_ENABLE)
void on_usb_led_off(void);
void on_usb_led_on(void);
#endif

View File

@ -1,25 +0,0 @@
#include "csc027.h"
#include "custom_rgb.h"
#if defined(RGBLIGHT_ENABLE)
void keyboard_post_init_user(void) {
rgblight_enable_noeeprom();
rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
uint16_t user_hue = rgblight_get_hue();
for (uint16_t i = 0; i < 256; ++i) {
rgblight_sethsv_noeeprom((i + user_hue) % 256, 255, 255);
wait_ms(5);
}
rgblight_sethsv_noeeprom(0, 0, 0);
}
void on_usb_led_off(void) {
rgblight_sethsv_noeeprom(0, 0, rgblight_get_val() - 85);
}
void on_usb_led_on(void) {
rgblight_sethsv_noeeprom(0, 0, rgblight_get_val() + 85);
}
#endif

View File

@ -1,9 +0,0 @@
#pragma once
#if defined(RGBLIGHT_ENABLE)
void keyboard_post_init_user(void);
void on_usb_led_off(void);
void on_usb_led_on(void);
#endif

View File

@ -1,270 +0,0 @@
#pragma once
#include "csc027.h"
#define MC_RSFE RSFT_T(KC_ENT) // Right Shift on hold, Enter on tap
#define MC_LSEC LSFT_T(KC_ESC) // Left Shift on hold, Escape on tap
#define ________________ KC_TRNS
/* QWERTY Layer
*
* The basic layer of this keymap is a QWERTY layer.
*
* - Modifier keys more closely resemble a standard keyboard's layout.
* - There is a "Nxt L" function that cycles through the QWERTY and
* game layers. This has been implemented by hard coding the jump to the
* next layer in each of the layers using the TO() macro. Currently, the
* "Nxt L" function skips over the momentary layers (i.e., Mouse, Git,
* Lower, Raise, and Convenience layers).
* - There is a "Rst L" function that resets the current layer to the
* QWERTY layer.
* - The "Git" one shot function goes to the macro layer which has Git
* commands implemented.
* - The "Convc" momentary function goes to the Convenience layer which has a
* tenkey. Note: The tenkey will operate using the secondary functions if
* the Number Lock is not enabled (e.g., Left and Right instead of 4 and
* 6).
* - The Right Shift key also doubles as an Enter key if it is tapped rather
* than held.
*
* ,-----------------------------------. ,-----------------------------------.
* | Tab | Q | W | E | R | T | | Y | U | I | O | P |BkSpc|
* |-----------------------------------| |-----------------------------------|
* | Esc | A | S | D | F | G | | H | J | K | L | ; | ' |
* |-----------------------------------| |-----------------------------------|
* |Shift| Z | X | C | V | B | | N | M | , | . | / |Sf/En|
* |-----------------------------------| |-----------------------------------|
* |Cntrl|Super| Alt |Convc|Lower|Space| |Space|Raise| \ | Git |Nxt L|Rst L|
* `-----------------------------------' `-----------------------------------'
*/
#define _____________________QWERTY_L1_____________________ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T
#define _____________________QWERTY_L2_____________________ KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G
#define _____________________QWERTY_L3_____________________ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B
#define _____________________QWERTY_L4_____________________ KC_LCTL, KC_LGUI, KC_LALT, MO(_CN), LOWER, KC_SPC
#define _____________________QWERTY_R1_____________________ KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC
#define _____________________QWERTY_R2_____________________ KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT
#define _____________________QWERTY_R3_____________________ KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MC_RSFE
#define _____________________QWERTY_R4_____________________ KC_SPC, RAISE, KC_BSLS, OSL(_GT), TO(_GW), XXXXXXX
/* Raise Layer
*
* The Raise layer accommodates the Home, End, Page Up, and Page Down keys
* in what would be the Vim arrow keys positions. This is done as opposed
* to using C-D, C-U, 0, $, and ^, because it would require a separate layer.
*
* - The top row has the shifted versions of the number row, rather than the
* numbers themselves. This is a change to have a mnemonic where shifted
* elements are on the Raise layer. This also makes it easy to use some of
* Vim style movement controls (e.g. $, %), but makes it harder for others
* (e.g. ^, (, )). Consider swapping the number row with the shifted number
* row if you do not care about the mnemonic.
* - The Left Brace, Right Brace, Underscore, and Plus keys have been moved
* from the right side to the left side. This will take some getting used
* to, as these keys are normally on the right side of the keyboard. An
* alternative would be to keep the keys on the right hand side just under
* the Parentheses. This would prevent the use of Vim arrow keys however.
* - The F keys have been laid across the bottom in the Raise layer, rather
* than the Lower layer to allow easy access to the Alt-F4 chord for
* Windows. When the F keys were put in the Lower layer, it made it hard
* to use this chord, as the Lower key, the Alt key, and the F4 key were
* all right next to each other.
* - A Delete key has been added in this layer to allow easy access to the
* Control-Alt-Delete login chord for Windows.
*
* ,-----------------------------------. ,-----------------------------------.
* | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | Del |
* |-----------------------------------| |-----------------------------------|
* | | _ | + | { | } | Caps| | Home| PgDn| PgUp| End | | |
* |-----------------------------------| |-----------------------------------|
* | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | |
* |-----------------------------------| |-----------------------------------|
* | | | | | | | | | | | | | |
* `-----------------------------------' `-----------------------------------'
*/
#define ______________________RAISE_L1_____________________ KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC
#define ______________________RAISE_L2_____________________ _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_CAPS
#define ______________________RAISE_L3_____________________ _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5
#define ______________________RAISE_L4_____________________ _______, _______, _______, _______, _______, _______
#define ______________________RAISE_R1_____________________ KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DELT
#define ______________________RAISE_R2_____________________ KC_HOME, KC_PGDN, KC_PGUP, KC_END, XXXXXXX, XXXXXXX
#define ______________________RAISE_R3_____________________ KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______
#define ______________________RAISE_R4_____________________ _______, _______, _______, _______, XXXXXXX, XXXXXXX
/* Lower Layer
*
* The lower layout scheme accommodates the Vim style arrow keys.
*
* - The arrow keys are in the normal Vim positions.
* - The Left Square Bracket, Right Square Bracket, Minus, and Equal keys
* have been moved from the right side to the left side. This will take
* some getting used to, as it is on the left rather than the right.
* - A Delete key has been added in this layer to allow easy access to the
* Control-Alt-Delete login chord for Windows.
* - The remaining F keys are in this layer.
*
* ,-----------------------------------. ,-----------------------------------.
* | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del |
* |-----------------------------------| |-----------------------------------|
* | | - | = | [ | ] | | | Left| Down| Up |Right| | |
* |-----------------------------------| |-----------------------------------|
* | | F11 | F12 | | | | | | | | | | |
* |-----------------------------------| |-----------------------------------|
* | | | | | | | | | | | | | |
* `-----------------------------------' `-----------------------------------'
*/
#define ______________________LOWER_L1_____________________ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5
#define ______________________LOWER_L2_____________________ _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, XXXXXXX
#define ______________________LOWER_L3_____________________ _______, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX
#define ______________________LOWER_L4_____________________ _______, _______, _______, _______, _______, _______
#define ______________________LOWER_R1_____________________ KC_6, KC_7, KC_8, KC_9, KC_0, KC_DELT
#define ______________________LOWER_R2_____________________ KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, XXXXXXX
#define ______________________LOWER_R3_____________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______
#define ______________________LOWER_R4_____________________ _______, _______, _______, _______, XXXXXXX, XXXXXXX
/* MIT Layout (Mouse)
*
* The mouse layer adds keys to use the keyboard like a mouse.
*
* ,-----------------------------------. ,-----------------------------------.
* | | | | | | | | | | | | | |
* |-----------------------------------| |-----------------------------------|
* | | | |Ms-Lc|Ms-Rc| | | Ms-L| Ms-D| Ms-U| Ms-R| | |
* |-----------------------------------| |-----------------------------------|
* | | | | | | | | | | | | | |
* |-----------------------------------| |-----------------------------------|
* | | | | | | | | | | | | | |
* `-----------------------------------' `-----------------------------------'
*/
#define ______________________MOUSE_L1_____________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
#define ______________________MOUSE_L2_____________________ _______, XXXXXXX, XXXXXXX, KC_BTN1, KC_BTN2, XXXXXXX
#define ______________________MOUSE_L3_____________________ _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
#define ______________________MOUSE_L4_____________________ _______, _______, _______, _______, _______, _______
#define ______________________MOUSE_R1_____________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
#define ______________________MOUSE_R2_____________________ KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, XXXXXXX, XXXXXXX
#define ______________________MOUSE_R3_____________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______
#define ______________________MOUSE_R4_____________________ _______, _______, _______, _______, XXXXXXX, XXXXXXX
/* MIT Layout (Git)
*
* The macro layer that has common git commands.
*
* ,-----------------------------------. ,-----------------------------------.
* | |Chery| Show|Rebas|Reset| Tag | | | Pull| Init|Rmote| Push| |
* |-----------------------------------| |-----------------------------------|
* | | Add |Sttus| Diff|Fetch| Grep| |Stash| |ChkOt| Log | | |
* |-----------------------------------| |-----------------------------------|
* | | | |Comit| Move|Brnch| | |Merge| | | | |
* |-----------------------------------| |-----------------------------------|
* | | | | | | | | | | | | | |
* `-----------------------------------' `-----------------------------------'
*/
#define _______________________GIT_L1______________________ XXXXXXX, MC_cherrypick, MC_show, MC_rebase, MC_reset, MC_tag
#define _______________________GIT_L2______________________ _______, MC_add, MC_status, MC_diff, MC_fetch, MC_grep
#define _______________________GIT_L3______________________ _______, XXXXXXX, XXXXXXX, MC_commit, MC_mv, MC_branch
#define _______________________GIT_L4______________________ _______, _______, _______, _______, _______, _______
#define _______________________GIT_R1______________________ XXXXXXX, MC_pull, MC_init, MC_remote, MC_push, XXXXXXX
#define _______________________GIT_R2______________________ MC_stash, XXXXXXX, MC_checkout, MC_log, XXXXXXX, XXXXXXX
#define _______________________GIT_R3______________________ XXXXXXX, MC_merge, XXXXXXX, XXXXXXX, XXXXXXX, _______
#define _______________________GIT_R4______________________ _______, _______, _______, _______, XXXXXXX, XXXXXXX
/* MIT Layout (Convenience)
*
* The Convenience layer adds miscellaneous chords to the keyboard.
*
* - The Number Lock key is physically in the same spot as the Caps Lock key
* in the raise layer.
* - There is also a Backspace Key for convenience.
* - There is a convenience macro to type the Control-Alt-Delete login chord for Windows.
* - There is a convenience macro to switch context from the Remote Desktop to the local
* machine in Windows.
* - There are convenience macros to switch between virtual desktops in Windows.
* - There are convenience macros to create and delete virtual desktops in Windows.
*
* ,-----------------------------------. ,-----------------------------------.
* | | |Insrt|ScrLk|PrtSc| | | | | | | |BkSpc|
* |-----------------------------------| |-----------------------------------|
* | | | App | LCAD|MRDCC|NmLck| |MVTDL|MVTDC|MVTDN|MVTDR| | |
* |-----------------------------------| |-----------------------------------|
* | | | | | | | | | | | | | |
* |-----------------------------------| |-----------------------------------|
* | | | | | | | | | | | | | |
* `-----------------------------------' `-----------------------------------'
*/
#define ___________________CONVENIENCE_L1__________________ XXXXXXX, XXXXXXX, KC_INS, KC_SLCK, KC_PSCR, XXXXXXX
#define ___________________CONVENIENCE_L2__________________ _______, XXXXXXX, KC_APP, MC_lcad, MC_rdcc, KC_NLCK
#define ___________________CONVENIENCE_L3__________________ _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
#define ___________________CONVENIENCE_L4__________________ _______, _______, _______, _______, _______, _______
#define ___________________CONVENIENCE_R1__________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BSPC
#define ___________________CONVENIENCE_R2__________________ MC_vtdl, MC_vtdc, MC_vtdn, MC_vtdr, XXXXXXX, XXXXXXX
#define ___________________CONVENIENCE_R3__________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______
#define ___________________CONVENIENCE_R4__________________ _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
/* Convenience macros
*
* These are accelerator macros for simplifying declaration of PROGMEM strings
*/
// Declare variable name
#define CUSTOM_VAR(VAR) mc_##VAR
// Declare PROGMEM string using the variable name
#define CUSTOM_DEF(VAR) const char CUSTOM_VAR(VAR)[] PROGMEM =
// Declare enum name
#define CUSTOM_ENUM(VAR) MC_##VAR
#define CUSTOM_MACRO_STRING(X) X
#define COMMA_DELIM(...) ,
#define SEMI_DELIM(...) ;
#define DROP(...)
/* Keycode synchronization macros
*
* These macros help synchronize the keycodes between the string declaration, string pointer declaration, and enum order.
*/
#define CUSTOM_MACROS(CUSTOM_NAME, CUSTOM_STRING, CUSTOM_DELIM) \
CUSTOM_NAME(add) CUSTOM_STRING("git add ") CUSTOM_DELIM() \
CUSTOM_NAME(branch) CUSTOM_STRING("git branch ") CUSTOM_DELIM() \
CUSTOM_NAME(checkout) CUSTOM_STRING("git checkout ") CUSTOM_DELIM() \
CUSTOM_NAME(cherrypick) CUSTOM_STRING("git cherry-pick ") CUSTOM_DELIM() \
CUSTOM_NAME(commit) CUSTOM_STRING("git commit -m \"\""SS_TAP(X_LEFT)) CUSTOM_DELIM() \
CUSTOM_NAME(diff) CUSTOM_STRING("git diff ") CUSTOM_DELIM() \
CUSTOM_NAME(fetch) CUSTOM_STRING("git fetch ") CUSTOM_DELIM() \
CUSTOM_NAME(grep) CUSTOM_STRING("git grep ") CUSTOM_DELIM() \
CUSTOM_NAME(log) CUSTOM_STRING("git log --decorate --oneline --graph ") CUSTOM_DELIM() \
CUSTOM_NAME(init) CUSTOM_STRING("git init ") CUSTOM_DELIM() \
CUSTOM_NAME(mv) CUSTOM_STRING("git mv ") CUSTOM_DELIM() \
CUSTOM_NAME(merge) CUSTOM_STRING("git merge ") CUSTOM_DELIM() \
CUSTOM_NAME(push) CUSTOM_STRING("git push ") CUSTOM_DELIM() \
CUSTOM_NAME(pull) CUSTOM_STRING("git pull ") CUSTOM_DELIM() \
CUSTOM_NAME(rebase) CUSTOM_STRING("git rebase ") CUSTOM_DELIM() \
CUSTOM_NAME(remote) CUSTOM_STRING("git remote ") CUSTOM_DELIM() \
CUSTOM_NAME(reset) CUSTOM_STRING("git reset ") CUSTOM_DELIM() \
CUSTOM_NAME(show) CUSTOM_STRING("git show ") CUSTOM_DELIM() \
CUSTOM_NAME(stash) CUSTOM_STRING("git stash ") CUSTOM_DELIM() \
CUSTOM_NAME(status) CUSTOM_STRING("git status ") CUSTOM_DELIM() \
CUSTOM_NAME(tag) CUSTOM_STRING("git tag ") CUSTOM_DELIM() \
CUSTOM_NAME(rdcc) CUSTOM_STRING(SS_LCTL(SS_LALT(SS_TAP(X_HOME)))) CUSTOM_DELIM() \
CUSTOM_NAME(lcad) CUSTOM_STRING(SS_LCTL(SS_LALT(SS_TAP(X_DELETE)))) CUSTOM_DELIM() \
CUSTOM_NAME(vtdl) CUSTOM_STRING(SS_LCTL(SS_LGUI(SS_TAP(X_LEFT)))) CUSTOM_DELIM() \
CUSTOM_NAME(vtdc) CUSTOM_STRING(SS_LCTL(SS_LGUI(SS_TAP(X_F4)))) CUSTOM_DELIM() \
CUSTOM_NAME(vtdn) CUSTOM_STRING(SS_LCTL(SS_LGUI("d"))) CUSTOM_DELIM() \
CUSTOM_NAME(vtdr) CUSTOM_STRING(SS_LCTL(SS_LGUI(SS_TAP(X_RIGHT))))

View File

@ -1,11 +0,0 @@
SRC += csc027.c
ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
SRC += custom_rgb.c
SRC += usb_led.c
endif
ifeq ($(strip $(AUDIO_ENABLE)), yes)
SRC += custom_audio.c
SRC += usb_led.c
endif

View File

@ -1,32 +0,0 @@
#include "csc027.h"
#include "usb_led.h"
#include "led.h"
#if defined(RGBLIGHT_ENABLE)
# include "custom_rgb.h"
#elif defined(AUDIO_ENABLE)
# include "custom_audio.h"
#endif
#if defined(AUDIO_ENABLE) || defined(RGBLIGHT_ENABLE)
bool led_update_user(led_t usb_led) {
static led_t old_usb_led = {
.num_lock = false,
.caps_lock = false,
.scroll_lock = false
};
if(old_usb_led.caps_lock != usb_led.caps_lock) {
usb_led.caps_lock ? on_usb_led_on() : on_usb_led_off();
} else if(old_usb_led.num_lock != usb_led.num_lock) {
usb_led.num_lock ? on_usb_led_on() : on_usb_led_off();
} else if(old_usb_led.scroll_lock != usb_led.scroll_lock) {
usb_led.scroll_lock ? on_usb_led_on() : on_usb_led_off();
}
old_usb_led = usb_led;
return true;
}
#endif

View File

@ -1,3 +0,0 @@
#pragma once
bool led_update_user(led_t usb_led);

View File

@ -1 +0,0 @@
secrets.c

View File

@ -1,14 +0,0 @@
Copyright 2020 Akaash Suresh casa.akaash@gmail.com @CurryFurious
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/>.

View File

@ -1,30 +0,0 @@
# Information
These is my userspace files, heavily influenced by @drashna's userspace structure.
# Keyboards
Main uses are for corne & lily58, supporting dfu bootloader (elite-c)
## Split Common
Is compatible with split_common when the previous two keyboards update to them.
If you want to use these keymaps with split common code, they are on my personal github fork: [CurryFurious/qmk_firmware](https://github.com/CurryFurious/qmk_firmware)
Referenced PRs: #6260, #5998, #6001
## Keymaps
Keymap layout is similar between the two keyboards. Lily58 has a lot of open keys for custom keys as well. Keymap formatting is set up in the physical layout of the keyboard, so mapping keys should be easier.
## Tap Dances
Tap dances are enabled but none are defined, you can add them to [tapdances.c](tapdances.c). If not using tapdances, you can disable them in the keymaps.
## RGB
RGB is implemented pretty much the same as @drashna. Only change is that I added the RGB code from the drashna's corne [keymap.c](../../keyboards/crkbd/keymaps/drashna/keymap.c), lines 313-383 into rgb_stuff.c.
## OLED
Similarly to RGB, I moved all OLED code into [oled.c](oled.c) to better clear up the keymap.c file. I haven't experimented with the kyria's 128x64 pixel screen so it probably won't work as well with it yet.
## Wrappers
Have implemented QWERTY, COLEMAK Mod DH, and DVORAK. Other macros are defined, some modified from drashna's. Drashna's [wrappers.h](../drashna/wrappers.h) has other layouts that you can copy in as you see fit, make sure to add them to the userspace_layers enum in [curry.h](curry.h)

View File

@ -1,111 +0,0 @@
#pragma once
// Use custom magic number so that when switching branches, EEPROM always gets reset
#define EECONFIG_MAGIC_NUMBER (uint16_t)0x420
/* Set Polling rate to 1000Hz */
#define USB_POLLING_INTERVAL_MS 1
#if defined(RGBLIGHT_ENABLE)
# undef RGBLIGHT_ANIMATIONS
# define RGBLIGHT_SLEEP
# define RGBLIGHT_EFFECT_BREATHING
# define RGBLIGHT_EFFECT_SNAKE
# define RGBLIGHT_EFFECT_KNIGHT
#endif // RGBLIGHT_ENABLE
#if defined(RGB_MATRIX_ENABLE)
# define RGB_MATRIX_KEYPRESSES
# define RGB_MATRIX_FRAMEBUFFER_EFFECTS
# define RGB_DISABLE_WHEN_USB_SUSPENDED true
# define DISABLE_RGB_MATRIX_ALPHAS_MODS
# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
# define DISABLE_RGB_MATRIX_BREATHING
# define DISABLE_RGB_MATRIX_BAND_SAT
# define DISABLE_RGB_MATRIX_BAND_VAL
# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL
# define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT
# define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL
# define DISABLE_RGB_MATRIX_CYCLE_ALL
# define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
# define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN
# define DISABLE_RGB_MATRIX_CYCLE_OUT_IN
// # define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
# define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
# define DISABLE_RGB_MATRIX_DUAL_BEACON
# define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL
# define DISABLE_RGB_MATRIX_CYCLE_SPIRAL
# define DISABLE_RGB_MATRIX_RAINBOW_BEACON
# define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS
# define DISABLE_RGB_MATRIX_RAINDROPS
# define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
// # define DISABLE_RGB_MATRIX_TYPING_HEATMAP
# define DISABLE_RGB_MATRIX_DIGITAL_RAIN
# define DISABLE_RGB_MATRIX_SOLID_REACTIVE
# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
# define DISABLE_RGB_MATRIX_SPLASH
# define DISABLE_RGB_MATRIX_MULTISPLASH
# define DISABLE_RGB_MATRIX_SOLID_SPLASH
# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
#endif // RGB_MATRIX_ENABLE
#if !defined(ONESHOT_TAP_TOGGLE)
# define ONESHOT_TAP_TOGGLE 2
#endif // !ONESHOT_TAP_TOGGLE
#if !defined(ONESHOT_TIMEOUT)
# define ONESHOT_TIMEOUT 3000
#endif // !ONESHOT_TIMEOUT
#if !defined(QMK_KEYS_PER_SCAN)
# define QMK_KEYS_PER_SCAN 4
#endif // !QMK_KEYS_PER_SCAN
#define IGNORE_MOD_TAP_INTERRUPT
#undef PERMISSIVE_HOLD
#define FORCE_NKRO
#if !defined(TAPPING_TOGGLE)
# define TAPPING_TOGGLE 1
#endif
#if defined(TAPPING_TERM)
# undef TAPPING_TERM
#endif // TAPPING_TERM
#if defined(KEYBOARD_ergodox_ez)
# define TAPPING_TERM 185
#elif defined(KEYBOARD_crkbd)
# define TAPPING_TERM 200
#else
# define TAPPING_TERM 175
#endif
#define TAP_CODE_DELAY 5
#define LEADER_TIMEOUT 250
#define LEADER_PER_KEY_TIMING
/* Disable unused and unneeded features to reduce on firmware size */
#if defined(LOCKING_SUPPORT_ENABLE)
# undef LOCKING_SUPPORT_ENABLE
#endif
#if defined(LOCKING_RESYNC_ENABLE)
# undef LOCKING_RESYNC_ENABLE
#endif
#if defined(OLED_FONT_H)
# undef OLED_FONT_H
#endif
#define OLED_FONT_H "users/curry/glcdfont.c"

View File

@ -1,130 +0,0 @@
#include "curry.h"
userspace_config_t userspace_config;
#define CURRY_UNICODE_MODE 1
void bootmagic_lite(void) {
matrix_scan();
#if defined(DEBOUNCING_DELAY) && DEBOUNCING_DELAY > 0
wait_ms(DEBOUNCING_DELAY * 2);
#elif defined(DEBOUNCE) && DEBOUNCE > 0
wait_ms(DEBOUNCE * 2);
#else
wait_ms(30);
#endif
matrix_scan();
if (matrix_get_row(BOOTMAGIC_LITE_ROW) & (1 << BOOTMAGIC_LITE_COLUMN)) {
bootloader_jump();
}
}
__attribute__((weak)) void keyboard_pre_init_keymap(void) {}
void keyboard_pre_init_user(void) {
userspace_config.raw = eeconfig_read_user();
keyboard_pre_init_keymap();
}
__attribute__((weak)) void matrix_init_keymap(void) {}
// Call user matrix init, set default RGB colors and then
// call the keymap's init function
void matrix_init_user(void) {
#if (defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE))
set_unicode_input_mode(CURRY_UNICODE_MODE);
get_unicode_input_mode();
#endif // UNICODE_ENABLE
matrix_init_keymap();
}
__attribute__((weak)) void keyboard_post_init_keymap(void) {}
void keyboard_post_init_user(void) {
#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE)
keyboard_post_init_rgb();
#endif
keyboard_post_init_keymap();
}
__attribute__((weak)) void shutdown_keymap(void) {}
void rgb_matrix_update_pwm_buffers(void);
// On RESET, set all RGB to red, shutdown the keymap.
void shutdown_user(void) {
#if defined(RGBLIGHT_ENABLE)
rgblight_enable_noeeprom();
rgblight_mode_noeeprom(1);
rgblight_setrgb_red();
#endif
#if defined(RGB_MATRIX_ENABLE)
rgb_matrix_set_color_all(0xFF, 0x00, 0x00);
rgb_matrix_update_pwm_buffers();
#endif
shutdown_keymap();
}
__attribute__((weak)) void suspend_power_down_keymap(void) {}
void suspend_power_down_user(void) { suspend_power_down_keymap(); }
__attribute__((weak)) void suspend_wakeup_init_keymap(void) {}
void suspend_wakeup_init_user(void) { suspend_wakeup_init_keymap(); }
__attribute__((weak)) void matrix_scan_keymap(void) {}
// No global matrix scan code, so just run keymap's matrix
// scan function
__attribute__((weak)) void matrix_scan_user(void) {
static bool has_ran_yet;
if (!has_ran_yet) {
has_ran_yet = true;
startup_user();
}
#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE)
matrix_scan_rgb();
#endif // RGBLIGHT_ENABLE
matrix_scan_keymap();
}
__attribute__((weak)) layer_state_t layer_state_set_keymap(layer_state_t state) { return state; }
// On Layer change, run keymap's layer change check
layer_state_t layer_state_set_user(layer_state_t state) {
state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST);
#if defined(RGBLIGHT_ENABLE)
state = layer_state_set_rgb(state);
#endif
return layer_state_set_keymap(state);
}
__attribute__((weak)) layer_state_t default_layer_state_set_keymap(layer_state_t state) { return state; }
// Runs state check and changes underglow color and animation
layer_state_t default_layer_state_set_user(layer_state_t state) { return default_layer_state_set_keymap(state); }
__attribute__((weak)) void led_set_keymap(uint8_t usb_led) {}
// Any custom LED code goes here.
void led_set_user(uint8_t usb_led) { led_set_keymap(usb_led); }
__attribute__((weak)) void eeconfig_init_keymap(void) {}
void eeconfig_init_user(void) {
userspace_config.raw = 0;
userspace_config.rgb_layer_change = true;
eeconfig_update_user(userspace_config.raw);
#if (defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE))
set_unicode_input_mode(CURRY_UNICODE_MODE);
get_unicode_input_mode();
#else
eeprom_update_byte(EECONFIG_UNICODEMODE, CURRY_UNICODE_MODE);
#endif
eeconfig_init_keymap();
keyboard_init();
}

View File

@ -1,59 +0,0 @@
#pragma once
#include QMK_KEYBOARD_H
#include "version.h"
#include "eeprom.h"
#include "wrappers.h"
#include "process_records.h"
#if defined(TAP_DANCE_ENABLE)
# include "tap_dances.h"
#endif // TAP_DANCE_ENABLE
#if defined(RGB_MATRIX_ENABLE)
# include "rgb_matrix_user.h"
#endif
#if defined(RGBLIGHT_ENABLE)
# include "rgb_lighting_user.h"
#endif
#if defined(KEYBOARD_lily58_rev1) & defined(PROTOCOL_LUFA)
# include "lufa.h"
# include "split_util.h"
#endif
/* Define layer names */
enum userspace_layers {
_QWERTY = 0,
_COLEMAK,
_DVORAK,
_WORKMAN,
_MODS,
_LOWER,
_RAISE,
_ADJUST,
};
void matrix_init_keymap(void);
void shutdown_keymap(void);
void suspend_power_down_keymap(void);
void suspend_wakeup_init_keymap(void);
void matrix_scan_keymap(void);
layer_state_t layer_state_set_keymap(layer_state_t state);
layer_state_t default_layer_state_set_keymap(layer_state_t state);
void led_set_keymap(uint8_t usb_led);
void eeconfig_init_keymap(void);
// clang-format off
typedef union {
uint32_t raw;
struct {
bool rgb_layer_change :1;
bool nuke_switch :1;
bool rgb_matrix_idle_anim :1;
};
} userspace_config_t;
// clang-format on
extern userspace_config_t userspace_config;

View File

@ -1,232 +0,0 @@
#include "progmem.h"
// Corne 8x6 font with QMK Firmware Logo
// Online editor: https://helixfonteditor.netlify.com/
// clang-format off
const unsigned char font[] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00,
0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00,
0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00,
0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00,
0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00,
0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00,
0x00, 0x18, 0x3C, 0x18, 0x00, 0x00,
0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00,
0x00, 0x18, 0x24, 0x18, 0x00, 0x00,
0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00,
0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00,
0x26, 0x29, 0x79, 0x29, 0x26, 0x00,
0x40, 0x7F, 0x05, 0x05, 0x07, 0x00,
0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00,
0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00,
0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00,
0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00,
0x14, 0x22, 0x7F, 0x22, 0x14, 0x00,
0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00,
0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00,
0x00, 0x66, 0x89, 0x95, 0x6A, 0x00,
0x60, 0x60, 0x60, 0x60, 0x60, 0x00,
0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00,
0x08, 0x04, 0x7E, 0x04, 0x08, 0x00,
0x10, 0x20, 0x7E, 0x20, 0x10, 0x00,
0x08, 0x08, 0x2A, 0x1C, 0x08, 0x00,
0x08, 0x1C, 0x2A, 0x08, 0x08, 0x00,
0x1E, 0x10, 0x10, 0x10, 0x10, 0x00,
0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00,
0x30, 0x38, 0x3E, 0x38, 0x30, 0x00,
0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x5F, 0x00, 0x00, 0x00,
0x00, 0x07, 0x00, 0x07, 0x00, 0x00,
0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00,
0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00,
0x23, 0x13, 0x08, 0x64, 0x62, 0x00,
0x36, 0x49, 0x56, 0x20, 0x50, 0x00,
0x00, 0x08, 0x07, 0x03, 0x00, 0x00,
0x00, 0x1C, 0x22, 0x41, 0x00, 0x00,
0x00, 0x41, 0x22, 0x1C, 0x00, 0x00,
0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00,
0x08, 0x08, 0x3E, 0x08, 0x08, 0x00,
0x00, 0x80, 0x70, 0x30, 0x00, 0x00,
0x08, 0x08, 0x08, 0x08, 0x08, 0x00,
0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
0x20, 0x10, 0x08, 0x04, 0x02, 0x00,
0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00,
0x00, 0x42, 0x7F, 0x40, 0x00, 0x00,
0x72, 0x49, 0x49, 0x49, 0x46, 0x00,
0x21, 0x41, 0x49, 0x4D, 0x33, 0x00,
0x18, 0x14, 0x12, 0x7F, 0x10, 0x00,
0x27, 0x45, 0x45, 0x45, 0x39, 0x00,
0x3C, 0x4A, 0x49, 0x49, 0x31, 0x00,
0x41, 0x21, 0x11, 0x09, 0x07, 0x00,
0x36, 0x49, 0x49, 0x49, 0x36, 0x00,
0x46, 0x49, 0x49, 0x29, 0x1E, 0x00,
0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
0x00, 0x40, 0x34, 0x00, 0x00, 0x00,
0x00, 0x08, 0x14, 0x22, 0x41, 0x00,
0x14, 0x14, 0x14, 0x14, 0x14, 0x00,
0x00, 0x41, 0x22, 0x14, 0x08, 0x00,
0x02, 0x01, 0x59, 0x09, 0x06, 0x00,
0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x00,
0x7C, 0x12, 0x11, 0x12, 0x7C, 0x00,
0x7F, 0x49, 0x49, 0x49, 0x36, 0x00,
0x3E, 0x41, 0x41, 0x41, 0x22, 0x00,
0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00,
0x7F, 0x49, 0x49, 0x49, 0x41, 0x00,
0x7F, 0x09, 0x09, 0x09, 0x01, 0x00,
0x3E, 0x41, 0x41, 0x51, 0x73, 0x00,
0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00,
0x00, 0x41, 0x7F, 0x41, 0x00, 0x00,
0x20, 0x40, 0x41, 0x3F, 0x01, 0x00,
0x7F, 0x08, 0x14, 0x22, 0x41, 0x00,
0x7F, 0x40, 0x40, 0x40, 0x40, 0x00,
0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00,
0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00,
0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00,
0x7F, 0x09, 0x09, 0x09, 0x06, 0x00,
0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00,
0x7F, 0x09, 0x19, 0x29, 0x46, 0x00,
0x26, 0x49, 0x49, 0x49, 0x32, 0x00,
0x03, 0x01, 0x7F, 0x01, 0x03, 0x00,
0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00,
0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00,
0x3F, 0x40, 0x38, 0x40, 0x3F, 0x00,
0x63, 0x14, 0x08, 0x14, 0x63, 0x00,
0x03, 0x04, 0x78, 0x04, 0x03, 0x00,
0x61, 0x59, 0x49, 0x4D, 0x43, 0x00,
0x00, 0x7F, 0x41, 0x41, 0x41, 0x00,
0x02, 0x04, 0x08, 0x10, 0x20, 0x00,
0x00, 0x41, 0x41, 0x41, 0x7F, 0x00,
0x04, 0x02, 0x01, 0x02, 0x04, 0x00,
0x40, 0x40, 0x40, 0x40, 0x40, 0x00,
0x00, 0x03, 0x07, 0x08, 0x00, 0x00,
0x20, 0x54, 0x54, 0x78, 0x40, 0x00,
0x7F, 0x28, 0x44, 0x44, 0x38, 0x00,
0x38, 0x44, 0x44, 0x44, 0x28, 0x00,
0x38, 0x44, 0x44, 0x28, 0x7F, 0x00,
0x38, 0x54, 0x54, 0x54, 0x18, 0x00,
0x00, 0x08, 0x7E, 0x09, 0x02, 0x00,
0x18, 0x24, 0x24, 0x1C, 0x78, 0x00,
0x7F, 0x08, 0x04, 0x04, 0x78, 0x00,
0x00, 0x44, 0x7D, 0x40, 0x00, 0x00,
0x20, 0x40, 0x40, 0x3D, 0x00, 0x00,
0x7F, 0x10, 0x28, 0x44, 0x00, 0x00,
0x00, 0x41, 0x7F, 0x40, 0x00, 0x00,
0x7C, 0x04, 0x78, 0x04, 0x78, 0x00,
0x7C, 0x08, 0x04, 0x04, 0x78, 0x00,
0x38, 0x44, 0x44, 0x44, 0x38, 0x00,
0x7C, 0x18, 0x24, 0x24, 0x18, 0x00,
0x18, 0x24, 0x24, 0x18, 0x7C, 0x00,
0x7C, 0x08, 0x04, 0x04, 0x08, 0x00,
0x48, 0x54, 0x54, 0x54, 0x24, 0x00,
0x04, 0x04, 0x3F, 0x44, 0x24, 0x00,
0x3C, 0x40, 0x40, 0x20, 0x7C, 0x00,
0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00,
0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00,
0x44, 0x28, 0x10, 0x28, 0x44, 0x00,
0x4C, 0x90, 0x90, 0x90, 0x7C, 0x00,
0x44, 0x64, 0x54, 0x4C, 0x44, 0x00,
0x00, 0x08, 0x36, 0x41, 0x00, 0x00,
0x00, 0x00, 0x77, 0x00, 0x00, 0x00,
0x00, 0x41, 0x36, 0x08, 0x00, 0x00,
0x02, 0x01, 0x02, 0x04, 0x02, 0x00,
0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xC0, 0xE0,
0xF0, 0xF8, 0xF8, 0x18, 0x00, 0xC0,
0xF0, 0xFC, 0xFE, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0x7E, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x80, 0xC0, 0xE0, 0xE0,
0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0,
0xC0, 0x80, 0x00, 0x00, 0x00, 0x00,
0x80, 0xC0, 0xE0, 0xE0, 0xE0, 0xE0,
0xE0, 0xE0, 0xE0, 0xE0, 0xC0, 0x80,
0x00, 0x00, 0x00, 0xE0, 0xE0, 0xC0,
0xC0, 0xE0, 0xE0, 0xE0, 0xE0, 0x00,
0x00, 0xE0, 0xE0, 0xC0, 0xC0, 0xE0,
0xE0, 0xE0, 0xE0, 0xE0, 0xC0, 0x80,
0x00, 0x00, 0x00, 0x00, 0x80, 0xC0,
0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0,
0xE0, 0xE0, 0xC0, 0x80, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xE0, 0xF0, 0xF0, 0xF0, 0xE0, 0xEC,
0xEE, 0xF7, 0xF3, 0x70, 0x20, 0x00,
0x7C, 0x7C, 0x7C, 0x7E, 0x00, 0x7E,
0x7E, 0x7E, 0x7F, 0x7F, 0x7F, 0x00,
0x00, 0x80, 0xC0, 0xE0, 0x7E, 0x5B,
0x4F, 0x5B, 0xFE, 0xC0, 0x00, 0x00,
0xC0, 0x00, 0xDC, 0xD7, 0xDE, 0xDE,
0xDE, 0xD7, 0xDC, 0x00, 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, 0xF8, 0xFC, 0xFE,
0xFF, 0xE0, 0x00, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0x80, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0x1F, 0x07, 0x01, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xFF, 0xFF, 0xFF, 0x81, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x81,
0xC3, 0xC3, 0xC3, 0x00, 0x00, 0xFF,
0xFF, 0xFF, 0x81, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x81, 0xFF, 0xFF,
0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF,
0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xFF, 0xFF, 0xFF, 0x01, 0x00,
0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF,
0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF,
0x9D, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C,
0x1C, 0x9D, 0xDF, 0xDF, 0xDF, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x0F, 0x1F, 0x3F, 0x7F, 0x7F, 0x7F,
0x7F, 0x7F, 0x3F, 0x1E, 0x0C, 0x00,
0x1F, 0x1F, 0x1F, 0x3F, 0x00, 0x3F,
0x3F, 0x3F, 0x7F, 0x7F, 0x7F, 0x00,
0x30, 0x7B, 0x7F, 0x78, 0x30, 0x20,
0x20, 0x30, 0x78, 0x7F, 0x3B, 0x00,
0x03, 0x00, 0x0F, 0x7F, 0x0F, 0x0F,
0x0F, 0x7F, 0x0F, 0x00, 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, 0x03, 0x0F, 0x1F,
0x3F, 0x3F, 0x3F, 0x3F, 0x1F, 0x1F,
0x3F, 0x3F, 0x7F, 0x7F, 0x7F, 0x3F,
0x3F, 0x1F, 0x3F, 0x7F, 0x7F, 0x7F,
0x7F, 0x7C, 0x78, 0x78, 0x38, 0x1C,
0x0F, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x03, 0x07, 0x07,
0x07, 0x07, 0x07, 0x07, 0x07, 0x07,
0x03, 0x01, 0x00, 0x00, 0x00, 0x00,
0x01, 0x03, 0x07, 0x07, 0x07, 0x07,
0x07, 0x07, 0x07, 0x07, 0x03, 0x01,
0x00, 0x00, 0x00, 0x07, 0x07, 0x07,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x07, 0x07, 0x07, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x07, 0x07,
0x07, 0x00, 0x00, 0x00, 0x01, 0x03,
0x07, 0x07, 0x07, 0x07, 0x07, 0x07,
0x07, 0x07, 0x03, 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,
};

View File

@ -1,24 +0,0 @@
#include "curry.h"
#include "leader.h"
LEADER_EXTERNS();
void matrix_scan_user(void) {
static bool has_ran_yet;
if (!has_ran_yet) {
has_ran_yet = true;
startup_user();
}
#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE)
matrix_scan_rgb();
#endif // RGBLIGHT_ENABLE
LEADER_DICTIONARY() {
leading = false;
leader_end();
SEQ_ONE_KEY(KC_F) { SEND_STRING(SS_LCTL("akf")); } // Select all and format
SEQ_ONE_KEY(KC_P) { SEND_STRING(SS_LCTL(SS_LSFT("4"))); } // Screenshot region
SEQ_TWO_KEYS(KC_D, KC_D) { SEND_STRING(SS_LCTL("ac")); } // Copy all
}
matrix_scan_keymap();
}

View File

@ -1,3 +0,0 @@
#pragma once
void matrix_scan_user(void);

View File

@ -1,163 +0,0 @@
#include "curry.h"
#define KEYLOGGER_LENGTH 5
static uint32_t oled_timer = 0;
static char keylog_str[KEYLOGGER_LENGTH + 1] = {"\n"};
static uint16_t log_timer = 0;
// clang-format off
static const char PROGMEM code_to_name[0xFF] = {
// 0 1 2 3 4 5 6 7 8 9 A B c D E F
' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', // 0x
'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '1', '2', // 1x
'3', '4', '5', '6', '7', '8', '9', '0', 20, 19, 27, 26, 22, '-', '=', '[', // 2x
']','\\', '#', ';','\'', '`', ',', '.', '/', 128, ' ', ' ', ' ', ' ', ' ', ' ', // 3x
' ', ' ', ' ', ' ', ' ', ' ', 'P', 'S', ' ', ' ', ' ', ' ', 16, ' ', ' ', ' ', // 4x
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 5x
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 6x
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 7x
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 8x
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 9x
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Ax
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Bx
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Cx
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Dx
'C', 'S', 'A', 'C', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Ex
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' // Fx
};
// clang-format on
void add_keylog(uint16_t keycode);
oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; }
void add_keylog(uint16_t keycode) {
if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX) || (keycode >= QK_MODS && keycode <= QK_MODS_MAX)) {
keycode = keycode & 0xFF;
} else if (keycode > 0xFF) {
keycode = 0;
}
for (uint8_t i = (KEYLOGGER_LENGTH - 1); i > 0; --i) {
keylog_str[i] = keylog_str[i - 1];
}
if (keycode < (sizeof(code_to_name) / sizeof(char))) {
keylog_str[0] = pgm_read_byte(&code_to_name[keycode]);
}
log_timer = timer_read();
}
void render_keylogger_status(void) {
oled_write_P(PSTR("Keys:"), false);
oled_write(keylog_str, false);
}
void render_default_layer_state(void) {
oled_write_P(PSTR("Lyout"), false);
switch (get_highest_layer(default_layer_state)) {
case _QWERTY:
oled_write_P(PSTR(" QRTY"), false);
break;
case _COLEMAK:
oled_write_P(PSTR(" COLE"), false);
break;
case _DVORAK:
oled_write_P(PSTR(" DVRK"), false);
break;
case _WORKMAN:
oled_write_P(PSTR(" WRKM"), false);
break;
}
}
void render_layer_state(void) {
oled_write_P(PSTR("LAYER"), false);
oled_write_P(PSTR("Lower"), layer_state_is(_LOWER));
oled_write_P(PSTR("Raise"), layer_state_is(_RAISE));
oled_write_P(PSTR(" Mods"), layer_state_is(_MODS));
}
void render_keylock_status(uint8_t led_usb_state) {
oled_write_P(PSTR("Lock:"), false);
oled_write_P(PSTR(" "), false);
oled_write_P(PSTR("N"), led_usb_state & (1 << USB_LED_NUM_LOCK));
oled_write_P(PSTR("C"), led_usb_state & (1 << USB_LED_CAPS_LOCK));
oled_write_ln_P(PSTR("S"), led_usb_state & (1 << USB_LED_SCROLL_LOCK));
}
void render_mod_status(uint8_t modifiers) {
oled_write_P(PSTR("Mods:"), false);
oled_write_P(PSTR(" "), false);
oled_write_P(PSTR("S"), (modifiers & MOD_MASK_SHIFT));
oled_write_P(PSTR("C"), (modifiers & MOD_MASK_CTRL));
oled_write_P(PSTR("A"), (modifiers & MOD_MASK_ALT));
oled_write_P(PSTR("G"), (modifiers & MOD_MASK_GUI));
}
void render_bootmagic_status(void) {
/* Show Ctrl-Gui Swap options */
static const char PROGMEM logo[][2][3] = {
{{0x97, 0x98, 0}, {0xb7, 0xb8, 0}},
{{0x95, 0x96, 0}, {0xb5, 0xb6, 0}},
};
oled_write_P(PSTR("BTMGK"), false);
oled_write_P(PSTR(" "), false);
oled_write_P(logo[0][0], !keymap_config.swap_lctl_lgui);
oled_write_P(logo[1][0], keymap_config.swap_lctl_lgui);
oled_write_P(PSTR(" "), false);
oled_write_P(logo[0][1], !keymap_config.swap_lctl_lgui);
oled_write_P(logo[1][1], keymap_config.swap_lctl_lgui);
oled_write_P(PSTR(" NKRO"), keymap_config.nkro);
}
void render_user_status(void) {
oled_write_P(PSTR("USER:"), false);
oled_write_P(PSTR(" Anim"), userspace_config.rgb_matrix_idle_anim);
oled_write_P(PSTR(" Layr"), userspace_config.rgb_layer_change);
oled_write_P(PSTR(" Nuke"), userspace_config.nuke_switch);
}
void render_status_main(void) {
/* Show Keyboard Layout */
render_default_layer_state();
render_keylock_status(host_keyboard_leds());
render_bootmagic_status();
render_user_status();
render_keylogger_status();
}
void render_status_secondary(void) {
/* Show Keyboard Layout */
render_default_layer_state();
render_layer_state();
render_mod_status(get_mods() | get_oneshot_mods());
render_keylogger_status();
}
void oled_task_user(void) {
if (timer_elapsed32(oled_timer) > 30000) {
oled_off();
return;
}
#if !defined(SPLIT_KEYBOARD)
else {
oled_on();
}
#endif
if (is_keyboard_master()) {
render_status_main(); // Renders the current keyboard state (layer, lock, caps, scroll, etc)
} else {
render_status_secondary();
}
}
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
if (record->event.pressed) {
oled_timer = timer_read32();
add_keylog(keycode);
}
return true;
}

View File

@ -1,76 +0,0 @@
#include "curry.h"
uint16_t copy_paste_timer;
__attribute__((weak)) bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { return true; }
__attribute__((weak)) bool process_record_secrets(uint16_t keycode, keyrecord_t *record) { return true; }
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
xprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed);
switch (keycode) {
case KC_QWERTY ... KC_WORKMAN:
if (record->event.pressed) {
set_single_persistent_default_layer(keycode - KC_QWERTY);
}
break;
case KC_MAKE:
if (!record->event.pressed) {
uint8_t temp_mod = mod_config(get_mods());
uint8_t temp_osm = mod_config(get_oneshot_mods());
clear_mods();
clear_oneshot_mods();
send_string_with_delay_P(PSTR("make " QMK_KEYBOARD ":" QMK_KEYMAP), TAP_CODE_DELAY);
if ((temp_mod | temp_osm) & MOD_MASK_SHIFT) {
send_string_with_delay_P(PSTR(":flash"), TAP_CODE_DELAY);
}
send_string_with_delay_P(PSTR(" -j8 --output-sync\n"), TAP_CODE_DELAY);
}
break;
case VRSN: // Prints firmware version
if (record->event.pressed) {
send_string_with_delay_P(PSTR(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION ", Built on: " QMK_BUILDDATE), TAP_CODE_DELAY);
}
break;
case KC_CCCV: // One key copy/paste
if (record->event.pressed) {
copy_paste_timer = timer_read();
} else {
if (timer_elapsed(copy_paste_timer) > TAPPING_TERM) { // Hold, copy
tap_code16(LCTL(KC_C));
} else { // Tap, paste
tap_code16(LCTL(KC_V));
}
}
break;
#if defined(UNICODE_ENABLE)
case UC_FLIP: // (ノಠ痊ಠ)ノ彡┻━┻
if (record->event.pressed) {
send_unicode_hex_string("0028 30CE 0CA0 75CA 0CA0 0029 30CE 5F61 253B 2501 253B");
}
break;
case UC_TABL: // ┬─┬ノ( º _ ºノ)
if (record->event.pressed) {
send_unicode_hex_string("252C 2500 252C 30CE 0028 0020 00BA 0020 005F 0020 00BA 30CE 0029");
}
break;
case UC_SHRG: // ¯\_(ツ)_/¯
if (record->event.pressed) {
send_unicode_hex_string("00AF 005C 005F 0028 30C4 0029 005F 002F 00AF");
}
break;
case UC_DISA: // ಠ_ಠ
if (record->event.pressed) {
send_unicode_hex_string("0CA0 005F 0CA0");
}
break;
#endif
}
return process_record_keymap(keycode, record) &&
#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE)
process_record_user_rgb(keycode, record) &&
#endif // RGBLIGHT_ENABLE
process_record_secrets(keycode, record);
}

View File

@ -1,86 +0,0 @@
#pragma once
enum userspace_custom_keycodes {
VRSN = SAFE_RANGE, // Prints QMK Firmware and board info
KC_QWERTY, // Sets default layer to QWERTY
KC_COLEMAK, // Sets default layer to COLEMAK
KC_DVORAK, // Sets default layer to DVORAK
KC_WORKMAN, // Sets default layer to WORKMAN
KC_MAKE, // Run keyboard's customized make command
KC_RGB_T, // Toggles RGB Layer Indication mode
RGB_IDL, // RGB Idling animations
KC_SECRET_1, // test1
KC_SECRET_2, // test2
KC_SECRET_3, // test3
KC_SECRET_4, // test4
KC_SECRET_5, // test5
KC_CCCV, // Hold to copy, tap to paste
UC_FLIP, // (ಠ痊ಠ)┻━┻
UC_TABL, // ┬─┬ノ( º _ ºノ)
UC_SHRG, // ¯\_(ツ)_/¯
UC_DISA, // ಠ_ಠ
KC_DT1,
KC_DT2,
KC_DT3,
KC_DT4,
NEW_SAFE_RANGE // use "NEWPLACEHOLDER for keymap specific codes
};
bool process_record_secrets(uint16_t keycode, keyrecord_t *record);
bool process_record_keymap(uint16_t keycode, keyrecord_t *record);
#define LOWER MO(_LOWER)
#define RAISE MO(_RAISE)
#define ADJUST MO(_ADJUST)
#define TG_MODS TG(_MODS)
#define OS_LWR OSL(_LOWER)
#define OS_RSE OSL(_RAISE)
#define KC_SEC1 KC_SECRET_1
#define KC_SEC2 KC_SECRET_2
#define KC_SEC3 KC_SECRET_3
#define KC_SEC4 KC_SECRET_4
#define KC_SEC5 KC_SECRET_5
#define QWERTY KC_QWERTY
#define DVORAK KC_DVORAK
#define COLEMAK KC_COLEMAK
#define WORKMAN KC_WORKMAN
#define KC_RST RESET
#if defined(SWAP_HANDS_ENABLE)
# define KC_C1R3 SH_T(KC_TAB)
#else // SWAP_HANDS_ENABLE
# define KC_C1R3 KC_TAB
#endif // SWAP_HANDS_ENABLE
#define SP_LWER LT(_LOWER, KC_SPC)
#define ET_RAIS LT(_RAISE, KC_ENTER)
/* OSM keycodes, to keep things clean and easy to change */
#define OS_LGUI OSM(MOD_LGUI)
#define OS_RGUI OSM(MOD_RGUI)
#define OS_LSFT OSM(MOD_LSFT)
#define OS_RSFT OSM(MOD_RSFT)
#define OS_LCTL OSM(MOD_LCTL)
#define OS_RCTL OSM(MOD_RCTL)
#define OS_LALT OSM(MOD_LALT)
#define OS_RALT OSM(MOD_RALT)
#define OS_MEH OSM(MOD_MEH)
#define OS_HYPR OSM(MOD_HYPR)
#define MT_TAB MT(MOD_LCTL, KC_TAB)
#define ALT_APP ALT_T(KC_APP)
#define MG_NKRO MAGIC_TOGGLE_NKRO
#define UC_IRNY UC(0x2E2E)
#define UC_CLUE UC(0x203D)
// KWin Window Switching
#define KC_DT1 LCTL(KC_F1)
#define KC_DT2 LCTL(KC_F2)
#define KC_DT3 LCTL(KC_F3)
#define KC_DT4 LCTL(KC_F4)

View File

@ -1,19 +0,0 @@
#pragma once
typedef struct {
bool enabled;
uint8_t hue;
uint16_t timer;
uint8_t life;
} rgblight_fadeout;
bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record);
void keyboard_post_init_rgb(void);
void matrix_scan_rgb(void);
layer_state_t layer_state_set_rgb(layer_state_t state);
layer_state_t default_layer_state_set_rgb(layer_state_t state);
void rgblight_sethsv_default_helper(uint8_t index);
#if defined(RGBLIGHT_TWINKLE)
void scan_rgblight_fadeout(void);
#endif

View File

@ -1,144 +0,0 @@
#include "curry.h"
#include "rgb_matrix_user.h"
#include "lib/lib8tion/lib8tion.h"
static uint32_t hypno_timer;
extern led_config_t g_led_config;
#define RGB_MATRIX_REST_MODE RGB_MATRIX_CYCLE_OUT_IN_DUAL
void suspend_power_down_keymap(void) { rgb_matrix_set_suspend_state(true); }
void suspend_wakeup_init_keymap(void) { rgb_matrix_set_suspend_state(false); }
void check_default_layer(uint8_t mode, uint8_t type) {
switch (get_highest_layer(default_layer_state)) {
case _QWERTY:
rgb_matrix_layer_helper(HSV_CYAN, mode, rgb_matrix_config.speed, type);
break;
case _COLEMAK:
rgb_matrix_layer_helper(HSV_MAGENTA, mode, rgb_matrix_config.speed, type);
break;
case _DVORAK:
rgb_matrix_layer_helper(HSV_SPRINGGREEN, mode, rgb_matrix_config.speed, type);
break;
case _WORKMAN:
rgb_matrix_layer_helper(HSV_GOLDENROD, mode, rgb_matrix_config.speed, type);
break;
}
}
void rgb_matrix_indicators_user(void) {
if (userspace_config.rgb_layer_change && !g_suspend_state && rgb_matrix_config.enable) {
switch (get_highest_layer(layer_state)) {
case _RAISE:
rgb_matrix_layer_helper(HSV_YELLOW, 0, rgb_matrix_config.speed, LED_FLAG_UNDERGLOW);
break;
case _LOWER:
rgb_matrix_layer_helper(HSV_GREEN, 0, rgb_matrix_config.speed, LED_FLAG_UNDERGLOW);
break;
case _ADJUST:
rgb_matrix_layer_helper(HSV_RED, 0, rgb_matrix_config.speed, LED_FLAG_UNDERGLOW);
break;
default: {
check_default_layer(IS_LAYER_ON(_MODS), LED_FLAG_UNDERGLOW);
break;
}
}
check_default_layer(0, LED_FLAG_MODIFIER);
}
}
bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record) {
uint16_t temp_keycode = keycode;
// Filter out the actual keycode from MT and LT keys.
if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX)) {
temp_keycode &= 0xFF;
}
hypno_timer = timer_read32();
if (userspace_config.rgb_matrix_idle_anim && rgb_matrix_get_mode() == RGB_MATRIX_REST_MODE) {
rgb_matrix_mode_noeeprom(RGB_MATRIX_TYPING_HEATMAP);
}
switch (temp_keycode) {
case KC_RGB_T: // This allows me to use underglow as layer indication, or as normal
if (record->event.pressed) {
userspace_config.rgb_layer_change ^= 1;
dprintf("rgblight layer change [EEPROM]: %u\n", userspace_config.rgb_layer_change);
eeconfig_update_user(userspace_config.raw);
if (userspace_config.rgb_layer_change) {
layer_state_set(layer_state); // This is needed to immediately set the layer color (looks better)
}
}
break;
case RGB_IDL: // This allows me to use underglow as layer indication, or as normal
if (record->event.pressed) {
userspace_config.rgb_matrix_idle_anim ^= 1;
dprintf("RGB Matrix Idle Animation [EEPROM]: %u\n", userspace_config.rgb_matrix_idle_anim);
eeconfig_update_user(userspace_config.raw);
if (userspace_config.rgb_matrix_idle_anim) {
rgb_matrix_mode_noeeprom(RGB_MATRIX_TYPING_HEATMAP);
}
}
break;
case RGB_MODE_FORWARD ... RGB_MODE_GRADIENT: // quantum_keycodes.h L400 for definitions
if (record->event.pressed) {
bool is_eeprom_updated = false;
if (userspace_config.rgb_matrix_idle_anim) {
userspace_config.rgb_matrix_idle_anim = false;
dprintf("RGB Matrix Idle Animation [EEPROM]: %u\n", userspace_config.rgb_matrix_idle_anim);
is_eeprom_updated = true;
}
if (is_eeprom_updated) {
eeconfig_update_user(userspace_config.raw);
}
}
break;
}
return true;
}
void keyboard_post_init_rgb(void) {
if (userspace_config.rgb_matrix_idle_anim) {
rgb_matrix_mode_noeeprom(RGB_MATRIX_REST_MODE);
}
}
void matrix_scan_rgb(void) {
if (userspace_config.rgb_matrix_idle_anim && rgb_matrix_get_mode() == RGB_MATRIX_TYPING_HEATMAP && timer_elapsed32(hypno_timer) > 15000) {
rgb_matrix_mode_noeeprom(RGB_MATRIX_REST_MODE);
}
}
void rgb_matrix_layer_helper(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode, uint8_t speed, uint8_t led_type) {
HSV hsv = {hue, sat, val};
if (hsv.v > rgb_matrix_config.hsv.v) {
hsv.v = rgb_matrix_config.hsv.v;
}
switch (mode) {
case 1: // breathing
{
uint16_t time = scale16by8(g_rgb_counters.tick, speed / 8);
hsv.v = scale8(abs8(sin8(time) - 128) * 2, hsv.v);
RGB rgb = hsv_to_rgb(hsv);
for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) {
if (HAS_FLAGS(g_led_config.flags[i], led_type)) {
rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
}
}
break;
}
default: // Solid Color
{
RGB rgb = hsv_to_rgb(hsv);
for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) {
if (HAS_FLAGS(g_led_config.flags[i], led_type)) {
rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
}
}
break;
}
}
}

View File

@ -1,71 +0,0 @@
SRC += curry.c \
process_records.c
# Common flags
SPACE_CADET_ENABLE = no
LTO_ENABLE = yes
EXTRAKEY_ENABLE = yes
UNICODE_ENABLE = yes
NKRO_ENABLE = yes
EXTRAKEY_ENABLE = yes
LEADER_ENABLE = yes
TAP_DANCE_ENABLE = no
ifneq ($(strip $(NO_SECRETS)), yes)
ifneq ("$(wildcard $(USER_PATH)/secrets.c)","")
SRC += secrets.c
endif
ifeq ($(strip $(NO_SECRETS)), lite)
OPT_DEFS += -DNO_SECRETS
endif
endif
ifeq ($(strip $(TAP_DANCE_ENABLE)), yes)
SRC += tap_dances.c
endif
ifeq ($(strip $(OLED_DRIVER_ENABLE)), yes)
SRC += oled.c
endif
ifeq ($(strip $(LEADER_ENABLE)), yes)
SRC += leader.c
endif
ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
SRC += rgb_lighting_user.c
ifeq ($(strip $(INDICATOR_LIGHTS)), yes)
OPT_DEFS += -DINDICATOR_LIGHTS
endif
ifeq ($(strip $(RGBLIGHT_TWINKLE)), yes)
OPT_DEFS += -DRGBLIGHT_TWINKLE
endif
ifeq ($(strip $(RGBLIGHT_NOEEPROM)), yes)
OPT_DEFS += -DRGBLIGHT_NOEEPROM
endif
ifeq ($(strip $(RGBLIGHT_STARTUP_ANIMATION)), yes)
OPT_DEFS += -DRGBLIGHT_STARTUP_ANIMATION
endif
endif
RGB_MATRIX_ENABLE ?= no
ifneq ($(strip $(RGB_MATRIX_ENABLE)), no)
SRC += rgb_matrix_user.c
endif
ifdef CONSOLE_ENABLE
ifeq ($(strip $(KEYLOGGER_ENABLE)), yes)
OPT_DEFS += -DKEYLOGGER_ENABLE
endif
endif
ifeq ($(strip $(MAKE_BOOTLOADER)), yes)
OPT_DEFS += -DMAKE_BOOTLOADER
endif
# At least until build.mk or the like drops, this is here to prevent
# VUSB boards from enabling NKRO, as they do not support it. Ideally
# this should be handled per keyboard, but until that happens ...
ifeq ($(strip $(PROTOCOL)), VUSB)
NKRO_ENABLE = no
endif

View File

@ -1,4 +0,0 @@
#include "tap_dances.h"
#include "curry.h"
qk_tap_dance_action_t tap_dance_actions[] = {};

View File

@ -1 +0,0 @@
#pragma once

View File

@ -1,88 +0,0 @@
#pragma once
#include "curry.h"
/*
Since our quirky block definitions are basically a list of comma separated
arguments, we need a wrapper in order for these definitions to be
expanded before being used as arguments to the LAYOUT_xxx macro.
*/
#if (!defined(LAYOUT) && defined(KEYMAP))
# define LAYOUT KEYMAP
#endif
// clang-format off
#define KEYMAP_wrapper(...) LAYOUT(__VA_ARGS__)
#define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__)
#define LAYOUT_ortho_4x12_wrapper(...) LAYOUT_ortho_4x12(__VA_ARGS__)
#define LAYOUT_ortho_5x12_wrapper(...) LAYOUT_ortho_5x12(__VA_ARGS__)
#define _________________QWERTY_L1_________________ KC_Q, KC_W, KC_E, KC_R, KC_T
#define _________________QWERTY_L2_________________ KC_A, KC_S, KC_D, KC_F, KC_G
#define _________________QWERTY_L3_________________ KC_Z, KC_X, KC_C, KC_V, KC_B
#define _________________QWERTY_R1_________________ KC_Y, KC_U, KC_I, KC_O, KC_P
#define _________________QWERTY_R2_________________ KC_H, KC_J, KC_K, KC_L, KC_SCLN
#define _________________QWERTY_R3_________________ KC_N, KC_M, KC_COMM, KC_DOT, KC_SLASH
#define _________________COLEMAK_L1________________ KC_Q, KC_W, KC_F, KC_P, KC_B
#define _________________COLEMAK_L2________________ KC_A, KC_R, KC_S, KC_T, KC_G
#define _________________COLEMAK_L3________________ KC_Z, KC_X, KC_C, KC_D, KC_V
#define _________________COLEMAK_R1________________ KC_J, KC_L, KC_U, KC_Y, KC_SCLN
#define _________________COLEMAK_R2________________ KC_M, KC_N, KC_E, KC_I, KC_O
#define _________________COLEMAK_R3________________ KC_K, KC_H, KC_COMM, KC_DOT, KC_SLASH
#define _________________DVORAK_L1_________________ KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y
#define _________________DVORAK_L2_________________ KC_A, KC_O, KC_E, KC_U, KC_I
#define _________________DVORAK_L3_________________ KC_SCLN, KC_Q, KC_J, KC_K, KC_X
#define _________________DVORAK_R1_________________ KC_F, KC_G, KC_C, KC_R, KC_L
#define _________________DVORAK_R2_________________ KC_D, KC_H, KC_T, KC_N, KC_S
#define _________________DVORAK_R3_________________ KC_B, KC_M, KC_W, KC_V, KC_Z
#define _________________WORKMAN_L1________________ KC_Q, KC_D, KC_R, KC_W, KC_B
#define _________________WORKMAN_L2________________ KC_A, KC_S, KC_H, KC_T, KC_G
#define _________________WORKMAN_L3________________ KC_Z, KC_X, KC_M, KC_C, KC_V
#define _________________WORKMAN_R1________________ KC_J, KC_F, KC_U, KC_P, KC_SCLN
#define _________________WORKMAN_R2________________ KC_Y, KC_N, KC_E, KC_O, KC_I
#define _________________WORKMAN_R3________________ KC_K, KC_L, KC_COMM, KC_DOT, KC_SLASH
#define ________________NUMBER_LEFT________________ KC_1, KC_2, KC_3, KC_4, KC_5
#define ________________NUMBER_RIGHT_______________ KC_6, KC_7, KC_8, KC_9, KC_0
#define _________________FUNC_LEFT_________________ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5
#define _________________FUNC_RIGHT________________ KC_F6, KC_F7, KC_F8, KC_F9, KC_F10
#define _________________SYM_LEFT__________________ KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC
#define _________________SYM_RIGHT_________________ KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN
#define ___________________BLANK___________________ _______, _______, _______, _______, _______
#define _________________LOWER_L1__________________ _________________FUNC_LEFT_________________
#define _________________LOWER_L2__________________ _________________SYM_LEFT__________________
#define _________________LOWER_L3__________________ KC_DT1, KC_DT2, KC_DT3, KC_DT4, KC_CCCV
#define _________________LOWER_R1__________________ _________________FUNC_RIGHT________________
#define _________________LOWER_R2__________________ _________________SYM_RIGHT_________________
#define _________________LOWER_R3__________________ KC_DQUO, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR
#define _________________RAISE_L1__________________ ________________NUMBER_LEFT________________
#define _________________RAISE_L2__________________ KC_PGUP, KC_PGDN, KC_HOME, KC_END, _______
#define _________________RAISE_L3__________________ UC_FLIP, UC_TABL, UC_SHRG, UC_DISA, _______
#define _________________RAISE_R1__________________ ________________NUMBER_RIGHT_______________
#define _________________RAISE_R2__________________ KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______
#define _________________RAISE_R3__________________ KC_QUOT, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC
#define _________________ADJUST_L1_________________ RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_TOG
#define _________________ADJUST_L2_________________ MU_TOG , CK_TOGG, AU_ON, AU_OFF, CG_NORM
#define _________________ADJUST_L3_________________ RGB_RMOD,RGB_HUD,RGB_SAD, RGB_VAD, KC_RGB_T
#define _________________ADJUST_R1_________________ KC_SEC1, KC_SEC2, KC_SEC3, KC_SEC4, KC_SEC5
#define _________________ADJUST_R2_________________ CG_SWAP, QWERTY, COLEMAK, DVORAK, WORKMAN
#define _________________ADJUST_R3_________________ MG_NKRO, KC_MUTE, KC_VOLD, KC_VOLU, KC_MNXT
// clang-format on

View File

@ -1 +0,0 @@
#define FORCE_NKRO

View File

@ -1,37 +0,0 @@
#include "d4mation.h"
__attribute__ ((weak))
bool process_record_keymap( uint16_t keycode, keyrecord_t *record ) {
/* If you want macros specific to your keymap, you need to define this function in your keymap */
return true;
}
__attribute__ ((weak))
void matrix_init_keymap() {
/* If you want a matrix init specific to your keymap, you need to define this function in your keymap */
}
__attribute__ ((weak))
void matrix_scan_keymap() {
/* If you want a matrix scan specific to your keymap, you need to define this function in your keymap */
}
__attribute__((weak))
void eeconfig_init_keymap( void ) {}
/* process_record_user() is called in macros.c */
void matrix_init_user( void ) {
matrix_init_keymap();
}
void matrix_scan_user( void ) {
matrix_scan_keymap();
}
void eeconfig_init_user( void ) {
eeconfig_init_keymap();
keyboard_init();
}

View File

@ -1,17 +0,0 @@
#pragma once
#include "quantum.h"
#ifdef UNICODE_ENABLE
#include "macros.h"
#endif
#ifdef TAP_DANCE_ENABLE
#include "tap-dance.h"
#endif
bool process_record_keymap( uint16_t keycode, keyrecord_t *record );
void matrix_init_keymap( void );
void matrix_scan_keymap( void );

View File

@ -1,160 +0,0 @@
#include "d4mation.h"
#include "tap-hold.h"
#include "zalgo.h"
#include "macros.h"
bool zalgo_enabled = false;
bool process_record_user( uint16_t keycode, keyrecord_t *record ) {
switch ( keycode ) {
case _GRAVE_ESC:
/* Send ` on Tap, Esc on Hold */
tap_or_hold( record, KC_GRAVE, KC_ESC );
return false;
break;
case PHPOPEN:
if ( record->event.pressed ) {
tap_code16( S( KC_COMMA ) );
tap_code16( S( KC_SLASH ) );
tap_code( KC_P );
tap_code( KC_H );
tap_code( KC_P );
}
return false;
break;
case PHPCLSE:
if ( record->event.pressed ) {
tap_code16( S( KC_SLASH ) );
tap_code16( S( KC_DOT ) );
}
return false;
break;
#ifdef UNICODE_ENABLE
case AMENO: /* ༼ つ ◕_◕ ༽つ */
if ( record->event.pressed ) {
send_unicode_hex_string( "0F3C 0020 3064 0020 25D5 005F 25D5 0020 0F3D 3064" );
}
return false;
break;
case MAGIC: /* (∩ ͡° ͜ʖ ͡°)⊃━☆゚. * */
if ( record->event.pressed ) {
send_unicode_hex_string( "0028 2229 0020 0361 00B0 0020 035C 0296 0020 0361 00B0 0029 2283 2501 2606 FF9F 002E 0020 002A" );
}
return false;
break;
case LENNY: /* ( ͡° ͜ʖ ͡°) */
if ( record->event.pressed ) {
send_unicode_hex_string( "0028 0020 0361 00B0 0020 035C 0296 0020 0361 00b0 0029" );
}
return false;
break;
case DISFACE: /* ಠ_ಠ */
if ( record->event.pressed ) {
send_unicode_hex_string( "0CA0 005F 0CA0" );
}
return false;
break;
case TFLIP: /* (╯°□°)╯ ︵ ┻━┻ */
if ( record->event.pressed ) {
send_unicode_hex_string( "0028 256F 00b0 25A1 00B0 0029 256F FE35 253B 2501 253B" );
}
return false;
break;
case TPUT: /* ┬──┬ ( ゜-゜ノ) */
if ( record->event.pressed ) {
send_unicode_hex_string( "252C 2500 2500 252C 0020 30CE 0028 0020 309C 002D 309C 30CE 0029" );
}
return false;
break;
case SHRUG: /* ¯\_(ツ)_/¯ */
if ( record->event.pressed ) {
send_unicode_hex_string( "00AF 005C 005F 0028 30C4 0029 005F 002F 00AF" );
}
return false;
break;
case ZALGO: /* Toggles Zalgo Text mode */
if ( record->event.pressed ) {
zalgo_enabled = ! zalgo_enabled;
}
return false;
break;
#endif
default:
#ifdef UNICODE_ENABLE
if ( zalgo_enabled ) {
if ( keycode < KC_A || ( keycode > KC_0 && keycode < KC_MINUS ) || keycode > KC_SLASH ) {
process_record_keymap( keycode, record );
return true;
}
if ( record->event.pressed ) {
zalgo_text( keycode );
}
return false;
}
#endif
break;
}
process_record_keymap( keycode, record );
return true;
};

View File

@ -1,23 +0,0 @@
#pragma once
#include "quantum.h"
#include "tap-hold.h"
#include "zalgo.h"
#define SCRGB LCTL( LSFT( LGUI( KC_4 ) ) ) /* Mac Screen Area Grab shortcut (Puts into Clipboard) */
#define SLEEP LALT( LGUI( KC_SYSTEM_POWER ) ) /* Instant sleep on Mac, rather than having to hold down the button */
enum custom_keycodes {
_GRAVE_ESC = SAFE_RANGE, /* Prefixed with underscore to prevent conflicts */
PHPOPEN, /* <?php */
PHPCLSE, /* ?> */
AMENO,
MAGIC,
LENNY,
DISFACE,
TFLIP,
TPUT,
SHRUG,
ZALGO,
NEW_SAFE_RANGE
};

View File

@ -1,15 +0,0 @@
SRC += d4mation.c \
tap-hold.c \
macros.c
BOOTMAGIC_ENABLE = no
LTO_ENABLE = yes
MOUSEKEY_ENABLE = no
ifeq ($(strip $(UNICODE_ENABLE)), yes)
SRC += zalgo.c
endif
ifeq ($(strip $(TAP_DANCE_ENABLE)), yes)
SRC += tap-dance.c
endif

View File

@ -1,6 +0,0 @@
#include "tap-dance.h"
qk_tap_dance_action_t tap_dance_actions[] = {
/* Tap once/hold for Shift, tap twice for Caps Lock */
[SHIFT_CAPS] = ACTION_TAP_DANCE_DOUBLE( KC_LSHIFT, KC_CAPS )
};

View File

@ -1,7 +0,0 @@
#pragma once
#include "quantum.h"
enum tap_dance {
SHIFT_CAPS = 0
};

View File

@ -1,28 +0,0 @@
#include "tap-hold.h"
#ifndef TAP_HOLD_TIME
#define TAP_HOLD_TIME 200
#endif
uint16_t tap_hold_timer;
void tap_or_hold( keyrecord_t *record, uint16_t tap, uint16_t hold ) {
if ( record->event.pressed ) {
tap_hold_timer = timer_read();
} else {
if ( tap_hold_timer &&
timer_elapsed( tap_hold_timer ) > TAP_HOLD_TIME ) {
/* Held down then released */
tap_code( hold );
} else {
/* Quickly Tapped */
tap_code( tap );
}
tap_hold_timer = 0;
}
}

Some files were not shown because too many files have changed in this diff Show More