<?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>279342</bug_id>
          
          <creation_ts>2024-09-08 22:40:15 -0700</creation_ts>
          <short_desc>[WebDriver][WPE] Track shift status in key sequences</short_desc>
          <delta_ts>2025-04-15 13:04:27 -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>WebDriver</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Lauro Moura">lmoura</reporter>
          <assigned_to name="Lauro Moura">lmoura</assigned_to>
          <cc>bburg</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2058543</commentid>
    <comment_count>0</comment_count>
    <who name="Lauro Moura">lmoura</who>
    <bug_when>2024-09-08 22:40:15 -0700</bug_when>
    <thetext>The WebDriver spec for sending key sequences[1] states that the implementation should check if a given character is &quot;shifted&quot;, that is, usually typed holding the shift key, and insert a shift key press before this character if shift is not already pressed. If the character is not shifted, then the implementation should send a shift release if it&apos;s pressed.

For example, the string &quot;a@e&quot; should generate the following interactions:

- Key Down, &apos;a&apos;
- Key Up, &apos;a&apos;
- Key Down, &apos;Shift&apos;
- Key Down, &apos;@&apos;
- Key Up, &apos;@&apos;
- Key Up, &apos;Shift&apos;
- Key Down, &apos;e&apos;
- Key Up, &apos;e&apos;

Currently, the ports implement this separately. For example, Mac explicitly inserts the shift key in `platformSimulateKeySequence()`.

For WPE, somehow this seems to be handled by the old implementation, either in libwpe or in the FDObackend.

In the new WPE API, we correctly translate &apos;@&apos; to the equivalent &apos;2&apos; hardware key, but due to the lack of the shift modifier, the generated WebEvent is &apos;2&apos; instead of &apos;@&apos;.

Patch incoming.

[1] https://w3c.github.io/webdriver/#element-send-keys</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2059588</commentid>
    <comment_count>1</comment_count>
    <who name="Lauro Moura">lmoura</who>
    <bug_when>2024-09-11 22:40:02 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/33525</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2111144</commentid>
    <comment_count>2</comment_count>
    <who name="Lauro Moura">lmoura</who>
    <bug_when>2025-04-15 13:04:27 -0700</bug_when>
    <thetext>*** Bug 215588 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>