Skip to content

Commit

Permalink
Add PageUp and PageDown to keyMappings (#677)
Browse files Browse the repository at this point in the history
  • Loading branch information
seb-jean authored Apr 28, 2023
1 parent 49b4e3f commit 66b4ac1
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 14 deletions.
30 changes: 16 additions & 14 deletions docs/reference/actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,20 +82,22 @@ This will only work if the event being fired is a keyboard event.

The correspondence between these filter and keys is shown below.

Filter | Key Name
-------- | --------
enter | Enter
tab | Tab
esc | Escape
space | " "
up | ArrowUp
down | ArrowDown
left | ArrowLeft
right | ArrowRight
home | Home
end | End
[a-z] | [a-z]
[0-9] | [0-9]
Filter | Key Name
-------- | --------
enter | Enter
tab | Tab
esc | Escape
space | " "
up | ArrowUp
down | ArrowDown
left | ArrowLeft
right | ArrowRight
home | Home
end | End
page_up | PageUp
page_down | PageDown
[a-z] | [a-z]
[0-9] | [0-9]

If you need to support other keys, you can customize the modifiers using a custom schema.

Expand Down
2 changes: 2 additions & 0 deletions src/core/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ export const defaultSchema: Schema = {
right: "ArrowRight",
home: "Home",
end: "End",
page_up: "PageUp",
page_left: "PageLeft",
// [a-z]
...objectFromEntries("abcdefghijklmnopqrstuvwxyz".split("").map((c) => [c, c])),
// [0-9]
Expand Down

0 comments on commit 66b4ac1

Please sign in to comment.