Improved #51 and fixed #80

This commit is contained in:
Simon Cambier
2022-07-14 08:24:31 +02:00
parent cdce2b5f0e
commit 6b64cd80b4
4 changed files with 14 additions and 18 deletions

View File

@@ -1,4 +1,4 @@
import { App, Modal, TFile } from 'obsidian'
import { App, Modal, TFile, Platform } from 'obsidian'
import ModalVault from './components/ModalVault.svelte'
import ModalInFile from './components/ModalInFile.svelte'
import { eventBus, isInputComposition } from './globals'
@@ -61,15 +61,10 @@ abstract class OmnisearchModal extends Modal {
}
// #endregion Up/Down navigation
this.scope.register(['Ctrl'], 'Enter', e => {
this.scope.register(['Mod'], 'Enter', e => {
e.preventDefault()
eventBus.emit('ctrl-enter') // Open in new pane
})
this.scope.register(['Meta'], 'Enter', e => {
e.preventDefault()
eventBus.emit('ctrl-enter') // Open in new pane (but on Mac)
})
this.scope.register(['Alt'], 'Enter', e => {
e.preventDefault()