Formatting

This commit is contained in:
bluepython508
2024-03-14 10:44:18 +00:00
parent bae54f3cad
commit 9762887d45
2 changed files with 110 additions and 120 deletions

View File

@@ -13,7 +13,7 @@ AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: 'false'
BinPackArguments: 'true'
BinPackParameters: 'true'
ColumnLimit: '1000'
ColumnLimit: '100'
IndentCaseLabels: 'true'
IndentPPDirectives: AfterHash
IndentWidth: '4'

View File

@@ -91,6 +91,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
// ),
};
// clang-format on
void keyboard_pre_init_user(void) {
setPinOutput(24);
@@ -112,12 +113,10 @@ typedef struct {
oneshot_mode_t mode;
} oneshot_state_t;
oneshot_state_t oneshot_state[4] = {
{ 0, KC_LSFT, OS_LSFT, os_up_unqueued },
oneshot_state_t oneshot_state[4] = {{0, KC_LSFT, OS_LSFT, os_up_unqueued},
{0, KC_LCTL, OS_LCTL, os_up_unqueued},
{0, KC_LALT, OS_LALT, os_up_unqueued},
{ 0, KC_LGUI, OS_LGUI, os_up_unqueued }
};
{0, KC_LGUI, OS_LGUI, os_up_unqueued}};
bool is_oneshot_ignored_key(uint16_t keycode) {
switch (keycode) {
@@ -136,20 +135,12 @@ bool is_oneshot_ignored_key(uint16_t keycode) {
}
bool is_oneshot_cancel_key(uint16_t keycode) {
switch (keycode) {
case KC_NO:
return true;
default:
return false;
}
return keycode == KC_NO;
}
// Based on https://github.com/qmk/qmk_firmware/blob/user-keymaps-still-present/users/callum/oneshot.c
void update_oneshot(
oneshot_state_t *state,
uint16_t keycode,
keyrecord_t *record
) {
// Based on
// https://github.com/qmk/qmk_firmware/blob/user-keymaps-still-present/users/callum/oneshot.c
void update_oneshot(oneshot_state_t *state, uint16_t keycode, keyrecord_t *record) {
if (keycode == state->trigger) {
if (record->event.pressed) {
// Trigger keydown
@@ -233,4 +224,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}