<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [GTK] Handle caps lock indicator in event modifiers"
   href="https://bugs.webkit.org/show_bug.cgi?id=168186#c4">Comment # 4</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [GTK] Handle caps lock indicator in event modifiers"
   href="https://bugs.webkit.org/show_bug.cgi?id=168186">bug 168186</a>
              from <span class="vcard"><a class="email" href="mailto:cgarcia&#64;igalia.com" title="Carlos Garcia Campos &lt;cgarcia&#64;igalia.com&gt;"> <span class="fn">Carlos Garcia Campos</span></a>
</span></b>
        <pre>(In reply to <a href="show_bug.cgi?id=168186#c3">comment #3</a>)
<span class="quote">&gt; Comment on <span class=""><a href="attachment.cgi?id=301299&amp;action=diff" name="attach_301299" title="Patch">attachment 301299</a> <a href="attachment.cgi?id=301299&amp;action=edit" title="Patch">[details]</a></span>
&gt; Patch
&gt; 
&gt; View in context:
&gt; <a href="https://bugs.webkit.org/attachment.cgi?id=301299&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=301299&amp;action=review</a>
&gt; 
&gt; &gt; LayoutTests/ChangeLog:9
&gt; &gt; +        Add platform specific results for fast/events/special-key-events-in-input-text.html. This patch fixes the caps
&gt; &gt; +        lock key case, but we still have different results in the PrintScreen case.
&gt; 
&gt; What's different about the PrintScreen case? Do we not ever want to fix it?</span >

-INPUT - keydown - false,false,false,false,false - PrintScreen - KeyA - PrintScreen - 44 - 0. Value: &quot;&quot;.
-INPUT - keyup - false,false,false,false,false - PrintScreen - KeyA - PrintScreen - 44 - 0. Value: &quot;&quot;.
+INPUT - keydown - false,false,false,false,false - PrintScreen - PrintScreen - PrintScreen - 44 - 0. Value: &quot;&quot;.
+INPUT - keyup - false,false,false,false,false - PrintScreen - PrintScreen - PrintScreen - 44 - 0. Value: &quot;&quot;.

I don't think there's anything to fix there, KeyA doesn't look like the right key code for PrintScreen.

<span class="quote">&gt; &gt; Source/WebCore/platform/PlatformKeyboardEvent.h:169
&gt; &gt; +        static bool modifiersContainCapsLock(unsigned);
&gt; 
&gt; This header is already a mess, so I guess it's OK, but I dislike adding a
&gt; special function here just for CapsLock. I'd prefer a generic function:
&gt; 
&gt; static bool modifiersContainModifier(unsigned, PlatformEvent::Modifier)
&gt; 
&gt; that you would pass PlatformEvent::Modifier::CapsLockKey to. Even if it's
&gt; currently only used for CapsLock. But your choice.</span >

There are other similar static functions there and currentCapsLockState().

<span class="quote">&gt; &gt; Source/WebCore/platform/gtk/PlatformKeyboardEventGtk.cpp:1325
&gt; &gt; +    // In X11 GDK_LOCK_MASK could be CapsLock or ShiftLock. What GTK+ does in the X11 backend is checking if
&gt; 
&gt; This code really confused me. I wrote a decent-length WTF comment to ask you
&gt; to explain why it would ever be impossible for GTK+ to generate
&gt; GDK_KEY_Caps_Lock. The key is to understand that it depends on the nutty
&gt; modifier mapping of the X server. So I'd add that to your comment:
&gt; 
&gt; &quot;In X11 GDK_LOCK_MASK could be CapsLock or ShiftLock, depending on the
&gt; modifier mapping of the X server.&quot;</span >

Ok.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>