You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

ts-key-enum

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ts-key-enum - npm Package Compare versions

Comparing version

to
2.0.3

77

dist/declarations/Key.enum.d.ts

@@ -8,3 +8,6 @@ /**

export declare enum Key {
/** The user agent wasn't able to map the event's virtual keycode to a specific key value. This can happen due to hardware or software constraints, or because of constraints around the platform on which the user agent is running. */
/**
* The user agent wasn't able to map the event's virtual keycode to a specific key value.
* This can happen due to hardware or software constraints, or because of constraints around the platform on which the user agent is running.
*/
Unidentified = "Unidentified",

@@ -19,3 +22,3 @@ /** The Alt (Alternative) key. */

Control = "Control",
/** The Fn (Function modifier) key. Used to allow generating function key (F1-F15, for instance) characters on keyboards without a dedicated function key area. Often handled in hardware so that events aren't generated for this key. */
/** The Fn (Function modifier) key. Used to allow generating function key (F1–F15, for instance) characters on keyboards without a dedicated function key area. Often handled in hardware so that events aren't generated for this key. */
Fn = "Fn",

@@ -30,3 +33,3 @@ /** The FnLock or F-Lock (Function Lock) key.Toggles the function key mode described by "Fn" on and off. Often handled in hardware so that events aren't generated for this key. */

NumLock = "NumLock",
/** The Scroll Lock key. Toggles beteen scrolling and cursor movement modes. */
/** The Scroll Lock key. Toggles between scrolling and cursor movement modes. */
ScrollLock = "ScrollLock",

@@ -77,3 +80,3 @@ /** The Shift key. Modifies keystrokes to allow typing upper (or other) case letters, and to support typing punctuation and other special characters. */

ExSel = "ExSel",
/** The Insert key, Ins. Toggles  between inserting and overwriting text. */
/** The Insert key, Ins. Toggles between inserting and overwriting text. */
Insert = "Insert",

@@ -108,3 +111,3 @@ /** Paste from the clipboard. */

* The Pause key. Pauses the current application or state, if applicable.
* This shouldn't be confused with the "MediaPause" key value, which is used for media controllers, rather than to control applications and processes.
* Note: This shouldn't be confused with the "MediaPause" key value, which is used for media controllers, rather than to control applications and processes.
*/

@@ -114,3 +117,3 @@ Pause = "Pause",

* The Play key. Resumes a previously paused application, if applicable.
* This shouldn't be confused with the "MediaPlay" key value, which is used for media controllers, rather than to control applications and processes.
* Note: This shouldn't be confused with the "MediaPlay" key value, which is used for media controllers, rather than to control applications and processes.
*/

@@ -136,3 +139,3 @@ Play = "Play",

* The Power button or key, to toggle power on and off.
* Not all systems pass this key through to to the user agent.
* Note: Not all systems pass this key through to to the user agent.
*/

@@ -146,5 +149,5 @@ Power = "Power",

Hibernate = "Hibernate",
/** The Standby key; also known as Suspend or Sleep. This turns off the display and puts the computer in a low power consumption mode, without completely powering off. */
/** The Standby key. (Also known as Suspend or Sleep.) This turns off the display and puts the computer in a low power consumption mode, without completely powering off. */
Standby = "Standby",
/** The WakeUp key; used to wake the computer from the hibernation or standby modes. */
/** The WakeUp key. Used to wake the computer from the hibernation or standby modes. */
WakeUp = "WakeUp",

@@ -161,3 +164,6 @@ /** The All Candidates key, which starts multi-candidate mode, in which multiple candidates are displayed for the ongoing input. */

Convert = "Convert",
/** A dead "combining" key; that is, a key which is used in tandem with other keys to generate accented and other modified characters. If pressed by itself, it doesn't generate a character. If you wish to identify which specific dead key was pressed (in cases where more than one exists), you can do so by examining the KeyboardEvent's associated compositionupdate event's  data property. */
/**
* A dead "combining" key; that is, a key which is used in tandem with other keys to generate accented and other modified characters. If pressed by itself, it doesn't generate a character.
* If you wish to identify which specific dead key was pressed (in cases where more than one exists), you can do so by examining the KeyboardEvent's associated compositionupdate event's  data property.
*/
Dead = "Dead",

@@ -262,7 +268,7 @@ /** The Final (Final Mode) key is used on some Asian keyboards to enter final mode when using IMEs. */

AppSwitch = "AppSwitch",
/** The Call key; dials the number which has been entered. */
/** The Call key. Dials the number which has been entered. */
Call = "Call",
/** The Camera key; activates the camera. */
/** The Camera key. Activates the camera. */
Camera = "Camera",
/** The Focus key; focuses the camera. */
/** The Focus key. Focuses the camera. */
CameraFocus = "CameraFocus",

@@ -273,7 +279,7 @@ /** The End Call or Hang Up button. */

GoBack = "GoBack",
/** The Home button, which takes the user to the phone's main screen (usually an application launcher). */
/** The Home button. Returns the user to the phone's main screen (usually an application launcher). */
GoHome = "GoHome",
/** The Headset Hook key. This is typically actually a button on the headset which is used to hang up calls and play or pause media. */
HeadsetHook = "HeadsetHook",
/** The Redial button, which redials the last-called number. */
/** The Redial button. Redials the last-called number. */
LastNumberRedial = "LastNumberRedial",

@@ -292,3 +298,6 @@ /** The Notification key. */

MediaFastForward = "MediaFastForward",
/** Pauses the currently playing media. Some older applications use simply "Pause" but this is not correct. */
/**
* Pauses the currently playing media.
* Note: Some older applications use simply "Pause", but this is not correct.
*/
MediaPause = "MediaPause",

@@ -411,13 +420,13 @@ /** Starts or continues playing media at normal speed, if not already doing so. Has no effect otherwise. */

AVRPower = "AVRPower",
/** General-purpose media function key, color-coded red; this has index 0 among the colored keys. */
/** General-purpose media function key, color-coded red. This has index 0 among the colored keys. */
ColorF0Red = "ColorF0Red",
/** General-purpose media funciton key, color-coded green; this has index 1 among the colored keys. */
/** General-purpose media funciton key, color-coded green. This has index 1 among the colored keys. */
ColorF1Green = "ColorF1Green",
/** General-purpose media funciton key, color-coded yellow; this has index 2 among the colored keys. */
/** General-purpose media funciton key, color-coded yellow. This has index 2 among the colored keys. */
ColorF2Yellow = "ColorF2Yellow",
/** General-purpose media funciton key, color-coded blue; this has index 3 among the colored keys. */
/** General-purpose media funciton key, color-coded blue. This has index 3 among the colored keys. */
ColorF3Blue = "ColorF3Blue",
/** General-purpose media funciton key, color-coded grey; this has index 4 among the colored keys. */
/** General-purpose media funciton key, color-coded grey. This has index 4 among the colored keys. */
ColorF4Grey = "ColorF4Grey",
/** General-purpose media funciton key, color-coded brown; this has index 5 among the colored keys. */
/** General-purpose media funciton key, color-coded brown. This has index 5 among the colored keys. */
ColorF5Brown = "ColorF5Brown",

@@ -490,3 +499,3 @@ /** Toggles closed captioning on and off. */

MediaStepForward = "MediaStepForward",
/** Top Menu button; opens the media's main menu, such as on a DVD or Blu-Ray disc. */
/** Top Menu button. Opens the media's main menu (e.g., for a DVD or Blu-Ray disc). */
MediaTopMenu = "MediaTopMenu",

@@ -531,3 +540,3 @@ /** Navigates into a submenu or option. */

RfBypass = "RfBypass",
/** Toggles the channel scan mode on and off; this is a mode which flips through channels automatically until the user stops the scan. */
/** Toggles the channel scan mode on and off. This is a mode which flips through channels automatically until the user stops the scan. */
ScanChannelsToggle = "ScanChannelsToggle",

@@ -578,15 +587,15 @@ /** Cycles through the available screen display modes. */

LaunchCalculator = "LaunchCalculator",
/** The Calendar key, often labeled with an icon. */
/** The Calendar key. Often labeled with an icon. */
LaunchCalendar = "LaunchCalendar",
/** The Contacts key. */
LaunchContacts = "LaunchContacts",
/** The Mail key. This is often displayed with an icon. */
/** The Mail key. Often labeled with an icon. */
LaunchMail = "LaunchMail",
/** The Media Player key. */
LaunchMediaPlayer = "LaunchMediaPlayer",
/** The Music Player key, often labeled with an icon. */
/** The Music Player key. Often labeled with an icon. */
LaunchMusicPlayer = "LaunchMusicPlayer",
/** The My Computer key on Windows keyboards. This is often used as a generic application launcher key (APPCOMMAND_LAUNCH_APP1). */
LaunchMyComputer = "LaunchMyComputer",
/** The Phone key, to open the phone dialer application if one is present. */
/** The Phone key. Opens the phone dialer application (if one is present). */
LaunchPhone = "LaunchPhone",

@@ -643,3 +652,3 @@ /** The Screen Saver key. */

BrowserHome = "BrowserHome",
/** Refreshes the current page or contentl. */
/** Refreshes the current page or content. */
BrowserRefresh = "BrowserRefresh",

@@ -650,3 +659,6 @@ /** Activates the user's preferred search engine or the search interface within their browser. */

BrowserStop = "BrowserStop",
/** The decimal point key (typically . or , depending on the region. In newer browsers, this value to simply be the character generated by the decimal key (one of those two characters). [1] */
/**
* The decimal point key (typically . or , depending on the region).
* In newer browsers, this value to simply be the character generated by the decimal key (one of those two characters). [1]
*/
Decimal = "Decimal",

@@ -665,4 +677,7 @@ /** The 11 key found on certain media numeric keypads. */

Subtract = "Subtract",
/** The numeric keypad's places separator character (in the United States, this is a comma, but elsewhere it is frequently a period). */
/**
* The numeric keypad's places separator character.
* (In the United States this is a comma, but elsewhere it is frequently a period.)
*/
Separator = "Separator"
}
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Key = void 0;
/**

@@ -11,3 +12,6 @@ * An enum that includes all non-printable string values one can expect from $event.key.

(function (Key) {
/** The user agent wasn't able to map the event's virtual keycode to a specific key value. This can happen due to hardware or software constraints, or because of constraints around the platform on which the user agent is running. */
/**
* The user agent wasn't able to map the event's virtual keycode to a specific key value.
* This can happen due to hardware or software constraints, or because of constraints around the platform on which the user agent is running.
*/
Key["Unidentified"] = "Unidentified";

@@ -22,3 +26,3 @@ /** The Alt (Alternative) key. */

Key["Control"] = "Control";
/** The Fn (Function modifier) key. Used to allow generating function key (F1-F15, for instance) characters on keyboards without a dedicated function key area. Often handled in hardware so that events aren't generated for this key. */
/** The Fn (Function modifier) key. Used to allow generating function key (F1–F15, for instance) characters on keyboards without a dedicated function key area. Often handled in hardware so that events aren't generated for this key. */
Key["Fn"] = "Fn";

@@ -33,3 +37,3 @@ /** The FnLock or F-Lock (Function Lock) key.Toggles the function key mode described by "Fn" on and off. Often handled in hardware so that events aren't generated for this key. */

Key["NumLock"] = "NumLock";
/** The Scroll Lock key. Toggles beteen scrolling and cursor movement modes. */
/** The Scroll Lock key. Toggles between scrolling and cursor movement modes. */
Key["ScrollLock"] = "ScrollLock";

@@ -80,3 +84,3 @@ /** The Shift key. Modifies keystrokes to allow typing upper (or other) case letters, and to support typing punctuation and other special characters. */

Key["ExSel"] = "ExSel";
/** The Insert key, Ins. Toggles  between inserting and overwriting text. */
/** The Insert key, Ins. Toggles between inserting and overwriting text. */
Key["Insert"] = "Insert";

@@ -111,3 +115,3 @@ /** Paste from the clipboard. */

* The Pause key. Pauses the current application or state, if applicable.
* This shouldn't be confused with the "MediaPause" key value, which is used for media controllers, rather than to control applications and processes.
* Note: This shouldn't be confused with the "MediaPause" key value, which is used for media controllers, rather than to control applications and processes.
*/

@@ -117,3 +121,3 @@ Key["Pause"] = "Pause";

* The Play key. Resumes a previously paused application, if applicable.
* This shouldn't be confused with the "MediaPlay" key value, which is used for media controllers, rather than to control applications and processes.
* Note: This shouldn't be confused with the "MediaPlay" key value, which is used for media controllers, rather than to control applications and processes.
*/

@@ -139,3 +143,3 @@ Key["Play"] = "Play";

* The Power button or key, to toggle power on and off.
* Not all systems pass this key through to to the user agent.
* Note: Not all systems pass this key through to to the user agent.
*/

@@ -149,5 +153,5 @@ Key["Power"] = "Power";

Key["Hibernate"] = "Hibernate";
/** The Standby key; also known as Suspend or Sleep. This turns off the display and puts the computer in a low power consumption mode, without completely powering off. */
/** The Standby key. (Also known as Suspend or Sleep.) This turns off the display and puts the computer in a low power consumption mode, without completely powering off. */
Key["Standby"] = "Standby";
/** The WakeUp key; used to wake the computer from the hibernation or standby modes. */
/** The WakeUp key. Used to wake the computer from the hibernation or standby modes. */
Key["WakeUp"] = "WakeUp";

@@ -164,3 +168,6 @@ /** The All Candidates key, which starts multi-candidate mode, in which multiple candidates are displayed for the ongoing input. */

Key["Convert"] = "Convert";
/** A dead "combining" key; that is, a key which is used in tandem with other keys to generate accented and other modified characters. If pressed by itself, it doesn't generate a character. If you wish to identify which specific dead key was pressed (in cases where more than one exists), you can do so by examining the KeyboardEvent's associated compositionupdate event's  data property. */
/**
* A dead "combining" key; that is, a key which is used in tandem with other keys to generate accented and other modified characters. If pressed by itself, it doesn't generate a character.
* If you wish to identify which specific dead key was pressed (in cases where more than one exists), you can do so by examining the KeyboardEvent's associated compositionupdate event's  data property.
*/
Key["Dead"] = "Dead";

@@ -265,7 +272,7 @@ /** The Final (Final Mode) key is used on some Asian keyboards to enter final mode when using IMEs. */

Key["AppSwitch"] = "AppSwitch";
/** The Call key; dials the number which has been entered. */
/** The Call key. Dials the number which has been entered. */
Key["Call"] = "Call";
/** The Camera key; activates the camera. */
/** The Camera key. Activates the camera. */
Key["Camera"] = "Camera";
/** The Focus key; focuses the camera. */
/** The Focus key. Focuses the camera. */
Key["CameraFocus"] = "CameraFocus";

@@ -276,7 +283,7 @@ /** The End Call or Hang Up button. */

Key["GoBack"] = "GoBack";
/** The Home button, which takes the user to the phone's main screen (usually an application launcher). */
/** The Home button. Returns the user to the phone's main screen (usually an application launcher). */
Key["GoHome"] = "GoHome";
/** The Headset Hook key. This is typically actually a button on the headset which is used to hang up calls and play or pause media. */
Key["HeadsetHook"] = "HeadsetHook";
/** The Redial button, which redials the last-called number. */
/** The Redial button. Redials the last-called number. */
Key["LastNumberRedial"] = "LastNumberRedial";

@@ -295,3 +302,6 @@ /** The Notification key. */

Key["MediaFastForward"] = "MediaFastForward";
/** Pauses the currently playing media. Some older applications use simply "Pause" but this is not correct. */
/**
* Pauses the currently playing media.
* Note: Some older applications use simply "Pause", but this is not correct.
*/
Key["MediaPause"] = "MediaPause";

@@ -414,13 +424,13 @@ /** Starts or continues playing media at normal speed, if not already doing so. Has no effect otherwise. */

Key["AVRPower"] = "AVRPower";
/** General-purpose media function key, color-coded red; this has index 0 among the colored keys. */
/** General-purpose media function key, color-coded red. This has index 0 among the colored keys. */
Key["ColorF0Red"] = "ColorF0Red";
/** General-purpose media funciton key, color-coded green; this has index 1 among the colored keys. */
/** General-purpose media funciton key, color-coded green. This has index 1 among the colored keys. */
Key["ColorF1Green"] = "ColorF1Green";
/** General-purpose media funciton key, color-coded yellow; this has index 2 among the colored keys. */
/** General-purpose media funciton key, color-coded yellow. This has index 2 among the colored keys. */
Key["ColorF2Yellow"] = "ColorF2Yellow";
/** General-purpose media funciton key, color-coded blue; this has index 3 among the colored keys. */
/** General-purpose media funciton key, color-coded blue. This has index 3 among the colored keys. */
Key["ColorF3Blue"] = "ColorF3Blue";
/** General-purpose media funciton key, color-coded grey; this has index 4 among the colored keys. */
/** General-purpose media funciton key, color-coded grey. This has index 4 among the colored keys. */
Key["ColorF4Grey"] = "ColorF4Grey";
/** General-purpose media funciton key, color-coded brown; this has index 5 among the colored keys. */
/** General-purpose media funciton key, color-coded brown. This has index 5 among the colored keys. */
Key["ColorF5Brown"] = "ColorF5Brown";

@@ -493,3 +503,3 @@ /** Toggles closed captioning on and off. */

Key["MediaStepForward"] = "MediaStepForward";
/** Top Menu button; opens the media's main menu, such as on a DVD or Blu-Ray disc. */
/** Top Menu button. Opens the media's main menu (e.g., for a DVD or Blu-Ray disc). */
Key["MediaTopMenu"] = "MediaTopMenu";

@@ -534,3 +544,3 @@ /** Navigates into a submenu or option. */

Key["RfBypass"] = "RfBypass";
/** Toggles the channel scan mode on and off; this is a mode which flips through channels automatically until the user stops the scan. */
/** Toggles the channel scan mode on and off. This is a mode which flips through channels automatically until the user stops the scan. */
Key["ScanChannelsToggle"] = "ScanChannelsToggle";

@@ -581,15 +591,15 @@ /** Cycles through the available screen display modes. */

Key["LaunchCalculator"] = "LaunchCalculator";
/** The Calendar key, often labeled with an icon. */
/** The Calendar key. Often labeled with an icon. */
Key["LaunchCalendar"] = "LaunchCalendar";
/** The Contacts key. */
Key["LaunchContacts"] = "LaunchContacts";
/** The Mail key. This is often displayed with an icon. */
/** The Mail key. Often labeled with an icon. */
Key["LaunchMail"] = "LaunchMail";
/** The Media Player key. */
Key["LaunchMediaPlayer"] = "LaunchMediaPlayer";
/** The Music Player key, often labeled with an icon. */
/** The Music Player key. Often labeled with an icon. */
Key["LaunchMusicPlayer"] = "LaunchMusicPlayer";
/** The My Computer key on Windows keyboards. This is often used as a generic application launcher key (APPCOMMAND_LAUNCH_APP1). */
Key["LaunchMyComputer"] = "LaunchMyComputer";
/** The Phone key, to open the phone dialer application if one is present. */
/** The Phone key. Opens the phone dialer application (if one is present). */
Key["LaunchPhone"] = "LaunchPhone";

@@ -646,3 +656,3 @@ /** The Screen Saver key. */

Key["BrowserHome"] = "BrowserHome";
/** Refreshes the current page or contentl. */
/** Refreshes the current page or content. */
Key["BrowserRefresh"] = "BrowserRefresh";

@@ -653,3 +663,6 @@ /** Activates the user's preferred search engine or the search interface within their browser. */

Key["BrowserStop"] = "BrowserStop";
/** The decimal point key (typically . or , depending on the region. In newer browsers, this value to simply be the character generated by the decimal key (one of those two characters). [1] */
/**
* The decimal point key (typically . or , depending on the region).
* In newer browsers, this value to simply be the character generated by the decimal key (one of those two characters). [1]
*/
Key["Decimal"] = "Decimal";

@@ -668,4 +681,7 @@ /** The 11 key found on certain media numeric keypads. */

Key["Subtract"] = "Subtract";
/** The numeric keypad's places separator character (in the United States, this is a comma, but elsewhere it is frequently a period). */
/**
* The numeric keypad's places separator character.
* (In the United States this is a comma, but elsewhere it is frequently a period.)
*/
Key["Separator"] = "Separator";
})(Key = exports.Key || (exports.Key = {}));
{
"name": "ts-key-enum",
"version": "2.0.2",
"version": "2.0.3",
"description": "A TypeScript string enum for compile-time safety when working with event.key",

@@ -5,0 +5,0 @@ "main": "dist/js/Key.enum.js",