MCPcopy
hub / github.com/adobe/react-spectrum / useKeyboard

Function useKeyboard

packages/react-aria/src/interactions/useKeyboard.ts:29–38  ·  view source on GitHub ↗
(props: KeyboardProps)

Source from the content-addressed store, hash-verified

27 * Handles keyboard interactions for a focusable element.
28 */
29export function useKeyboard(props: KeyboardProps): KeyboardResult {
30 return {
31 keyboardProps: props.isDisabled
32 ? {}
33 : {
34 onKeyDown: createEventHandler(props.onKeyDown),
35 onKeyUp: createEventHandler(props.onKeyUp)
36 }
37 };
38}

Callers 11

ExampleFunction · 0.90
useFocusableFunction · 0.90
useTableColumnResizeFunction · 0.90
useMenuItemFunction · 0.90
useSliderThumbFunction · 0.90
useColorWheelFunction · 0.90
useColorAreaFunction · 0.90
ListBox.tsxFile · 0.90
ActionBarInnerFunction · 0.90
TokenField.tsxFile · 0.90
ActionBar.tsxFile · 0.90

Calls 1

createEventHandlerFunction · 0.90

Tested by 1

ExampleFunction · 0.72