Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/Icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const Icon: Record<Action, JSX.Element> & Record<string, JSX.Element> = {

duplicate: fasIcon("clone"),

help: fasIcon("question"),
help: fasIcon("keyboard"),
fullScreen: fasIcon("expand"),
enterFullScreen: fasIcon("expand"),
exitFullScreen: fasIcon("compress"),
Expand Down
2 changes: 1 addition & 1 deletion src/components/Stylebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const Stylebar = (props: {
const otherActions = [
Action.Copy,
Action.Paste,
Action.Help,
Action.Bindings,
!isFullscreen ? Action.EnterFullScreen : Action.ExitFullScreen,
];

Expand Down
2 changes: 1 addition & 1 deletion src/lib/action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export enum Action {
HalfFilled = "halfFilled",
Filled = "filled",

Help = "help",
Bindings = "help",
ResetStyles = "resetStyles",
FullScreen = "fullScreen",
EnterFullScreen = "enterFullScreen",
Expand Down
18 changes: 9 additions & 9 deletions src/lib/keyboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ export const defaultKeys: KeyMap = {
"ctrl + x": Action.Cut,
"ctrl + c": Action.Copy,

"1": Action.Help,
"0": Action.Help,
"/": Action.Help,
"shift + /": Action.Help,
"1": Action.Bindings,
"0": Action.Bindings,
"/": Action.Bindings,
"shift + /": Action.Bindings,
};

export default class KeyboardHandler {
Expand Down Expand Up @@ -75,12 +75,12 @@ export default class KeyboardHandler {

// for backwards compatibility, ensure help is bound
if (
Object.values(this.keyMap).every((action) => action !== Action.Help)
Object.values(this.keyMap).every((action) => action !== Action.Bindings)
) {
this.bind("0", Action.Help);
this.bind("1", Action.Help);
this.bind("/", Action.Help);
this.bind("shift + /", Action.Help);
this.bind("0", Action.Bindings);
this.bind("1", Action.Bindings);
this.bind("/", Action.Bindings);
this.bind("shift + /", Action.Bindings);
}
}
}
Expand Down