[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src
Tor Lillqvist (via logerrit)
logerrit at kemper.freedesktop.org
Fri Nov 8 11:54:44 UTC 2019
loleaflet/src/control/Control.MobileInput.js | 9 +++++++++
1 file changed, 9 insertions(+)
New commits:
commit 538d4fceeecc97dcb2cd47da0ece259151cff298
Author: Tor Lillqvist <tml at collabora.com>
AuthorDate: Fri Nov 8 12:51:02 2019 +0200
Commit: Tor Lillqvist <tml at collabora.com>
CommitDate: Fri Nov 8 12:54:26 2019 +0100
tdf#128034: Add any modifiers to the UNO keycode also for mobile devices
For non-mobile devices this is done in _onKeyDown() in L.Map.Keyboard.
(In master the key handling has apparently been unified for mobile and
non-mobile devices, which is good.)
Change-Id: If96f0da762379593285dc90dc98e5eb9da7554f1
Reviewed-on: https://gerrit.libreoffice.org/82282
Reviewed-by: Tor Lillqvist <tml at collabora.com>
Tested-by: Tor Lillqvist <tml at collabora.com>
diff --git a/loleaflet/src/control/Control.MobileInput.js b/loleaflet/src/control/Control.MobileInput.js
index b9db83cbb..49ede50d5 100644
--- a/loleaflet/src/control/Control.MobileInput.js
+++ b/loleaflet/src/control/Control.MobileInput.js
@@ -166,6 +166,15 @@ L.Control.MobileInput = L.Control.extend({
docLayer = this._map._docLayer,
unoKeyCode = handler._toUNOKeyCode(keyCode);
+ if (e.shiftKey)
+ unoKeyCode |= handler.keyModifier.shift;
+ if (e.ctrlKey)
+ unoKeyCode |= handler.keyModifier.ctrl;
+ if (e.altKey)
+ unoKeyCode |= handler.keyModifier.alt;
+ if (e.metaKey)
+ unoKeyCode |= handler.keyModifier.ctrl;
+
this._keyHandled = this._keyHandled || false;
// console.log('==> onKeyEvents: ' + e.type + ':' + e.key + ' keyCode=' + keyCode + ' charCode=' + charCode + ' unoKeyCode=' + unoKeyCode + ' _keyHandled=' + this._keyHandled + ' _isComposing=' + this._isComposing)
if (this._isComposing) {
More information about the Libreoffice-commits
mailing list