More touchpad palm rejection options #11747
Replies: 3 comments 4 replies
-
|
After some digging, it seems we would need to add this functionality to Aquamarine as Hyprland doesn't interface directly with libinput. I'll put together some pseudocode of what would likely need to be changed, but I would love some feedback on which way this should be done (I'm leaning towards option 1, then option 0 once that works): Option 1: Pass Palm Info Up to HyprlandAquamarine attaches a "palm" flag (e.g. Pros
Cons
Option 2 Aquamarine Does the FilteringAquamarine internally filters out palm events and never passes them up as pointer/touch events, unless explicitly told not to (via a config or runtime API from HL). Pros
Cons
Option 0 BothBy default, pass palm info up, and optionally add a config to aquamarine to filter at the backend for users who want it. |
Beta Was this translation helpful? Give feedback.
-
|
Never mind, libinput already filters out palm moves by default, if I try to move the mouse with my palm, nothing happens. I can click with my palm though which is my issue, but libinput doesn't seem to pass on tool info on taps. I think the |
Beta Was this translation helpful? Give feedback.
-
|
This might be better as an option in libinput so I'll suggest it there too I've never used c++, only c so sorry if this is wildly wrong but might this work? diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp
index ea16484..9629958 100644
--- a/src/managers/input/InputManager.cpp
+++ b/src/managers/input/InputManager.cpp
@@ -614,10 +614,15 @@ void CInputManager::onMouseButton(IPointer::SButtonEvent e) {
EMIT_HOOK_EVENT_CANCELLABLE("mouseButton", e);
if (e.mouse)
recheckMouseWarpOnMouseInput();
+ // If the user is typing, ignore the click
+ if (e.device && e.device->m_isTouchpad && Time::millis(Time::steadyNow()) - g_pKeybindManager->m_timeLastMs <= 200) {
+ return
+ }
+
m_lastCursorMovement.reset();
if (e.state == WL_POINTER_BUTTON_STATE_PRESSED) {
m_currentlyHeldButtons.push_back(e.button);
} else { |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Good evening all! I am a little disappointed with the state of trackpad palm rejection in Linux, so I was hoping we could be the change!
At the moment, HL only has a toggle for
input:touchpad:disable_while_typingwith no adjustment for the delay.I would like to suggest a few things in order of doability:
enable_firmware_palm_rejection- Listen toABS_MT_TOOL_TYPEmessages from the touchpad if they are supporteddisable_while_typing_delay- Delay in ms to keep the touchpad disabled after a key pressdisable_clicks_while_typingorallow_moving_while_typing- So you don't click and move the cursor, but don't have to wait for the delay before starting to movepalm_min_width- To only acknowledge touches small enough to reasonably be a finger (likesynclient PalmMinWidth=X, explained hereMore on
ABS_MT_TOOL_TYPERunning
sudo libinput record -o toupad.logyou can see what messages are sent by the touchpad, and in my case at least (Framework 16 with NixOS) it reports in the top info section that it supports the method, then each time the tool changes it reports it (the first touch is assumed to be a finger unless specified, key is 0=finger, 1=pen, 2=palm)toupad.log
This event is described in the multi-touch-protocol documentation here, internal function descibed here
Beta Was this translation helpful? Give feedback.
All reactions