furo-keydown #
@furo/util v2.1.19
import '@furo/util/src/furo-keydown.js';
exports FuroKeydown js
exports <furo-keydown> custom-element-definition
superclass LitElement
mixes FBP
summary keyboard event listener
furo-keydown attaches a keypress listener to the parent element and gives you handy events to work with.
When you set alt, ctrl or any of the other arguments, the key event will be triggered only if the corresponding key was pressed too.
|
|
Attributes and Properties #
key #
key
String
Key to listen on. Like Enter, Backspace, ArrowLeft, A,B,C, a,b,c
global #
global
Boolean
Set this attribute to listen to the keydown event global (window).
alt #
alt
Boolean
alt key must be pressed to trigger the key event.
ctrl #
ctrl
Boolean
ctrl key must be pressed to trigger the key event.
meta #
meta
Boolean
meta key must be pressed to trigger the key event.
shift #
shift
Boolean
shift key must be pressed to trigger the key event.
preventDefault #
prevent-default
Boolean
Set this attribute to prevent the event default of the keypress event.
stopPropagation #
stop-propagation
Boolean
Set this to true to stop the event propagation of the keypress event.
Events #
key #
at-key
→ KeyboardEvent
Fired when key was catched on target