[Libreoffice-bugs] [Bug 124905] iPad Hardware-Keyboard in iOS App

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Wed May 29 17:30:11 UTC 2019


https://bugs.documentfoundation.org/show_bug.cgi?id=124905

--- Comment #3 from Tor Lillqvist <tml at iki.fi> ---
At least part of the problem seems to be that loleaflet uses a HTML text input
field that it gives the focus to enable the on-screen keyboard, even of there
iOS a hardware keyboard (and no on-screen keyboard will pop up). The cursor
keys are then handled inside that text input field (even if the field does not
have any contents) and not passed on as JavaScript events. If the text input
field does not have focus, the cursor keys arrive as keyboard events with key
property "ArrowDown", "ArrowLeft" etc.

Here is a useful tiny test HTML page I use to experiment with:

> <html>
>   <head>
>     <title>
>       Title
>     </title>
> 
>     <script>
>       var keyeventhandler = function(e) {
> 	  console.log(e.type + ' "' + e.key + '" ' + e.keyCode + ' ' + e.charCode);
> 	  if (e.type === 'keydown' && e.key === 'f')
> 	      window['inputfield'].focus();
> 	  else if (e.type === 'keydown' && e.key === 'b')
> 	      window['inputfield'].blur();
>       }
> 
>       var textinputeventhandler = function(e) {
> 	  console.log('textInput: "' + e.data + '"');
>       }
> 
>       var inputeventhandler = function(e) {
> 	  console.log(e.inputType);
>       }
> 
>       var compeventhandler = function(e) {
> 	  console.log(e.type + ' "' + e.data + '"');
>       }
> 
>       var clipboardeventhandler = function(e) {
> 	  console.log(e.type);
>       }
> 
>       window.addEventListener('keydown', keyeventhandler);
>       window.addEventListener('keypress', keyeventhandler);
>       window.addEventListener('keyup', keyeventhandler);
> 
>       window.addEventListener('textInput', textinputeventhandler);
> 
>       window.addEventListener('input', inputeventhandler);
> 
>       window.addEventListener('compositionstart', compeventhandler);
>       window.addEventListener('compositionupdate', compeventhandler);
>       window.addEventListener('compositionend', compeventhandler);
> 
>       window.addEventListener('copy', clipboardeventhandler);
>       window.addEventListener('paste', clipboardeventhandler);
> 
>     </script>
> 
>   </head>
>   <body>
>     Body.
>     <input id="inputfield" type="text">
>   </body>
> </html>

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20190529/e2bdecec/attachment.html>


More information about the Libreoffice-bugs mailing list