Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added pop to stop mouse drag setting #1545

Merged
merged 1 commit into from
Aug 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion plugin/mouse/mouse.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@
default=False,
desc="When enabled, pop stops continuous scroll modes (wheel upper/downer/gaze)",
)
mod.setting(
"mouse_enable_pop_stops_drag",
type=bool,
default=False,
desc="When enabled, pop stops mouse drag",
)
mod.setting(
"mouse_enable_hiss_scroll",
type=bool,
Expand Down Expand Up @@ -280,7 +286,12 @@ def show_cursor_helper(show):
@ctx.action_class("user")
class UserActions:
def noise_trigger_pop():
if settings.get("user.mouse_enable_pop_stops_scroll") and (
if (
settings.get("user.mouse_enable_pop_stops_drag")
and ctrl.mouse_buttons_down()
):
actions.user.mouse_drag_end()
elif settings.get("user.mouse_enable_pop_stops_scroll") and (
gaze_job or scroll_job
):
# Allow pop to stop scroll
Expand Down
3 changes: 3 additions & 0 deletions settings.talon
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ settings():
# If `true`, stop continuous scroll/gaze scroll with a pop
user.mouse_enable_pop_stops_scroll = true

# If `true`, stop mouse drag with a pop
user.mouse_enable_pop_stops_drag = true
Copy link
Collaborator Author

@AndreasArvidsson AndreasArvidsson Aug 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made the decision to enable this as default here since the above mouse_enable_pop_stops_scroll already does that


# Choose how pop click should work in 'control mouse' mode
# 0 = off
# 1 = on with eyetracker but not zoom mouse mode
Expand Down