Add utility functions for Pointing Device Auto Mouse feature (#23144)
* Make is_auto_mouse_active() available globally * Add mouse key tracker functions for auto mouse layer
This commit is contained in:
parent
9f4a9d5826
commit
c0dbe9a336
3 changed files with 25 additions and 2 deletions
|
@ -45,7 +45,7 @@ static inline bool layer_hold_check(void) {
|
|||
}
|
||||
|
||||
/* check all layer activation criteria */
|
||||
static inline bool is_auto_mouse_active(void) {
|
||||
bool is_auto_mouse_active(void) {
|
||||
return auto_mouse_context.status.is_activated || auto_mouse_context.status.mouse_key_tracker || layer_hold_check();
|
||||
}
|
||||
|
||||
|
@ -98,6 +98,15 @@ bool get_auto_mouse_toggle(void) {
|
|||
return auto_mouse_context.status.is_toggled;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief get key tracker value
|
||||
*
|
||||
* @return bool of current layer_toggled state
|
||||
*/
|
||||
int8_t get_auto_mouse_key_tracker(void) {
|
||||
return auto_mouse_context.status.mouse_key_tracker;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Reset auto mouse context
|
||||
*
|
||||
|
@ -163,6 +172,15 @@ void set_auto_mouse_debounce(uint8_t debounce) {
|
|||
auto_mouse_reset();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Changes the timeout for the mouse auto layer to be disabled
|
||||
*
|
||||
* @param key_tracker
|
||||
*/
|
||||
void set_auto_mouse_key_tracker(int8_t key_tracker) {
|
||||
auto_mouse_context.status.mouse_key_tracker = key_tracker;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief toggle mouse layer setting
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue