{"abstract":[{"type":"text","text":"The "},{"type":"codeVoice","code":"GestureEvent"},{"type":"text","text":" class encapsulates information about a multi-touch gesture."}],"documentVersion":0,"hierarchy":{"paths":[["doc://com.apple.documentation/documentation/technologies","doc://com.apple.documentation/documentation/webkitjs"]]},"identifier":{"url":"doc://com.apple.documentation/documentation/webkitjs/gestureevent","interfaceLanguage":"data"},"legacy_identifier":1630462,"kind":"symbol","metadata":{"title":"GestureEvent","role":"symbol","roleHeading":"Class","modules":[{"name":"WebKit JS"}],"platforms":[{"name":"Safari Desktop","introducedAt":"10.1","current":"18.0"},{"name":"Safari Mobile","introducedAt":"2.0","current":"18.0"}],"externalID":"cl/GestureEvent","symbolKind":"cl"},"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"traits":[{"interfaceLanguage":"data"}],"paths":["documentation/webkitjs/gestureevent"]}],"references":{"doc://com.apple.documentation/documentation/webkitjs":{"title":"WebKit JS","identifier":"doc://com.apple.documentation/documentation/webkitjs","url":"/documentation/webkitjs","type":"topic","kind":"symbol","role":"collection"},"doc://com.apple.documentation/documentation/webkitjs/touchevent":{"title":"TouchEvent","type":"topic","identifier":"doc://com.apple.documentation/documentation/webkitjs/touchevent","kind":"symbol","role":"symbol","url":"/documentation/webkitjs/touchevent"},"doc://com.apple.documentation/documentation/webkitjs/uievent":{"title":"UIEvent","type":"topic","identifier":"doc://com.apple.documentation/documentation/webkitjs/uievent","kind":"symbol","role":"symbol","url":"/documentation/webkitjs/uievent"},"doc://com.apple.documentation/documentation/webkitjs/gestureevent/1630971-altkey":{"title":"altKey","type":"topic","identifier":"doc://com.apple.documentation/documentation/webkitjs/gestureevent/1630971-altkey","kind":"symbol","role":"symbol","url":"/documentation/webkitjs/gestureevent/1630971-altkey","abstract":[{"type":"text","text":"A Boolean value indicating whether the alt key is pressed."}]},"doc://com.apple.documentation/documentation/webkitjs/gestureevent/1629639-ctrlkey":{"title":"ctrlKey","type":"topic","identifier":"doc://com.apple.documentation/documentation/webkitjs/gestureevent/1629639-ctrlkey","kind":"symbol","role":"symbol","url":"/documentation/webkitjs/gestureevent/1629639-ctrlkey","abstract":[{"type":"text","text":"A Boolean value indicating whether the control key is pressed."}]},"doc://com.apple.documentation/documentation/webkitjs/gestureevent/1630762-metakey":{"title":"metaKey","type":"topic","identifier":"doc://com.apple.documentation/documentation/webkitjs/gestureevent/1630762-metakey","kind":"symbol","role":"symbol","url":"/documentation/webkitjs/gestureevent/1630762-metakey","abstract":[{"type":"text","text":"A Boolean value indicating whether the meta key is pressed."}]},"doc://com.apple.documentation/documentation/webkitjs/gestureevent/1633278-rotation":{"title":"rotation","type":"topic","identifier":"doc://com.apple.documentation/documentation/webkitjs/gestureevent/1633278-rotation","kind":"symbol","role":"symbol","url":"/documentation/webkitjs/gestureevent/1633278-rotation","abstract":[{"type":"text","text":"The delta rotation since the start of an event, in degrees, where clockwise is positive and counter-clockwise is negative. "}]},"doc://com.apple.documentation/documentation/webkitjs/gestureevent/1632653-scale":{"title":"scale","type":"topic","identifier":"doc://com.apple.documentation/documentation/webkitjs/gestureevent/1632653-scale","kind":"symbol","role":"symbol","url":"/documentation/webkitjs/gestureevent/1632653-scale","abstract":[{"type":"text","text":"The distance between two fingers since the start of an event, as a multiplier of the initial distance. "}]},"doc://com.apple.documentation/documentation/webkitjs/gestureevent/1633677-shiftkey":{"title":"shiftKey","type":"topic","identifier":"doc://com.apple.documentation/documentation/webkitjs/gestureevent/1633677-shiftkey","kind":"symbol","role":"symbol","url":"/documentation/webkitjs/gestureevent/1633677-shiftkey","abstract":[{"type":"text","text":"A Boolean value indicating whether the shift key is pressed."}]},"doc://com.apple.documentation/documentation/webkitjs/gestureevent/1632473-target":{"title":"target","type":"topic","identifier":"doc://com.apple.documentation/documentation/webkitjs/gestureevent/1632473-target","kind":"symbol","role":"symbol","url":"/documentation/webkitjs/gestureevent/1632473-target","abstract":[{"type":"text","text":"The target of this gesture."}]},"doc://com.apple.documentation/documentation/webkitjs/gestureevent/1634533-initgestureevent":{"title":"initGestureEvent","type":"topic","identifier":"doc://com.apple.documentation/documentation/webkitjs/gestureevent/1634533-initgestureevent","kind":"symbol","role":"symbol","url":"/documentation/webkitjs/gestureevent/1634533-initgestureevent","abstract":[{"type":"text","text":"Initializes a newly created "},{"type":"codeVoice","code":"GestureEvent"},{"type":"text","text":" object."}]},"doc://com.apple.documentation/documentation/webkitjs/gestureevent/1777782-clientx":{"title":"clientX","type":"topic","identifier":"doc://com.apple.documentation/documentation/webkitjs/gestureevent/1777782-clientx","kind":"symbol","role":"symbol","url":"/documentation/webkitjs/gestureevent/1777782-clientx"},"doc://com.apple.documentation/documentation/webkitjs/gestureevent/1777798-clienty":{"title":"clientY","type":"topic","identifier":"doc://com.apple.documentation/documentation/webkitjs/gestureevent/1777798-clienty","kind":"symbol","role":"symbol","url":"/documentation/webkitjs/gestureevent/1777798-clienty"},"doc://com.apple.documentation/documentation/webkitjs/gestureevent/1777860-screenx":{"title":"screenX","type":"topic","identifier":"doc://com.apple.documentation/documentation/webkitjs/gestureevent/1777860-screenx","kind":"symbol","role":"symbol","url":"/documentation/webkitjs/gestureevent/1777860-screenx"},"doc://com.apple.documentation/documentation/webkitjs/gestureevent/1777971-screeny":{"title":"screenY","type":"topic","identifier":"doc://com.apple.documentation/documentation/webkitjs/gestureevent/1777971-screeny","kind":"symbol","role":"symbol","url":"/documentation/webkitjs/gestureevent/1777971-screeny"},"doc://com.apple.documentation/documentation/technologies":{"type":"topic","identifier":"doc://com.apple.documentation/documentation/technologies","url":"/documentation/technologies","kind":"technologies","title":"Technologies"}},"relationshipsSections":[{"kind":"relationships","title":"Inherits From","type":"inheritsFrom","identifiers":["doc://com.apple.documentation/documentation/webkitjs/uievent"]}],"topicSections":[{"kind":"taskGroup","title":"Accessing Properties","identifiers":["doc://com.apple.documentation/documentation/webkitjs/gestureevent/1630971-altkey","doc://com.apple.documentation/documentation/webkitjs/gestureevent/1629639-ctrlkey","doc://com.apple.documentation/documentation/webkitjs/gestureevent/1630762-metakey","doc://com.apple.documentation/documentation/webkitjs/gestureevent/1633278-rotation","doc://com.apple.documentation/documentation/webkitjs/gestureevent/1632653-scale","doc://com.apple.documentation/documentation/webkitjs/gestureevent/1633677-shiftkey","doc://com.apple.documentation/documentation/webkitjs/gestureevent/1632473-target"],"anchor":"1667668"},{"kind":"taskGroup","title":"Initializing","identifiers":["doc://com.apple.documentation/documentation/webkitjs/gestureevent/1634533-initgestureevent"],"anchor":"1667752"},{"kind":"taskGroup","title":"Instance Properties","identifiers":["doc://com.apple.documentation/documentation/webkitjs/gestureevent/1777782-clientx","doc://com.apple.documentation/documentation/webkitjs/gestureevent/1777798-clienty","doc://com.apple.documentation/documentation/webkitjs/gestureevent/1777860-screenx","doc://com.apple.documentation/documentation/webkitjs/gestureevent/1777971-screeny"],"anchor":"2857862"}],"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["data"],"tokens":[{"kind":"keyword","text":"interface"},{"kind":"text","text":" "},{"kind":"identifier","text":"GestureEvent"}],"platforms":["Safari Desktop","Safari Mobile"]}]},{"kind":"content","content":[{"anchor":"overview","level":2,"text":"Overview","type":"heading"},{"type":"paragraph","inlineContent":[{"type":"codeVoice","code":"GestureEvent"},{"type":"text","text":" objects are high-level events that encapsulate the low-level "},{"type":"reference","isActive":true,"identifier":"doc://com.apple.documentation/documentation/webkitjs/touchevent"},{"type":"text","text":" objects. Both "},{"type":"codeVoice","code":"GestureEvent"},{"type":"text","text":" and "},{"type":"codeVoice","code":"TouchEvent"},{"type":"text","text":" events are sent during a multi-touch sequence. Gesture events contain scaling and rotation information allowing gestures to be combined, if supported by the platform. If not supported, one gesture ends before another starts. Listen for "},{"type":"codeVoice","code":"GestureEvent"},{"type":"text","text":" events if you want to respond to gestures only, not process the low-level "},{"type":"codeVoice","code":"TouchEvent"},{"type":"text","text":" objects."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"The different types of "},{"type":"codeVoice","code":"GestureEvent"},{"type":"text","text":" objects that can occur are:"}]},{"type":"termList","items":[{"term":{"inlineContent":[{"type":"codeVoice","code":"gesturestart"}]},"definition":{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Sent when two or more fingers touch the surface."}]}]}},{"term":{"inlineContent":[{"type":"codeVoice","code":"gesturechange"}]},"definition":{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Sent when fingers are moved during a gesture."}]}]}},{"term":{"inlineContent":[{"type":"codeVoice","code":"gestureend"}]},"definition":{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Sent when the gesture ends (when there are 1 or 0 fingers touching the surface)."}]}]}}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"For example, for a two finger multi-touch gesture, the events occur in the following sequence:"}]},{"type":"orderedList","items":[{"content":[{"type":"paragraph","inlineContent":[{"type":"codeVoice","code":"touchstart"},{"type":"text","text":" for finger 1. Sent when the first finger touches the surface."}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"codeVoice","code":"gesturestart"},{"type":"text","text":". Sent when the second finger touches the surface."}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"codeVoice","code":"touchstart"},{"type":"text","text":" for finger 2. Sent immediately after "},{"type":"codeVoice","code":"gesturestart"},{"type":"text","text":" when the second finger touches the surface."}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"codeVoice","code":"gesturechange"},{"type":"text","text":" for current gesture. Sent when both fingers move while still touching the surface."}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"codeVoice","code":"gestureend"},{"type":"text","text":". Sent when the second finger lifts from the surface."}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"codeVoice","code":"touchend"},{"type":"text","text":" for finger 2. Sent immediately after "},{"type":"codeVoice","code":"gestureend"},{"type":"text","text":" when the second finger lifts from the surface."}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"codeVoice","code":"touchend"},{"type":"text","text":" for finger 1. Sent when the first finger lifts from the surface."}]}]}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"See "},{"type":"reference","isActive":true,"identifier":"doc://com.apple.documentation/documentation/webkitjs/touchevent"},{"type":"text","text":" if you want to process just low-level "},{"type":"codeVoice","code":"TouchEvent"},{"type":"text","text":" objects."}]}]}],"legalNotices":{"copyright":"Copyright &copy; 2026 Apple Inc. All rights reserved.","termsOfUse":"https://www.apple.com/legal/internet-services/terms/site.html","privacyPolicy":"https://www.apple.com/privacy/privacy-policy"}}