Skip to content

Commit

Permalink
Add more docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ai committed Feb 17, 2024
1 parent 9b6759f commit 4373884
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ using keyboard.
* Show/hide submenus of `role="menu"`.
* Allows users to **override hotkeys**.
* **1 KB** (minified and brotlied). No dependencies.
* Vanilla JS and works with any framework including React, Vue, Svelte.

```jsx
export const Button = ({ hokey, children }) => {
Expand All @@ -32,3 +33,58 @@ export const Button = ({ hokey, children }) => {
```sh
npm install keyux
```

Then add `startKeyUX` call with necessary features to main JS file.

```diff
+ import {
+ getHotKeyHint,
+ hiddenKeyUX,
+ hotkeyKeyUX,
+ jumpKeyUX,
+ likelyWithKeyboard,
+ menuKeyUX,
+ pressKeyUX,
+ startKeyUX
+ } from 'keyux'

+ startKeyUX(window, [
+ hotkeyKeyUX(overrides),
+ menuKeyUX(),
+ pressKeyUX('is-pressed'),
+ jumpKeyUX(),
+ hiddenKeyUX()
+ ])

createRoot(root).render(<App>)
```

## Features

### Hotkeys

TODO

### Pressed State

TODO

### Hotkeys Hint

TODO

### Hotkeys Override

TODO

### Menu

TODO

### Jumps

TODO

### Nested Menu

TODO

0 comments on commit 4373884

Please sign in to comment.