Added super alt-tab

- going to remove it though so I can hold different mods for chrome
and windows. Wanted to save the code since I spent time working on it
- General code cleanup
- introduced klor and rollow keyboard.json
- set encoder resolution to 4 for alt tab to work right
This commit is contained in:
Victor 2024-07-02 23:29:06 -05:00
parent bd72a9b350
commit edf4c932f2
Failed to generate hash of commit
19 changed files with 172 additions and 129 deletions

View file

@ -1,35 +1,26 @@
#include "taphold.h"
void double_tap(uint16_t key, uint32_t ms) {
void double_tap( uint16_t key, uint32_t ms) {
tap_code16(key);
wait_ms(ms);
tap_code16(key);
}
void insert_brackets(uint16_t left, uint16_t right, uint32_t ms) {
void insert_brackets (uint16_t left, uint16_t right, uint32_t ms) {
tap_code16(left);
wait_ms(ms);
tap_code16(right);
wait_ms(ms);
tap_code16(KC_LEFT);
}
bool process_tap_hold_key(keyrecord_t* record, uint16_t tap_keycode, uint16_t hold_keycode, int mode) {
bool process_tap_hold_key (keyrecord_t* record, uint16_t tap_keycode, uint16_t hold_keycode, int mode) {
if (record->tap.count > 0) { // Key is being tapped
// register on press, unregister on release
record->event.pressed ? register_code16(tap_keycode) : unregister_code16(tap_keycode);
} else { // Key is being held
} else { // Key is being hel
switch (mode) {
case HOLD_BRACKETS:
record->event.pressed ? insert_brackets(tap_keycode, hold_keycode, TAP_CODE_DELAY) : 0;
break;
@ -42,8 +33,6 @@ bool process_tap_hold_key(keyrecord_t* record, uint16_t tap_keycode, uint16_t ho
record->event.pressed ? register_code16(hold_keycode) : unregister_code16(hold_keycode);
break;
}
}
return false;
}