@lesnoypudge/utils
Version:
lesnoypudge's utils
194 lines (193 loc) • 5.53 kB
TypeScript
import { T } from '@lesnoypudge/types-utils-base/namespace';
export type KEY = T.ValueOf<typeof KEY>;
/**
* Commonly used keyboard keys.
*/
export declare const KEY: {
readonly Space: " ";
readonly Num0: "0";
readonly Num1: "1";
readonly Num2: "2";
readonly Num3: "3";
readonly Num4: "4";
readonly Num5: "5";
readonly Num6: "6";
readonly Num7: "7";
readonly Num8: "8";
readonly Num9: "9";
readonly A: "A";
readonly B: "B";
readonly C: "C";
readonly D: "D";
readonly E: "E";
readonly F: "F";
readonly G: "G";
readonly H: "H";
readonly I: "I";
readonly J: "J";
readonly K: "K";
readonly L: "L";
readonly M: "M";
readonly N: "M";
readonly O: "O";
readonly P: "P";
readonly Q: "Q";
readonly R: "R";
readonly S: "S";
readonly T: "T";
readonly U: "U";
readonly V: "V";
readonly W: "W";
readonly X: "X";
readonly Y: "Y";
readonly Z: "Z";
readonly Plus: "+";
readonly Minus: "-";
readonly Equal: "=";
readonly Comma: ",";
readonly Period: ".";
readonly Question: "?";
readonly Slash: "/";
/**
* 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.
*/
readonly Unidentified: "Unidentified";
/** The Alt (Alternative) key. */
readonly Alt: "Alt";
/**
* The Caps Lock key. Toggles the capital character lock on and
* off for subsequent input.
*/
readonly CapsLock: "CapsLock";
/**
* The Control, Ctrl, or Ctl key. Allows
* typing control characters.
*/
readonly 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.
*/
readonly Fn: "Fn";
/**
* The Meta key. Allows issuing special command inputs. This is
* the Windows logo key, or the Command or
* ⌘ key on Mac keyboards.
*/
readonly Meta: "Meta";
/**
* The NumLock (Number Lock) key. Toggles the numeric keypad
* between number entry some other mode (often directional arrows).
*/
readonly NumLock: "NumLock";
/**
* The Scroll Lock key. Toggles between scrolling and cursor
* movement modes.
*/
readonly ScrollLock: "ScrollLock";
/**
* The Shift key. Modifies keystrokes to allow typing upper (or
* other) case letters, and to support typing punctuation and other special
* characters.
*/
readonly Shift: "Shift";
/**
* The Enter or ↵ key (sometimes labeled
* Return).
*/
readonly Enter: "Enter";
/** The Horizontal Tab key, Tab. */
readonly Tab: "Tab";
/** The down arrow key. */
readonly ArrowDown: "ArrowDown";
/** The left arrow key. */
readonly ArrowLeft: "ArrowLeft";
/** The right arrow key. */
readonly ArrowRight: "ArrowRight";
/** The up arrow key. */
readonly ArrowUp: "ArrowUp";
/** The End key. Moves to the end of content. */
readonly End: "End";
/** The Home key. Moves to the start of content. */
readonly Home: "Home";
/**
* The Page Down (or PgDn) key. Scrolls down or
* displays the next page of content.
*/
readonly PageDown: "PageDown";
/**
* The Page Up (or PgUp) key. Scrolls up or displays
* the previous page of content.
*/
readonly PageUp: "PageUp";
/**
* The Backspace key. This key is labeled Delete on
* Mac keyboards.
*/
readonly Backspace: "Backspace";
/** The Delete key, Del. */
readonly Delete: "Delete";
/**
* The Insert key, Ins. Toggles between inserting and
* overwriting text.
*/
readonly Insert: "Insert";
/**
* The Esc (Escape) key. Typically used as an exit, cancel, or
* "escape this operation" button. Historically, the Escape character was
* used to signal the start of a special control sequence of characters
* called an "escape sequence."
*/
readonly Escape: "Escape";
/**
* The PrintScreen or PrtScr key. Sometimes
* SnapShot. Captures the screen and prints it or saves it to
* disk.
*/
readonly PrintScreen: "PrintScreen";
/** The first general-purpose function key, F1. */
readonly F1: "F1";
/** The F2 key. */
readonly F2: "F2";
/** The F3 key. */
readonly F3: "F3";
/** The F4 key. */
readonly F4: "F4";
/** The F5 key. */
readonly F5: "F5";
/** The F6 key. */
readonly F6: "F6";
/** The F7 key. */
readonly F7: "F7";
/** The F8 key. */
readonly F8: "F8";
/** The F9 key. */
readonly F9: "F9";
/** The F10 key. */
readonly F10: "F10";
/** The F11 key. */
readonly F11: "F11";
/** The F12 key. */
readonly F12: "F12";
/** The F13 key. */
readonly F13: "F13";
/** The F14 key. */
readonly F14: "F14";
/** The F15 key. */
readonly F15: "F15";
/** The F16 key. */
readonly F16: "F16";
/** The F17 key. */
readonly F17: "F17";
/** The F18 key. */
readonly F18: "F18";
/** The F19 key. */
readonly F19: "F19";
/** The F20 key. */
readonly F20: "F20";
};