Opened 10 years ago
Closed 4 years ago
#11673 closed enhancement (fixed)
Add mouse-down-filter-while-typing to Touchpad prefs (easy)
Reported by: | humdinger | Owned by: | pulkomandy |
---|---|---|---|
Priority: | normal | Milestone: | R1/beta3 |
Component: | Preferences/Input | Version: | R1/Development |
Keywords: | Cc: | ||
Blocked By: | Blocking: | #16281 | |
Platform: | All |
Description
This is hrev48584.
For BeOS, there's been an input_server filter that prevented you from accidentally creating mouse clicks on the touchpad while typing. I contacted the author, Shamyl Zakariya, who agreed to release the (tiny piece of) code for us. The archive is attached to this ticket.
I propose to integrate this setting in the Touchpad preferences. I'm not sure the setting has to be adjustable even, at least here the 300ms worked well enough. So, a checkbox should suffice, but if people complain, a slider would be OK too...
Attachments (1)
Change History (15)
by , 10 years ago
Attachment: | TouchpadInputServerFilter.zip added |
---|
comment:1 by , 10 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:2 by , 9 years ago
Now hosted at HaikuArchive as PadBlocker. Also available as package in HaikuDepot. Still, would be nice to see integrated into the system with a slider in the Touchpad prefs.
comment:4 by , 6 years ago
I was thinking of changing the value of _threshold as the slider is moved using a get function to get the current value and a set function to set the _threshold value to appropriate value. Am I going in the right direction?
comment:5 by , 6 years ago
I am unable to understand where to instantiate the PadBlocker object to be able to change the value of the _threshold variable with the value taken as input from the slider. Any help would be appreciated.
comment:6 by , 6 years ago
In the comment at the start of the sourcecode I found this: https://github.com/HaikuArchives/PadBlocker/blob/master/PadBlocker.cpp
Note: makes a settings file in
home/config/settings/PadBlocker_settings
. Just a text file, containing the sensitivity threshold in thousandths of a second. This number represents the delay between the last B_KEY_UP message and when the filter will allow a B_MOUSE_DOWN message. Eg, if less than _threshold has transpired between a B_KEY_DOWN and a B_MOUSE_DOWN, the mouse down event will be skipped, cast into oblivion.
So you just need to create that file and store the slider value in it. To write a file, you can use BFile (which is a BDataIO), or if you already know them, usual C (fprinf) or C++ (iostream) file operations.
comment:7 by , 6 years ago
Just changing the file will work? don't we have to instantiate the PadBlocker object somewhere? Or is it already built-in? Sorry for not getting things at one go, I'm still trying to navigate my way through the Haiku codebase.
comment:8 by , 6 years ago
Padblocker is a input server filter you can install from as a package from HaikuDepot and not installed by default.
So maybe you only want to show settings for it if it is installed? Otherwise they won't do anything. Or perhaps it could just become part of the base install.
comment:10 by , 5 years ago
Owner: | changed from | to
---|
comment:11 by , 5 years ago
Owner: | changed from | to
---|
Help reviewing and polishing https://review.haiku-os.org/c/haiku/+/1590 welcome :)
comment:12 by , 5 years ago
Component: | Preferences/Touchpad → Preferences/Input |
---|
comment:13 by , 4 years ago
Blocking: | 16281 added |
---|
comment:14 by , 4 years ago
Milestone: | R1 → R1/beta3 |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
Patch has been merged.
original TouchpadInputServerFilter