Home Reference Source
public class | source

Keyboard

Constructor Summary

Public Constructor
public

constructor(client: Chrome | CRIConnection | CDPSession | Object)

Member Summary

Private Members
private
private

_client: *

private
private

Method Summary

Public Methods
public

async down(key: string, options: {text?: string}=)

public

async press(key: string, options: {delay?: number, text?: string})

public

async sendCharacter(char: string)

public

async type(text: string, options: {delay: number|undefined})

public

async up(key: string)

public
Private Methods
private
private
private

Public Constructors

public constructor(client: Chrome | CRIConnection | CDPSession | Object) source

Params:

NameTypeAttributeDescription
client Chrome | CRIConnection | CDPSession | Object

Private Members

private _altKeyDef: Object<string, KeyDefinition> source

private _client: * source

private _modifiers: number source

private _pressedKeys: * source

Public Methods

public async down(key: string, options: {text?: string}=) source

Params:

NameTypeAttributeDescription
key string
options {text?: string}=

public async press(key: string, options: {delay?: number, text?: string}) source

Params:

NameTypeAttributeDescription
key string
options {delay?: number, text?: string}
  • optional
  • nullable: false

public async sendCharacter(char: string) source

Params:

NameTypeAttributeDescription
char string

public async type(text: string, options: {delay: number|undefined}) source

Params:

NameTypeAttributeDescription
text string
options {delay: number|undefined}
  • optional

public async up(key: string) source

Params:

NameTypeAttributeDescription
key string

public useAlternativeKeyDefinitions(keyDef: Object<string, KeyDefinition>) source

Params:

NameTypeAttributeDescription
keyDef Object<string, KeyDefinition>

Private Methods

private _getKeyDefValue(key: string): KeyDefinition source

Params:

NameTypeAttributeDescription
key string

Return:

KeyDefinition

private _keyDescriptionForString(keyString: string): KeyDescription source

Params:

NameTypeAttributeDescription
keyString string

Return:

KeyDescription

private _modifierBit(key: string): number source

Params:

NameTypeAttributeDescription
key string

Return:

number