@3dsource/angular-unreal-module 0.0.181 → 0.0.182
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -268,24 +268,43 @@ declare const MouseButtonsMask: {
|
|
|
268
268
|
* punctuation keys by ASCII — `;` as 59, `=` as 61, `-` as 173) and keys Unreal
|
|
269
269
|
* numbers differently from the DOM (the right-hand modifiers, the Cmd/Win keys).
|
|
270
270
|
*
|
|
271
|
-
* The numpad
|
|
272
|
-
*
|
|
273
|
-
*
|
|
274
|
-
*
|
|
275
|
-
*
|
|
276
|
-
*
|
|
271
|
+
* The numpad digits, `NumpadDecimal` and `NumpadEnter` are the exception to the
|
|
272
|
+
* rule above, and the reason it is worded as a rule. A numpad key reports the
|
|
273
|
+
* same `code` in both NumLock states but a different virtual key — `Numpad4` is
|
|
274
|
+
* 37/`VK_LEFT` with NumLock off and 100/`VK_NUMPAD4` with it on. Their entries
|
|
275
|
+
* here hold the NumLock-*off* values, so an entry wins over the value the
|
|
276
|
+
* browser resolved and pins that state: with NumLock on the engine is told
|
|
277
|
+
* `VK_LEFT`. Read `event.keyCode` directly if you need the other state.
|
|
278
|
+
* `NumpadAdd`/`Subtract`/`Multiply`/`Divide` carry no such caveat — they do not
|
|
279
|
+
* change with NumLock.
|
|
277
280
|
*
|
|
278
281
|
* `SpecialKeyCodes` in `./buttons-codes` repeats seven of these entries with
|
|
279
282
|
* the same values. The two are kept apart because both are public API; merging
|
|
280
283
|
* them would be a breaking change.
|
|
281
284
|
*
|
|
282
|
-
*
|
|
283
|
-
* `
|
|
284
|
-
*
|
|
285
|
+
* `InvertedKeyMap` is consequently lossy. `NumpadEnter` and `Numpad4/8/6/2`
|
|
286
|
+
* share their values with `Enter` and `Arrow*`, and the derivation keeps the
|
|
287
|
+
* last name written for a value, so those five cannot be reached through it —
|
|
288
|
+
* which is what makes them unnameable through the numeric form of
|
|
289
|
+
* `useKeyboardKeys()`. The `OSLeft`/`MetaLeft` and `OSRight`/`MetaRight` pairs
|
|
290
|
+
* share a value on purpose: they are legacy and current names for the same
|
|
291
|
+
* physical key.
|
|
285
292
|
*/
|
|
286
293
|
declare const KeyboardNumericCode: {
|
|
287
294
|
readonly Backspace: 8;
|
|
288
295
|
readonly Tab: 9;
|
|
296
|
+
readonly Numpad5: 12;
|
|
297
|
+
readonly NumpadEnter: 13;
|
|
298
|
+
readonly Numpad9: 33;
|
|
299
|
+
readonly Numpad3: 34;
|
|
300
|
+
readonly Numpad1: 35;
|
|
301
|
+
readonly Numpad7: 36;
|
|
302
|
+
readonly Numpad4: 37;
|
|
303
|
+
readonly Numpad8: 38;
|
|
304
|
+
readonly Numpad6: 39;
|
|
305
|
+
readonly Numpad2: 40;
|
|
306
|
+
readonly Numpad0: 45;
|
|
307
|
+
readonly NumpadDecimal: 46;
|
|
289
308
|
readonly Enter: 13;
|
|
290
309
|
readonly ShiftLeft: 16;
|
|
291
310
|
readonly ControlLeft: 17;
|
|
@@ -392,7 +411,7 @@ type IKeyCode = (typeof KeyboardNumericCode)[IKeyName];
|
|
|
392
411
|
*
|
|
393
412
|
* The union lists the names this table knows a virtual-key code for, so editors
|
|
394
413
|
* complete them. The `string` branch keeps every other DOM code assignable —
|
|
395
|
-
* `'
|
|
414
|
+
* `'Delete'`, `'Home'`, `'PageUp'` — since a key needs no entry here to be
|
|
396
415
|
* matched against `event.code`.
|
|
397
416
|
*/
|
|
398
417
|
type IKeyCodeName = IKeyName | (string & Record<never, never>);
|