<?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>128011</bug_id>
          
          <creation_ts>2014-01-31 12:47:46 -0800</creation_ts>
          <short_desc>Web Inspector: Layers and Node side panels shortcuts are not triggered when using Spanish keyboard layout</short_desc>
          <delta_ts>2016-12-13 15:32:34 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Web Inspector</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Minor</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Diego Pino">dpino</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>inspector-bugzilla-changes</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>974427</commentid>
    <comment_count>0</comment_count>
    <who name="Diego Pino">dpino</who>
    <bug_when>2014-01-31 12:47:46 -0800</bug_when>
    <thetext>Shortcuts &apos;CmdOrCtrl+Shift+2&apos; (open Node side panel) and &apos;CmdOrCtrl+Shift+3&apos; (open Layers side panel) don&apos;t work when using Spanish keyboard layout. It works fine if I use US keyboard layout (Environment: WebKitGTK/Minibrowser; Ubuntu 13.04).

I debugged the issue and it seems that KeyboardShortcut.matchesEvent (KeyboardShortcut:74) returns false for these two shortcuts. What it happens is that an unexpected event.keyCode is sent:

  * &apos;Ctrl+Shift+2&apos; sends event.keyCode = 222 (when it should be 50).
  * &apos;Ctrl+Shift+3&apos; sends event.keyCode = 0 (when it should be 51).

This page is useful for testing purporses: http://www.asquare.net/javascript/tests/KeyCode.html. 

I researched a bit on the internet and I saw that this is a problem related to Javascript Key Events. In this page (http://news.qooxdoo.org/key-event-nightmare-resolved) it reads:

&quot;The key code of keys that require the shift key on some keyboard layouts are not reliable. The key code which is generated depends on the current language-specific keyboard layout of the user.&quot;

So, I grepped shortcuts involving the Shift key and tested whether they work or not. Here is the result:

| *File* | *Shortcut* | *Action* | *Works* |
| ContentBrowser.js:46 | CmdOrCtrl + Shift + &apos;S&apos; | _saveAs | Yes |
| DebuggerSidebarPanel.js:50 | CmdOrCtrl + Shift + &apos;;&apos; | _debuggerStepOutButtonClicked | Yes |
| FindBanner.js:84 | CmdOrCtrl + Shift + &apos;G&apos; | _previousResultButtonClicked | Yes |
| JavaScriptLogViewController.js:55 | CmdOrCtrl + Shift + &apos;G&apos; | _handleFindPreviousShortcut | Yes |
| JavaScriptLogViewController.js:60 | CmdOrCtrl + Shift + &apos;G&apos; | _handleFindPreviousShortcut | Yes |
| Main.js:219 | CmdOrCtrl + Shift + &apos;R&apos; | _reloadPageIgnoringCache | Yes |
| Main.js:221 | CmdOrCtrl + Shift + &apos;C&apos; | _toggleInspectMode | Yes |
| Main.js:224 | CmdOrCtrl + Shift + &apos;Z&apos; | _redoKeyboardShortcut | Yes |
| ResourceSidebarPanel.js:51 | CmdOrCtrl + Shift + &apos;F&apos; | _focusSearchField | Yes |

Conclusion, all the other shortcuts (involving the Shift key) work and the only ones that fail are &apos;CmdOrCtrl+Shift+2&apos; and &apos;CmdOrCtrl+Shift+3&apos;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>974428</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2014-01-31 12:48:00 -0800</bug_when>
    <thetext>&lt;rdar://problem/15959734&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>974437</commentid>
    <comment_count>2</comment_count>
      <attachid>222839</attachid>
    <who name="Diego Pino">dpino</who>
    <bug_when>2014-01-31 12:54:00 -0800</bug_when>
    <thetext>Created attachment 222839
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>974442</commentid>
    <comment_count>3</comment_count>
    <who name="Diego Pino">dpino</who>
    <bug_when>2014-01-31 13:05:07 -0800</bug_when>
    <thetext>The solution proposed in the patch is to use &apos;Option&apos; instead of &apos;Shift&apos; for the DetailsSidebarPanel.js buttons. 

I preferred not to change the other shortcuts as they are working. I&apos;m aware this solution may solve only the issue for Spanish keyboard layout, but it might persist in other keyboard layouts.

My gut feeling is that &apos;Shift&apos; is problematic in combination with number keys, but works fine with alphabetic characters (or punctuaction symbols like &apos;;&apos;). But this is just a wild guess, I have nothing to back up this statement :(</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>976971</commentid>
    <comment_count>4</comment_count>
    <who name="Timothy Hatcher">timothy</who>
    <bug_when>2014-02-05 11:16:03 -0800</bug_when>
    <thetext>What platform were you using? I am wondering if Mac can stay as Option, since we match Xcode there.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>977150</commentid>
    <comment_count>5</comment_count>
    <who name="Diego Pino">dpino</who>
    <bug_when>2014-02-05 17:09:44 -0800</bug_when>
    <thetext>My environment is: 

   * OS: Ubuntu 13.04.
   * WebKit: WebKitGTK+/Minibrowser. I&apos;m using WebKit2.

Maybe another possibility is to remap the shortcut as Ctrl + Number. That&apos;s the shortcut for the Menu buttons on the left side and it&apos;s working. But doing that means that the shorcut for the Menu buttons on the right side should start at 4. If I&apos;m not wrong, up to 5 different sidepanels can be shown on the right side.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>979658</commentid>
    <comment_count>6</comment_count>
    <who name="Timothy Hatcher">timothy</who>
    <bug_when>2014-02-11 16:38:19 -0800</bug_when>
    <thetext>(In reply to comment #5)
&gt; My environment is: 
&gt; 
&gt;    * OS: Ubuntu 13.04.
&gt;    * WebKit: WebKitGTK+/Minibrowser. I&apos;m using WebKit2.
&gt; 
&gt; Maybe another possibility is to remap the shortcut as Ctrl + Number. That&apos;s the shortcut for the Menu buttons on the left side and it&apos;s working. But doing that means that the shorcut for the Menu buttons on the right side should start at 4. If I&apos;m not wrong, up to 5 different sidepanels can be shown on the right side.

That wouldn&apos;t be ideal. The idea of using a modifier and starting with 1 was to have left and right sidebars use the same modifiers and start with 1 — matching Xcode.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1088652</commentid>
    <comment_count>7</comment_count>
      <attachid>222839</attachid>
    <who name="Timothy Hatcher">timothy</who>
    <bug_when>2015-04-25 18:37:17 -0700</bug_when>
    <thetext>Comment on attachment 222839
Patch

We don&apos;t have the shortcuts as of r183342.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>222839</attachid>
            <date>2014-01-31 12:54:00 -0800</date>
            <delta_ts>2015-04-25 18:37:17 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-128011-20140131215359.patch</filename>
            <type>text/plain</type>
            <size>2022</size>
            <attacher name="Diego Pino">dpino</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMTYyOTQ3CmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViSW5zcGVj
dG9yVUkvQ2hhbmdlTG9nIGIvU291cmNlL1dlYkluc3BlY3RvclVJL0NoYW5nZUxvZwppbmRleCBm
M2RkOWJlNmM2NWNmZTI5YjdiOGZjNGUwMGY5YWIwMzI4ODkxYjQwLi4wMGFjMmY4NGMzZjgxYzA0
ODJiODM5MGQxZDAyNzRkOWQ1YjgxNDQ4IDEwMDY0NAotLS0gYS9Tb3VyY2UvV2ViSW5zcGVjdG9y
VUkvQ2hhbmdlTG9nCisrKyBiL1NvdXJjZS9XZWJJbnNwZWN0b3JVSS9DaGFuZ2VMb2cKQ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nRjdXQpIHsKICAgICAgICAg
dmFyIHNob3dUb29sVGlwID0gV2ViSW5zcGVjdG9yLlVJU3RyaW5nKCJTaG93IHRoZSAlcyBkZXRh
aWxzIHNpZGViYXIgKCVzKSIpLmZvcm1hdChzaW5ndWxhckRpc3BsYXlOYW1lLCB0aGlzLl9rZXli
b2FyZFNob3J0Y3V0LmRpc3BsYXlOYW1lKTsK
</data>
<flag name="review"
          id="246864"
          type_id="1"
          status="-"
          setter="timothy"
    />
          </attachment>
      

    </bug>

</bugzilla>