Remove action_function()
from LFKeyboards boards (#15993)
This commit is contained in:
parent
4ef11f0905
commit
8ec18d1476
26 changed files with 716 additions and 1257 deletions
|
@ -37,7 +37,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
* |-----------------------------------------------------------|
|
* |-----------------------------------------------------------|
|
||||||
* | |Lef|Dow|Rig| | | | | | |Hom|PgU| |
|
* | |Lef|Dow|Rig| | | | | | |Hom|PgU| |
|
||||||
* |-----------------------------------------------------------|
|
* |-----------------------------------------------------------|
|
||||||
* | | |App|Fn1|Fn2|Fn3|VoD|VoU|Mut|End|PgD| | |
|
* | | |App| | | |VoD|VoU|Mut|End|PgD| | |
|
||||||
* |-----------------------------------------------------------|
|
* |-----------------------------------------------------------|
|
||||||
* | | | | | | | | |
|
* | | | | | | | | |
|
||||||
* `-----------------------------------------------------------'
|
* `-----------------------------------------------------------'
|
||||||
|
@ -47,7 +47,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||||
KC_TRNS,KC_TRNS,KC_UP, KC_TRNS,KC_TRNS,KC_TRNS,KC_CALC,KC_TRNS,KC_INS, KC_TRNS,KC_PSCR,KC_SLCK,KC_PAUS,KC_TRNS,KC_TRNS,
|
KC_TRNS,KC_TRNS,KC_UP, KC_TRNS,KC_TRNS,KC_TRNS,KC_CALC,KC_TRNS,KC_INS, KC_TRNS,KC_PSCR,KC_SLCK,KC_PAUS,KC_TRNS,KC_TRNS,
|
||||||
BL_BRTG,KC_LEFT,KC_DOWN,KC_RGHT,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_HOME,KC_PGUP,KC_TRNS,KC_TRNS,KC_TRNS,
|
BL_BRTG,KC_LEFT,KC_DOWN,KC_RGHT,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_HOME,KC_PGUP,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||||
BL_STEP,KC_NO, KC_TRNS,KC_APP, KC_FN1, KC_FN2, KC_FN3, KC_VOLD,KC_VOLU,KC_MUTE,KC_END, KC_PGDN,KC_TRNS,KC_TRNS,KC_TRNS,
|
BL_STEP,KC_NO, KC_TRNS,KC_APP, KC_TRNS,KC_TRNS,KC_TRNS,KC_VOLD,KC_VOLU,KC_MUTE,KC_END, KC_PGDN,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||||
KC_SLEP,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS)
|
KC_SLEP,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS)
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -98,62 +98,6 @@ bool process_record_kb(uint16_t keycode, keyrecord_t* record)
|
||||||
return process_record_user(keycode, record);
|
return process_record_user(keycode, record);
|
||||||
}
|
}
|
||||||
|
|
||||||
void action_function(keyrecord_t *event, uint8_t id, uint8_t opt)
|
|
||||||
{
|
|
||||||
#ifdef AUDIO_ENABLE
|
|
||||||
int8_t sign = 1;
|
|
||||||
#endif
|
|
||||||
if(id == LFK_ESC_TILDE){
|
|
||||||
// Send ~ on shift-esc
|
|
||||||
void (*method)(uint8_t) = (event->event.pressed) ? &add_key : &del_key;
|
|
||||||
uint8_t shifted = get_mods() & (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT));
|
|
||||||
method(shifted ? KC_GRAVE : KC_ESCAPE);
|
|
||||||
send_keyboard_report();
|
|
||||||
}else if(event->event.pressed){
|
|
||||||
switch(id){
|
|
||||||
case LFK_SET_DEFAULT_LAYER:
|
|
||||||
// set/save the current base layer to eeprom, falls through to LFK_CLEAR
|
|
||||||
eeconfig_update_default_layer(1UL << opt);
|
|
||||||
default_layer_set(1UL << opt);
|
|
||||||
case LFK_CLEAR:
|
|
||||||
// Go back to default layer
|
|
||||||
layer_clear();
|
|
||||||
break;
|
|
||||||
#ifdef AUDIO_ENABLE
|
|
||||||
case LFK_CLICK_FREQ_LOWER:
|
|
||||||
sign = -1; // continue to next statement
|
|
||||||
case LFK_CLICK_FREQ_HIGHER:
|
|
||||||
click_hz += sign * 100;
|
|
||||||
click(click_hz, click_time);
|
|
||||||
break;
|
|
||||||
case LFK_CLICK_TOGGLE:
|
|
||||||
if(click_toggle){
|
|
||||||
click_toggle = 0;
|
|
||||||
click(4000, 100);
|
|
||||||
click(1000, 100);
|
|
||||||
}else{
|
|
||||||
click_toggle = 1;
|
|
||||||
click(1000, 100);
|
|
||||||
click(4000, 100);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case LFK_CLICK_TIME_SHORTER:
|
|
||||||
sign = -1; // continue to next statement
|
|
||||||
case LFK_CLICK_TIME_LONGER:
|
|
||||||
click_time += sign;
|
|
||||||
click(click_hz, click_time);
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
case LFK_DEBUG_SETTINGS:
|
|
||||||
dprintf("Click:\n");
|
|
||||||
dprintf(" toggle: %d\n", click_toggle);
|
|
||||||
dprintf(" freq(hz): %d\n", click_hz);
|
|
||||||
dprintf(" duration(ms): %d\n", click_time);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void reset_keyboard_kb(){
|
void reset_keyboard_kb(){
|
||||||
#ifdef WATCHDOG_ENABLE
|
#ifdef WATCHDOG_ENABLE
|
||||||
MCUSR = 0;
|
MCUSR = 0;
|
||||||
|
|
|
@ -19,19 +19,6 @@ typedef struct Layer_Info {
|
||||||
extern const uint32_t layer_count;
|
extern const uint32_t layer_count;
|
||||||
extern const Layer_Info layer_info[];
|
extern const Layer_Info layer_info[];
|
||||||
|
|
||||||
enum action_functions {
|
|
||||||
LFK_CLEAR = 0, // Resets all layers
|
|
||||||
LFK_ESC_TILDE, // esc+lshift = ~
|
|
||||||
LFK_SET_DEFAULT_LAYER, // changes and saves current base layer to eeprom
|
|
||||||
LFK_CLICK_TOGGLE, // Adjusts click duration
|
|
||||||
LFK_CLICK_FREQ_HIGHER, // Adjusts click frequency
|
|
||||||
LFK_CLICK_FREQ_LOWER, // Adjusts click frequency
|
|
||||||
LFK_CLICK_TIME_LONGER, // Adjusts click duration
|
|
||||||
LFK_CLICK_TIME_SHORTER, // Adjusts click duration
|
|
||||||
LFK_DEBUG_SETTINGS, // prints LED and click settings to HID
|
|
||||||
LFK_LED_TEST // cycles through switch and RGB LEDs
|
|
||||||
};
|
|
||||||
|
|
||||||
#define CLICK_HZ 500
|
#define CLICK_HZ 500
|
||||||
#define CLICK_MS 2
|
#define CLICK_MS 2
|
||||||
#define CLICK_ENABLED 0
|
#define CLICK_ENABLED 0
|
||||||
|
|
|
@ -1,18 +1,11 @@
|
||||||
#include QMK_KEYBOARD_H
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
//Define a shorter 'transparent' key code to make the keymaps more compact
|
|
||||||
#define KC_TR KC_TRNS
|
|
||||||
|
|
||||||
enum keymap_layout {
|
enum keymap_layout {
|
||||||
BASE = 0,
|
BASE = 0,
|
||||||
FUNC,
|
FUNC,
|
||||||
};
|
};
|
||||||
|
|
||||||
// #define uint16_t int
|
|
||||||
// #define uint8_t int
|
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
[BASE] = LAYOUT_ansi(
|
|
||||||
/* Keymap VANILLA: (Base Layer) Default Layer
|
/* Keymap VANILLA: (Base Layer) Default Layer
|
||||||
* ,------------------------------------------------------------.----.
|
* ,------------------------------------------------------------.----.
|
||||||
* |Esc~| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0| - | = |Backspa| Ins|
|
* |Esc~| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0| - | = |Backspa| Ins|
|
||||||
|
@ -26,13 +19,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
* |Ctrl|Win |Alt | Space |Alt |Ctrl|Func|Lft| Dn |Rig |
|
* |Ctrl|Win |Alt | Space |Alt |Ctrl|Func|Lft| Dn |Rig |
|
||||||
* `-----------------------------------------------------------------'
|
* `-----------------------------------------------------------------'
|
||||||
*/
|
*/
|
||||||
|
[BASE] = LAYOUT_ansi(
|
||||||
KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS,
|
KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS,
|
||||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL,
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL,
|
||||||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP,
|
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP,
|
||||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN,
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN,
|
||||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, MO(FUNC), KC_LEFT, KC_DOWN, KC_RGHT),
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, MO(FUNC), KC_LEFT, KC_DOWN, KC_RGHT
|
||||||
|
),
|
||||||
|
|
||||||
[FUNC] = LAYOUT_ansi(
|
|
||||||
/* Keymap VANILLA: Function Layer
|
/* Keymap VANILLA: Function Layer
|
||||||
* ,------------------------------------------------------------.----.
|
* ,------------------------------------------------------------.----.
|
||||||
* |Esc~| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0| - | = |Backspa| Ins|
|
* |Esc~| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0| - | = |Backspa| Ins|
|
||||||
|
@ -46,9 +40,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
* |Ctrl|Win |Alt | Space |Alt |Ctrl|Func|Lft| Dn |Rig |
|
* |Ctrl|Win |Alt | Space |Alt |Ctrl|Func|Lft| Dn |Rig |
|
||||||
* `-----------------------------------------------------------------'
|
* `-----------------------------------------------------------------'
|
||||||
*/
|
*/
|
||||||
|
[FUNC] = LAYOUT_ansi(
|
||||||
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_F13, KC_F14,
|
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_F13, KC_F14,
|
||||||
MU_MOD, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, RGB_TOG,
|
MU_MOD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG,
|
||||||
AU_TOG, F(1),F(3), KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, RESET, RGB_MOD,
|
AU_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, RGB_MOD,
|
||||||
F(5), F(2),F(4), KC_TR, KC_TR, KC_TR, KC_TR, MU_TOG, RGB_VAD, RGB_VAI, KC_TR, KC_TR, RGB_HUI, KC_TR,
|
_______, _______, _______, _______, _______, _______, _______, MU_TOG, RGB_VAD, RGB_VAI, _______, _______, RGB_HUI, _______,
|
||||||
KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, RGB_SAD, RGB_HUD, RGB_SAI),
|
_______, _______, _______, _______, _______, _______, _______, RGB_SAD, RGB_HUD, RGB_SAI
|
||||||
|
)
|
||||||
};
|
};
|
||||||
|
|
|
@ -15,14 +15,12 @@ enum {
|
||||||
|
|
||||||
bool spam_space = false;
|
bool spam_space = false;
|
||||||
|
|
||||||
|
|
||||||
// {0x00000000, 0xFFFFFFFF, {0x0000, 0x0FFF, 0x0000}}, // base layer - green
|
// {0x00000000, 0xFFFFFFFF, {0x0000, 0x0FFF, 0x0000}}, // base layer - green
|
||||||
// {0x00000008, 0xFFFFFFF8, {0x07FF, 0x07FF, 0x0000}}, // CSGO layer - orange
|
// {0x00000008, 0xFFFFFFF8, {0x07FF, 0x07FF, 0x0000}}, // CSGO layer - orange
|
||||||
// {0x00000010, 0xFFFFFFF0, {0x0000, 0x0000, 0x0FFF}}, // function layer - blue
|
// {0x00000010, 0xFFFFFFF0, {0x0000, 0x0000, 0x0FFF}}, // function layer - blue
|
||||||
// {0x00000020, 0xFFFFFFE0, {0x0FFF, 0x0000, 0x0FFF}}, // settings layer - magenta
|
// {0x00000020, 0xFFFFFFE0, {0x0FFF, 0x0000, 0x0FFF}}, // settings layer - magenta
|
||||||
// {0xFFFFFFFF, 0xFFFFFFFF, {0x0FFF, 0x0FFF, 0x0FFF}}, // unknown layer - REQUIRED - white
|
// {0xFFFFFFFF, 0xFFFFFFFF, {0x0FFF, 0x0FFF, 0x0FFF}}, // unknown layer - REQUIRED - white
|
||||||
|
|
||||||
|
|
||||||
// Colors of the layer indicator LED
|
// Colors of the layer indicator LED
|
||||||
// This list needs to define layer 0xFFFFFFFF, it is the end of the list, and the unknown layer
|
// This list needs to define layer 0xFFFFFFFF, it is the end of the list, and the unknown layer
|
||||||
const Layer_Info layer_info[] = {
|
const Layer_Info layer_info[] = {
|
||||||
|
@ -49,19 +47,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
* `---------' `------------------------------------------------------' `-------------'
|
* `---------' `------------------------------------------------------' `-------------'
|
||||||
*/
|
*/
|
||||||
[VANILLA] = LAYOUT_split_rshift(
|
[VANILLA] = LAYOUT_split_rshift(
|
||||||
KC_VOLD, KC_VOLU, KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, LALT(KC_F5), KC_PGUP, \
|
KC_VOLD, KC_VOLU, KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, LALT(KC_F5), KC_PGUP,
|
||||||
KC_F3, KC_F4, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_PGDN, \
|
KC_F3, KC_F4, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_PGDN,
|
||||||
KC_F5, KC_F6, TD(TD_ESC_FUNC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \
|
KC_F5, KC_F6, TD(TD_ESC_FUNC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
|
||||||
KC_F7, KC_F8, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(CS_GO), KC_UP, \
|
KC_F7, KC_F8, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(CS_GO), KC_UP,
|
||||||
KC_F9, KC_F10, KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RCTL, MO(FUNC), KC_LEFT, KC_DOWN, KC_RGHT \
|
KC_F9, KC_F10, KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RCTL, MO(FUNC), KC_LEFT, KC_DOWN, KC_RGHT
|
||||||
),
|
),
|
||||||
|
|
||||||
[CS_GO] = LAYOUT_split_rshift(
|
[CS_GO] = LAYOUT_split_rshift(
|
||||||
_______, _______, KC_GESC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, F(0), _______, \
|
_______, _______, KC_GESC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, F(0), _______,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
_______, _______, KC_LCTL, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
_______, _______, KC_LCTL, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
),
|
),
|
||||||
|
|
||||||
/* Keymap FUNCTION: Function Layer
|
/* Keymap FUNCTION: Function Layer
|
||||||
|
@ -78,11 +76,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
* `---------' `------------------------------------------------------' `-------------'
|
* `---------' `------------------------------------------------------' `-------------'
|
||||||
*/
|
*/
|
||||||
[FUNC] = LAYOUT_split_rshift(
|
[FUNC] = LAYOUT_split_rshift(
|
||||||
_______, _______, KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, TO(CS_GO), KC_HOME, \
|
_______, _______, KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, TO(CS_GO), KC_HOME,
|
||||||
_______, _______, XXXXXXX, KC_PGUP, KC_UP, KC_PGDN, KC_HOME, XXXXXXX, XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, KC_END, \
|
_______, _______, XXXXXXX, KC_PGUP, KC_UP, KC_PGDN, KC_HOME, XXXXXXX, XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, KC_END,
|
||||||
_______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, XXXXXXX, \
|
_______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
_______, _______, _______, XXXXXXX, KC_DEL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, TG(SETTINGS), XXXXXXX, _______, \
|
_______, _______, _______, XXXXXXX, KC_DEL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, TG(SETTINGS), XXXXXXX, _______,
|
||||||
_______, _______, _______, _______, _______, KC_PGDN, _______, _______, _______, _______, _______, _______ \
|
_______, _______, _______, _______, _______, KC_PGDN, _______, _______, _______, _______, _______, _______
|
||||||
),
|
),
|
||||||
|
|
||||||
/* Keymap SETTINGS: Settings Layer
|
/* Keymap SETTINGS: Settings Layer
|
||||||
|
@ -99,15 +97,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
* `---------' `------------------------------------------------------' `--------------'
|
* `---------' `------------------------------------------------------' `--------------'
|
||||||
*/
|
*/
|
||||||
[SETTINGS] = LAYOUT_split_rshift(
|
[SETTINGS] = LAYOUT_split_rshift(
|
||||||
XXXXXXX, XXXXXXX, F(0), F(3), F(4), F(5), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, BL_DEC, BL_INC, BL_TOGG, RGB_TOG, RGB_VAI, \
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, BL_DEC, BL_INC, BL_TOGG, RGB_TOG, RGB_VAI,
|
||||||
XXXXXXX, XXXXXXX, DEBUG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_MOD, RGB_VAD, \
|
XXXXXXX, XXXXXXX, DEBUG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_MOD, RGB_VAD,
|
||||||
XXXXXXX, XXXXXXX, F(0), F(6), F(8), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET, \
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET,
|
||||||
XXXXXXX, XXXXXXX, F(10), F(7), F(9), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, F(0), XXXXXXX, RGB_HUI, \
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_HUI,
|
||||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, F(12), XXXXXXX, XXXXXXX, F(0), RGB_SAD, RGB_HUD, RGB_SAI \
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_SAD, RGB_HUD, RGB_SAI
|
||||||
),
|
)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
void tap_space_spam_finished(qk_tap_dance_state_t *state, void *user_data) {
|
void tap_space_spam_finished(qk_tap_dance_state_t *state, void *user_data) {
|
||||||
if (get_mods() & (MOD_BIT(KC_LGUI))) {
|
if (get_mods() & (MOD_BIT(KC_LGUI))) {
|
||||||
return;
|
return;
|
||||||
|
@ -115,8 +112,7 @@ void tap_space_spam_finished(qk_tap_dance_state_t *state, void *user_data) {
|
||||||
if (state->pressed) {
|
if (state->pressed) {
|
||||||
spam_space = true;
|
spam_space = true;
|
||||||
}
|
}
|
||||||
register_code(KC_SPC);
|
tap_code(KC_SPC);
|
||||||
unregister_code(KC_SPC);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void tap_space_spam_reset(qk_tap_dance_state_t *state, void *user_data) {
|
void tap_space_spam_reset(qk_tap_dance_state_t *state, void *user_data) {
|
||||||
|
@ -128,8 +124,7 @@ void tap_esc_func_finished(qk_tap_dance_state_t *state, void *user_data) {
|
||||||
if (state->pressed) {
|
if (state->pressed) {
|
||||||
layer_on(FUNC);
|
layer_on(FUNC);
|
||||||
} else {
|
} else {
|
||||||
register_code(KC_ESC);
|
tap_code(KC_ESC);
|
||||||
unregister_code(KC_ESC);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -142,31 +137,12 @@ qk_tap_dance_action_t tap_dance_actions[] = {
|
||||||
[TD_SPC_SPAM] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, tap_space_spam_finished, tap_space_spam_reset),
|
[TD_SPC_SPAM] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, tap_space_spam_finished, tap_space_spam_reset),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
const uint16_t PROGMEM fn_actions[] = {
|
|
||||||
ACTION_FUNCTION(LFK_CLEAR), // FN0 - reset layers
|
|
||||||
ACTION_FUNCTION(LFK_ESC_TILDE), // FN1 - esc+shift = ~, else escape
|
|
||||||
ACTION_FUNCTION(LFK_LED_TEST), // FN2 - cycle through LEDs for testing
|
|
||||||
ACTION_FUNCTION_OPT(LFK_SET_DEFAULT_LAYER, VANILLA), // FN3 - set base layer to 0 and save
|
|
||||||
ACTION_FUNCTION_OPT(LFK_SET_DEFAULT_LAYER, VANILLA), // FN4 - set base layer to 1 and save
|
|
||||||
ACTION_FUNCTION_OPT(LFK_SET_DEFAULT_LAYER, VANILLA), // FN5 - set base layer to 2 and save
|
|
||||||
ACTION_FUNCTION(LFK_CLICK_FREQ_HIGHER), // FN6 - Increase Freq of audio click
|
|
||||||
ACTION_FUNCTION(LFK_CLICK_FREQ_LOWER), // FN7 - Decrease Freq of audio click
|
|
||||||
ACTION_FUNCTION(LFK_CLICK_TIME_LONGER), // FN8 - Increase length of audio click
|
|
||||||
ACTION_FUNCTION(LFK_CLICK_TIME_SHORTER), // FN9 - Decrease length of audio click
|
|
||||||
ACTION_FUNCTION(LFK_CLICK_TOGGLE), // FN10 - Toggle audio click
|
|
||||||
ACTION_FUNCTION(LFK_LED_TEST), // FN11 - cycle through LEDs for testing
|
|
||||||
ACTION_FUNCTION(LFK_DEBUG_SETTINGS), // FN12 - prints LED and click settings to HID
|
|
||||||
};
|
|
||||||
|
|
||||||
void matrix_scan_user(void) {
|
void matrix_scan_user(void) {
|
||||||
if (spam_space && !(get_mods() & (MOD_BIT(KC_LGUI)))) {
|
if (spam_space && !(get_mods() & (MOD_BIT(KC_LGUI)))) {
|
||||||
register_code(KC_SPC);
|
tap_code(KC_SPC);
|
||||||
unregister_code(KC_SPC);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
if ((layer_state & (1 << CS_GO)) && (keycode == 44)) {
|
if ((layer_state & (1 << CS_GO)) && (keycode == 44)) {
|
||||||
if (get_mods() & (MOD_BIT(KC_LGUI))) {
|
if (get_mods() & (MOD_BIT(KC_LGUI))) {
|
||||||
|
|
|
@ -73,23 +73,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
* `---------' `--------------------------------------------------------' `--------------'
|
* `---------' `--------------------------------------------------------' `--------------'
|
||||||
*/
|
*/
|
||||||
[SETTINGS] = LAYOUT(
|
[SETTINGS] = LAYOUT(
|
||||||
XXXXXXX, XXXXXXX, F(0), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, BL_DEC, BL_INC, BL_TOGG, RGB_TOG, RGB_VAI,
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, BL_DEC, BL_INC, BL_TOGG, RGB_TOG, RGB_VAI,
|
||||||
XXXXXXX, XXXXXXX, MU_MOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_MOD, RGB_VAD,
|
XXXXXXX, XXXXXXX, MU_MOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_MOD, RGB_VAD,
|
||||||
XXXXXXX, XXXXXXX, AU_TOG, F(1), F(3), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET,
|
XXXXXXX, XXXXXXX, AU_TOG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET,
|
||||||
XXXXXXX, XXXXXXX, F(5), F(2), F(4), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MU_TOG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_HUI,
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MU_TOG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_HUI,
|
||||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_SAD, RGB_HUD, RGB_SAI
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_SAD, RGB_HUD, RGB_SAI
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint16_t PROGMEM fn_actions[] = {
|
|
||||||
ACTION_FUNCTION(LFK_CLEAR), // FN0 - reset layers
|
|
||||||
ACTION_FUNCTION(LFK_CLICK_FREQ_HIGHER), // FN1 - Increase Freq of audio click
|
|
||||||
ACTION_FUNCTION(LFK_CLICK_FREQ_LOWER), // FN2 - Decrease Freq of audio click
|
|
||||||
ACTION_FUNCTION(LFK_CLICK_TIME_LONGER), // FN3 - Increase length of audio click
|
|
||||||
ACTION_FUNCTION(LFK_CLICK_TIME_SHORTER), // FN4 - Decrease length of audio click
|
|
||||||
ACTION_FUNCTION(LFK_CLICK_TOGGLE) // FN5 - Toggle audio click
|
|
||||||
};
|
|
||||||
|
|
||||||
void matrix_init_user(void) {
|
void matrix_init_user(void) {
|
||||||
// This keymap only has a single base layer, so reset the default if needed
|
// This keymap only has a single base layer, so reset the default if needed
|
||||||
if (eeconfig_read_default_layer() > 1) {
|
if (eeconfig_read_default_layer() > 1) {
|
||||||
|
|
|
@ -73,23 +73,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
* `---------' `--------------------------------------------------------' `--------------'
|
* `---------' `--------------------------------------------------------' `--------------'
|
||||||
*/
|
*/
|
||||||
[SETTINGS] = LAYOUT_iso(
|
[SETTINGS] = LAYOUT_iso(
|
||||||
XXXXXXX, XXXXXXX, F(0), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, BL_DEC, BL_INC, BL_TOGG, RGB_TOG, RGB_VAI,
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, BL_DEC, BL_INC, BL_TOGG, RGB_TOG, RGB_VAI,
|
||||||
XXXXXXX, XXXXXXX, MU_MOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_MOD, RGB_VAD,
|
XXXXXXX, XXXXXXX, MU_MOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_MOD, RGB_VAD,
|
||||||
XXXXXXX, XXXXXXX, AU_TOG, F(1), F(3), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET,
|
XXXXXXX, XXXXXXX, AU_TOG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET,
|
||||||
XXXXXXX, XXXXXXX, F(5), F(2), F(4), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MU_TOG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_HUI,
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MU_TOG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_HUI,
|
||||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_SAD, RGB_HUD, RGB_SAI
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_SAD, RGB_HUD, RGB_SAI
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint16_t PROGMEM fn_actions[] = {
|
|
||||||
ACTION_FUNCTION(LFK_CLEAR), // FN0 - reset layers
|
|
||||||
ACTION_FUNCTION(LFK_CLICK_FREQ_HIGHER), // FN1 - Increase Freq of audio click
|
|
||||||
ACTION_FUNCTION(LFK_CLICK_FREQ_LOWER), // FN2 - Decrease Freq of audio click
|
|
||||||
ACTION_FUNCTION(LFK_CLICK_TIME_LONGER), // FN3 - Increase length of audio click
|
|
||||||
ACTION_FUNCTION(LFK_CLICK_TIME_SHORTER), // FN4 - Decrease length of audio click
|
|
||||||
ACTION_FUNCTION(LFK_CLICK_TOGGLE) // FN5 - Toggle audio click
|
|
||||||
};
|
|
||||||
|
|
||||||
void matrix_init_user(void) {
|
void matrix_init_user(void) {
|
||||||
// This keymap only has a single base layer, so reset the default if needed
|
// This keymap only has a single base layer, so reset the default if needed
|
||||||
if (eeconfig_read_default_layer() > 1) {
|
if (eeconfig_read_default_layer() > 1) {
|
||||||
|
|
|
@ -73,23 +73,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
* `---------' `--------------------------------------------------------' `--------------'
|
* `---------' `--------------------------------------------------------' `--------------'
|
||||||
*/
|
*/
|
||||||
[SETTINGS] = LAYOUT_split_bs(
|
[SETTINGS] = LAYOUT_split_bs(
|
||||||
XXXXXXX, XXXXXXX, F(0), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, BL_DEC, BL_INC, XXXXXXX, XXXXXXX, RGB_TOG, RGB_VAI,
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, BL_DEC, BL_INC, XXXXXXX, XXXXXXX, RGB_TOG, RGB_VAI,
|
||||||
XXXXXXX, XXXXXXX, MU_MOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, BL_TOGG, RGB_MOD, RGB_VAD,
|
XXXXXXX, XXXXXXX, MU_MOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, BL_TOGG, RGB_MOD, RGB_VAD,
|
||||||
XXXXXXX, XXXXXXX, AU_TOG, F(1), F(3), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET,
|
XXXXXXX, XXXXXXX, AU_TOG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET,
|
||||||
XXXXXXX, XXXXXXX, F(5), F(2), F(4), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MU_TOG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_HUI,
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MU_TOG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_HUI,
|
||||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_SAD, RGB_HUD, RGB_SAI
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_SAD, RGB_HUD, RGB_SAI
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint16_t PROGMEM fn_actions[] = {
|
|
||||||
ACTION_FUNCTION(LFK_CLEAR), // FN0 - reset layers
|
|
||||||
ACTION_FUNCTION(LFK_CLICK_FREQ_HIGHER), // FN1 - Increase Freq of audio click
|
|
||||||
ACTION_FUNCTION(LFK_CLICK_FREQ_LOWER), // FN2 - Decrease Freq of audio click
|
|
||||||
ACTION_FUNCTION(LFK_CLICK_TIME_LONGER), // FN3 - Increase length of audio click
|
|
||||||
ACTION_FUNCTION(LFK_CLICK_TIME_SHORTER), // FN4 - Decrease length of audio click
|
|
||||||
ACTION_FUNCTION(LFK_CLICK_TOGGLE) // FN5 - Toggle audio click
|
|
||||||
};
|
|
||||||
|
|
||||||
void matrix_init_user(void) {
|
void matrix_init_user(void) {
|
||||||
// This keymap only has a single base layer, so reset the default if needed
|
// This keymap only has a single base layer, so reset the default if needed
|
||||||
if (eeconfig_read_default_layer() > 1) {
|
if (eeconfig_read_default_layer() > 1) {
|
||||||
|
|
|
@ -134,73 +134,6 @@ bool process_record_kb(uint16_t keycode, keyrecord_t* record) {
|
||||||
return process_record_user(keycode, record);
|
return process_record_user(keycode, record);
|
||||||
}
|
}
|
||||||
|
|
||||||
void action_function(keyrecord_t *event, uint8_t id, uint8_t opt) {
|
|
||||||
#ifdef AUDIO_ENABLE
|
|
||||||
int8_t sign = 1;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (id == LFK_ESC_TILDE) {
|
|
||||||
// Send ~ on shift-esc
|
|
||||||
void (*method)(uint8_t) = (event->event.pressed) ? &add_key : &del_key;
|
|
||||||
uint8_t shifted = get_mods() & (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT));
|
|
||||||
|
|
||||||
if (layer_state == 0) {
|
|
||||||
method(shifted ? KC_GRAVE : KC_ESCAPE);
|
|
||||||
} else {
|
|
||||||
method(shifted ? KC_ESCAPE : KC_GRAVE);
|
|
||||||
}
|
|
||||||
|
|
||||||
send_keyboard_report();
|
|
||||||
} else if (event->event.pressed) {
|
|
||||||
switch (id) {
|
|
||||||
case LFK_SET_DEFAULT_LAYER:
|
|
||||||
// set/save the current base layer to eeprom, falls through to LFK_CLEAR
|
|
||||||
eeconfig_update_default_layer(1UL << opt);
|
|
||||||
default_layer_set(1UL << opt);
|
|
||||||
case LFK_CLEAR:
|
|
||||||
// Go back to default layer
|
|
||||||
layer_clear();
|
|
||||||
break;
|
|
||||||
#ifdef ISSI_ENABLE
|
|
||||||
case LFK_LED_TEST:
|
|
||||||
led_test();
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
#ifdef AUDIO_ENABLE
|
|
||||||
case LFK_CLICK_FREQ_LOWER:
|
|
||||||
sign = -1; // continue to next statement
|
|
||||||
case LFK_CLICK_FREQ_HIGHER:
|
|
||||||
click_hz += sign * 100;
|
|
||||||
click(click_hz, click_time);
|
|
||||||
break;
|
|
||||||
case LFK_CLICK_TOGGLE:
|
|
||||||
if (click_toggle) {
|
|
||||||
click_toggle = 0;
|
|
||||||
click(4000, 100);
|
|
||||||
click(1000, 100);
|
|
||||||
} else {
|
|
||||||
click_toggle = 1;
|
|
||||||
click(1000, 100);
|
|
||||||
click(4000, 100);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case LFK_CLICK_TIME_SHORTER:
|
|
||||||
sign = -1; // continue to next statement
|
|
||||||
case LFK_CLICK_TIME_LONGER:
|
|
||||||
click_time += sign;
|
|
||||||
click(click_hz, click_time);
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
case LFK_DEBUG_SETTINGS:
|
|
||||||
dprintf("Click:\n");
|
|
||||||
dprintf(" toggle: %d\n", click_toggle);
|
|
||||||
dprintf(" freq(hz): %d\n", click_hz);
|
|
||||||
dprintf(" duration(ms): %d\n", click_time);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void reset_keyboard_kb() {
|
void reset_keyboard_kb() {
|
||||||
#ifdef WATCHDOG_ENABLE
|
#ifdef WATCHDOG_ENABLE
|
||||||
MCUSR = 0;
|
MCUSR = 0;
|
||||||
|
|
|
@ -25,19 +25,6 @@ typedef struct Layer_Info {
|
||||||
extern const uint32_t layer_count;
|
extern const uint32_t layer_count;
|
||||||
extern const Layer_Info layer_info[];
|
extern const Layer_Info layer_info[];
|
||||||
|
|
||||||
enum action_functions {
|
|
||||||
LFK_CLEAR = 0, // Resets all layers
|
|
||||||
LFK_ESC_TILDE, // esc+lshift = ~
|
|
||||||
LFK_SET_DEFAULT_LAYER, // changes and saves current base layer to eeprom
|
|
||||||
LFK_CLICK_TOGGLE, // Adjusts click duration
|
|
||||||
LFK_CLICK_FREQ_HIGHER, // Adjusts click frequency
|
|
||||||
LFK_CLICK_FREQ_LOWER, // Adjusts click frequency
|
|
||||||
LFK_CLICK_TIME_LONGER, // Adjusts click duration
|
|
||||||
LFK_CLICK_TIME_SHORTER, // Adjusts click duration
|
|
||||||
LFK_DEBUG_SETTINGS, // prints LED and click settings to HID
|
|
||||||
LFK_LED_TEST // cycles through switch and RGB LEDs
|
|
||||||
};
|
|
||||||
|
|
||||||
#define CLICK_HZ 500
|
#define CLICK_HZ 500
|
||||||
#define CLICK_MS 2
|
#define CLICK_MS 2
|
||||||
#define CLICK_ENABLED 0
|
#define CLICK_ENABLED 0
|
||||||
|
|
|
@ -13,7 +13,6 @@ enum {
|
||||||
TD_ESC_FUNC = 0,
|
TD_ESC_FUNC = 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// Colors of the layer indicator LED
|
// Colors of the layer indicator LED
|
||||||
// This list needs to define layer 0xFFFFFFFF, it is the end of the list, and the unknown layer
|
// This list needs to define layer 0xFFFFFFFF, it is the end of the list, and the unknown layer
|
||||||
const Layer_Info layer_info[] = {
|
const Layer_Info layer_info[] = {
|
||||||
|
@ -25,7 +24,6 @@ const Layer_Info layer_info[] = {
|
||||||
{0xFFFFFFFF, 0xFFFFFFFF, {0x0FFF, 0x0FFF, 0x0FFF}}, // unknown layer - REQUIRED - white
|
{0xFFFFFFFF, 0xFFFFFFFF, {0x0FFF, 0x0FFF, 0x0FFF}}, // unknown layer - REQUIRED - white
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
/* Keymap VANILLA: (Base Layer) Default Layer
|
/* Keymap VANILLA: (Base Layer) Default Layer
|
||||||
* ,-----------------------------------------------------------------------------.
|
* ,-----------------------------------------------------------------------------.
|
||||||
|
@ -43,12 +41,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
* `-----------------------------------------------------------' `-------------'
|
* `-----------------------------------------------------------' `-------------'
|
||||||
*/
|
*/
|
||||||
[VANILLA] = LAYOUT_tkl_ansi(
|
[VANILLA] = LAYOUT_tkl_ansi(
|
||||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_0, KC_1, KC_2, KC_3, KC_4, KC_5, \
|
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_0, KC_1, KC_2, KC_3, KC_4, KC_5,
|
||||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, \
|
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP,
|
||||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, \
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN,
|
||||||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \
|
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
|
||||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, \
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP,
|
||||||
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RCTL, MO(FUNC), MO(SETTINGS), KC_LEFT, KC_DOWN, KC_RGHT \
|
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RCTL, MO(FUNC), MO(SETTINGS), KC_LEFT, KC_DOWN, KC_RGHT
|
||||||
),
|
),
|
||||||
|
|
||||||
/* Keymap DEFAULT_TKL: (Base Layer) Default Layer
|
/* Keymap DEFAULT_TKL: (Base Layer) Default Layer
|
||||||
|
@ -67,12 +65,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
* `-----------------------------------------------------------' `-------------'
|
* `-----------------------------------------------------------' `-------------'
|
||||||
*/
|
*/
|
||||||
[DEFAULT_WKL] = LAYOUT_tkl_ansi(
|
[DEFAULT_WKL] = LAYOUT_tkl_ansi(
|
||||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, \
|
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS,
|
||||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, \
|
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP,
|
||||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, \
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN,
|
||||||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \
|
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
|
||||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, \
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP,
|
||||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, MO(FUNC), KC_LEFT, KC_DOWN, KC_RGHT \
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, MO(FUNC), KC_LEFT, KC_DOWN, KC_RGHT
|
||||||
),
|
),
|
||||||
|
|
||||||
/* Keymap DEFAULT_OSX: (Base Layer) Default Layer
|
/* Keymap DEFAULT_OSX: (Base Layer) Default Layer
|
||||||
|
@ -91,21 +89,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
* `-----------------------------------------------------------' `-------------'
|
* `-----------------------------------------------------------' `-------------'
|
||||||
*/
|
*/
|
||||||
[DEFAULT_OSX] = LAYOUT_tkl_ansi(
|
[DEFAULT_OSX] = LAYOUT_tkl_ansi(
|
||||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_SLCK, KC_PAUS, LALT(KC_F5), \
|
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_SLCK, KC_PAUS, LALT(KC_F5),
|
||||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, \
|
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP,
|
||||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, \
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN,
|
||||||
TD(TD_ESC_FUNC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \
|
TD(TD_ESC_FUNC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
|
||||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, \
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP,
|
||||||
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RCTL, MO(FUNC), MO(SETTINGS), KC_LEFT, KC_DOWN, KC_RGHT \
|
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RCTL, MO(FUNC), MO(SETTINGS), KC_LEFT, KC_DOWN, KC_RGHT
|
||||||
),
|
),
|
||||||
|
|
||||||
[CS_GO] = LAYOUT_tkl_ansi(
|
[CS_GO] = LAYOUT_tkl_ansi(
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, F(0), _______, _______, \
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
KC_LCTL, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
KC_LCTL, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
),
|
),
|
||||||
|
|
||||||
/* Keymap FUNCTION: Function Layer
|
/* Keymap FUNCTION: Function Layer
|
||||||
|
@ -124,12 +122,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
* `------------------------------------------------------' `-------------'
|
* `------------------------------------------------------' `-------------'
|
||||||
*/
|
*/
|
||||||
[FUNC] = LAYOUT_tkl_ansi(
|
[FUNC] = LAYOUT_tkl_ansi(
|
||||||
KC_ESC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, \
|
KC_ESC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, TO(CS_GO), _______, _______, \
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, TO(CS_GO), _______, _______,
|
||||||
XXXXXXX, KC_PGUP, KC_UP, KC_PGDN, KC_HOME, XXXXXXX, XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, \
|
XXXXXXX, KC_PGUP, KC_UP, KC_PGDN, KC_HOME, XXXXXXX, XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______,
|
||||||
_______, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, XXXXXXX, \
|
_______, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
_______, XXXXXXX, KC_DEL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, TG(SETTINGS), _______, \
|
_______, XXXXXXX, KC_DEL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, TG(SETTINGS), _______,
|
||||||
_______, _______, _______, KC_PGDN, _______, _______, _______, _______, _______, _______, _______ \
|
_______, _______, _______, KC_PGDN, _______, _______, _______, _______, _______, _______, _______
|
||||||
),
|
),
|
||||||
|
|
||||||
/* Keymap SETTINGS: Settings Layer
|
/* Keymap SETTINGS: Settings Layer
|
||||||
|
@ -148,21 +146,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
* `------------------------------------------------------' `--------------'
|
* `------------------------------------------------------' `--------------'
|
||||||
*/
|
*/
|
||||||
[SETTINGS] = LAYOUT_tkl_ansi(
|
[SETTINGS] = LAYOUT_tkl_ansi(
|
||||||
F(13), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, BL_DEC, XXXXXXX, XXXXXXX, XXXXXXX, \
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, BL_DEC, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
F(0), F(3), F(4), F(5), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, BL_DEC, BL_INC, BL_TOGG, RGB_TOG, RGB_VAI, XXXXXXX, \
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, BL_DEC, BL_INC, BL_TOGG, RGB_TOG, RGB_VAI, XXXXXXX,
|
||||||
MU_MOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, F(2), RGB_MOD, RGB_VAD, XXXXXXX, \
|
MU_MOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_MOD, RGB_VAD, XXXXXXX,
|
||||||
AU_TOG, F(6), F(8), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET, \
|
AU_TOG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET,
|
||||||
F(10), F(7), F(9), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MU_TOG, XXXXXXX, XXXXXXX, XXXXXXX, F(0), RGB_HUI, \
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MU_TOG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_HUI,
|
||||||
XXXXXXX, XXXXXXX, XXXXXXX, F(12), XXXXXXX, XXXXXXX, XXXXXXX, _______, RGB_SAD, RGB_HUD, RGB_SAI \
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, RGB_SAD, RGB_HUD, RGB_SAI
|
||||||
),
|
)
|
||||||
};
|
};
|
||||||
|
|
||||||
void tap_esc_func_finished(qk_tap_dance_state_t *state, void *user_data) {
|
void tap_esc_func_finished(qk_tap_dance_state_t *state, void *user_data) {
|
||||||
if (state->pressed) {
|
if (state->pressed) {
|
||||||
layer_on(FUNC);
|
layer_on(FUNC);
|
||||||
} else {
|
} else {
|
||||||
register_code(KC_ESC);
|
tap_code(KC_ESC);
|
||||||
unregister_code(KC_ESC);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -174,24 +171,6 @@ qk_tap_dance_action_t tap_dance_actions[] = {
|
||||||
[TD_ESC_FUNC] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, tap_esc_func_finished, tap_esc_func_reset),
|
[TD_ESC_FUNC] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, tap_esc_func_finished, tap_esc_func_reset),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
const uint16_t PROGMEM fn_actions[] = {
|
|
||||||
ACTION_FUNCTION(LFK_CLEAR), // FN0 - reset layers
|
|
||||||
ACTION_FUNCTION(LFK_ESC_TILDE), // FN1 - esc+shift = ~, else escape
|
|
||||||
ACTION_FUNCTION(LFK_LED_TEST), // FN2 - cycle through LEDs for testing
|
|
||||||
ACTION_FUNCTION_OPT(LFK_SET_DEFAULT_LAYER, VANILLA), // FN3 - set base layer to 0 and save
|
|
||||||
ACTION_FUNCTION_OPT(LFK_SET_DEFAULT_LAYER, DEFAULT_WKL), // FN4 - set base layer to 1 and save
|
|
||||||
ACTION_FUNCTION_OPT(LFK_SET_DEFAULT_LAYER, DEFAULT_OSX), // FN5 - set base layer to 2 and save
|
|
||||||
ACTION_FUNCTION(LFK_CLICK_FREQ_HIGHER), // FN6 - Increase Freq of audio click
|
|
||||||
ACTION_FUNCTION(LFK_CLICK_FREQ_LOWER), // FN7 - Decrease Freq of audio click
|
|
||||||
ACTION_FUNCTION(LFK_CLICK_TIME_LONGER), // FN8 - Increase length of audio click
|
|
||||||
ACTION_FUNCTION(LFK_CLICK_TIME_SHORTER), // FN9 - Decrease length of audio click
|
|
||||||
ACTION_FUNCTION(LFK_CLICK_TOGGLE), // FN10 - Toggle audio click
|
|
||||||
ACTION_FUNCTION(LFK_LED_TEST), // FN11 - cycle through LEDs for testing
|
|
||||||
ACTION_FUNCTION(LFK_DEBUG_SETTINGS), // FN12 - prints LED and click settings to HID
|
|
||||||
ACTION_FUNCTION(LFK_PLAY_ONEUP),
|
|
||||||
};
|
|
||||||
|
|
||||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
if ((layer_state & (1 << CS_GO)) && (keycode == 44)) {
|
if ((layer_state & (1 << CS_GO)) && (keycode == 44)) {
|
||||||
if (get_mods() & (MOD_BIT(KC_LGUI))) {
|
if (get_mods() & (MOD_BIT(KC_LGUI))) {
|
||||||
|
|
|
@ -16,7 +16,6 @@ const Layer_Info layer_info[] = {
|
||||||
{0xFFFFFFFF, 0xFFFFFFFF, {0xFF, 0xFF, 0xFF}}, // unknown layer - REQUIRED - white
|
{0xFFFFFFFF, 0xFFFFFFFF, {0xFF, 0xFF, 0xFF}}, // unknown layer - REQUIRED - white
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
/* Keymap VANILLA: (Base Layer) Default Layer
|
/* Keymap VANILLA: (Base Layer) Default Layer
|
||||||
* ,-----------------------------------------------------------------------------.
|
* ,-----------------------------------------------------------------------------.
|
||||||
|
@ -82,22 +81,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
* `------------------------------------------------------------------------------'
|
* `------------------------------------------------------------------------------'
|
||||||
*/
|
*/
|
||||||
[SETTINGS] = LAYOUT_tkl_ansi(
|
[SETTINGS] = LAYOUT_tkl_ansi(
|
||||||
F(0), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, BL_DEC, XXXXXXX, XXXXXXX, XXXXXXX,
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, BL_DEC, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
F(0), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, BL_DEC, BL_INC, BL_TOGG, RGB_TOG, RGB_VAI, XXXXXXX,
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, BL_DEC, BL_INC, BL_TOGG, RGB_TOG, RGB_VAI, XXXXXXX,
|
||||||
MU_MOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, F(2), RGB_MOD, RGB_VAD, XXXXXXX,
|
MU_MOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_MOD, RGB_VAD, XXXXXXX,
|
||||||
AU_TOG, F(1), F(3), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET,
|
AU_TOG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET,
|
||||||
F(5), F(2), F(4), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MU_TOG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_HUI,
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MU_TOG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_HUI,
|
||||||
XXXXXXX, XXXXXXX, XXXXXXX, F(12), XXXXXXX, XXXXXXX, XXXXXXX, _______, RGB_SAD, RGB_HUD, RGB_SAI
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, RGB_SAD, RGB_HUD, RGB_SAI
|
||||||
),
|
)
|
||||||
};
|
|
||||||
|
|
||||||
const uint16_t PROGMEM fn_actions[] = {
|
|
||||||
ACTION_FUNCTION(LFK_CLEAR), // FN0 - reset layers
|
|
||||||
ACTION_FUNCTION(LFK_CLICK_FREQ_HIGHER), // FN1 - Increase Freq of audio click
|
|
||||||
ACTION_FUNCTION(LFK_CLICK_FREQ_LOWER), // FN2 - Decrease Freq of audio click
|
|
||||||
ACTION_FUNCTION(LFK_CLICK_TIME_LONGER), // FN3 - Increase length of audio click
|
|
||||||
ACTION_FUNCTION(LFK_CLICK_TIME_SHORTER), // FN4 - Decrease length of audio click
|
|
||||||
ACTION_FUNCTION(LFK_CLICK_TOGGLE), // FN5 - Toggle audio click
|
|
||||||
};
|
};
|
||||||
|
|
||||||
void matrix_init_user(void) {
|
void matrix_init_user(void) {
|
||||||
|
|
|
@ -16,7 +16,6 @@ const Layer_Info layer_info[] = {
|
||||||
{0xFFFFFFFF, 0xFFFFFFFF, {0xFF, 0xFF, 0xFF}}, // unknown layer - REQUIRED - white
|
{0xFFFFFFFF, 0xFFFFFFFF, {0xFF, 0xFF, 0xFF}}, // unknown layer - REQUIRED - white
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
/* Keymap VANILLA: (Base Layer) Default Layer
|
/* Keymap VANILLA: (Base Layer) Default Layer
|
||||||
* ,-----------------------------------------------------------------------------.
|
* ,-----------------------------------------------------------------------------.
|
||||||
|
@ -82,22 +81,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
* `----------------------------------------------------------------------------'
|
* `----------------------------------------------------------------------------'
|
||||||
*/
|
*/
|
||||||
[SETTINGS] = LAYOUT_tkl_ansi(
|
[SETTINGS] = LAYOUT_tkl_ansi(
|
||||||
F(0), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, BL_DEC, XXXXXXX, XXXXXXX, XXXXXXX,
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, BL_DEC, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
F(0), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, BL_DEC, BL_INC, BL_TOGG, RGB_TOG, RGB_VAI, XXXXXXX,
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, BL_DEC, BL_INC, BL_TOGG, RGB_TOG, RGB_VAI, XXXXXXX,
|
||||||
MU_MOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, F(2), RGB_MOD, RGB_VAD, XXXXXXX,
|
MU_MOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_MOD, RGB_VAD, XXXXXXX,
|
||||||
AU_TOG, KC_F1, F(3), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET,
|
AU_TOG, KC_F1, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET,
|
||||||
F(5), F(2), F(4), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MU_TOG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_HUI,
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MU_TOG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_HUI,
|
||||||
XXXXXXX, XXXXXXX, XXXXXXX, F(12), XXXXXXX, XXXXXXX, XXXXXXX, _______, RGB_SAD, RGB_HUD, RGB_SAI
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, RGB_SAD, RGB_HUD, RGB_SAI
|
||||||
),
|
)
|
||||||
};
|
|
||||||
|
|
||||||
const uint16_t PROGMEM fn_actions[] = {
|
|
||||||
ACTION_FUNCTION(LFK_CLEAR), // FN0 - reset layers
|
|
||||||
ACTION_FUNCTION(LFK_CLICK_FREQ_HIGHER), // FN1 - Increase Freq of audio click
|
|
||||||
ACTION_FUNCTION(LFK_CLICK_FREQ_LOWER), // FN2 - Decrease Freq of audio click
|
|
||||||
ACTION_FUNCTION(LFK_CLICK_TIME_LONGER), // FN3 - Increase length of audio click
|
|
||||||
ACTION_FUNCTION(LFK_CLICK_TIME_SHORTER), // FN4 - Decrease length of audio click
|
|
||||||
ACTION_FUNCTION(LFK_CLICK_TOGGLE), // FN5 - Toggle audio click
|
|
||||||
};
|
};
|
||||||
|
|
||||||
void matrix_init_user(void) {
|
void matrix_init_user(void) {
|
||||||
|
|
|
@ -16,7 +16,6 @@ const Layer_Info layer_info[] = {
|
||||||
{0xFFFFFFFF, 0xFFFFFFFF, {0x0F, 0x0F, 0x0F}}, // unknown layer - REQUIRED - white
|
{0xFFFFFFFF, 0xFFFFFFFF, {0x0F, 0x0F, 0x0F}}, // unknown layer - REQUIRED - white
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
/* Keymap VANILLA: (Base Layer) Default Layer
|
/* Keymap VANILLA: (Base Layer) Default Layer
|
||||||
* ,-----------------------------------------------------------------------------.
|
* ,-----------------------------------------------------------------------------.
|
||||||
|
@ -83,21 +82,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
*/
|
*/
|
||||||
[SETTINGS] = LAYOUT_tkl_iso(
|
[SETTINGS] = LAYOUT_tkl_iso(
|
||||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, BL_DEC, XXXXXXX, XXXXXXX, XXXXXXX,
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, BL_DEC, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
F(0), F(3), F(4), F(5), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, BL_DEC, BL_INC, BL_TOGG, RGB_TOG, RGB_VAI, XXXXXXX,
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, BL_DEC, BL_INC, BL_TOGG, RGB_TOG, RGB_VAI, XXXXXXX,
|
||||||
MU_MOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_MOD, RGB_VAD, XXXXXXX,
|
MU_MOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_MOD, RGB_VAD, XXXXXXX,
|
||||||
AU_TOG, F(3), F(5), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET,
|
AU_TOG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET,
|
||||||
F(7), XXXXXXX, F(4), F(6), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MU_TOG, XXXXXXX, XXXXXXX, XXXXXXX, F(0), RGB_HUI,
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MU_TOG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_HUI,
|
||||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, F(0), RGB_SAD, RGB_HUD, RGB_SAI
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_SAD, RGB_HUD, RGB_SAI
|
||||||
),
|
)
|
||||||
};
|
|
||||||
|
|
||||||
const uint16_t PROGMEM fn_actions[] = {
|
|
||||||
[0] = ACTION_FUNCTION(LFK_CLEAR), // FN0 - reset layers
|
|
||||||
[3] = ACTION_FUNCTION(LFK_CLICK_FREQ_HIGHER), // FN3 - Increase Freq of audio click
|
|
||||||
[4] = ACTION_FUNCTION(LFK_CLICK_FREQ_LOWER), // FN4 - Decrease Freq of audio click
|
|
||||||
[5] = ACTION_FUNCTION(LFK_CLICK_TIME_LONGER), // FN5 - Increase length of audio click
|
|
||||||
[6] = ACTION_FUNCTION(LFK_CLICK_TIME_SHORTER), // FN6 - Decrease length of audio click
|
|
||||||
[7] = ACTION_FUNCTION(LFK_CLICK_TOGGLE), // FN7 - Toggle audio click
|
|
||||||
};
|
};
|
||||||
|
|
||||||
void matrix_init_user(void) {
|
void matrix_init_user(void) {
|
||||||
|
|
|
@ -116,61 +116,6 @@ bool process_record_kb(uint16_t keycode, keyrecord_t* record)
|
||||||
return process_record_user(keycode, record);
|
return process_record_user(keycode, record);
|
||||||
}
|
}
|
||||||
|
|
||||||
void action_function(keyrecord_t *event, uint8_t id, uint8_t opt)
|
|
||||||
{
|
|
||||||
#ifdef AUDIO_ENABLE
|
|
||||||
int8_t sign = 1;
|
|
||||||
#endif
|
|
||||||
if(id == LFK_ESC_TILDE){
|
|
||||||
// Send ~ on shift-esc
|
|
||||||
void (*method)(uint8_t) = (event->event.pressed) ? &add_key : &del_key;
|
|
||||||
uint8_t shifted = get_mods() & (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT));
|
|
||||||
method(shifted ? KC_GRAVE : KC_ESCAPE);
|
|
||||||
send_keyboard_report();
|
|
||||||
}else if(event->event.pressed){
|
|
||||||
switch(id){
|
|
||||||
case LFK_SET_DEFAULT_LAYER:
|
|
||||||
// set/save the current base layer to eeprom, falls through to LFK_CLEAR
|
|
||||||
eeconfig_update_default_layer(1UL << opt);
|
|
||||||
default_layer_set(1UL << opt);
|
|
||||||
case LFK_CLEAR:
|
|
||||||
// Go back to default layer
|
|
||||||
layer_clear();
|
|
||||||
break;
|
|
||||||
#ifdef ISSI_ENABLE
|
|
||||||
case LFK_LED_TEST:
|
|
||||||
led_test();
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
#ifdef AUDIO_ENABLE
|
|
||||||
case LFK_CLICK_FREQ_LOWER:
|
|
||||||
sign = -1; // continue to next statement
|
|
||||||
case LFK_CLICK_FREQ_HIGHER:
|
|
||||||
click_hz += sign * 100;
|
|
||||||
click(click_hz, click_time);
|
|
||||||
break;
|
|
||||||
case LFK_CLICK_TOGGLE:
|
|
||||||
if(click_toggle){
|
|
||||||
click_toggle = 0;
|
|
||||||
click(4000, 100);
|
|
||||||
click(1000, 100);
|
|
||||||
}else{
|
|
||||||
click_toggle = 1;
|
|
||||||
click(1000, 100);
|
|
||||||
click(4000, 100);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case LFK_CLICK_TIME_SHORTER:
|
|
||||||
sign = -1; // continue to next statement
|
|
||||||
case LFK_CLICK_TIME_LONGER:
|
|
||||||
click_time += sign;
|
|
||||||
click(click_hz, click_time);
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void reset_keyboard_kb(){
|
void reset_keyboard_kb(){
|
||||||
#ifdef WATCHDOG_ENABLE
|
#ifdef WATCHDOG_ENABLE
|
||||||
MCUSR = 0;
|
MCUSR = 0;
|
||||||
|
|
|
@ -19,20 +19,6 @@ typedef struct Layer_Info {
|
||||||
extern const uint32_t layer_count;
|
extern const uint32_t layer_count;
|
||||||
extern const Layer_Info layer_info[];
|
extern const Layer_Info layer_info[];
|
||||||
|
|
||||||
enum action_functions {
|
|
||||||
LFK_CLEAR = 0, // Resets all layers
|
|
||||||
LFK_ESC_TILDE, // esc+lshift = ~
|
|
||||||
LFK_SET_DEFAULT_LAYER, // changes and saves current base layer to eeprom
|
|
||||||
LFK_CLICK_TOGGLE, // Adjusts click duration
|
|
||||||
LFK_CLICK_FREQ_HIGHER, // Adjusts click frequency
|
|
||||||
LFK_CLICK_FREQ_LOWER, // Adjusts click frequency
|
|
||||||
LFK_CLICK_TIME_LONGER, // Adjusts click duration
|
|
||||||
LFK_CLICK_TIME_SHORTER, // Adjusts click duration
|
|
||||||
LFK_DEBUG_SETTINGS, // prints LED and click settings to HID
|
|
||||||
LFK_LED_TEST, // cycles through switch and RGB LEDs
|
|
||||||
LFK_PLAY_ONEUP
|
|
||||||
};
|
|
||||||
|
|
||||||
#define CLICK_HZ 500
|
#define CLICK_HZ 500
|
||||||
#define CLICK_MS 2
|
#define CLICK_MS 2
|
||||||
#define CLICK_ENABLED 0
|
#define CLICK_ENABLED 0
|
||||||
|
|
|
@ -22,7 +22,6 @@ const Layer_Info layer_info[] = {
|
||||||
{0xFFFFFFFF, 0xFFFFFFFF, {0xFF, 0xFF, 0xFF}}, // unknown layer - REQUIRED - white
|
{0xFFFFFFFF, 0xFFFFFFFF, {0xFF, 0xFF, 0xFF}}, // unknown layer - REQUIRED - white
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
/* Keymap VANILLA: (Base Layer) Default Layer
|
/* Keymap VANILLA: (Base Layer) Default Layer
|
||||||
* ,-----------------------------------------------------------------------------.
|
* ,-----------------------------------------------------------------------------.
|
||||||
|
@ -40,11 +39,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
* `-----------------------------------------------------------' `-------------'
|
* `-----------------------------------------------------------' `-------------'
|
||||||
*/
|
*/
|
||||||
[VANILLA] = LAYOUT(
|
[VANILLA] = LAYOUT(
|
||||||
KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \
|
KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
|
||||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_P7, KC_P8, KC_P9, KC_PPLS, \
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_P7, KC_P8, KC_P9, KC_PPLS,
|
||||||
TD(TD_ESC_FUNC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, LALT(KC_F5), \
|
TD(TD_ESC_FUNC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, LALT(KC_F5),
|
||||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, \
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT,
|
||||||
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RCTL, MO(FUNC), KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT \
|
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RCTL, MO(FUNC), KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT
|
||||||
),
|
),
|
||||||
|
|
||||||
/* Keymap FUNCTION: Function Layer
|
/* Keymap FUNCTION: Function Layer
|
||||||
|
@ -63,11 +62,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
* `------------------------------------------------------' `-------------'
|
* `------------------------------------------------------' `-------------'
|
||||||
*/
|
*/
|
||||||
[FUNC] = LAYOUT(
|
[FUNC] = LAYOUT(
|
||||||
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, _______, _______, _______, _______, \
|
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, _______, _______, _______, _______,
|
||||||
XXXXXXX, KC_HOME, KC_UP, KC_END, KC_PGUP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______, \
|
XXXXXXX, KC_HOME, KC_UP, KC_END, KC_PGUP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______,
|
||||||
_______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______, \
|
_______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______,
|
||||||
_______, XXXXXXX, KC_DEL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, TG(SETTINGS), _______, _______, _______, _______, _______, \
|
_______, XXXXXXX, KC_DEL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, TG(SETTINGS), _______, _______, _______, _______, _______,
|
||||||
_______, _______, _______, KC_PGDN, _______, _______, _______, _______, _______, _______, _______, _______ \
|
_______, _______, _______, KC_PGDN, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
),
|
),
|
||||||
|
|
||||||
/* Keymap SETTINGS: Settings Layer
|
/* Keymap SETTINGS: Settings Layer
|
||||||
|
@ -86,20 +85,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
* `----------------------------------------------------------------------------'
|
* `----------------------------------------------------------------------------'
|
||||||
*/
|
*/
|
||||||
[SETTINGS] = LAYOUT(
|
[SETTINGS] = LAYOUT(
|
||||||
F(0), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, BL_DEC, BL_INC, BL_TOGG, RGB_TOG, RGB_VAI, XXXXXXX, XXXXXXX, \
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, BL_DEC, BL_INC, BL_TOGG, RGB_TOG, RGB_VAI, XXXXXXX, XXXXXXX,
|
||||||
MU_MOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, F(2), RGB_MOD, RGB_VAD, XXXXXXX, XXXXXXX, \
|
MU_MOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_MOD, RGB_VAD, XXXXXXX, XXXXXXX,
|
||||||
AU_TOG, KC_F1, F(3), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
|
AU_TOG, KC_F1, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
F(5), F(2), F(4), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MU_TOG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_HUI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MU_TOG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_HUI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
XXXXXXX, XXXXXXX, XXXXXXX, F(12), XXXXXXX, XXXXXXX, XXXXXXX, RGB_SAD, RGB_HUD, RGB_SAI, XXXXXXX, XXXXXXX \
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_SAD, RGB_HUD, RGB_SAI, XXXXXXX, XXXXXXX
|
||||||
),
|
)
|
||||||
};
|
};
|
||||||
|
|
||||||
void tap_esc_func_finished(qk_tap_dance_state_t *state, void *user_data) {
|
void tap_esc_func_finished(qk_tap_dance_state_t *state, void *user_data) {
|
||||||
if (state->pressed) {
|
if (state->pressed) {
|
||||||
layer_on(FUNC);
|
layer_on(FUNC);
|
||||||
} else {
|
} else {
|
||||||
register_code(KC_ESC);
|
tap_code(KC_ESC);
|
||||||
unregister_code(KC_ESC);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -111,15 +109,6 @@ qk_tap_dance_action_t tap_dance_actions[] = {
|
||||||
[TD_ESC_FUNC] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, tap_esc_func_finished, tap_esc_func_reset),
|
[TD_ESC_FUNC] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, tap_esc_func_finished, tap_esc_func_reset),
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint16_t PROGMEM fn_actions[] = {
|
|
||||||
ACTION_FUNCTION(LFK_CLEAR), // FN0 - reset layers
|
|
||||||
ACTION_FUNCTION(LFK_CLICK_FREQ_HIGHER), // FN1 - Increase Freq of audio click
|
|
||||||
ACTION_FUNCTION(LFK_CLICK_FREQ_LOWER), // FN2 - Decrease Freq of audio click
|
|
||||||
ACTION_FUNCTION(LFK_CLICK_TIME_LONGER), // FN3 - Increase length of audio click
|
|
||||||
ACTION_FUNCTION(LFK_CLICK_TIME_SHORTER), // FN4 - Decrease length of audio click
|
|
||||||
ACTION_FUNCTION(LFK_CLICK_TOGGLE), // FN5 - Toggle audio click
|
|
||||||
};
|
|
||||||
|
|
||||||
void matrix_init_user(void) {
|
void matrix_init_user(void) {
|
||||||
// This keymap only has a single base layer, so reset the default if needed
|
// This keymap only has a single base layer, so reset the default if needed
|
||||||
if (eeconfig_read_default_layer() > 1) {
|
if (eeconfig_read_default_layer() > 1) {
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
#include QMK_KEYBOARD_H
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
//Define a shorter 'transparent' key code to make the keymaps more compact
|
|
||||||
#define KC_TR KC_TRNS
|
|
||||||
|
|
||||||
enum keymap_layout {
|
enum keymap_layout {
|
||||||
VANILLA = 0, // matches MF68 layout
|
VANILLA = 0, // matches MF68 layout
|
||||||
FUNC, // 0x08
|
FUNC, // 0x08
|
||||||
|
@ -19,7 +16,6 @@ const Layer_Info layer_info[] = {
|
||||||
{0xFFFFFFFF, 0xFFFFFFFF, {0xFF, 0xFF, 0xFF}}, // unknown layer - REQUIRED - white
|
{0xFFFFFFFF, 0xFFFFFFFF, {0xFF, 0xFF, 0xFF}}, // unknown layer - REQUIRED - white
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
/* Keymap VANILLA: (Base Layer) Default Layer
|
/* Keymap VANILLA: (Base Layer) Default Layer
|
||||||
* ,-----------------------------------------------------------------------------.
|
* ,-----------------------------------------------------------------------------.
|
||||||
|
@ -83,21 +79,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
* `----------------------------------------------------------------------------'
|
* `----------------------------------------------------------------------------'
|
||||||
*/
|
*/
|
||||||
[SETTINGS] = LAYOUT(
|
[SETTINGS] = LAYOUT(
|
||||||
F(0), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, BL_DEC, BL_INC, BL_TOGG, RGB_TOG, RGB_VAI, XXXXXXX, XXXXXXX,
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, BL_DEC, BL_INC, BL_TOGG, RGB_TOG, RGB_VAI, XXXXXXX, XXXXXXX,
|
||||||
MU_MOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, F(2), RGB_MOD, RGB_VAD, XXXXXXX, XXXXXXX,
|
MU_MOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_MOD, RGB_VAD, XXXXXXX, XXXXXXX,
|
||||||
AU_TOG, F(1), F(3), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
AU_TOG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
F(5), F(2), F(4), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MU_TOG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_HUI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MU_TOG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_HUI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
XXXXXXX, XXXXXXX, XXXXXXX, F(12), XXXXXXX, XXXXXXX, XXXXXXX, RGB_SAD, RGB_HUD, RGB_SAI, XXXXXXX, XXXXXXX
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_SAD, RGB_HUD, RGB_SAI, XXXXXXX, XXXXXXX
|
||||||
),
|
)
|
||||||
};
|
|
||||||
|
|
||||||
const uint16_t PROGMEM fn_actions[] = {
|
|
||||||
ACTION_FUNCTION(LFK_CLEAR), // FN0 - reset layers
|
|
||||||
ACTION_FUNCTION(LFK_CLICK_FREQ_HIGHER), // FN1 - Increase Freq of audio click
|
|
||||||
ACTION_FUNCTION(LFK_CLICK_FREQ_LOWER), // FN2 - Decrease Freq of audio click
|
|
||||||
ACTION_FUNCTION(LFK_CLICK_TIME_LONGER), // FN3 - Increase length of audio click
|
|
||||||
ACTION_FUNCTION(LFK_CLICK_TIME_SHORTER), // FN4 - Decrease length of audio click
|
|
||||||
ACTION_FUNCTION(LFK_CLICK_TOGGLE), // FN5 - Toggle audio click
|
|
||||||
};
|
};
|
||||||
|
|
||||||
void matrix_init_user(void) {
|
void matrix_init_user(void) {
|
||||||
|
|
|
@ -122,64 +122,6 @@ bool process_record_kb(uint16_t keycode, keyrecord_t* record)
|
||||||
return process_record_user(keycode, record);
|
return process_record_user(keycode, record);
|
||||||
}
|
}
|
||||||
|
|
||||||
void action_function(keyrecord_t *event, uint8_t id, uint8_t opt)
|
|
||||||
{
|
|
||||||
#ifdef AUDIO_ENABLE
|
|
||||||
int8_t sign = 1;
|
|
||||||
#endif
|
|
||||||
if(id == LFK_ESC_TILDE){
|
|
||||||
// Send ~ on shift-esc
|
|
||||||
void (*method)(uint8_t) = (event->event.pressed) ? &add_key : &del_key;
|
|
||||||
uint8_t shifted = get_mods() & (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT));
|
|
||||||
method(shifted ? KC_GRAVE : KC_ESCAPE);
|
|
||||||
send_keyboard_report();
|
|
||||||
}else if(event->event.pressed){
|
|
||||||
switch(id){
|
|
||||||
case LFK_SET_DEFAULT_LAYER:
|
|
||||||
// set/save the current base layer to eeprom, falls through to LFK_CLEAR
|
|
||||||
eeconfig_update_default_layer(1UL << opt);
|
|
||||||
default_layer_set(1UL << opt);
|
|
||||||
case LFK_CLEAR:
|
|
||||||
// Go back to default layer
|
|
||||||
layer_clear();
|
|
||||||
break;
|
|
||||||
#ifdef ISSI_ENABLE
|
|
||||||
case LFK_LED_TEST:
|
|
||||||
led_test();
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
#ifdef AUDIO_ENABLE
|
|
||||||
case LFK_CLICK_FREQ_LOWER:
|
|
||||||
sign = -1; // continue to next statement
|
|
||||||
case LFK_CLICK_FREQ_HIGHER:
|
|
||||||
click_hz += sign * 100;
|
|
||||||
click(click_hz, click_time);
|
|
||||||
break;
|
|
||||||
case LFK_CLICK_TOGGLE:
|
|
||||||
if(click_toggle){
|
|
||||||
click_toggle = 0;
|
|
||||||
click(4000, 100);
|
|
||||||
click(1000, 100);
|
|
||||||
}else{
|
|
||||||
click_toggle = 1;
|
|
||||||
click(1000, 100);
|
|
||||||
click(4000, 100);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case LFK_CLICK_TIME_SHORTER:
|
|
||||||
sign = -1; // continue to next statement
|
|
||||||
case LFK_CLICK_TIME_LONGER:
|
|
||||||
click_time += sign;
|
|
||||||
click(click_hz, click_time);
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
case LFK_PLAY_ONEUP:
|
|
||||||
PLAY_SONG(my_song);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void reset_keyboard_kb(){
|
void reset_keyboard_kb(){
|
||||||
#ifdef WATCHDOG_ENABLE
|
#ifdef WATCHDOG_ENABLE
|
||||||
MCUSR = 0;
|
MCUSR = 0;
|
||||||
|
|
|
@ -19,20 +19,6 @@ typedef struct Layer_Info {
|
||||||
extern const uint32_t layer_count;
|
extern const uint32_t layer_count;
|
||||||
extern const Layer_Info layer_info[];
|
extern const Layer_Info layer_info[];
|
||||||
|
|
||||||
enum action_functions {
|
|
||||||
LFK_CLEAR = 0, // Resets all layers
|
|
||||||
LFK_ESC_TILDE, // esc+lshift = ~
|
|
||||||
LFK_SET_DEFAULT_LAYER, // changes and saves current base layer to eeprom
|
|
||||||
LFK_CLICK_TOGGLE, // Adjusts click duration
|
|
||||||
LFK_CLICK_FREQ_HIGHER, // Adjusts click frequency
|
|
||||||
LFK_CLICK_FREQ_LOWER, // Adjusts click frequency
|
|
||||||
LFK_CLICK_TIME_LONGER, // Adjusts click duration
|
|
||||||
LFK_CLICK_TIME_SHORTER, // Adjusts click duration
|
|
||||||
LFK_DEBUG_SETTINGS, // prints LED and click settings to HID
|
|
||||||
LFK_LED_TEST, // cycles through switch and RGB LEDs
|
|
||||||
LFK_PLAY_ONEUP
|
|
||||||
};
|
|
||||||
|
|
||||||
#define CLICK_HZ 500
|
#define CLICK_HZ 500
|
||||||
#define CLICK_MS 2
|
#define CLICK_MS 2
|
||||||
#define CLICK_ENABLED 0
|
#define CLICK_ENABLED 0
|
||||||
|
|
|
@ -58,18 +58,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
[_FN] = LAYOUT_65_ansi(
|
[_FN] = LAYOUT_65_ansi(
|
||||||
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_F13, KC_F14,
|
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_F13, KC_F14,
|
||||||
MU_MOD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG,
|
MU_MOD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG,
|
||||||
AU_TOG, F(1), F(3), _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, RGB_MOD,
|
AU_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, RGB_MOD,
|
||||||
F(5), F(2), F(4), _______, _______, _______, _______, MU_TOG, RGB_VAD, RGB_VAI, _______, _______, RGB_HUI, _______,
|
_______, _______, _______, _______, _______, _______, _______, MU_TOG, RGB_VAD, RGB_VAI, _______, _______, RGB_HUI, _______,
|
||||||
_______, _______, _______, _______, _______, _______, _______, RGB_SAD, RGB_HUD, RGB_SAI
|
_______, _______, _______, _______, _______, _______, _______, RGB_SAD, RGB_HUD, RGB_SAI
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifndef NO_ACTION_FUNCTION
|
|
||||||
const uint16_t PROGMEM fn_actions[] = {
|
|
||||||
[1] = ACTION_FUNCTION(LFK_CLICK_FREQ_HIGHER), // FN1 - Increase Freq of audio click
|
|
||||||
[2] = ACTION_FUNCTION(LFK_CLICK_FREQ_LOWER), // FN2 - Decrease Freq of audio click
|
|
||||||
[3] = ACTION_FUNCTION(LFK_CLICK_TIME_LONGER), // FN3 - Increase length of audio click
|
|
||||||
[4] = ACTION_FUNCTION(LFK_CLICK_TIME_SHORTER), // FN4 - Decrease length of audio click
|
|
||||||
[5] = ACTION_FUNCTION(LFK_CLICK_TOGGLE), // FN5 - Toggle audio click
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -58,18 +58,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
[_FN] = LAYOUT_65_iso(
|
[_FN] = LAYOUT_65_iso(
|
||||||
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_F13, KC_F14,
|
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_F13, KC_F14,
|
||||||
MU_MOD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG,
|
MU_MOD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG,
|
||||||
AU_TOG, F(1), F(3), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, RGB_MOD,
|
AU_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, RGB_MOD,
|
||||||
F(5), _______, F(2), F(4), _______, _______, _______, _______, MU_TOG, RGB_VAD, RGB_VAI, _______, _______, RGB_HUI, _______,
|
_______, _______, _______, _______, _______, _______, _______, _______, MU_TOG, RGB_VAD, RGB_VAI, _______, _______, RGB_HUI, _______,
|
||||||
_______, _______, _______, _______, _______, _______, _______, RGB_SAD, RGB_HUD, RGB_SAI
|
_______, _______, _______, _______, _______, _______, _______, RGB_SAD, RGB_HUD, RGB_SAI
|
||||||
),
|
)
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifndef NO_ACTION_FUNCTION
|
|
||||||
const uint16_t PROGMEM fn_actions[] = {
|
|
||||||
[1] = ACTION_FUNCTION(LFK_CLICK_FREQ_HIGHER), // FN1 - Increase Freq of audio click
|
|
||||||
[2] = ACTION_FUNCTION(LFK_CLICK_FREQ_LOWER), // FN2 - Decrease Freq of audio click
|
|
||||||
[3] = ACTION_FUNCTION(LFK_CLICK_TIME_LONGER), // FN3 - Increase length of audio click
|
|
||||||
[4] = ACTION_FUNCTION(LFK_CLICK_TIME_SHORTER), // FN4 - Decrease length of audio click
|
|
||||||
[5] = ACTION_FUNCTION(LFK_CLICK_TOGGLE), // FN5 - Toggle audio click
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -81,62 +81,6 @@ bool process_record_kb(uint16_t keycode, keyrecord_t* record)
|
||||||
return process_record_user(keycode, record);
|
return process_record_user(keycode, record);
|
||||||
}
|
}
|
||||||
|
|
||||||
void action_function(keyrecord_t *event, uint8_t id, uint8_t opt)
|
|
||||||
{
|
|
||||||
#ifdef AUDIO_ENABLE
|
|
||||||
int8_t sign = 1;
|
|
||||||
#endif
|
|
||||||
if(id == LFK_ESC_TILDE){
|
|
||||||
// Send ~ on shift-esc
|
|
||||||
void (*method)(uint8_t) = (event->event.pressed) ? &add_key : &del_key;
|
|
||||||
uint8_t shifted = get_mods() & (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT));
|
|
||||||
method(shifted ? KC_GRAVE : KC_ESCAPE);
|
|
||||||
send_keyboard_report();
|
|
||||||
}else if(event->event.pressed){
|
|
||||||
switch(id){
|
|
||||||
case LFK_SET_DEFAULT_LAYER:
|
|
||||||
// set/save the current base layer to eeprom, falls through to LFK_CLEAR
|
|
||||||
eeconfig_update_default_layer(1UL << opt);
|
|
||||||
default_layer_set(1UL << opt);
|
|
||||||
case LFK_CLEAR:
|
|
||||||
// Go back to default layer
|
|
||||||
layer_clear();
|
|
||||||
break;
|
|
||||||
#ifdef AUDIO_ENABLE
|
|
||||||
case LFK_CLICK_FREQ_LOWER:
|
|
||||||
sign = -1; // continue to next statement
|
|
||||||
case LFK_CLICK_FREQ_HIGHER:
|
|
||||||
click_hz += sign * 100;
|
|
||||||
click(click_hz, click_time);
|
|
||||||
break;
|
|
||||||
case LFK_CLICK_TOGGLE:
|
|
||||||
if(click_toggle){
|
|
||||||
click_toggle = 0;
|
|
||||||
click(4000, 100);
|
|
||||||
click(1000, 100);
|
|
||||||
}else{
|
|
||||||
click_toggle = 1;
|
|
||||||
click(1000, 100);
|
|
||||||
click(4000, 100);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case LFK_CLICK_TIME_SHORTER:
|
|
||||||
sign = -1; // continue to next statement
|
|
||||||
case LFK_CLICK_TIME_LONGER:
|
|
||||||
click_time += sign;
|
|
||||||
click(click_hz, click_time);
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
case LFK_DEBUG_SETTINGS:
|
|
||||||
dprintf("Click:\n");
|
|
||||||
dprintf(" toggle: %d\n", click_toggle);
|
|
||||||
dprintf(" freq(hz): %d\n", click_hz);
|
|
||||||
dprintf(" duration(ms): %d\n", click_time);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void reset_keyboard_kb(){
|
void reset_keyboard_kb(){
|
||||||
#ifdef WATCHDOG_ENABLE
|
#ifdef WATCHDOG_ENABLE
|
||||||
MCUSR = 0;
|
MCUSR = 0;
|
||||||
|
|
|
@ -33,19 +33,6 @@ typedef struct Layer_Info {
|
||||||
extern const uint32_t layer_count;
|
extern const uint32_t layer_count;
|
||||||
extern const Layer_Info layer_info[];
|
extern const Layer_Info layer_info[];
|
||||||
|
|
||||||
enum action_functions {
|
|
||||||
LFK_CLEAR = 0, // Resets all layers
|
|
||||||
LFK_ESC_TILDE, // esc+lshift = ~
|
|
||||||
LFK_SET_DEFAULT_LAYER, // changes and saves current base layer to eeprom
|
|
||||||
LFK_CLICK_TOGGLE, // Adjusts click duration
|
|
||||||
LFK_CLICK_FREQ_HIGHER, // Adjusts click frequency
|
|
||||||
LFK_CLICK_FREQ_LOWER, // Adjusts click frequency
|
|
||||||
LFK_CLICK_TIME_LONGER, // Adjusts click duration
|
|
||||||
LFK_CLICK_TIME_SHORTER, // Adjusts click duration
|
|
||||||
LFK_DEBUG_SETTINGS, // prints LED and click settings to HID
|
|
||||||
LFK_LED_TEST // cycles through switch and RGB LEDs
|
|
||||||
};
|
|
||||||
|
|
||||||
#define CLICK_HZ 500
|
#define CLICK_HZ 500
|
||||||
#define CLICK_MS 2
|
#define CLICK_MS 2
|
||||||
#define CLICK_ENABLED 0
|
#define CLICK_ENABLED 0
|
||||||
|
|
|
@ -55,7 +55,7 @@ char* translate_keycode_to_string(uint16_t code)
|
||||||
return (return_p);
|
return (return_p);
|
||||||
}
|
}
|
||||||
|
|
||||||
lookup_table_t lookup_table[366] =
|
lookup_table_t lookup_table[334] =
|
||||||
{
|
{
|
||||||
{"KC_NO", KC_NO},
|
{"KC_NO", KC_NO},
|
||||||
{"KC_TRNS", KC_TRNS},
|
{"KC_TRNS", KC_TRNS},
|
||||||
|
@ -243,38 +243,6 @@ lookup_table_t lookup_table[366] =
|
||||||
{"KC_MRWD", KC_MRWD},
|
{"KC_MRWD", KC_MRWD},
|
||||||
{"KC_BRIU", KC_BRIU},
|
{"KC_BRIU", KC_BRIU},
|
||||||
{"KC_BRID", KC_BRID},
|
{"KC_BRID", KC_BRID},
|
||||||
{"KC_FN0", KC_FN0},
|
|
||||||
{"KC_FN1", KC_FN1},
|
|
||||||
{"KC_FN2", KC_FN2},
|
|
||||||
{"KC_FN3", KC_FN3},
|
|
||||||
{"KC_FN4", KC_FN4},
|
|
||||||
{"KC_FN5", KC_FN5},
|
|
||||||
{"KC_FN6", KC_FN6},
|
|
||||||
{"KC_FN7", KC_FN7},
|
|
||||||
{"KC_FN8", KC_FN8},
|
|
||||||
{"KC_FN9", KC_FN9},
|
|
||||||
{"KC_FN10", KC_FN10},
|
|
||||||
{"KC_FN11", KC_FN11},
|
|
||||||
{"KC_FN12", KC_FN12},
|
|
||||||
{"KC_FN13", KC_FN13},
|
|
||||||
{"KC_FN14", KC_FN14},
|
|
||||||
{"KC_FN15", KC_FN15},
|
|
||||||
{"KC_FN16", KC_FN16},
|
|
||||||
{"KC_FN17", KC_FN17},
|
|
||||||
{"KC_FN18", KC_FN18},
|
|
||||||
{"KC_FN19", KC_FN19},
|
|
||||||
{"KC_FN20", KC_FN20},
|
|
||||||
{"KC_FN21", KC_FN21},
|
|
||||||
{"KC_FN22", KC_FN22},
|
|
||||||
{"KC_FN23", KC_FN23},
|
|
||||||
{"KC_FN24", KC_FN24},
|
|
||||||
{"KC_FN25", KC_FN25},
|
|
||||||
{"KC_FN26", KC_FN26},
|
|
||||||
{"KC_FN27", KC_FN27},
|
|
||||||
{"KC_FN28", KC_FN28},
|
|
||||||
{"KC_FN29", KC_FN29},
|
|
||||||
{"KC_FN30", KC_FN30},
|
|
||||||
{"KC_FN31", KC_FN31},
|
|
||||||
{"KC_LCTL", KC_LCTL},
|
{"KC_LCTL", KC_LCTL},
|
||||||
{"KC_LSFT", KC_LSFT},
|
{"KC_LSFT", KC_LSFT},
|
||||||
{"KC_LALT", KC_LALT},
|
{"KC_LALT", KC_LALT},
|
||||||
|
|
Loading…
Reference in a new issue