W3C home > Mailing lists > Public > public-pointer-events@w3.org > January to March 2015

New webkitmouseforce* events in WebKit

From: Rick Byers <rbyers@chromium.org>
Date: Thu, 26 Mar 2015 10:38:40 -0400
Message-ID: <CAFUtAY8nVS18WTvCU=UJWNFsxJara-xK5w0TjKPpSdpMJomAwA@mail.gmail.com>
To: "public-pointer-events@w3.org" <public-pointer-events@w3.org>
People here will probably be interested in these new event types that just
landed in WebKit <https://bugs.webkit.org/show_bug.cgi?id=142836>.

Here's the relevant API details from the ChangeLog:

This patch adds six new events for the force click gesture:

webkitmouseforcewillbegin -> Event is sent just before mousedown to
indicate that
force can be perceived if the user presses any harder. The author should
default on this event to both prevent the user agent’s default force click
features and to receive the other 5 events.

webkitmouseforcechanged -> This event fires whenever force changes between
mousedown and mouseup. It is a new type of mouse event that includes a
variable which is a normalized number between 0 (corresponds to click) and
(corresponds to force click). In this patch, I have only added code to send
event between mousedown and mouseforcedown, but as a followup patch, we
plan to
send it through mouseup.

webkitmouseforcecancelled -> If the user releases their finger from the
after pressing hard enough to send webkitmouseforcewillbegin events but not
enough to force click, this event will be sent to indicate that the user
out on the gesture.

webkitmouseforcedown -> The down part of the force click.

webkitmouseforceup -> The up part of the force click. This event is added
in this
patch, but does not yet fire. That is work for a follow-up patch.

webkitmouseforceclick -> The equivalent of the click event for the force
Should fire just after webkitmouseforceup. This event is added in this
patch, but
does not yet fire. That is work for a follow-up patch.
Received on Thursday, 26 March 2015 14:39:27 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 26 March 2015 14:39:28 UTC