Skip to content

Commit

Permalink
Keypress note.
Browse files Browse the repository at this point in the history
  • Loading branch information
kinyoklion committed Nov 8, 2024
1 parent 6989474 commit 22dd887
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ export default class KeypressCollector implements Collector {
private _lastEvent?: UiBreadcrumb;

constructor() {
// Currently we use the keypress event, but it is technically deprecated.
// It is the simplest way to currently get the most broad coverage.
// In the future we may want to consider some check to attempt to selectively use a more
// targetted event.
window.addEventListener(
'keypress',
(event: KeyboardEvent) => {
Expand Down

0 comments on commit 22dd887

Please sign in to comment.