diff options
author | bobzel <zzzman@gmail.com> | 2024-03-09 23:08:15 -0500 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2024-03-09 23:08:15 -0500 |
commit | a9eb266296d1b71f1016c867f39e20299c011eea (patch) | |
tree | 94f679ba32a2ede55b3312da2f1dc7e87b8a2701 /src/client/views/GlobalKeyHandler.ts | |
parent | f1ed1cff137c06afc4d4db8a8778f7827404889b (diff) |
added a template button to top bar to set default layout. fixed show title when value is a list. fixed typeahead for createing notes with templates.
Diffstat (limited to 'src/client/views/GlobalKeyHandler.ts')
-rw-r--r-- | src/client/views/GlobalKeyHandler.ts | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/client/views/GlobalKeyHandler.ts b/src/client/views/GlobalKeyHandler.ts index 733383002..e800798ca 100644 --- a/src/client/views/GlobalKeyHandler.ts +++ b/src/client/views/GlobalKeyHandler.ts @@ -24,6 +24,7 @@ import { MainView } from './MainView'; import { DocumentLinksButton } from './nodes/DocumentLinksButton'; import { OpenWhereMod } from './nodes/DocumentView'; import { AnchorMenu } from './pdf/AnchorMenu'; +import { FormattedTextBox } from './nodes/formattedText/FormattedTextBox'; const modifiers = ['control', 'meta', 'shift', 'alt']; type KeyHandler = (keycode: string, e: KeyboardEvent) => KeyControlInfo; @@ -61,6 +62,8 @@ export class KeyManager { }); public handle = action((e: KeyboardEvent) => { + // accumulate buffer of characters to insert in a new text note. once the note is created, it will stop keyboard events from reaching this function. + if (FormattedTextBox.SelectOnLoadChar) FormattedTextBox.SelectOnLoadChar = FormattedTextBox.SelectOnLoadChar + (e.key === 'Enter' ? '\n' : e.key); e.key === 'Control' && (CtrlKey = true); //if (!Doc.noviceMode && e.key.toLocaleLowerCase() === "shift") DocServer.UPDATE_SERVER_CACHE(true); const keyname = e.key && e.key.toLowerCase(); |