Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove action_function() from LFKeyboards boards #15993

Merged
merged 1 commit into from
Jan 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions keyboards/amjkeyboard/amj84/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |-----------------------------------------------------------|
* | |Lef|Dow|Rig| | | | | | |Hom|PgU| |
* |-----------------------------------------------------------|
* | | |App|Fn1|Fn2|Fn3|VoD|VoU|Mut|End|PgD| | |
* | | |App| | | |VoD|VoU|Mut|End|PgD| | |
* |-----------------------------------------------------------|
* | | | | | | | | |
* `-----------------------------------------------------------'
Expand All @@ -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_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_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)

};
56 changes: 0 additions & 56 deletions keyboards/capsunlocked/cu75/cu75.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,62 +98,6 @@ bool process_record_kb(uint16_t keycode, keyrecord_t* 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(){
#ifdef WATCHDOG_ENABLE
MCUSR = 0;
Expand Down
13 changes: 0 additions & 13 deletions keyboards/capsunlocked/cu75/cu75.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,6 @@ typedef struct Layer_Info {
extern const uint32_t layer_count;
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_MS 2
#define CLICK_ENABLED 0
Expand Down
Empty file.
84 changes: 40 additions & 44 deletions keyboards/lfkeyboards/lfk65_hs/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
@@ -1,54 +1,50 @@
#include QMK_KEYBOARD_H

//Define a shorter 'transparent' key code to make the keymaps more compact
#define KC_TR KC_TRNS

enum keymap_layout {
BASE = 0,
FUNC,
};

// #define uint16_t int
// #define uint8_t int

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[BASE] = LAYOUT_ansi(
/* Keymap VANILLA: (Base Layer) Default Layer
* ,------------------------------------------------------------.----.
* |Esc~| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0| - | = |Backspa| Ins|
* |------------------------------------------------------------|----|
* |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| Del|
* |------------------------------------------------------------|----|
* |CAPS | A| S| D| F| G| H| J| K| L| ;| '|Return |PgUp|
* |------------------------------------------------------------|----|
* |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift |Up |PgDn|
* |-----------------------------------------------------------------|
* |Ctrl|Win |Alt | Space |Alt |Ctrl|Func|Lft| Dn |Rig |
* `-----------------------------------------------------------------'
*/
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_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_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, MO(FUNC), KC_LEFT, KC_DOWN, KC_RGHT),
/* Keymap VANILLA: (Base Layer) Default Layer
* ,------------------------------------------------------------.----.
* |Esc~| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0| - | = |Backspa| Ins|
* |------------------------------------------------------------|----|
* |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| Del|
* |------------------------------------------------------------|----|
* |CAPS | A| S| D| F| G| H| J| K| L| ;| '|Return |PgUp|
* |------------------------------------------------------------|----|
* |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift |Up |PgDn|
* |-----------------------------------------------------------------|
* |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_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_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
),

[FUNC] = LAYOUT_ansi(
/*Keymap VANILLA: Function Layer
* ,------------------------------------------------------------.----.
* |Esc~| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0| - | = |Backspa| Ins|
* |------------------------------------------------------------|----|
* |MuMode | | | |E| R| T| Y| U| I| O| P| [| ]| \| Del|
* |------------------------------------------------------------|----|
* |AudTgl|Hz+|MS+| | D| F| G| H| J| K| L| ;| '|Return |PgUp|
* |------------------------------------------------------------|----|
* |ClickTgl|Hz-|MS-|| C| V| B| N|MuTgl| ,| .| /|Shift |Up |PgDn|
* |-----------------------------------------------------------------|
* |Ctrl|Win |Alt | Space |Alt |Ctrl|Func|Lft| Dn |Rig |
* `-----------------------------------------------------------------'
*/
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,
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,
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,
KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, RGB_SAD, RGB_HUD, RGB_SAI),
/* Keymap VANILLA: Function Layer
* ,------------------------------------------------------------.----.
* |Esc~| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0| - | = |Backspa| Ins|
* |------------------------------------------------------------|----|
* |MuMode | | | |E| R| T| Y| U| I| O| P| [| ]| \| Del|
* |------------------------------------------------------------|----|
* |AudTgl|Hz+|MS+| | D| F| G| H| J| K| L| ;| '|Return |PgUp|
* |------------------------------------------------------------|----|
* |ClickTgl|Hz-|MS-|| C| V| B| N|MuTgl| ,| .| /|Shift |Up |PgDn|
* |-----------------------------------------------------------------|
* |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,
MU_MOD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG,
AU_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, RGB_MOD,
_______, _______, _______, _______, _______, _______, _______, MU_TOG, RGB_VAD, RGB_VAI, _______, _______, RGB_HUI, _______,
_______, _______, _______, _______, _______, _______, _______, RGB_SAD, RGB_HUD, RGB_SAI
)
};
Loading