Skip to content

Commit

Permalink
feat: Add keycap shortcuts for matrix selection
Browse files Browse the repository at this point in the history
  • Loading branch information
arnog committed Nov 15, 2023
1 parent 17631d5 commit 764e07b
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
instead of mf.registers = {...mf.registers, arraystretch: 1.5}`
- Allow changing registers using `\renewcommand`, for example
`\renewcommand{\arraystretch}{1.5}`
- Added keycap shortcuts `[up]` and `[down]` to move the selection up or down
in a matrix.


## 0.96.0 (2023-11-14)

Expand Down
18 changes: 18 additions & 0 deletions src/virtual-keyboard/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -712,6 +712,24 @@ const KEYCAP_SHORTCUTS: Record<string, Partial<VirtualKeyboardKeycap>> = {
command: ['performWithFeedback', 'extendSelectionForward'],
},
},
'[up]': {
class: 'action hide-shift',
label: '↑',
command: ['performWithFeedback', 'moveUp'],
shift: {
label: '↟',
command: ['performWithFeedback', 'extendSelectionUpward'],
},
},
'[down]': {
class: 'action hide-shift',
label: '↓',
command: ['performWithFeedback', 'moveDown'],
shift: {
label: '↡',
command: ['performWithFeedback', 'extendSelectionDownward'],
},
},
'[return]': {
class: 'action hide-shift',
command: ['performWithFeedback', 'commit'],
Expand Down

0 comments on commit 764e07b

Please sign in to comment.