filter/source/svg/presentation_engine.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+)
New commits: commit 6c7cb5a7b40a7bacf07bfe1c7bad4d9195ca5f35 Author: Tor Lillqvist <t...@collabora.com> AuthorDate: Fri Feb 22 18:27:01 2019 +0200 Commit: Tor Lillqvist <t...@collabora.com> CommitDate: Fri Sep 20 11:18:09 2019 +0200 Handle arrow keys (from a hardware keyboard) on iOS Change-Id: Ia5946a77215eba565c3ff8c4dfbc08b95af493c0 (cherry picked from commit 06405cae7ccd596f2e0f4dd49a3e7612a883e654) Reviewed-on: https://gerrit.libreoffice.org/79166 Reviewed-by: Tor Lillqvist <t...@collabora.com> Tested-by: Tor Lillqvist <t...@collabora.com> diff --git a/filter/source/svg/presentation_engine.js b/filter/source/svg/presentation_engine.js index ef6ee6416657..081537954bf1 100644 --- a/filter/source/svg/presentation_engine.js +++ b/filter/source/svg/presentation_engine.js @@ -106,6 +106,28 @@ function onKeyDown( aEvt ) var code = aEvt.keyCode || aEvt.charCode; + // console.log('===> onKeyDown: ' + code); + + // Handle arrow keys in iOS WebKit (including Mobile Safari) + if (code == 0 && aEvt.key != undefined) { + switch (aEvt.key) { + case 'UIKeyInputLeftArrow': + code = LEFT_KEY; + break; + case 'UIKeyInputUpArrow': + code = UP_KEY; + break; + case 'UIKeyInputRightArrow': + code = RIGHT_KEY; + break; + case 'UIKeyInputDownArrow': + code = DOWN_KEY; + break; + } + + // console.log(' now: ' + code); + } + if( !processingEffect && keyCodeDictionary[currentMode] && keyCodeDictionary[currentMode][code] ) { return keyCodeDictionary[currentMode][code](); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits