@@ -221,13 +221,10 @@ export interface NativePointerEvent extends NativeMouseEvent {
221221export type PointerEvent = NativeSyntheticEvent < NativePointerEvent > ;
222222
223223export type NativeTouchEvent = $ReadOnly < {
224- altKey ?: ?boolean , // [macOS]
225- button ?: ?number , // [macOS]
226224 /**
227225 * Array of all touch events that have changed since the last event
228226 */
229227 changedTouches : $ReadOnlyArray < NativeTouchEvent > ,
230- ctrlKey ?: ?boolean , // [macOS]
231228 /**
232229 * 3D Touch reported force
233230 * @platform ios
@@ -245,7 +242,7 @@ export type NativeTouchEvent = $ReadOnly<{
245242 * The Y position of the touch, relative to the element
246243 */
247244 locationY : number ,
248- metaKey ?: ? boolean , // [macOS]
245+
249246 /**
250247 * The X position of the touch, relative to the screen
251248 */
@@ -254,7 +251,6 @@ export type NativeTouchEvent = $ReadOnly<{
254251 * The Y position of the touch, relative to the screen
255252 */
256253 pageY : number ,
257- shiftKey ?: ?boolean , // [macOS]
258254 /**
259255 * The node id of the element receiving the touch event
260256 */
@@ -267,6 +263,13 @@ export type NativeTouchEvent = $ReadOnly<{
267263 * Array of all current touches on the screen
268264 */
269265 touches : $ReadOnlyArray < NativeTouchEvent > ,
266+ // [macOS
267+ ctrlKey ?: ?boolean ,
268+ altKey ?: ?boolean ,
269+ shiftKey ?: ?boolean ,
270+ metaKey ?: ?boolean ,
271+ button ?: ?number ,
272+ // macOS]
270273} > ;
271274
272275export type GestureResponderEvent = ResponderSyntheticEvent < NativeTouchEvent > ;
@@ -283,48 +286,6 @@ export type NativeScrollPoint = $ReadOnly<{
283286 x : number ,
284287} > ;
285288
286- // [macOS
287- export type KeyEvent = NativeSyntheticEvent <
288- $ReadOnly < { |
289- // Modifier keys
290- capsLockKey : boolean ,
291- shiftKey : boolean ,
292- ctrlKey : boolean ,
293- altKey : boolean ,
294- metaKey : boolean ,
295- numericPadKey : boolean ,
296- helpKey : boolean ,
297- functionKey : boolean ,
298- // Key options
299- ArrowLeft : boolean ,
300- ArrowRight : boolean ,
301- ArrowUp : boolean ,
302- ArrowDown : boolean ,
303- key : string ,
304- | } > ,
305- > ;
306-
307- /**
308- * Represents a key that could be passed to `KeyDownEvents` and `KeyUpEvents`.
309- *
310- * `key` is the actual key, such as "a", or one of the special values:
311- * "Tab", "Escape", "Enter", "ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown",
312- * "Backspace", "Delete", "Home", "End", "PageUp", "PageDown".
313- *
314- * The rest are modifiers that when absent mean false.
315- *
316- * @platform macos
317- */
318- export type HandledKeyEvent = $ReadOnly < { |
319- altKey ?: ?boolean ,
320- ctrlKey ?: ?boolean ,
321- metaKey ?: ?boolean ,
322- shiftKey ?: ?boolean ,
323- key : string ,
324- | } > ;
325-
326- // macOS]
327-
328289export type NativeScrollVelocity = $ReadOnly < {
329290 y : number ,
330291 x : number ,
@@ -371,28 +332,6 @@ export type MouseEvent = NativeSyntheticEvent<
371332 } > ,
372333> ;
373334
374- // // Base mouse event data shared between MouseEvent and DragEvent
375- // export type NativeMouseEvent = $ReadOnly<{
376- // clientX: number,
377- // clientY: number,
378- // pageX: number,
379- // pageY: number,
380- // timestamp: number,
381- // screenX?: number,
382- // screenY?: number,
383- // altKey?: boolean,
384- // ctrlKey?: boolean,
385- // shiftKey?: boolean,
386- // metaKey?: boolean,
387- // }>;
388-
389- // export type MouseEvent = NativeSyntheticEvent<
390- // $ReadOnly<{
391- // ...NativeMouseEvent,
392- // dataTransfer?: DataTransfer,
393- // }>,
394- // >;
395-
396335// [macOS
397336export type DataTransferItem = $ReadOnly < {
398337 name : string ,
@@ -416,13 +355,46 @@ export type DragEvent = NativeSyntheticEvent<
416355 pageX : number ,
417356 pageY : number ,
418357 timestamp : number ,
419- screenX ?: number ,
420- screenY ?: number ,
421- altKey ?: boolean ,
422- ctrlKey ?: boolean ,
423- shiftKey ?: boolean ,
424- metaKey ?: boolean ,
425358 dataTransfer ?: DataTransfer ,
426359 } > ,
427360> ;
361+
362+ export type KeyEvent = NativeSyntheticEvent <
363+ $ReadOnly < { |
364+ // Modifier keys
365+ capsLockKey : boolean ,
366+ shiftKey : boolean ,
367+ ctrlKey : boolean ,
368+ altKey : boolean ,
369+ metaKey : boolean ,
370+ numericPadKey : boolean ,
371+ helpKey : boolean ,
372+ functionKey : boolean ,
373+ // Key options
374+ ArrowLeft : boolean ,
375+ ArrowRight : boolean ,
376+ ArrowUp : boolean ,
377+ ArrowDown : boolean ,
378+ key : string ,
379+ | } > ,
380+ > ;
381+
382+ /**
383+ * Represents a key that could be passed to `KeyDownEvents` and `KeyUpEvents`.
384+ *
385+ * `key` is the actual key, such as "a", or one of the special values:
386+ * "Tab", "Escape", "Enter", "ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown",
387+ * "Backspace", "Delete", "Home", "End", "PageUp", "PageDown".
388+ *
389+ * The rest are modifiers that when absent mean false.
390+ *
391+ * @platform macos
392+ */
393+ export type HandledKeyEvent = $ReadOnly < { |
394+ ctrlKey ?: ?boolean ,
395+ altKey ?: ?boolean ,
396+ shiftKey ?: ?boolean ,
397+ metaKey ?: ?boolean ,
398+ key : string ,
399+ | } > ;
428400// macOS]
0 commit comments