Options
All
  • Public
  • Public/Protected
  • All
Menu

Namespace input

Index

Type aliases

CursorStyles

CursorStyles: "default" | "text" | "auto" | "pointer" | "move" | "not-allowed" | "no-drop" | "wait" | "help" | "crosshair" | "n-resize" | "s-resize" | "w-resize" | "e-resize" | "nw-resize" | "sw-resize" | "ne-resize" | "se-resize"

DragEvents

DragEvents: "drag" | "drop" | "dragend" | "dragstart" | "dragenter" | "dragleave" | "dragover"

Hotkeys

Hotkeys: string

keychar1 + keychar2 + ... + keycharN

Examples:

A+B+C+D

KeyEventInits

KeyEventInits: { altKey?: boolean; bubbles?: boolean; cancelable?: boolean; ctrlKey?: boolean; detail?: any; keyCode: number; metaKey?: boolean; shiftKey?: boolean; target?: HTMLElement; view?: WindowProxy }

Type declaration

  • Optional altKey?: boolean

    Optional and defaulting to false, that indicates if the alt key was simultaneously pressed.

  • Optional bubbles?: boolean

    A Boolean indicating whether the event bubbles. The default is false.

  • Optional cancelable?: boolean

    A Boolean indicating whether the event can be cancelled. The default is false.

  • Optional ctrlKey?: boolean

    Optional and defaulting to false, that indicates if the ctrl key was simultaneously pressed.

  • Optional detail?: any

    Whatever data the event was initialized with.

  • keyCode: number
  • Optional metaKey?: boolean

    Optional and defaulting to false, that indicates if the meta key was simultaneously pressed.

  • Optional shiftKey?: boolean

    Optional and defaulting to false, that indicates if the shift key was simultaneously pressed.

  • Optional target?: HTMLElement
  • Optional view?: WindowProxy

    Optional and defaulting to document.defaultView, of type WindowProxy, that is the Window associated with the event.

KeyboardEvents

KeyboardEvents: "keyup" | "keydown" | "keypress"

Note: The "keypress" event is not recommended.

MouseEvents

MouseEvents: "click" | "dblclick" | "mouseleave" | "mouseenter" | "mouseout" | "mouseover" | "mousedown" | "mouseup" | "mousemove" | "mousewheel"

Seqkeys

Seqkeys: string

keychar1 , keychar2 , ... , keycharN-1, keycharN|Hotkeys

Examples:

A,B,C,D
A,B,C+D

SwipeEvents

SwipeEvents: "swipe" | "swipeleft" | "swiperight" | "swipeup" | "swipedown"

TapEvents

TapEvents: "tap" | "singletap" | "doubletap" | "longtap"

TouchEvents

TouchEvents: "touchstart" | "touchend" | "touchmove" | "touchcancel"

Mobile Events

Variables

Const CTXMENU

CTXMENU: 900 = 900

Const D

D: Document = document

Const DBL_TAP_INTERVAL

DBL_TAP_INTERVAL: 300 = 300

Const DRAG_IMAGE_OPACITY

DRAG_IMAGE_OPACITY: 0.5 = 0.5

Const DRAG_MOVE_PX

DRAG_MOVE_PX: 5 = 5

DataTransfer

DataTransfer: DataTransfer = (function () {function DataTransfer() {this._dropEffect = 'move';this._effectAllowed = 'all';this._data = {};}Object.defineProperty(DataTransfer.prototype, "dropEffect", {/*** Gets or sets the type of drag-and-drop operation currently selected.* The value must be 'none', 'copy', 'link', or 'move'.*/get: function () {return this._dropEffect;},set: function (value) {this._dropEffect = value;},enumerable: true,configurable: true});Object.defineProperty(DataTransfer.prototype, "effectAllowed", {/*** Gets or sets the types of operations that are possible.* Must be one of 'none', 'copy', 'copyLink', 'copyMove', 'link',* 'linkMove', 'move', 'all' or 'uninitialized'.*/get: function () {return this._effectAllowed;},set: function (value) {this._effectAllowed = value;},enumerable: true,configurable: true});Object.defineProperty(DataTransfer.prototype, "types", {/*** Gets an array of strings giving the formats that were set in the @see:dragstart event.*/get: function () {return Object.keys(this._data);},enumerable: true,configurable: true});/*** Removes the data associated with a given type.** The type argument is optional. If the type is empty or not specified, the data* associated with all types is removed. If data for the specified type does not exist,* or the data transfer contains no data, this method will have no effect.** @param type Type of data to remove.*/DataTransfer.prototype.clearData = function (type) {if (type != null) {delete this._data[type];}else {this._data = null;}};/*** Retrieves the data for a given type, or an empty string if data for that type does* not exist or the data transfer contains no data.** @param type Type of data to retrieve.*/DataTransfer.prototype.getData = function (type) {return this._data[type] || '';};/*** Set the data for a given type.** For a list of recommended drag types, please see* https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Recommended_Drag_Types.** @param type Type of data to add.* @param value Data to add.*/DataTransfer.prototype.setData = function (type, value) {this._data[type] = value;};/*** Set the image to be used for dragging if a custom one is desired.** @param img An image element to use as the drag feedback image.* @param offsetX The horizontal offset within the image.* @param offsetY The vertical offset within the image.*/DataTransfer.prototype.setDragImage = function (img, offsetX, offsetY) {instance.setDragImage(img, offsetX, offsetY)};return DataTransfer;}())

Object used to hold the data that is being dragged during drag and drop operations.

It may hold one or more data items of different types. For more information about drag and drop operations and data transfer objects, see HTML Drag and Drop API.

This object is created automatically by the @see:TouchDelegate singleton and is accessible through the @see:dataTransfer property of all drag events.

Let J

J: Jsons = Jsons

Const KB_PROPS

KB_PROPS: string[] = ['altKey', 'ctrlKey', 'metaKey', 'shiftKey']

Const LONG_TAP_INTERVAL

LONG_TAP_INTERVAL: 750 = 750

Const PT_PROPS

PT_PROPS: string[] = ['pageX', 'pageY', 'clientX', 'clientY', 'screenX', 'screenY']

Const RM_ATTS

RM_ATTS: string[] = ['id', 'class', 'style', 'draggable']

Let instance

instance: TouchDelegate = new TouchDelegate()

Object literals

Let VK

VK: object

A

A: number = 65

ALT

ALT: number = 18

APOSTROPHE

APOSTROPHE: number = 192

`

B

B: number = 66

BACK_SLASH

BACK_SLASH: number = 220

\

BACK_SPACE

BACK_SPACE: number = 8

C

C: number = 67

CAPS_LOCK

CAPS_LOCK: number = 20

COMMA

COMMA: number = 188

,

CTRL

CTRL: number = 17

D

D: number = 68

DECIMAL

DECIMAL: number = 110

. in NUMPAD

DELETE

DELETE: number = 46

DIVIDE

DIVIDE: number = 111

DOWN

DOWN: number = 40

E

E: number = 69

END

END: number = 35

ENTER

ENTER: number = 13

EQUAL_SIGN

EQUAL_SIGN: number = 187

=

ESC

ESC: number = 27

F

F: number = 70

F1

F1: number = 112

F10

F10: number = 121

F11

F11: number = 122

F12

F12: number = 123

F2

F2: number = 113

F3

F3: number = 114

F4

F4: number = 115

F5

F5: number = 116

F6

F6: number = 117

F7

F7: number = 118

F8

F8: number = 119

F9

F9: number = 120

G

G: number = 71

H

H: number = 72

HOME

HOME: number = 36

HYPHEN

HYPHEN: number = 189

-

I

I: number = 73

INSERT

INSERT: number = 45

J

J: number = 74

K

K: number = 75

KEY0

KEY0: number = 48

KEY1

KEY1: number = 49

KEY2

KEY2: number = 50

KEY3

KEY3: number = 51

KEY4

KEY4: number = 52

KEY5

KEY5: number = 53

KEY6

KEY6: number = 54

KEY7

KEY7: number = 55

KEY8

KEY8: number = 56

KEY9

KEY9: number = 57

L

L: number = 76

LEFT

LEFT: number = 37

LEFT_SQUARE_BRACKET

LEFT_SQUARE_BRACKET: number = 219

[

M

M: number = 77

META_LEFT

META_LEFT: number = 91

Mac平台上指的是 command键(⌘),而在Windows平台指的是 windows键(⊞)

META_RIGHT

META_RIGHT: number = 93

MULTIPLY

MULTIPLY: number = 106

in NUMPAD

N

N: number = 78

NUM_LOCK

NUM_LOCK: number = 144

O

O: number = 79

P

P: number = 80

PAD0

PAD0: number = 96

Numbers in NUMPAD

PAD1

PAD1: number = 97

PAD2

PAD2: number = 98

PAD3

PAD3: number = 99

PAD4

PAD4: number = 100

PAD5

PAD5: number = 101

PAD6

PAD6: number = 102

PAD7

PAD7: number = 103

PAD8

PAD8: number = 104

PAD9

PAD9: number = 105

PAGE_DOWN

PAGE_DOWN: number = 34

PAGE_UP

PAGE_UP: number = 33

PAUSE

PAUSE: number = 19

PERIOD

PERIOD: number = 190

.

PLUS

PLUS: number = 107
  • in NUMPAD

PRINT_SCREEN

PRINT_SCREEN: number = 44

Q

Q: number = 81

QUOTE

QUOTE: number = 222

'

R

R: number = 82

RIGHT

RIGHT: number = 39

RIGHT_SQUARE_BRACKET

RIGHT_SQUARE_BRACKET: number = 221

]

S

S: number = 83

SCROLL_LOCK

SCROLL_LOCK: number = 145

SEMICOLON

SEMICOLON: number = 186

;

SHIFT

SHIFT: number = 16

SLASH

SLASH: number = 191

SPACE

SPACE: number = 32

SUBTRACT

SUBTRACT: number = 109
  • in NUMPAD

T

T: number = 84

TAB

TAB: number = 9

U

U: number = 85

UP

UP: number = 38

V

V: number = 86

W

W: number = 87

X

X: number = 88

Y

Y: number = 89

Z

Z: number = 90