(currentKeyCode: number)
| 2 | |
| 3 | /** keyCode Judgment function */ |
| 4 | export function isValidateOpenKey(currentKeyCode: number): boolean { |
| 5 | return ( |
| 6 | // Undefined for Edge bug: |
| 7 | // https://github.com/ant-design/ant-design/issues/51292 |
| 8 | currentKeyCode && |
| 9 | // Other keys |
| 10 | ![ |
| 11 | // System function button |
| 12 | KeyCode.ESC, |
| 13 | KeyCode.SHIFT, |
| 14 | KeyCode.BACKSPACE, |
| 15 | KeyCode.TAB, |
| 16 | KeyCode.WIN_KEY, |
| 17 | KeyCode.ALT, |
| 18 | KeyCode.META, |
| 19 | KeyCode.WIN_KEY_RIGHT, |
| 20 | KeyCode.CTRL, |
| 21 | KeyCode.SEMICOLON, |
| 22 | KeyCode.EQUALS, |
| 23 | KeyCode.CAPS_LOCK, |
| 24 | KeyCode.CONTEXT_MENU, |
| 25 | // F1-F12 |
| 26 | KeyCode.F1, |
| 27 | KeyCode.F2, |
| 28 | KeyCode.F3, |
| 29 | KeyCode.F4, |
| 30 | KeyCode.F5, |
| 31 | KeyCode.F6, |
| 32 | KeyCode.F7, |
| 33 | KeyCode.F8, |
| 34 | KeyCode.F9, |
| 35 | KeyCode.F10, |
| 36 | KeyCode.F11, |
| 37 | KeyCode.F12, |
| 38 | ].includes(currentKeyCode) |
| 39 | ); |
| 40 | } |
no outgoing calls
no test coverage detected
searching dependent graphs…