<?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>30397</bug_id>
          
          <creation_ts>2009-10-15 10:48:47 -0700</creation_ts>
          <short_desc>Meta + key should not fire keypress event</short_desc>
          <delta_ts>2026-03-15 19:57:05 -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>DOM</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=185971</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=16972</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=28409</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=199475</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=208088</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=32746</see_also>
    
    <see_also>https://github.com/web-platform-tests/wpt/pull/58511</see_also>
          <bug_file_loc>https://whsieh.github.io/examples/key-events</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>BrowserCompat, InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Erik Arvidsson">arv</reporter>
          <assigned_to name="Karl Dubost">karlcow</assigned_to>
          <cc>a_protyasha</cc>
    
    <cc>ap</cc>
    
    <cc>asevilla</cc>
    
    <cc>karlcow</cc>
    
    <cc>masayuki</cc>
    
    <cc>tony</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>wenson_hsieh</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>154844</commentid>
    <comment_count>0</comment_count>
    <who name="Erik Arvidsson">arv</who>
    <bug_when>2009-10-15 10:48:47 -0700</bug_when>
    <thetext>The general rule is that key(s) should only fire keypress events if they generate content. Also, we are trying to match IE which dos not fire keypress events for ctrl + key (we should still fire repeating keydown events)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>190369</commentid>
    <comment_count>1</comment_count>
    <who name="Tony Chang">tony</who>
    <bug_when>2010-02-14 20:17:51 -0800</bug_when>
    <thetext>(In reply to comment #0)
&gt; The general rule is that key(s) should only fire keypress events if they
&gt; generate content. Also, we are trying to match IE which dos not fire keypress
&gt; events for ctrl + key (we should still fire repeating keydown events)

By meta, do you mean command on mac and the Windows key on win/linux?  Or do you mean the alt/option key on mac?

Using the test case on bug 28409 https://bug-28409-attachments.webkit.org/attachment.cgi?id=34993 , in Safari 4.0.4 on mac, I see a keypress fired in all cases (ctrl, alt, or command).  On Chrome on mac, I see a keypress fired for only ctrl and alt (no keypress event for command).

Is this bug Safari specific?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2005802</commentid>
    <comment_count>2</comment_count>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2024-01-18 02:48:22 -0800</bug_when>
    <thetext>from https://www.w3.org/TR/uievents/#keypress:

&gt; If supported by a user agent, this event MUST be dispatched when a key is pressed down, if and only if that key normally produces a character value. The keypress event type is device dependent and relies on the capabilities of the input devices and how they are mapped in the operating system.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2005803</commentid>
    <comment_count>3</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2024-01-18 02:48:30 -0800</bug_when>
    <thetext>&lt;rdar://problem/121181035&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2005847</commentid>
    <comment_count>4</comment_count>
    <who name="Arvin Sevilla">asevilla</who>
    <bug_when>2024-01-18 07:20:08 -0800</bug_when>
    <thetext>*** Bug 208088 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2007021</commentid>
    <comment_count>5</comment_count>
    <who name="Abrar Rahman Protyasha">a_protyasha</who>
    <bug_when>2024-01-23 14:54:24 -0800</bug_when>
    <thetext>(In reply to Karl Dubost from comment #2)
&gt; from https://www.w3.org/TR/uievents/#keypress:
&gt; 
&gt; &gt; If supported by a user agent, this event MUST be dispatched when a key is pressed down, if and only if that key normally produces a character value. The keypress event type is device dependent and relies on the capabilities of the input devices and how they are mapped in the operating system.

&quot;that key normally produces a character value&quot; is a little vague because the `keypress` events are fired for, say, `V`, and not `⌘`, when a user types `⌘V` to paste something. At any rate, it seems OK for us to align our behavior with the other browser engines here and _not_ dispatch `keypress` if there is a modifier active.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2011960</commentid>
    <comment_count>6</comment_count>
    <who name="Abrar Rahman Protyasha">a_protyasha</who>
    <bug_when>2024-02-08 15:32:47 -0800</bug_when>
    <thetext>*** Bug 185971 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2189777</commentid>
    <comment_count>7</comment_count>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2026-03-12 16:18:11 -0700</bug_when>
    <thetext>&lt;rdar://4360235&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2189795</commentid>
    <comment_count>8</comment_count>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2026-03-12 16:44:35 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/60520</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2190456</commentid>
    <comment_count>9</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2026-03-15 19:48:14 -0700</bug_when>
    <thetext>Committed 309300@main (6e8432fe7c28): &lt;https://commits.webkit.org/309300@main&gt;

Reviewed commits have been landed. Closing PR #60520 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2190460</commentid>
    <comment_count>10</comment_count>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2026-03-15 19:57:05 -0700</bug_when>
    <thetext>Submitted web-platform-tests pull request: https://github.com/web-platform-tests/wpt/pull/58511</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>