This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 23907 - How do web apps distinguish if a keydown event causes text input?
Summary: How do web apps distinguish if a keydown event causes text input?
Status: RESOLVED MOVED
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: HISTORICAL - UI Events (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Gary Kacmarcik
QA Contact: public-webapps-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-25 08:45 UTC by Masayuki Nakano
Modified: 2015-10-06 22:53 UTC (History)
3 users (show)

See Also:


Attachments

Description Masayuki Nakano 2013-11-25 08:45:34 UTC
Even there is beforeinput event, web applications may want to distinguish whether a keydown event causes text input or not at keydown event handler.

For example, if web apps wants to implement text editor and their own shortcut keys, if a key event will cause text input, it shouldn't be handled as shortcut key at keydown event.

E.g., Ctrl+Shift+2 of Persian keyboard layout causes inputting ZWNJ.
https://bugzilla.mozilla.org/show_bug.cgi?id=414130

So, in such case, text input may be preferred rather than kicking shortcut.

I'd like to suggest a new attribute KeyboardEvent.inputText as bool.
Comment 1 Travis Leithead [MSFT] 2013-12-04 01:49:09 UTC
Moving to UIEvents component with permission from opener. We will not address this as part of finishing DOM3 Events.
Comment 2 Gary Kacmarcik 2015-10-06 22:53:39 UTC
Now tracking as: https://github.com/w3c/uievents/issues/18