Open Bug 1478559 Opened 7 years ago Updated 3 years ago

DevTools should handle Esc key with keydown event listener rather than keypress event listener

Categories

(DevTools :: General, enhancement, P3)

enhancement

Tracking

(Not tracked)

People

(Reporter: nchevobbe, Unassigned)

References

(Blocks 1 open bug)

Details

Standard says that keypress should be fired only for printable characters, which excludes <kbd>Esc</kbd>. We use keypress in some panels to handle esc, as well as in the toolbox to toggle the split console.
Priority: -- → P3
Using keyup sounds odd. keydown and keyup are event for physical state of key device, and keypress is event for text input by key (i.e., logical). keypress always follows keydown event if necessary. So, using keydown is same meaning in most cases.
(In reply to Masayuki Nakano [:masayuki] (JST, +0900) from comment #1) > Using keyup sounds odd. keydown and keyup are event for physical state of > key device, and keypress is event for text input by key (i.e., logical). > keypress always follows keydown event if necessary. So, using keydown is > same meaning in most cases. thanks, I changed the bug title
Summary: DevTools should handle Esc key with keyup event listener rather than keypress event listener → DevTools should handle Esc key with keydown event listener rather than keypress event listener

Nicolas,

Would you please assign this bug to me and also provide me with some pointers to get started. Thanks again.

Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.