W3C home > Mailing lists > Public > www-dom@w3.org > July to September 2012

[Bug 18867] New: Web developers cannot know whether a key event will cause text input actually

From: <bugzilla@jessica.w3.org>
Date: Thu, 13 Sep 2012 06:11:56 +0000
To: www-dom@w3.org
Message-ID: <bug-18867-4009@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=18867

           Summary: Web developers cannot know whether a key event will
                    cause text input actually
           Product: WebAppsWG
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DOM3 Events
        AssignedTo: schepers@w3.org
        ReportedBy: masayuki@d-toybox.com
         QAContact: public-webapps-bugzilla@w3.org
                CC: mike@w3.org, www-dom@w3.org


Under current D3E draft, .key and .char are always same value if the event is
caused by a printable key. And the example for Ctrl+'v' defines the 'v' key's
.key and .char are 'v'. So, the result of .getModifierState('Control') is the
only difference between 'v' key event with Ctrl and 'v' key event without Ctrl
key.

If web developers want to use text input editor with key events, they cannot
know whether a key event would cause text input or not with .key or .char.

So, I'd like to suggest that .key value should be same as current spec, but
.char value should be empty string if the key event doesn't cause actual text
input.

I.e.,

'v':                     { key: 'v', char: 'v' }
'v' with Shift:          { key: 'V', char: 'V' }
'v' with Ctrl:           { key: 'v', char: ''  }
'v' with Ctrl and Shift: { key: 'V', char: ''  }

-- 
Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
Received on Thursday, 13 September 2012 06:11:57 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 13 September 2012 06:12:03 GMT