Opened 15 years ago

Last modified 4 years ago

#4685 assigned enhancement

[patch] Don't register mouse click when Wacom pen slightly touches tablet

Reported by: idefix Owned by: stippi
Priority: normal Milestone: R1.1
Component: Drivers/Input/Wacom Version: R1/alpha1
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

I often accidentally touches the Wacom tablet slightly with the pen, causing Haiku to register a mouse click. Therefore I've created a patch that implements a minimum click pressure.

Attachments (1)

wacom_pressure.patch (783 bytes ) - added by idefix 15 years ago.
(patch) set minimum click pressure for Wacom pen

Download all attachments as: .zip

Change History (12)

by idefix, 15 years ago

Attachment: wacom_pressure.patch added

(patch) set minimum click pressure for Wacom pen

comment:1 by stippi, 15 years ago

The code already implements that. Cutting of a range of the pressure is not the way to go. You need to find the place in the code where it uses the proximity as a threshold for the click. This value seems to be too low for your tablet. Since this is obviously tablet specific, and I even remember this value being different depending on where you touched the tablet, this should definitely go into a future preference panel.

in reply to:  1 comment:2 by idefix, 15 years ago

Replying to stippi:

The code already implements that.

You mean (in case of a Wacom Graphire) line 288 in TabletDevice.cpp?

Cutting of a range of the pressure is not the way to go.

No, and it wasn't my first intention to do that. I was going to use only this line:

if (pressure <= MIN_CLICK_PRESSURE && mode == MODE_PEN) 
firstButton = false; 

But this caused Wonderbrush to ignore the pressure-levels below MIN_CLICK_PRESSURE, so drawing thin lines didn't work anymore.

You need to find the place in the code where it uses the proximity as a threshold for the click. This value seems to be too low for your tablet. Since this is obviously tablet specific, and I even remember this value being different depending on where you touched the tablet, this should definitely go into a future preference panel.

Well, I had a more generic solution in mind. But a preference panel does sound good. :)

comment:3 by stippi, 15 years ago

Hm, maybe line 288 should be

firstButton = (data[1] & 0x01) != 0;

If that doesn't work, you can cut off the pressure, but do it like this:

pressure = max_c(0.0, (pressure - 0.1)) / 0.9;

which will make it range from 0.0 to 1.0 again.

in reply to:  3 comment:4 by idefix, 15 years ago

Replying to stippi:

Hm, maybe line 288 should be

firstButton = (data[1] & 0x01) != 0;

This causes firstButton to be true at a pressure of approximately 0.12. But this also causes WonderBrush to ignore the pressure-levels below that. Maybe WonderBrush should only act on the pressure-level and not on the button-data when one of the parameters is configured for pressure-sensitivity and the user is using a Wacom pen? That way you can use the full pressure-range when drawing and still have a trigger-point for firstButton when using any other application.

If that doesn't work, you can cut off the pressure, but do it like this:

pressure = max_c(0.0, (pressure - 0.1)) / 0.9;

which will make it range from 0.0 to 1.0 again.

This works, but as you said, it will cut a range of the pressure which the driver shouldn't do at default. Maybe one day this can be implemented in a preference panel.

comment:5 by mmlr, 15 years ago

Owner: changed from mmlr to stippi
Status: newassigned

Reassigning as the wacom driver's not really my area.

comment:6 by nielx, 15 years ago

patch: 1

comment:7 by idefix, 15 years ago

patch: 10

comment:8 by waddlesplash, 10 years ago

Component: Drivers/Mouse/USBDrivers/Input/Wacom

comment:9 by waddlesplash, 10 years ago

Milestone: R1Unscheduled

comment:10 by waddlesplash, 10 years ago

Milestone: UnscheduledR1

Reverting earlier milestone change

comment:11 by pulkomandy, 4 years ago

Milestone: R1R1.1
Note: See TracTickets for help on using tickets.