Keyboard

Type class

A class that represents collection of keyboard-related utilities.

Do not instantiate this class directly, but rather use keyboard variable.

Sources

Keyboard can be used (imported) via one of the following packages.

/**
 * --------------------------------------------------------
 * Import from: "core.ts"
 * Use like: am4core.Keyboard
 * --------------------------------------------------------
 */
import * as am4core from "@amcharts/amcharts4/core";

/**
 * --------------------------------------------------------
 * Include via: <script src="core.js"></script>
 * Access items like: am4.Keyboard
 * --------------------------------------------------------
 */

Inheritance

Keyboard does not extend any other symbol.

Keyboard is not extended by any other symbol.

Properties

Keyboard does not have any properties.

Methods

altKey(

ev: KeyboardEvent | MouseEvent

)

#

Returns boolean

Returns true if alt key was presset at the moment of the event

ctrlKey(

ev: KeyboardEvent | MouseEvent

)

#

Returns boolean

Returns true if ctrl key was presset at the moment of the event.

getEventKey(

ev: KeyboardEvent

)

#

Returns KeyboardKeys

Returns a named key based on information contained in the event or "other".

isKey(

ev: KeyboardEvent,
key: string | string[]

)

#

Returns boolean

Checks if event key is one or more of the selected named keys.

metaKey(

ev: KeyboardEvent | MouseEvent

)

#

Returns boolean

Returns true if meta key was presset at the moment of the event

shiftKey(

ev: KeyboardEvent | MouseEvent

)

#

Returns boolean

Returns true if shift key was presset at the moment of the event.

Events

Keyboard does not have any events.

Adapters

Keyboard does not have any adapters.