Skip to content

Commit

Permalink
feat(useMagicKeys): add more alias
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Apr 8, 2021
1 parent 8e04292 commit ae56165
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/useMagicKeys/index.md
Expand Up @@ -26,7 +26,7 @@ watchEffect(() => {
})
```

Check out [all the possible keycodes](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode).
Check out [all the possible keycodes](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code/code_values).

### Combinations

Expand Down
4 changes: 4 additions & 0 deletions packages/core/useMagicKeys/index.ts
Expand Up @@ -46,6 +46,10 @@ export interface UseMagicKeysOptions<Reactive extends Boolean> {
export const DefaultMagicKeysAliasMap: Readonly<Record<string, string>> = {
ctrl: 'control',
option: 'meta',
up: 'arrowup',
down: 'arrowdown',
left: 'arrowleft',
right: 'arrowright',
}

export interface MagicKeysInternal {
Expand Down

0 comments on commit ae56165

Please sign in to comment.