From 1736f7874b8f651ae42a21f48b6a15d90f30974a Mon Sep 17 00:00:00 2001 From: jacqueline Date: Mon, 29 Apr 2024 13:53:11 +1000 Subject: Use double-clicks instead of long-presses for wheel shortcuts --- src/input/input_touch_wheel.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/input/input_touch_wheel.cpp') diff --git a/src/input/input_touch_wheel.cpp b/src/input/input_touch_wheel.cpp index 67cab3bf..41fd73bc 100644 --- a/src/input/input_touch_wheel.cpp +++ b/src/input/input_touch_wheel.cpp @@ -39,11 +39,11 @@ TouchWheel::TouchWheel(drivers::NvsStorage& nvs, drivers::TouchWheel& wheel) threshold_ = calculateThreshold(int_val); return true; }), - centre_("centre", actions::select(), {}, {}), - up_("up", {}, actions::scrollToTop(), actions::scrollUp()), - right_("right", {}, {}, {}), - down_("down", {}, actions::scrollToBottom(), actions::scrollDown()), - left_("left", {}, actions::goBack(), {}), + centre_("centre", actions::select(), {}, {}, {}), + up_("up", {}, actions::scrollToTop(), {}, {}), + right_("right", {}), + down_("down", {}, actions::scrollToBottom(), {}, {}), + left_("left", {}, actions::goBack(), {}, {}), is_scrolling_(false), threshold_(calculateThreshold(nvs.ScrollSensitivity())), is_first_read_(true), @@ -68,7 +68,8 @@ auto TouchWheel::read(lv_indev_data_t* data) -> void { data->enc_diff = 0; } - centre_.update(!is_scrolling_ && wheel_data.is_button_touched, data); + centre_.update(wheel_data.is_button_touched && !wheel_data.is_wheel_touched, + data); // If the user is touching the wheel but not scrolling, then they may be // clicking on one of the wheel's cardinal directions. -- cgit v1.2.3