loleaflet/Makefile.am | 2 -- loleaflet/src/map/handler/Map.Keyboard.js | 19 ++++++++++++++++--- 2 files changed, 16 insertions(+), 5 deletions(-)
New commits: commit 5374b6c6ff440b4016f393557b8e8846481a1355 Author: Pranav Kant <pran...@collabora.co.uk> Date: Thu Jan 5 13:13:20 2017 +0530 loleaflet: Don't forward shift+insert/delete key events This are converted to 'cut', 'paste' events which are automatically handled by us using uno commands, so avoid double-handling them. Change-Id: If97e9f4efabbb929e7a5dd87c1228ee6a0df9e61 diff --git a/loleaflet/src/map/handler/Map.Keyboard.js b/loleaflet/src/map/handler/Map.Keyboard.js index 62e61db..84c72d3 100644 --- a/loleaflet/src/map/handler/Map.Keyboard.js +++ b/loleaflet/src/map/handler/Map.Keyboard.js @@ -119,7 +119,7 @@ L.Map.Keyboard = L.Handler.extend({ 222 : null // single quote : UNKOWN }, - handleOnKeyDown: { + handleOnKeyDownKeys: { // these keys need to be handled on keydown in order for them // to work on chrome 8 : true, // backspace @@ -180,6 +180,19 @@ L.Map.Keyboard = L.Handler.extend({ this._map.off('compositionstart compositionupdate compositionend textInput', this._onKeyDown, this); }, + _handleOnKeyDown: function (keyCode, modifier) { + if (modifier & this.keyModifier.shift) { + // don't handle shift+insert, shift+delete + // These are converted to 'cut', 'paste' events which are + // automatically handled by us, so avoid double-handling + if (keyCode === 45 || keyCode === 46) { + return false; + } + } + + return this.handleOnKeyDownKeys[keyCode]; + }, + _setPanOffset: function (pan) { var keys = this._panKeys = {}, codes = this.navigationKeyCodes, @@ -295,12 +308,12 @@ L.Map.Keyboard = L.Handler.extend({ this._keyHandled = false; this._bufferedTextInputEvent = null; - if (this.handleOnKeyDown[keyCode] && charCode === 0) { + if (this._handleOnKeyDown(keyCode, this.modifier) && charCode === 0) { docLayer._postKeyboardEvent('input', charCode, unoKeyCode); } } else if ((e.type === 'keypress' || e.type === 'compositionend') && - (!this.handleOnKeyDown[keyCode] || charCode !== 0)) { + (!this._handleOnKeyDown(keyCode, this.modifier) || charCode !== 0)) { if (charCode === keyCode && charCode !== 13) { // Chrome sets keyCode = charCode for printable keys // while LO requires it to be 0 commit 053f5b5d9f5b9ddb4a83527e0373ff294105d5b3 Author: Pranav Kant <pran...@collabora.co.uk> Date: Wed Jan 4 20:59:58 2017 +0530 Unused variable Change-Id: I1e8ba0dc8683193d7ce0680854cb43286fc0dd98 diff --git a/loleaflet/Makefile.am b/loleaflet/Makefile.am index 178b827..4e3ed35 100644 --- a/loleaflet/Makefile.am +++ b/loleaflet/Makefile.am @@ -3,8 +3,6 @@ # ("micro") part: Between releases odd, even for releases (no other # changes inbetween). -VERSION=2.0.1+ - # Version number of the bundled 'draw' thing DRAW_VERSION=0.2.4 _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits