Tab to switch contexts, alt+enter to inject a link

This commit is contained in:
Simon Cambier
2022-06-25 12:01:49 +02:00
parent 887787d303
commit b718f8e5cb
7 changed files with 94 additions and 83 deletions

View File

@@ -73,7 +73,7 @@ abstract class OmnisearchModal extends Modal {
this.scope.register(['Alt'], 'Enter', e => {
e.preventDefault()
eventBus.emit('alt-enter') // Open the InFile modal
eventBus.emit('alt-enter') // Insert link
})
this.scope.register(['Shift'], 'Enter', e => {
@@ -88,6 +88,11 @@ abstract class OmnisearchModal extends Modal {
eventBus.emit('enter') // Open in current pane
}
})
this.scope.register([], 'Tab', e => {
e.preventDefault()
eventBus.emit('tab') // Switch context
})
}
}