Force Touch events

非标准: 该特性是非标准的,请尽量不要在生产环境中使用它!

Force Touch events are a proprietary, Apple-specific feature which makes possible (where supported by the input hardware) new interactions based on how hard the user clicks or presses down on the touchscreen or trackpad.

Events

webkitmouseforcewillbegin 非标准

This event is fired before the mousedown (en-US) event. Its main use is that it can be Event.preventDefault()ed.

webkitmouseforcedown 非标准

This event is fired after the mousedown (en-US) event as soon as sufficient pressure has been applied for it to qualify as a "force click".

webkitmouseforceup 非标准

This event is fired after the webkitmouseforcedown event as soon as the pressure has been reduced sufficiently to end the "force click".

webkitmouseforcechanged 非标准

This event is fired each time the amount of pressure changes. This event first fires after the mousedown (en-US) event and stops firing before the mouseup (en-US) event.

Event properties

The following property is known to be available on the webkitmouseforcewillbegin, mousedown (en-US), webkitmouseforcechanged, webkitmouseforcedown, webkitmouseforceup, mousemove (en-US), and mouseup (en-US) event objects:

MouseEvent.webkitForce (en-US) 非标准 只读

当前施加于触控板/触摸屏的压力量

常量

这些常数对于确定由MouseEvent.webkitForce (en-US)指示的压力的相对强度是有用的:

MouseEvent.WEBKIT_FORCE_AT_MOUSE_DOWN (en-US) 非标准 只读

正常点击所需的最小力量

MouseEvent.WEBKIT_FORCE_AT_FORCE_MOUSE_DOWN (en-US) 非标准 只读

强制点击所需的最小力量

产品规格

*不是任何规格的一部分。*苹果在 Mac 开发者图书馆一个描述