keycode: Javascript key codes

Description Usage Arguments Details Value

View source: R/keycodes.R

Description

Javascript key codes

Usage

1
keycode(key = NULL, code = NULL)

Arguments

key

character vector specifying keynames (default = NULL)

code

numeric vector specfiying keycodes (default = NULL)

Details

This function provides a mapping between the human-readable javascript key names and their corresponding numeric code values. If both input arguments are NULL, it returns a named numeric vector whose values correspond to the key codes and whose names correspond to the key names. If key is specified the return value is a vector with the corresponding numeric codes; whereas if code is specified the output is a character vector containing the corresponding key names. If neither argument is NULL the function throws an error.

Value

A numeric or character vector


djnavarro/jaysire documentation built on April 12, 2021, 4:25 a.m.