Skip to content

Commit

Permalink
make ui/round keyboard shortcuts consistent with ui/puzzle and ui/ana…
Browse files Browse the repository at this point in the history
…lysis
  • Loading branch information
ornicar committed Sep 27, 2022
1 parent 187987b commit 1806eb6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ui/round/src/keyboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@ export const prev = (ctrl: RoundController) => ctrl.userJump(ctrl.ply - 1);
export const next = (ctrl: RoundController) => ctrl.userJump(ctrl.ply + 1);

export const init = (ctrl: RoundController) =>
window.Mousetrap.bind(['left', 'h'], () => {
window.Mousetrap.bind(['left', 'k'], () => {
prev(ctrl);
ctrl.redraw();
})
.bind(['right', 'l'], () => {
.bind(['right', 'j'], () => {
next(ctrl);
ctrl.redraw();
})
.bind(['up', 'k', 'home'], () => {
.bind(['up', '0', 'home'], () => {
ctrl.userJump(0);
ctrl.redraw();
})
.bind(['down', 'j', 'end'], () => {
.bind(['down', '$', 'end'], () => {
ctrl.userJump(ctrl.data.steps.length - 1);
ctrl.redraw();
})
Expand Down

0 comments on commit 1806eb6

Please sign in to comment.