Commit 02d5480
fix: Support Function Key Handling in macOS Views (#2554)
## Summary:
Function keys on macOS currently get dispatched with the value from the
underlying NS*FunctionKey code point. For instance, a `F12` event gets
dispatched as `\uf70f` for
[NS12FunctionKey](https://developer.apple.com/documentation/appkit/nsf12functionkey?language=objc).
To clean this up, we should dispatch the same strings we use on other
platforms (i.e. `'F12'` for the F12 key).
## Test Plan:
I used a pressable component with a `onKeyDown` handler in
`RNTester-macOS` to test keyboard events. With this change, the function
keys come in as `F12`, `F11` etc... instead of the underlying
NS*FunctionKey code points.
---------
Co-authored-by: Colin Heffernan <coheffer@microsoft.com>1 parent 48e6077 commit 02d5480
1 file changed
Lines changed: 24 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
66 | 90 | | |
67 | 91 | | |
68 | 92 | | |
| |||
0 commit comments