DOM.Event.KeyboardEvent
- Package
- purescript-domDEPRECATED
- Repository
- purescript-web/purescript-dom
Functions that expose the KeyboardEvent API.
https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent
Note: The deprecated attributes .keyCode
, .charCode
, and
.which
are deliberately omitted. It is currently recommended to use
KeyboardEvent.key
instead.
If browser support for KeyboardEvent.key
is not yet widespread
enough for your use case, consider using a polyfill
(e.g. https://github.com/inexorabletash/polyfill#keyboard-events)
or use the purescript FFI to access the deprecated attributes you
want to work with.
#key Source
key :: KeyboardEvent -> String
A non-empty Unicode character string containing the printable representation of the key, if available.
#code Source
code :: KeyboardEvent -> String
Returns a string representing a physical key on the keyboard. Not affected by keyboard layout or state of the modifier keys.
#locationIndex Source
locationIndex :: KeyboardEvent -> Int
#location Source
location :: Partial => KeyboardEvent -> KeyLocation
#KeyLocation Source
#toEnumKeyLocation Source
toEnumKeyLocation :: Int -> Maybe KeyLocation
#ctrlKey Source
ctrlKey :: KeyboardEvent -> Boolean
#shiftKey Source
shiftKey :: KeyboardEvent -> Boolean
#altKey Source
altKey :: KeyboardEvent -> Boolean
#metaKey Source
metaKey :: KeyboardEvent -> Boolean
#repeat Source
repeat :: KeyboardEvent -> Boolean
#isComposing Source
isComposing :: KeyboardEvent -> Boolean
#getModifierState Source
getModifierState :: forall eff. String -> KeyboardEvent -> Eff (dom :: DOM | eff) Boolean
Re-exports from DOM.Event.Types
#KeyboardEvent Source
data KeyboardEvent :: Type
- Modules
- DOM
- DOM.
CSS. Event. Types - DOM.
Event. ClipboardEvent - DOM.
Event. CompositionEvent - DOM.
Event. Event - DOM.
Event. EventPhase - DOM.
Event. EventTarget - DOM.
Event. FocusEvent - DOM.
Event. KeyboardEvent - DOM.
Event. MouseEvent - DOM.
Event. PopstateEvent - DOM.
Event. TouchEvent - DOM.
Event. Types - DOM.
Event. WheelEvent - DOM.
File. Blob - DOM.
File. File - DOM.
File. FileList - DOM.
File. FileReader - DOM.
File. FileReader. ReadyState - DOM.
File. Types - DOM.
HTML - DOM.
HTML. Document - DOM.
HTML. Document. ReadyState - DOM.
HTML. Event. DataTransfer - DOM.
HTML. Event. DragEvent - DOM.
HTML. Event. DragEvent. DataTransfer - DOM.
HTML. Event. ErrorEvent - DOM.
HTML. Event. EventTypes - DOM.
HTML. Event. HashChangeEvent - DOM.
HTML. Event. Types - DOM.
HTML. HTMLAnchorElement - DOM.
HTML. HTMLAreaElement - DOM.
HTML. HTMLBaseElement - DOM.
HTML. HTMLButtonElement - DOM.
HTML. HTMLCanvasElement - DOM.
HTML. HTMLDataElement - DOM.
HTML. HTMLDataListElement - DOM.
HTML. HTMLElement - DOM.
HTML. HTMLEmbedElement - DOM.
HTML. HTMLFieldSetElement - DOM.
HTML. HTMLFormElement - DOM.
HTML. HTMLHyperlinkElementUtils - DOM.
HTML. HTMLIFrameElement - DOM.
HTML. HTMLImageElement - DOM.
HTML. HTMLInputElement - DOM.
HTML. HTMLKeygenElement - DOM.
HTML. HTMLLIElement - DOM.
HTML. HTMLLabelElement - DOM.
HTML. HTMLLegendElement - DOM.
HTML. HTMLLinkElement - DOM.
HTML. HTMLMapElement - DOM.
HTML. HTMLMediaElement - DOM.
HTML. HTMLMediaElement. CanPlayType - DOM.
HTML. HTMLMediaElement. NetworkState - DOM.
HTML. HTMLMediaElement. ReadyState - DOM.
HTML. HTMLMetaElement - DOM.
HTML. HTMLMeterElement - DOM.
HTML. HTMLModElement - DOM.
HTML. HTMLOListElement - DOM.
HTML. HTMLObjectElement - DOM.
HTML. HTMLOptGroupElement - DOM.
HTML. HTMLOptionElement - DOM.
HTML. HTMLOutputElement - DOM.
HTML. HTMLParamElement - DOM.
HTML. HTMLProgressElement - DOM.
HTML. HTMLQuoteElement - DOM.
HTML. HTMLScriptElement - DOM.
HTML. HTMLSelectElement - DOM.
HTML. HTMLSourceElement - DOM.
HTML. HTMLStyleElement - DOM.
HTML. HTMLTableCellElement - DOM.
HTML. HTMLTableColElement - DOM.
HTML. HTMLTableElement - DOM.
HTML. HTMLTableHeaderCellElement - DOM.
HTML. HTMLTableRowElement - DOM.
HTML. HTMLTableSectionElement - DOM.
HTML. HTMLTemplateElement - DOM.
HTML. HTMLTextAreaElement - DOM.
HTML. HTMLTimeElement - DOM.
HTML. HTMLTitleElement - DOM.
HTML. HTMLTrackElement - DOM.
HTML. HTMLTrackElement. ReadyState - DOM.
HTML. HTMLVideoElement - DOM.
HTML. History - DOM.
HTML. Location - DOM.
HTML. Navigator - DOM.
HTML. SelectionMode - DOM.
HTML. Types - DOM.
HTML. URL - DOM.
HTML. Window - DOM.
Node. ChildNode - DOM.
Node. ClassList - DOM.
Node. Document - DOM.
Node. DocumentType - DOM.
Node. Element - DOM.
Node. HTMLCollection - DOM.
Node. MutationObserver - DOM.
Node. MutationRecord - DOM.
Node. Node - DOM.
Node. NodeList - DOM.
Node. NodeType - DOM.
Node. NonDocumentTypeChildNode - DOM.
Node. NonElementParentNode - DOM.
Node. ParentNode - DOM.
Node. Types - DOM.
Util. FFI - DOM.
WebStorage. Event. StorageEvent - DOM.
WebStorage. Event. Types - DOM.
WebStorage. Storage - DOM.
WebStorage. Types - DOM.
Websocket. BinaryType - DOM.
Websocket. Event. CloseEvent - DOM.
Websocket. Event. EventTypes - DOM.
Websocket. Event. MessageEvent - DOM.
Websocket. Event. Types - DOM.
Websocket. ReadyState - DOM.
Websocket. Types - DOM.
Websocket. WebSocket - DOM.
XHR. FormData - DOM.
XHR. Types