Skip to content

Commit e5fa413

Browse files
authored
Merge pull request #107 from LuCEresearchlab/keyboard-binding-changes
Changed binding for info button
2 parents e5593d3 + 1013da4 commit e5fa413

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

frontend/src/components/tagger_component/MisconceptionInfoButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ function MisconceptionInfoButton({tags, handled_element, keyboardIndex}: Input)
4747
// end popup stuff
4848

4949
withKeyboard((command => {
50-
if (keyboardIndex != undefined && (command == '' + keyboardIndex + 'h')) {
50+
if (keyboardIndex != undefined && (command == '' + keyboardIndex + '?')) {
5151
ref.current?.click()
5252
}
5353
}))

frontend/src/hooks/withKeyboard.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ function withKeyboard(action: (command: string) => void) {
4040
setCommand(command.substring(0, command.length - 1))
4141
} else if (key.length == 1 && allowedInputs.test(key)) {
4242
setCommand(command + key)
43-
} else setCommand('')
43+
}
4444
}
4545

4646
document.addEventListener('keydown', func)

0 commit comments

Comments
 (0)