diff options
author | Gökay Şatır <gokaysatir@gmail.com> | 2023-10-03 16:59:45 +0300 |
---|---|---|
committer | Gökay ŞATIR <gokaysatir@gmail.com> | 2023-10-06 10:10:59 +0300 |
commit | b5af4e0c100fb01f30267e2c3f465a3fb0e972ed (patch) | |
tree | 04fbbcbbf6436471ef192d1df1e81fc3ab5d2ff3 /browser/src/map/handler/Map.Keyboard.js | |
parent | Added CTRL + ALT + N shortcut. (diff) | |
download | online-b5af4e0c100fb01f30267e2c3f465a3fb0e972ed.tar.gz online-b5af4e0c100fb01f30267e2c3f465a3fb0e972ed.zip |
Add CTRL + ALT + O as open document shortcut.
* Sends "UI_OpenDocument" message to integrator.
* The post message needs to be handled by the integrator.
Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: If57bdd1f7db496766fbb7082ffeff855aba4e97c
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 52db865e09..4c210671c4 100644 --- a/browser/src/map/handler/Map.Keyboard.js +++ b/browser/src/map/handler/Map.Keyboard.js @@ -748,6 +748,13 @@ L.Map.Keyboard = L.Handler.extend({ return true; } + // CTRL + ALT + O to open a document. This needs to be handled by the integrator. + if (this._isCtrlKey(e) && e.altKey && e.key.toUpperCase() === 'O') { + this._map.fire('postMessage', { msgId: 'UI_OpenDocument' }); + e.preventDefault(); + return true; + } + if (this._isCtrlKey(e) && e.shiftKey && e.key === '?') { this._map.showHelp('keyboard-shortcuts-content'); e.preventDefault(); |