<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>149054</bug_id>
          
          <creation_ts>2015-09-10 18:32:40 -0700</creation_ts>
          <short_desc>keydown event doesn&apos;t fire on iOS when arrow keys pressed on external keyboard</short_desc>
          <delta_ts>2019-06-05 09:45:30 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>UI Events</component>
          <version>Safari 9</version>
          <rep_platform>iPhone / iPad</rep_platform>
          <op_sys>iOS 8.4</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>MOVED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>190571</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Steve">steve</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>anamh</cc>
    
    <cc>ap</cc>
    
    <cc>bfulgham</cc>
    
    <cc>bjonesbe</cc>
    
    <cc>cdumez</cc>
    
    <cc>dbates</cc>
    
    <cc>ejosue.15</cc>
    
    <cc>enrica</cc>
    
    <cc>ericjrabil</cc>
    
    <cc>frolvlad</cc>
    
    <cc>jo</cc>
    
    <cc>jonlee</cc>
    
    <cc>ken.rimple</cc>
    
    <cc>mail.vince</cc>
    
    <cc>mail</cc>
    
    <cc>maxjerin</cc>
    
    <cc>mitz</cc>
    
    <cc>pirijan</cc>
    
    <cc>sam</cc>
    
    <cc>thorton</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>wenson_hsieh</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1125115</commentid>
    <comment_count>0</comment_count>
      <attachid>260981</attachid>
    <who name="Steve">steve</who>
    <bug_when>2015-09-10 18:32:40 -0700</bug_when>
    <thetext>Created attachment 260981
Repro.html

Steps to Reproduce:

1. Connect an external keyboard to an iPad Simulator: Hardware &gt; Keyboard &gt; Connect Hardware Keyboard
2. Open attached file in Safari on an iPad Simulator
3. Tap into the editable region
4. Press the arrow keys on the keyboard
5. Notice the keydown event doesn&apos;t fire

These instructions are specific to the iOS simulator, but I assume the same steps apply when connecting a physical keyboard to a real iPad?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1125214</commentid>
    <comment_count>1</comment_count>
    <who name="Bem Jones-Bey">bjonesbe</who>
    <bug_when>2015-09-11 10:36:25 -0700</bug_when>
    <thetext>I have confirmed that real hardware (iPad Air 2, bluetooth keyboard) exhibits the same behavior on iOS 8.4.1.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1125221</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2015-09-11 10:58:34 -0700</bug_when>
    <thetext>&lt;rdar://problem/22663985&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1164883</commentid>
    <comment_count>3</comment_count>
    <who name="Vince">mail.vince</who>
    <bug_when>2016-02-15 13:56:34 -0800</bug_when>
    <thetext>I can confirm that this is still an issue on an iPad Mini FE276LL/A running iOS 9.2 (13C75), with a previous generation bluetooth Apple Wireless Keyboard.

More specifically, if NO control has focus, no keydown and no keyup events fire at all.

However, if a control DOES has focus, keydown and keyup events do fire, but the keyIdentifier is &quot;Unidentified&quot;, and keyCode is 0 (the target is correct, however).

This makes it impossible to develop a web app that responds correctly to navigation using a bluetooth keyboard on iOS.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1201229</commentid>
    <comment_count>4</comment_count>
    <who name="Ken Rimple">ken.rimple</who>
    <bug_when>2016-06-10 06:50:29 -0700</bug_when>
    <thetext>Would be a huge benefit to the iPad community if arrow key events fired. That explains the lack of support by sites like Cloud9, plnkr, etc...  I do a lot of web development in those IDEs to teach people and to brainstorm when I&apos;m not at my computer so it would be awesome if the team got this in and it made its way to IOS.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1220138</commentid>
    <comment_count>5</comment_count>
    <who name="pirijan">pirijan</who>
    <bug_when>2016-08-15 13:45:54 -0700</bug_when>
    <thetext>(In reply to comment #4)
&gt; Would be a huge benefit to the iPad community if arrow key events fired.
&gt; That explains the lack of support by sites like Cloud9, plnkr, etc...  I do
&gt; a lot of web development in those IDEs to teach people and to brainstorm
&gt; when I&apos;m not at my computer so it would be awesome if the team got this in
&gt; and it made its way to IOS.

+1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1394912</commentid>
    <comment_count>6</comment_count>
    <who name="Willem L. Middelkoop">mail</who>
    <bug_when>2018-01-30 22:32:46 -0800</bug_when>
    <thetext>Workaround is possible:
- make sure some element has focus (so that key events do fire)
- event.keyCode will be 0 (which is non-desirable)
- however, event.key will have a value &quot;UIKeyInputUpArrow&quot;, &quot;UIKeyInputDownArrow&quot;, &quot;UIKeyInputLeftArrow&quot; or &quot;UIKeyInputRightArrow&quot;

I have confirmed this to work on iPad (in combination with hardware keyboard, type cover and bluetooth magic keyboard).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1423135</commentid>
    <comment_count>7</comment_count>
    <who name="anami">anamh</who>
    <bug_when>2018-05-11 07:51:20 -0700</bug_when>
    <thetext>After rereading the last comment - I have realised it was not a JavaScript workaround. 

Verified with iPad mini 2 running iOS 11.3.1

In addition to the arrow keys - the modifier (CTRL, CMD, ALT, SHIFT) keys are not detected also. 
So things like going to the beginning of the line or starting a selection is not possible to detect. 

It would be nice to add the modifier keys along with the cursor key events and if possible as their own distinct key press events. 

Please make this into webKit for iOS.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1456357</commentid>
    <comment_count>8</comment_count>
    <who name="Josué Zatarain">ejosue.15</who>
    <bug_when>2018-09-04 10:22:21 -0700</bug_when>
    <thetext>Was this ever reviewed?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1456699</commentid>
    <comment_count>9</comment_count>
    <who name="Josué Zatarain">ejosue.15</who>
    <bug_when>2018-09-05 07:44:53 -0700</bug_when>
    <thetext>I just tested in ios 11.4.1 and keydown, keyup, input, don&apos;t get triggered by the arrows.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1456702</commentid>
    <comment_count>10</comment_count>
    <who name="Josué Zatarain">ejosue.15</who>
    <bug_when>2018-09-05 07:47:18 -0700</bug_when>
    <thetext>Also, keypress.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1456710</commentid>
    <comment_count>11</comment_count>
    <who name="Josué Zatarain">ejosue.15</who>
    <bug_when>2018-09-05 08:20:41 -0700</bug_when>
    <thetext>If you press enter, in the keyup event, keycode comes as 0, and the originalEvent object has code: &quot;Unidentified&quot;.
It comes okay during a keydown event.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1471131</commentid>
    <comment_count>12</comment_count>
    <who name="Jochen H. Schmidt">jo</who>
    <bug_when>2018-10-21 01:24:40 -0700</bug_when>
    <thetext>Yes still the same behaviour. It is the main blocker for online IDE and code editor services like codesandbox.io, repl.it. Particularily Monaco the editor component of Visual Studio code does not work on the iPad because of this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1480560</commentid>
    <comment_count>13</comment_count>
    <who name="Eric Rabil">ericjrabil</who>
    <bug_when>2018-11-20 12:08:41 -0800</bug_when>
    <thetext>Has there been any update on this issue? No updates from the team in three years on such a glaring oversight is quite disturbing.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1480566</commentid>
    <comment_count>14</comment_count>
    <who name="Daniel Bates">dbates</who>
    <bug_when>2018-11-20 12:42:42 -0800</bug_when>
    <thetext>(In reply to Eric Rabil from comment #13)
&gt; Has there been any update on this issue? No updates from the team in three
&gt; years on such a glaring oversight is quite disturbing.

This needs to be fixed in UIKit.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1481551</commentid>
    <comment_count>15</comment_count>
    <who name="Tim Horton">thorton</who>
    <bug_when>2018-11-26 09:48:27 -0800</bug_when>
    <thetext>Not a WebKit bug; please file a duplicate at bugreport.apple.com if you want to track this (but it&apos;s already tracked by &lt;rdar://problem/22663985&gt; as mentioned above).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1487104</commentid>
    <comment_count>16</comment_count>
    <who name="Daniel Bates">dbates</who>
    <bug_when>2018-12-11 19:50:18 -0800</bug_when>
    <thetext>(In reply to Tim Horton from comment #15)
&gt; Not a WebKit bug; please file a duplicate at bugreport.apple.com if you want
&gt; to track this (but it&apos;s already tracked by &lt;rdar://problem/22663985&gt; as
&gt; mentioned above).

For completeness, the UIKit bug was fixed in &lt;rdar://problem/44929845&gt;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1490385</commentid>
    <comment_count>17</comment_count>
    <who name="Eric Rabil">ericjrabil</who>
    <bug_when>2018-12-21 10:15:15 -0800</bug_when>
    <thetext>(In reply to Daniel Bates from comment #16)
&gt; (In reply to Tim Horton from comment #15)
&gt; &gt; Not a WebKit bug; please file a duplicate at bugreport.apple.com if you want
&gt; &gt; to track this (but it&apos;s already tracked by &lt;rdar://problem/22663985&gt; as
&gt; &gt; mentioned above).
&gt; 
&gt; For completeness, the UIKit bug was fixed in &lt;rdar://problem/44929845&gt;.

I am now able to detect the arrow events in most elements (12.1.3b2), however &lt;textarea&gt; among a few other input elements still do not fire arrow events as expected.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1521647</commentid>
    <comment_count>18</comment_count>
    <who name="Vlad Frolov">frolvlad</who>
    <bug_when>2019-03-27 01:34:40 -0700</bug_when>
    <thetext>The issue is still present in iOS 12.2 https://github.com/Microsoft/monaco-editor/issues/293</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1521690</commentid>
    <comment_count>19</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2019-03-27 08:43:45 -0700</bug_when>
    <thetext>(In reply to Vlad Frolov from comment #18)
&gt; The issue is still present in iOS 12.2
&gt; https://github.com/Microsoft/monaco-editor/issues/293

This is correct, the fix did not ship in iOS 12.2. We cannot comment on when a particular fix will ship to customers.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1542025</commentid>
    <comment_count>20</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2019-06-05 09:40:59 -0700</bug_when>
    <thetext>(In reply to Chris Dumez from comment #19)
&gt; (In reply to Vlad Frolov from comment #18)
&gt; &gt; The issue is still present in iOS 12.2
&gt; &gt; https://github.com/Microsoft/monaco-editor/issues/293
&gt; 
&gt; This is correct, the fix did not ship in iOS 12.2. We cannot comment on when
&gt; a particular fix will ship to customers.

We do believe that this issue is fixed in the iOS 13 developer seed. Please do try on that platform and let us know if it resolves the issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1542029</commentid>
    <comment_count>21</comment_count>
    <who name="Eric Rabil">ericjrabil</who>
    <bug_when>2019-06-05 09:45:30 -0700</bug_when>
    <thetext>(In reply to Brent Fulgham from comment #20)
&gt; 
&gt; We do believe that this issue is fixed in the iOS 13 developer seed. Please
&gt; do try on that platform and let us know if it resolves the issue.

My iPad Pro 2nd Gen on iOS 13b1 has functioning arrow keys on Monaco editors that previously did not work :)</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>260981</attachid>
            <date>2015-09-10 18:32:40 -0700</date>
            <delta_ts>2015-09-10 18:32:40 -0700</delta_ts>
            <desc>Repro.html</desc>
            <filename>arrowKeysOnKeyDown.html</filename>
            <type>text/html</type>
            <size>1112</size>
            <attacher name="Steve">steve</attacher>
            
              <data encoding="base64">PGh0bWw+CjxoZWFkPgo8c3R5bGU+CglwI2lucHV0IHsKCQliYWN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