Skip to content

Keyboard Event Clarification #1793

@leaanthony

Description

@leaanthony

My application is currently using add_acceleratorkeypressed to intercept keypresses in the host. The aim was to prevent or remap keys like ctrl-p and prevent default dialogs. The problem is, it seems that those keypresses aren't getting raised as JS events, EG: window.addEventListener('keydown', console.log) will print nothing. If I return false for handled, then the print dialog will be opened, but if i return true, the event isn't raised in JS.

What's the correct approach to this problem? Thanks.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions