[Keymap] Added userspace for d4mation. Included their keymap for the Atreus62 (#7483)
* Added userspace for d4mation. Included their keymap for the Atreus62 * Do not assign layer numbers manually * Remove some unneeded things per @drashna's recommendation * Fix some single line comments I missed * Update unicode macros to use send_unicode_hex_string() instead of process_unicode() * OBetter check for Unicode Enabled. Moved some checks into macros.c * Use eeconfig_init_user() to set default unicode input mode
This commit is contained in:
parent
b2405fccce
commit
f42dd61b8d
15 changed files with 563 additions and 0 deletions
28
users/d4mation/tap-hold.c
Normal file
28
users/d4mation/tap-hold.c
Normal file
|
@ -0,0 +1,28 @@
|
|||
#include "tap-hold.h"
|
||||
|
||||
#ifndef TAP_HOLD_TIME
|
||||
#define TAP_HOLD_TIME 200
|
||||
#endif
|
||||
|
||||
uint16_t tap_hold_timer;
|
||||
|
||||
void tap_or_hold( keyrecord_t *record, uint16_t tap, uint16_t hold ) {
|
||||
|
||||
if ( record->event.pressed ) {
|
||||
tap_hold_timer = timer_read();
|
||||
} else {
|
||||
|
||||
if ( tap_hold_timer &&
|
||||
timer_elapsed( tap_hold_timer ) > TAP_HOLD_TIME ) {
|
||||
/* Held down then released */
|
||||
tap_code( hold );
|
||||
} else {
|
||||
/* Quickly Tapped */
|
||||
tap_code( tap );
|
||||
}
|
||||
|
||||
tap_hold_timer = 0;
|
||||
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue