@@ -221,13 +221,10 @@ export interface NativePointerEvent extends NativeMouseEvent {
221
221
export type PointerEvent = NativeSyntheticEvent < NativePointerEvent > ;
222
222
223
223
export type NativeTouchEvent = $ReadOnly < {
224
- altKey ?: ?boolean , // [macOS]
225
- button ?: ?number , // [macOS]
226
224
/**
227
225
* Array of all touch events that have changed since the last event
228
226
*/
229
227
changedTouches : $ReadOnlyArray < NativeTouchEvent > ,
230
- ctrlKey ?: ?boolean , // [macOS]
231
228
/**
232
229
* 3D Touch reported force
233
230
* @platform ios
@@ -245,7 +242,7 @@ export type NativeTouchEvent = $ReadOnly<{
245
242
* The Y position of the touch, relative to the element
246
243
*/
247
244
locationY : number ,
248
- metaKey ?: ? boolean , // [macOS]
245
+
249
246
/**
250
247
* The X position of the touch, relative to the screen
251
248
*/
@@ -254,7 +251,6 @@ export type NativeTouchEvent = $ReadOnly<{
254
251
* The Y position of the touch, relative to the screen
255
252
*/
256
253
pageY : number ,
257
- shiftKey ?: ?boolean , // [macOS]
258
254
/**
259
255
* The node id of the element receiving the touch event
260
256
*/
@@ -267,6 +263,13 @@ export type NativeTouchEvent = $ReadOnly<{
267
263
* Array of all current touches on the screen
268
264
*/
269
265
touches : $ReadOnlyArray < NativeTouchEvent > ,
266
+ // [macOS
267
+ ctrlKey ?: ?boolean ,
268
+ altKey ?: ?boolean ,
269
+ shiftKey ?: ?boolean ,
270
+ metaKey ?: ?boolean ,
271
+ button ?: ?number ,
272
+ // macOS]
270
273
} > ;
271
274
272
275
export type GestureResponderEvent = ResponderSyntheticEvent < NativeTouchEvent > ;
@@ -283,48 +286,6 @@ export type NativeScrollPoint = $ReadOnly<{
283
286
x : number ,
284
287
} > ;
285
288
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
-
328
289
export type NativeScrollVelocity = $ReadOnly < {
329
290
y : number ,
330
291
x : number ,
@@ -371,28 +332,6 @@ export type MouseEvent = NativeSyntheticEvent<
371
332
} > ,
372
333
> ;
373
334
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
-
396
335
// [macOS
397
336
export type DataTransferItem = $ReadOnly < {
398
337
name : string ,
@@ -416,13 +355,46 @@ export type DragEvent = NativeSyntheticEvent<
416
355
pageX : number ,
417
356
pageY : number ,
418
357
timestamp : number ,
419
- screenX ?: number ,
420
- screenY ?: number ,
421
- altKey ?: boolean ,
422
- ctrlKey ?: boolean ,
423
- shiftKey ?: boolean ,
424
- metaKey ?: boolean ,
425
358
dataTransfer ?: DataTransfer ,
426
359
} > ,
427
360
> ;
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
+ | } > ;
428
400
// macOS]
0 commit comments