diff --git a/front/public/hotkeys-iframe.js b/front/public/hotkeys-iframe.js index 6c47ee27f..9a2179a3f 100644 --- a/front/public/hotkeys-iframe.js +++ b/front/public/hotkeys-iframe.js @@ -365,3 +365,15 @@ hotkeys('ctrl+k, command+k', function (event) { parent.postMessage('showSearchDialog', '*'); }); + +// Hotkeys for HedgeDoc CodeMirror editor +editor.setOption('extraKeys', { + 'Ctrl-K': () => { + parent.postMessage('showSearchDialog', '*'); + return false; + }, + 'Cmd-K': () => { + parent.postMessage('showSearchDialog', '*'); + return false; + }, +});