diff options
author | Gökay Şatır <gokaysatir@gmail.com> | 2023-10-03 16:46:19 +0300 |
---|---|---|
committer | Gökay ŞATIR <gokaysatir@gmail.com> | 2023-10-05 20:11:49 +0300 |
commit | aa0c4dbc7a69cae2a9be52c872790c9178296171 (patch) | |
tree | 43dcda8fc6a2d21706c1c8b4cbaa99f6d235fa22 /browser/src/map/handler/Map.Keyboard.js | |
parent | CSS: Removed unused document-signing-bar (diff) | |
download | online-aa0c4dbc7a69cae2a9be52c872790c9178296171.tar.gz online-aa0c4dbc7a69cae2a9be52c872790c9178296171.zip |
Added CTRL + ALT + N shortcut.
* This sends the UI_CreateFile postmessage to integrator along with the document type.
* Integrator should handle the message.
Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: I75d78a2d37876af7233025233ab7f1b3515442a3
Diffstat (limited to 'browser/src/map/handler/Map.Keyboard.js')
-rw-r--r-- | browser/src/map/handler/Map.Keyboard.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/browser/src/map/handler/Map.Keyboard.js b/browser/src/map/handler/Map.Keyboard.js index e09a286eaf..52db865e09 100644 --- a/browser/src/map/handler/Map.Keyboard.js +++ b/browser/src/map/handler/Map.Keyboard.js @@ -734,6 +734,13 @@ L.Map.Keyboard = L.Handler.extend({ e.preventDefault(); } + // CTRL + ALT + N for new document. This needs to be handled by the integrator. + if (this._isCtrlKey(e) && e.altKey && e.key.toUpperCase() === 'N') { + this._map.fire('postMessage', {msgId: 'UI_CreateFile', args: { DocumentType: this._map.getDocType() }}); + e.preventDefault(); + return true; + } + // CTRL + SHIFT + L is added to the core side for writer. Others can also be checked. if (this._isCtrlKey(e) && e.shiftKey && e.key === 'L' && this._map.getDocType() !== 'text' && this._map.getDocType() !== 'spreadsheet') { app.socket.sendMessage('uno .uno:DefaultBullet'); |