Keycode (class)
public final Keycode
Import from: CURL.GUI.STANDARD. Defined in package CURL.DEVICE.KEYBOARD.

Represents a single input identifier, such as a keyboard key.

Description

A Keycode represents some user input identifier. It is most commonly used to report "raw" key press and release events, such as these:

Please refer to the documentation for KeyPressWindowEvent for a discussion of the difference between "cooked" and "raw" key events.

Most Keycodes represent keys on the keyboard. The notable exceptions are the mouse buttons, which are represented by Keycode.button-1 through Keycode.button-7. You should never see these values delivered in a key-related event, of course. They are present in Keycode because they are part of StateMask; Keycodes with values below 32 are in one-to-one correspondence with the individual values of StateMask.

Keycode numbering is platform independent, and is not expected to change in future releases of the Curl language.

Each Keycode is available as a class constant; for instance, the Keycode representing the space bar is Keycode.space.

Some Keycodes, such as hyper-left are reserved for future use.

Example

The following example demonstrates the handling of the press and release of a key. When the key is pressed, the Frame changes color; when it is released, it changes color again. You must left click in the yellow area to give the Frame keyboard focus so that it can receive key events.


Example: Working with Keycode
{Frame
    width = 1in,
    height = 1in,
    background = {FillPattern.get-yellow},
    {on p:PointerPress at frame:Frame do
        {frame.request-key-focus}
        {p.consume}
    },
    || If the space bar is pressed, the Frame changes
    || to red, then to blue.  If any other key is
    || pressed, the Frame changes to magenta, then
    || to cyan.
    {on raw-key-event:RawKeyPress at frame:Frame do
        {if raw-key-event.keycode == Keycode.space then
            set frame.background = {FillPattern.get-red}
         else
            set frame.background = {FillPattern.get-magenta}
        }
    },
    {on raw-key-event:RawKeyRelease at frame:Frame do
        {if raw-key-event.keycode == Keycode.space then
            set frame.background = {FillPattern.get-blue}
         else
            set frame.background = {FillPattern.get-cyan}
        }
    }
}

Constructors
default:Return the Keycode whose Keycode.value is n.
constructor public {Keycode.default n:int}
uninitialized:Construct uninitialized value.
factory public implicit inline {Keycode.uninitialized}:Keycode

Properties
value:The integer value of this Keycode. This number will be between 0 and 1023, inclusive.
field public constant Keycode.value:uint16

Class Variables and Constants
a:The Keycode for the a key
public constant Keycode.a:Keycode ={Keycode 0x61}
alt-left:The Keycode for the alt-left key
public constant Keycode.alt-left:Keycode ={Keycode 0x0C}
alt-right:The Keycode for the alt-right key
public constant Keycode.alt-right:Keycode ={Keycode 0x0D}
apostrophe:The Keycode for the apostrophe key
public constant Keycode.apostrophe:Keycode ={Keycode 0x27}
b:The Keycode for the b key
public constant Keycode.b:Keycode ={Keycode 0x62}
backslash:The Keycode for the backslash key
public constant Keycode.backslash:Keycode ={Keycode 0x5C}
backspace:The Keycode for the backspace key
public constant Keycode.backspace:Keycode ={Keycode 0x81}
backtick:The Keycode for the backtick key
public constant Keycode.backtick:Keycode ={Keycode 0x60}
bracket-left:The Keycode for the bracket-left key
public constant Keycode.bracket-left:Keycode ={Keycode 0x5B}
bracket-right:The Keycode for the bracket-right key
public constant Keycode.bracket-right:Keycode ={Keycode 0x5D}
button-1:The Keycode representing the left mouse button
public constant Keycode.button-1:Keycode ={Keycode 0x01}
button-2:The Keycode representing the center mouse button
public constant Keycode.button-2:Keycode ={Keycode 0x02}
button-3:The Keycode representing the right mouse button
public constant Keycode.button-3:Keycode ={Keycode 0x03}
button-4:The Keycode for mouse button 4
public constant Keycode.button-4:Keycode ={Keycode 0x04}
button-5:The Keycode for mouse button 5
public constant Keycode.button-5:Keycode ={Keycode 0x05}
button-6:The Keycode for mouse button 6
public constant Keycode.button-6:Keycode ={Keycode 0x06}
button-7:The Keycode for mouse button 7
public constant Keycode.button-7:Keycode ={Keycode 0x07}
c:The Keycode for the c key
public constant Keycode.c:Keycode ={Keycode 0x63}
caps-key:The Keycode for the caps-key key
public constant Keycode.caps-key:Keycode ={Keycode 0x18}
caps-lock:The Keycode for the caps-lock key
public constant Keycode.caps-lock:Keycode ={Keycode 0x1C}
comma:The Keycode for the comma key
public constant Keycode.comma:Keycode ={Keycode 0x2C}
command-left:The Keycode for the left command key on a Macintosh keyboard.
public constant Keycode.command-left:Keycode ={Keycode 0x14}
command-right:The Keycode for the right command key on a Macintosh keyboard.
public constant Keycode.command-right:Keycode ={Keycode 0x15}
ctrl-left:The Keycode for the ctrl-left key
public constant Keycode.ctrl-left:Keycode ={Keycode 0x0A}
ctrl-right:The Keycode for the ctrl-right key
public constant Keycode.ctrl-right:Keycode ={Keycode 0x0B}
d:The Keycode for the d key
public constant Keycode.d:Keycode ={Keycode 0x64}
delete:The Keycode for the delete key
public constant Keycode.delete:Keycode ={Keycode 0x8F}
down:The Keycode for the down key
public constant Keycode.down:Keycode ={Keycode 0x89}
e:The Keycode for the e key
public constant Keycode.e:Keycode ={Keycode 0x65}
end:The Keycode for the end key
public constant Keycode.end:Keycode ={Keycode 0x8B}
enter:The Keycode for the enter key
public constant Keycode.enter:Keycode ={Keycode 0x83}
equal:The Keycode for the equal key
public constant Keycode.equal:Keycode ={Keycode 0x3D}
esc:The Keycode for the esc key
public constant Keycode.esc:Keycode ={Keycode 0x80}
f:The Keycode for the f key
public constant Keycode.f:Keycode ={Keycode 0x66}
f0:The Keycode for the f0 key
public constant Keycode.f0:Keycode ={Keycode 0xA0}
f1:The Keycode for the f1 key
public constant Keycode.f1:Keycode ={Keycode 0xA1}
f10:The Keycode for the f10 key
public constant Keycode.f10:Keycode ={Keycode 0xAA}
f11:The Keycode for the f11 key
public constant Keycode.f11:Keycode ={Keycode 0xAB}
f12:The Keycode for the f12 key
public constant Keycode.f12:Keycode ={Keycode 0xAC}
f13:The Keycode for the f13 key
public constant Keycode.f13:Keycode ={Keycode 0xAD}
f14:The Keycode for the f14 key
public constant Keycode.f14:Keycode ={Keycode 0xAE}
f15:The Keycode for the f15 key
public constant Keycode.f15:Keycode ={Keycode 0xAF}
f16:The Keycode for the f16 key
public constant Keycode.f16:Keycode ={Keycode 0xB0}
f17:The Keycode for the f17 key
public constant Keycode.f17:Keycode ={Keycode 0xB1}
f18:The Keycode for the f18 key
public constant Keycode.f18:Keycode ={Keycode 0xB2}
f19:The Keycode for the f19 key
public constant Keycode.f19:Keycode ={Keycode 0xB3}
f2:The Keycode for the f2 key
public constant Keycode.f2:Keycode ={Keycode 0xA2}
f20:The Keycode for the f20 key
public constant Keycode.f20:Keycode ={Keycode 0xB4}
f21:The Keycode for the f21 key
public constant Keycode.f21:Keycode ={Keycode 0xB5}
f22:The Keycode for the f22 key
public constant Keycode.f22:Keycode ={Keycode 0xB6}
f23:The Keycode for the f23 key
public constant Keycode.f23:Keycode ={Keycode 0xB7}
f24:The Keycode for the f24 key
public constant Keycode.f24:Keycode ={Keycode 0xB8}
f25:The Keycode for the f25 key
public constant Keycode.f25:Keycode ={Keycode 0xB9}
f26:The Keycode for the f26 key
public constant Keycode.f26:Keycode ={Keycode 0xBA}
f27:The Keycode for the f27 key
public constant Keycode.f27:Keycode ={Keycode 0xBB}
f28:The Keycode for the f28 key
public constant Keycode.f28:Keycode ={Keycode 0xBC}
f29:The Keycode for the f29 key
public constant Keycode.f29:Keycode ={Keycode 0xBD}
f3:The Keycode for the f3 key
public constant Keycode.f3:Keycode ={Keycode 0xA3}
f30:The Keycode for the f30 key
public constant Keycode.f30:Keycode ={Keycode 0xBE}
f31:The Keycode for the f31 key
public constant Keycode.f31:Keycode ={Keycode 0xBF}
f4:The Keycode for the f4 key
public constant Keycode.f4:Keycode ={Keycode 0xA4}
f5:The Keycode for the f5 key
public constant Keycode.f5:Keycode ={Keycode 0xA5}
f6:The Keycode for the f6 key
public constant Keycode.f6:Keycode ={Keycode 0xA6}
f7:The Keycode for the f7 key
public constant Keycode.f7:Keycode ={Keycode 0xA7}
f8:The Keycode for the f8 key
public constant Keycode.f8:Keycode ={Keycode 0xA8}
f9:The Keycode for the f9 key
public constant Keycode.f9:Keycode ={Keycode 0xA9}
g:The Keycode for the g key
public constant Keycode.g:Keycode ={Keycode 0x67}
h:The Keycode for the h key
public constant Keycode.h:Keycode ={Keycode 0x68}
home:The Keycode for the home key
public constant Keycode.home:Keycode ={Keycode 0x8A}
hyper-left:The Keycode for the hyper-left key
public constant Keycode.hyper-left:Keycode ={Keycode 0x12}
hyper-right:The Keycode for the hyper-right key
public constant Keycode.hyper-right:Keycode ={Keycode 0x13}
i:The Keycode for the i key
public constant Keycode.i:Keycode ={Keycode 0x69}
insert:The Keycode for the insert key
public constant Keycode.insert:Keycode ={Keycode 0x8E}
j:The Keycode for the j key
public constant Keycode.j:Keycode ={Keycode 0x6A}
k:The Keycode for the k key
public constant Keycode.k:Keycode ={Keycode 0x6B}
keypad-0:The Keycode for the keypad-0 key
public constant Keycode.keypad-0:Keycode ={Keycode 0xD0}
keypad-1:The Keycode for the keypad-1 key
public constant Keycode.keypad-1:Keycode ={Keycode 0xD1}
keypad-2:The Keycode for the keypad-2 key
public constant Keycode.keypad-2:Keycode ={Keycode 0xD2}
keypad-3:The Keycode for the keypad-3 key
public constant Keycode.keypad-3:Keycode ={Keycode 0xD3}
keypad-4:The Keycode for the keypad-4 key
public constant Keycode.keypad-4:Keycode ={Keycode 0xD4}
keypad-5:The Keycode for the keypad-5 key
public constant Keycode.keypad-5:Keycode ={Keycode 0xD5}
keypad-6:The Keycode for the keypad-6 key
public constant Keycode.keypad-6:Keycode ={Keycode 0xD6}
keypad-7:The Keycode for the keypad-7 key
public constant Keycode.keypad-7:Keycode ={Keycode 0xD7}
keypad-8:The Keycode for the keypad-8 key
public constant Keycode.keypad-8:Keycode ={Keycode 0xD8}
keypad-9:The Keycode for the keypad-9 key
public constant Keycode.keypad-9:Keycode ={Keycode 0xD9}
keypad-asterisk:The Keycode for the keypad-asterisk key
public constant Keycode.keypad-asterisk:Keycode ={Keycode 0xDD}
keypad-backspace:The Keycode for the keypad-backspace key
public constant Keycode.keypad-backspace:Keycode ={Keycode 0xC1}
keypad-delete:The Keycode for the keypad-delete key
public constant Keycode.keypad-delete:Keycode ={Keycode 0xCF}
keypad-down:The Keycode for the keypad-down key
public constant Keycode.keypad-down:Keycode ={Keycode 0xC9}
keypad-end:The Keycode for the keypad-end key
public constant Keycode.keypad-end:Keycode ={Keycode 0xCB}
keypad-enter:The Keycode for the keypad-enter key
public constant Keycode.keypad-enter:Keycode ={Keycode 0xC3}
keypad-equal:The Keycode for the keypad-equal key
public constant Keycode.keypad-equal:Keycode ={Keycode 0xDB}
keypad-esc:The Keycode for the keypad-esc key
public constant Keycode.keypad-esc:Keycode ={Keycode 0xC0}
keypad-f0:The Keycode for the keypad-f0 key
public constant Keycode.keypad-f0:Keycode ={Keycode 0xE0}
keypad-f1:The Keycode for the keypad-f1 key
public constant Keycode.keypad-f1:Keycode ={Keycode 0xE1}
keypad-f10:The Keycode for the keypad-f10 key
public constant Keycode.keypad-f10:Keycode ={Keycode 0xEA}
keypad-f11:The Keycode for the keypad-f11 key
public constant Keycode.keypad-f11:Keycode ={Keycode 0xEB}
keypad-f12:The Keycode for the keypad-f12 key
public constant Keycode.keypad-f12:Keycode ={Keycode 0xEC}
keypad-f13:The Keycode for the keypad-f13 key
public constant Keycode.keypad-f13:Keycode ={Keycode 0xED}
keypad-f14:The Keycode for the keypad-f14 key
public constant Keycode.keypad-f14:Keycode ={Keycode 0xEE}
keypad-f15:The Keycode for the keypad-f15 key
public constant Keycode.keypad-f15:Keycode ={Keycode 0xEF}
keypad-f16:The Keycode for the keypad-f16 key
public constant Keycode.keypad-f16:Keycode ={Keycode 0xF0}
keypad-f17:The Keycode for the keypad-f17 key
public constant Keycode.keypad-f17:Keycode ={Keycode 0xF1}
keypad-f18:The Keycode for the keypad-f18 key
public constant Keycode.keypad-f18:Keycode ={Keycode 0xF2}
keypad-f19:The Keycode for the keypad-f19 key
public constant Keycode.keypad-f19:Keycode ={Keycode 0xF3}
keypad-f2:The Keycode for the keypad-f2 key
public constant Keycode.keypad-f2:Keycode ={Keycode 0xE2}
keypad-f20:The Keycode for the keypad-f20 key
public constant Keycode.keypad-f20:Keycode ={Keycode 0xF4}
keypad-f21:The Keycode for the keypad-f21 key
public constant Keycode.keypad-f21:Keycode ={Keycode 0xF5}
keypad-f22:The Keycode for the keypad-f22 key
public constant Keycode.keypad-f22:Keycode ={Keycode 0xF6}
keypad-f23:The Keycode for the keypad-f23 key
public constant Keycode.keypad-f23:Keycode ={Keycode 0xF7}
keypad-f24:The Keycode for the keypad-f24 key
public constant Keycode.keypad-f24:Keycode ={Keycode 0xF8}
keypad-f25:The Keycode for the keypad-f25 key
public constant Keycode.keypad-f25:Keycode ={Keycode 0xF9}
keypad-f26:The Keycode for the keypad-f26 key
public constant Keycode.keypad-f26:Keycode ={Keycode 0xFA}
keypad-f27:The Keycode for the keypad-f27 key
public constant Keycode.keypad-f27:Keycode ={Keycode 0xFB}
keypad-f28:The Keycode for the keypad-f28 key
public constant Keycode.keypad-f28:Keycode ={Keycode 0xFC}
keypad-f29:The Keycode for the keypad-f29 key
public constant Keycode.keypad-f29:Keycode ={Keycode 0xFD}
keypad-f3:The Keycode for the keypad-f3 key
public constant Keycode.keypad-f3:Keycode ={Keycode 0xE3}
keypad-f30:The Keycode for the keypad-f30 key
public constant Keycode.keypad-f30:Keycode ={Keycode 0xFE}
keypad-f31:The Keycode for the keypad-f31 key
public constant Keycode.keypad-f31:Keycode ={Keycode 0xFF}
keypad-f4:The Keycode for the keypad-f4 key
public constant Keycode.keypad-f4:Keycode ={Keycode 0xE4}
keypad-f5:The Keycode for the keypad-f5 key
public constant Keycode.keypad-f5:Keycode ={Keycode 0xE5}
keypad-f6:The Keycode for the keypad-f6 key
public constant Keycode.keypad-f6:Keycode ={Keycode 0xE6}
keypad-f7:The Keycode for the keypad-f7 key
public constant Keycode.keypad-f7:Keycode ={Keycode 0xE7}
keypad-f8:The Keycode for the keypad-f8 key
public constant Keycode.keypad-f8:Keycode ={Keycode 0xE8}
keypad-f9:The Keycode for the keypad-f9 key
public constant Keycode.keypad-f9:Keycode ={Keycode 0xE9}
keypad-home:The Keycode for the keypad-home key
public constant Keycode.keypad-home:Keycode ={Keycode 0xCA}
keypad-insert:The Keycode for the keypad-insert key
public constant Keycode.keypad-insert:Keycode ={Keycode 0xCE}
keypad-left:The Keycode for the keypad-left key
public constant Keycode.keypad-left:Keycode ={Keycode 0xC6}
keypad-middle:The Keycode for the keypad-middle key
public constant Keycode.keypad-middle:Keycode ={Keycode 0xC5}
keypad-minus:The Keycode for the keypad-minus key
public constant Keycode.keypad-minus:Keycode ={Keycode 0xDE}
keypad-next:The Keycode for the keypad-pgdn key
public constant Keycode.keypad-next:Keycode ={Keycode 0xCD}
keypad-period:The Keycode for the keypad-period key
public constant Keycode.keypad-period:Keycode ={Keycode 0xDA}
keypad-pgdn:The Keycode for the keypad-pgdn key
public constant Keycode.keypad-pgdn:Keycode ={Keycode 0xCD}
keypad-pgup:The Keycode for the keypad-pgup key
public constant Keycode.keypad-pgup:Keycode ={Keycode 0xCC}
keypad-plus:The Keycode for the keypad-plus key
public constant Keycode.keypad-plus:Keycode ={Keycode 0xDF}
keypad-prev:The Keycode for the keypad-pgup key
public constant Keycode.keypad-prev:Keycode ={Keycode 0xCC}
keypad-right:The Keycode for the keypad-right key
public constant Keycode.keypad-right:Keycode ={Keycode 0xC7}
keypad-slash:The Keycode for the keypad-slash key
public constant Keycode.keypad-slash:Keycode ={Keycode 0xDC}
keypad-tab:The Keycode for the keypad-tab key
public constant Keycode.keypad-tab:Keycode ={Keycode 0xC2}
keypad-up:The Keycode for the keypad-up key
public constant Keycode.keypad-up:Keycode ={Keycode 0xC8}
l:The Keycode for the l key
public constant Keycode.l:Keycode ={Keycode 0x6C}
left:The Keycode for the left key
public constant Keycode.left:Keycode ={Keycode 0x86}
lower-left:
deprecated public constant Keycode.lower-left:Keycode =Keycode.command-left
lower-right:
deprecated public constant Keycode.lower-right:Keycode =Keycode.command-right
m:The Keycode for the m key
public constant Keycode.m:Keycode ={Keycode 0x6D}
menu-left:The Keycode for the menu-left key
public constant Keycode.menu-left:Keycode ={Keycode 0x0E}
menu-right:The Keycode for the menu-right key
public constant Keycode.menu-right:Keycode ={Keycode 0x0F}
meta-left:
deprecated public constant Keycode.meta-left:Keycode =Keycode.menu-left
meta-right:
deprecated public constant Keycode.meta-right:Keycode =Keycode.menu-right
middle:The Keycode for the middle key
public constant Keycode.middle:Keycode ={Keycode 0x85}
minus:The Keycode for the minus key
public constant Keycode.minus:Keycode ={Keycode 0x2D}
n:The Keycode for the n key
public constant Keycode.n:Keycode ={Keycode 0x6E}
next:The Keycode for the pgdn key
public constant Keycode.next:Keycode ={Keycode 0x8D}
none:The Keycode representing no Keycode
public constant Keycode.none:Keycode ={Keycode 0x0}
num-key:The Keycode for the num-key key
public constant Keycode.num-key:Keycode ={Keycode 0x19}
num-lock:The Keycode for the num-lock key
public constant Keycode.num-lock:Keycode ={Keycode 0x1D}
number-0:The Keycode for the number-0 key
public constant Keycode.number-0:Keycode ={Keycode 0x30}
number-1:The Keycode for the number-1 key
public constant Keycode.number-1:Keycode ={Keycode 0x31}
number-2:The Keycode for the number-2 key
public constant Keycode.number-2:Keycode ={Keycode 0x32}
number-3:The Keycode for the number-3 key
public constant Keycode.number-3:Keycode ={Keycode 0x33}
number-4:The Keycode for the number-4 key
public constant Keycode.number-4:Keycode ={Keycode 0x34}
number-5:The Keycode for the number-5 key
public constant Keycode.number-5:Keycode ={Keycode 0x35}
number-6:The Keycode for the number-6 key
public constant Keycode.number-6:Keycode ={Keycode 0x36}
number-7:The Keycode for the number-7 key
public constant Keycode.number-7:Keycode ={Keycode 0x37}
number-8:The Keycode for the number-8 key
public constant Keycode.number-8:Keycode ={Keycode 0x38}
number-9:The Keycode for the number-9 key
public constant Keycode.number-9:Keycode ={Keycode 0x39}
o:The Keycode for the o key
public constant Keycode.o:Keycode ={Keycode 0x6F}
other-key:The Keycode for the other-key key
public constant Keycode.other-key:Keycode ={Keycode 0x1B}
other-lock:The Keycode for the other-lock key
public constant Keycode.other-lock:Keycode ={Keycode 0x1F}
p:The Keycode for the p key
public constant Keycode.p:Keycode ={Keycode 0x70}
pause:The Keycode for the pause key
public constant Keycode.pause:Keycode ={Keycode 0x96}
period:The Keycode for the period key
public constant Keycode.period:Keycode ={Keycode 0x2E}
pgdn:The Keycode for the pgdn key
public constant Keycode.pgdn:Keycode ={Keycode 0x8D}
pgup:The Keycode for the pgup key
public constant Keycode.pgup:Keycode ={Keycode 0x8C}
power-left:The Keycode for the power-left key
public constant Keycode.power-left:Keycode ={Keycode 0x10}
power-right:The Keycode for the power-right key
public constant Keycode.power-right:Keycode ={Keycode 0x11}
prev:The Keycode for the pgup key
public constant Keycode.prev:Keycode ={Keycode 0x8C}
q:The Keycode for the q key
public constant Keycode.q:Keycode ={Keycode 0x71}
r:The Keycode for the r key
public constant Keycode.r:Keycode ={Keycode 0x72}
right:The Keycode for the right key
public constant Keycode.right:Keycode ={Keycode 0x87}
s:The Keycode for the s key
public constant Keycode.s:Keycode ={Keycode 0x73}
scroll-key:The Keycode for the scroll-key key
public constant Keycode.scroll-key:Keycode ={Keycode 0x1A}
scroll-lock:The Keycode for the scroll-lock key
public constant Keycode.scroll-lock:Keycode ={Keycode 0x1E}
semicolon:The Keycode for the semicolon key
public constant Keycode.semicolon:Keycode ={Keycode 0x3B}
shift-left:The Keycode for the shift-left key
public constant Keycode.shift-left:Keycode ={Keycode 0x08}
shift-right:The Keycode for the shift-right key
public constant Keycode.shift-right:Keycode ={Keycode 0x09}
slash:The Keycode for the slash key
public constant Keycode.slash:Keycode ={Keycode 0x2F}
space:The Keycode for the space key
public constant Keycode.space:Keycode ={Keycode 0x20}
t:The Keycode for the t key
public constant Keycode.t:Keycode ={Keycode 0x74}
tab:The Keycode for the tab key
public constant Keycode.tab:Keycode ={Keycode 0x82}
u:The Keycode for the u key
public constant Keycode.u:Keycode ={Keycode 0x75}
up:The Keycode for the up key
public constant Keycode.up:Keycode ={Keycode 0x88}
upper-left:The Keycode for the upper-left key
public constant Keycode.upper-left:Keycode ={Keycode 0x16}
upper-right:The Keycode for the upper-right key
public constant Keycode.upper-right:Keycode ={Keycode 0x17}
v:The Keycode for the v key
public constant Keycode.v:Keycode ={Keycode 0x76}
w:The Keycode for the w key
public constant Keycode.w:Keycode ={Keycode 0x77}
x:The Keycode for the x key
public constant Keycode.x:Keycode ={Keycode 0x78}
y:The Keycode for the y key
public constant Keycode.y:Keycode ={Keycode 0x79}
z:The Keycode for the z key
public constant Keycode.z:Keycode ={Keycode 0x7A}

Class Procedures
keycode-for-name:Returns the Keycode corresponding to a given name.
public {Keycode.keycode-for-name name:String}:Keycode
name-for-keycode:Returns a String name for a Keycode.
public {Keycode.name-for-keycode keycode:Keycode}:String



Constructor Details
default (constructor)
public {Keycode.default n:int}

Return the Keycode whose Keycode.value is n.

n: An integer between 0 and 1023.


uninitialized (factory)
public implicit inline {Keycode.uninitialized}:Keycode

Construct uninitialized value.

Introduced in: version 6.0



Property Details
value (field)
public constant Keycode.value:uint16

The integer value of this Keycode. This number will be between 0 and 1023, inclusive.

Description

In general, this describes an arbitrary mapping of a Keycode to an integer. Certain mappings are not arbitrary, however, and you can expect certain keycodes to remain fixed across future versions of the Curl language.

In particular, "normal" glyphs (letter keys, number keys, and most symbol keys, such as apostrophe and semicolon) will map to their unmodified ASCII representation. For example, Keycode.a maps to the ASCII value for 'a,' which is 97. You can expect "normal" keycodes (generally, those listed by the API viewer among the Keycode class constants) to be invariant across platforms as well.

Thus, you can use this value to do math on Keycodes.

Example

The following code determines what English letter, if any, starting with 0, a given Keycode represents.


Example
|| Change this value to watch the code work.
{let keycode:Keycode = Keycode.m}

{let letter:int =
    {if keycode.value < Keycode.a.value or
        keycode.value > Keycode.z.value
     then
        -1 || Not an English letter.
     else
        keycode.value - Keycode.a.value
    }
}

The keycode is {value {Keycode.name-for-keycode keycode}}.
The letter is {value letter}.



Class Variable and Constant Details
a (class constant)
public constant Keycode.a:Keycode ={Keycode 0x61}

The Keycode for the a key



alt-left (class constant)
public constant Keycode.alt-left:Keycode ={Keycode 0x0C}

The Keycode for the alt-left key



alt-right (class constant)
public constant Keycode.alt-right:Keycode ={Keycode 0x0D}

The Keycode for the alt-right key



apostrophe (class constant)
public constant Keycode.apostrophe:Keycode ={Keycode 0x27}

The Keycode for the apostrophe key



b (class constant)
public constant Keycode.b:Keycode ={Keycode 0x62}

The Keycode for the b key



backslash (class constant)
public constant Keycode.backslash:Keycode ={Keycode 0x5C}

The Keycode for the backslash key



backspace (class constant)
public constant Keycode.backspace:Keycode ={Keycode 0x81}

The Keycode for the backspace key



backtick (class constant)
public constant Keycode.backtick:Keycode ={Keycode 0x60}

The Keycode for the backtick key



bracket-left (class constant)
public constant Keycode.bracket-left:Keycode ={Keycode 0x5B}

The Keycode for the bracket-left key



bracket-right (class constant)
public constant Keycode.bracket-right:Keycode ={Keycode 0x5D}

The Keycode for the bracket-right key



button-1 (class constant)
public constant Keycode.button-1:Keycode ={Keycode 0x01}

The Keycode representing the left mouse button



button-2 (class constant)
public constant Keycode.button-2:Keycode ={Keycode 0x02}

The Keycode representing the center mouse button



button-3 (class constant)
public constant Keycode.button-3:Keycode ={Keycode 0x03}

The Keycode representing the right mouse button



button-4 (class constant)
public constant Keycode.button-4:Keycode ={Keycode 0x04}

The Keycode for mouse button 4



button-5 (class constant)
public constant Keycode.button-5:Keycode ={Keycode 0x05}

The Keycode for mouse button 5



button-6 (class constant)
public constant Keycode.button-6:Keycode ={Keycode 0x06}

The Keycode for mouse button 6



button-7 (class constant)
public constant Keycode.button-7:Keycode ={Keycode 0x07}

The Keycode for mouse button 7



c (class constant)
public constant Keycode.c:Keycode ={Keycode 0x63}

The Keycode for the c key



caps-key (class constant)
public constant Keycode.caps-key:Keycode ={Keycode 0x18}

The Keycode for the caps-key key



caps-lock (class constant)
public constant Keycode.caps-lock:Keycode ={Keycode 0x1C}

The Keycode for the caps-lock key



comma (class constant)
public constant Keycode.comma:Keycode ={Keycode 0x2C}

The Keycode for the comma key



command-left (class constant)
public constant Keycode.command-left:Keycode ={Keycode 0x14}

The Keycode for the left command key on a Macintosh keyboard.

Introduced in: version 6.0


command-right (class constant)
public constant Keycode.command-right:Keycode ={Keycode 0x15}

The Keycode for the right command key on a Macintosh keyboard.

Introduced in: version 6.0


ctrl-left (class constant)
public constant Keycode.ctrl-left:Keycode ={Keycode 0x0A}

The Keycode for the ctrl-left key



ctrl-right (class constant)
public constant Keycode.ctrl-right:Keycode ={Keycode 0x0B}

The Keycode for the ctrl-right key



d (class constant)
public constant Keycode.d:Keycode ={Keycode 0x64}

The Keycode for the d key



delete (class constant)
public constant Keycode.delete:Keycode ={Keycode 0x8F}

The Keycode for the delete key



down (class constant)
public constant Keycode.down:Keycode ={Keycode 0x89}

The Keycode for the down key



e (class constant)
public constant Keycode.e:Keycode ={Keycode 0x65}

The Keycode for the e key



end (class constant)
public constant Keycode.end:Keycode ={Keycode 0x8B}

The Keycode for the end key



enter (class constant)
public constant Keycode.enter:Keycode ={Keycode 0x83}

The Keycode for the enter key



equal (class constant)
public constant Keycode.equal:Keycode ={Keycode 0x3D}

The Keycode for the equal key



esc (class constant)
public constant Keycode.esc:Keycode ={Keycode 0x80}

The Keycode for the esc key



f (class constant)
public constant Keycode.f:Keycode ={Keycode 0x66}

The Keycode for the f key



f0 (class constant)
public constant Keycode.f0:Keycode ={Keycode 0xA0}

The Keycode for the f0 key



f1 (class constant)
public constant Keycode.f1:Keycode ={Keycode 0xA1}

The Keycode for the f1 key



f10 (class constant)
public constant Keycode.f10:Keycode ={Keycode 0xAA}

The Keycode for the f10 key



f11 (class constant)
public constant Keycode.f11:Keycode ={Keycode 0xAB}

The Keycode for the f11 key



f12 (class constant)
public constant Keycode.f12:Keycode ={Keycode 0xAC}

The Keycode for the f12 key



f13 (class constant)
public constant Keycode.f13:Keycode ={Keycode 0xAD}

The Keycode for the f13 key



f14 (class constant)
public constant Keycode.f14:Keycode ={Keycode 0xAE}

The Keycode for the f14 key



f15 (class constant)
public constant Keycode.f15:Keycode ={Keycode 0xAF}

The Keycode for the f15 key



f16 (class constant)
public constant Keycode.f16:Keycode ={Keycode 0xB0}

The Keycode for the f16 key



f17 (class constant)
public constant Keycode.f17:Keycode ={Keycode 0xB1}

The Keycode for the f17 key



f18 (class constant)
public constant Keycode.f18:Keycode ={Keycode 0xB2}

The Keycode for the f18 key



f19 (class constant)
public constant Keycode.f19:Keycode ={Keycode 0xB3}

The Keycode for the f19 key



f2 (class constant)
public constant Keycode.f2:Keycode ={Keycode 0xA2}

The Keycode for the f2 key



f20 (class constant)
public constant Keycode.f20:Keycode ={Keycode 0xB4}

The Keycode for the f20 key



f21 (class constant)
public constant Keycode.f21:Keycode ={Keycode 0xB5}

The Keycode for the f21 key



f22 (class constant)
public constant Keycode.f22:Keycode ={Keycode 0xB6}

The Keycode for the f22 key



f23 (class constant)
public constant Keycode.f23:Keycode ={Keycode 0xB7}

The Keycode for the f23 key



f24 (class constant)
public constant Keycode.f24:Keycode ={Keycode 0xB8}

The Keycode for the f24 key



f25 (class constant)
public constant Keycode.f25:Keycode ={Keycode 0xB9}

The Keycode for the f25 key



f26 (class constant)
public constant Keycode.f26:Keycode ={Keycode 0xBA}

The Keycode for the f26 key



f27 (class constant)
public constant Keycode.f27:Keycode ={Keycode 0xBB}

The Keycode for the f27 key



f28 (class constant)
public constant Keycode.f28:Keycode ={Keycode 0xBC}

The Keycode for the f28 key



f29 (class constant)
public constant Keycode.f29:Keycode ={Keycode 0xBD}

The Keycode for the f29 key



f3 (class constant)
public constant Keycode.f3:Keycode ={Keycode 0xA3}

The Keycode for the f3 key



f30 (class constant)
public constant Keycode.f30:Keycode ={Keycode 0xBE}

The Keycode for the f30 key



f31 (class constant)
public constant Keycode.f31:Keycode ={Keycode 0xBF}

The Keycode for the f31 key



f4 (class constant)
public constant Keycode.f4:Keycode ={Keycode 0xA4}

The Keycode for the f4 key



f5 (class constant)
public constant Keycode.f5:Keycode ={Keycode 0xA5}

The Keycode for the f5 key



f6 (class constant)
public constant Keycode.f6:Keycode ={Keycode 0xA6}

The Keycode for the f6 key



f7 (class constant)
public constant Keycode.f7:Keycode ={Keycode 0xA7}

The Keycode for the f7 key



f8 (class constant)
public constant Keycode.f8:Keycode ={Keycode 0xA8}

The Keycode for the f8 key



f9 (class constant)
public constant Keycode.f9:Keycode ={Keycode 0xA9}

The Keycode for the f9 key



g (class constant)
public constant Keycode.g:Keycode ={Keycode 0x67}

The Keycode for the g key



h (class constant)
public constant Keycode.h:Keycode ={Keycode 0x68}

The Keycode for the h key



home (class constant)
public constant Keycode.home:Keycode ={Keycode 0x8A}

The Keycode for the home key



hyper-left (class constant)
public constant Keycode.hyper-left:Keycode ={Keycode 0x12}

The Keycode for the hyper-left key



hyper-right (class constant)
public constant Keycode.hyper-right:Keycode ={Keycode 0x13}

The Keycode for the hyper-right key



i (class constant)
public constant Keycode.i:Keycode ={Keycode 0x69}

The Keycode for the i key



insert (class constant)
public constant Keycode.insert:Keycode ={Keycode 0x8E}

The Keycode for the insert key



j (class constant)
public constant Keycode.j:Keycode ={Keycode 0x6A}

The Keycode for the j key



k (class constant)
public constant Keycode.k:Keycode ={Keycode 0x6B}

The Keycode for the k key



keypad-0 (class constant)
public constant Keycode.keypad-0:Keycode ={Keycode 0xD0}

The Keycode for the keypad-0 key



keypad-1 (class constant)
public constant Keycode.keypad-1:Keycode ={Keycode 0xD1}

The Keycode for the keypad-1 key



keypad-2 (class constant)
public constant Keycode.keypad-2:Keycode ={Keycode 0xD2}

The Keycode for the keypad-2 key



keypad-3 (class constant)
public constant Keycode.keypad-3:Keycode ={Keycode 0xD3}

The Keycode for the keypad-3 key



keypad-4 (class constant)
public constant Keycode.keypad-4:Keycode ={Keycode 0xD4}

The Keycode for the keypad-4 key



keypad-5 (class constant)
public constant Keycode.keypad-5:Keycode ={Keycode 0xD5}

The Keycode for the keypad-5 key



keypad-6 (class constant)
public constant Keycode.keypad-6:Keycode ={Keycode 0xD6}

The Keycode for the keypad-6 key



keypad-7 (class constant)
public constant Keycode.keypad-7:Keycode ={Keycode 0xD7}

The Keycode for the keypad-7 key



keypad-8 (class constant)
public constant Keycode.keypad-8:Keycode ={Keycode 0xD8}

The Keycode for the keypad-8 key



keypad-9 (class constant)
public constant Keycode.keypad-9:Keycode ={Keycode 0xD9}

The Keycode for the keypad-9 key



keypad-asterisk (class constant)
public constant Keycode.keypad-asterisk:Keycode ={Keycode 0xDD}

The Keycode for the keypad-asterisk key



keypad-backspace (class constant)
public constant Keycode.keypad-backspace:Keycode ={Keycode 0xC1}

The Keycode for the keypad-backspace key



keypad-delete (class constant)
public constant Keycode.keypad-delete:Keycode ={Keycode 0xCF}

The Keycode for the keypad-delete key



keypad-down (class constant)
public constant Keycode.keypad-down:Keycode ={Keycode 0xC9}

The Keycode for the keypad-down key



keypad-end (class constant)
public constant Keycode.keypad-end:Keycode ={Keycode 0xCB}

The Keycode for the keypad-end key



keypad-enter (class constant)
public constant Keycode.keypad-enter:Keycode ={Keycode 0xC3}

The Keycode for the keypad-enter key



keypad-equal (class constant)
public constant Keycode.keypad-equal:Keycode ={Keycode 0xDB}

The Keycode for the keypad-equal key



keypad-esc (class constant)
public constant Keycode.keypad-esc:Keycode ={Keycode 0xC0}

The Keycode for the keypad-esc key



keypad-f0 (class constant)
public constant Keycode.keypad-f0:Keycode ={Keycode 0xE0}

The Keycode for the keypad-f0 key



keypad-f1 (class constant)
public constant Keycode.keypad-f1:Keycode ={Keycode 0xE1}

The Keycode for the keypad-f1 key



keypad-f10 (class constant)
public constant Keycode.keypad-f10:Keycode ={Keycode 0xEA}

The Keycode for the keypad-f10 key



keypad-f11 (class constant)
public constant Keycode.keypad-f11:Keycode ={Keycode 0xEB}

The Keycode for the keypad-f11 key



keypad-f12 (class constant)
public constant Keycode.keypad-f12:Keycode ={Keycode 0xEC}

The Keycode for the keypad-f12 key



keypad-f13 (class constant)
public constant Keycode.keypad-f13:Keycode ={Keycode 0xED}

The Keycode for the keypad-f13 key



keypad-f14 (class constant)
public constant Keycode.keypad-f14:Keycode ={Keycode 0xEE}

The Keycode for the keypad-f14 key



keypad-f15 (class constant)
public constant Keycode.keypad-f15:Keycode ={Keycode 0xEF}

The Keycode for the keypad-f15 key



keypad-f16 (class constant)
public constant Keycode.keypad-f16:Keycode ={Keycode 0xF0}

The Keycode for the keypad-f16 key



keypad-f17 (class constant)
public constant Keycode.keypad-f17:Keycode ={Keycode 0xF1}

The Keycode for the keypad-f17 key



keypad-f18 (class constant)
public constant Keycode.keypad-f18:Keycode ={Keycode 0xF2}

The Keycode for the keypad-f18 key



keypad-f19 (class constant)
public constant Keycode.keypad-f19:Keycode ={Keycode 0xF3}

The Keycode for the keypad-f19 key



keypad-f2 (class constant)
public constant Keycode.keypad-f2:Keycode ={Keycode 0xE2}

The Keycode for the keypad-f2 key



keypad-f20 (class constant)
public constant Keycode.keypad-f20:Keycode ={Keycode 0xF4}

The Keycode for the keypad-f20 key



keypad-f21 (class constant)
public constant Keycode.keypad-f21:Keycode ={Keycode 0xF5}

The Keycode for the keypad-f21 key



keypad-f22 (class constant)
public constant Keycode.keypad-f22:Keycode ={Keycode 0xF6}

The Keycode for the keypad-f22 key



keypad-f23 (class constant)
public constant Keycode.keypad-f23:Keycode ={Keycode 0xF7}

The Keycode for the keypad-f23 key



keypad-f24 (class constant)
public constant Keycode.keypad-f24:Keycode ={Keycode 0xF8}

The Keycode for the keypad-f24 key



keypad-f25 (class constant)
public constant Keycode.keypad-f25:Keycode ={Keycode 0xF9}

The Keycode for the keypad-f25 key



keypad-f26 (class constant)
public constant Keycode.keypad-f26:Keycode ={Keycode 0xFA}

The Keycode for the keypad-f26 key



keypad-f27 (class constant)
public constant Keycode.keypad-f27:Keycode ={Keycode 0xFB}

The Keycode for the keypad-f27 key



keypad-f28 (class constant)
public constant Keycode.keypad-f28:Keycode ={Keycode 0xFC}

The Keycode for the keypad-f28 key



keypad-f29 (class constant)
public constant Keycode.keypad-f29:Keycode ={Keycode 0xFD}

The Keycode for the keypad-f29 key



keypad-f3 (class constant)
public constant Keycode.keypad-f3:Keycode ={Keycode 0xE3}

The Keycode for the keypad-f3 key



keypad-f30 (class constant)
public constant Keycode.keypad-f30:Keycode ={Keycode 0xFE}

The Keycode for the keypad-f30 key



keypad-f31 (class constant)
public constant Keycode.keypad-f31:Keycode ={Keycode 0xFF}

The Keycode for the keypad-f31 key



keypad-f4 (class constant)
public constant Keycode.keypad-f4:Keycode ={Keycode 0xE4}

The Keycode for the keypad-f4 key



keypad-f5 (class constant)
public constant Keycode.keypad-f5:Keycode ={Keycode 0xE5}

The Keycode for the keypad-f5 key



keypad-f6 (class constant)
public constant Keycode.keypad-f6:Keycode ={Keycode 0xE6}

The Keycode for the keypad-f6 key



keypad-f7 (class constant)
public constant Keycode.keypad-f7:Keycode ={Keycode 0xE7}

The Keycode for the keypad-f7 key



keypad-f8 (class constant)
public constant Keycode.keypad-f8:Keycode ={Keycode 0xE8}

The Keycode for the keypad-f8 key



keypad-f9 (class constant)
public constant Keycode.keypad-f9:Keycode ={Keycode 0xE9}

The Keycode for the keypad-f9 key



keypad-home (class constant)
public constant Keycode.keypad-home:Keycode ={Keycode 0xCA}

The Keycode for the keypad-home key



keypad-insert (class constant)
public constant Keycode.keypad-insert:Keycode ={Keycode 0xCE}

The Keycode for the keypad-insert key



keypad-left (class constant)
public constant Keycode.keypad-left:Keycode ={Keycode 0xC6}

The Keycode for the keypad-left key



keypad-middle (class constant)
public constant Keycode.keypad-middle:Keycode ={Keycode 0xC5}

The Keycode for the keypad-middle key



keypad-minus (class constant)
public constant Keycode.keypad-minus:Keycode ={Keycode 0xDE}

The Keycode for the keypad-minus key



keypad-next (class constant)
public constant Keycode.keypad-next:Keycode ={Keycode 0xCD}

The Keycode for the keypad-pgdn key



keypad-period (class constant)
public constant Keycode.keypad-period:Keycode ={Keycode 0xDA}

The Keycode for the keypad-period key



keypad-pgdn (class constant)
public constant Keycode.keypad-pgdn:Keycode ={Keycode 0xCD}

The Keycode for the keypad-pgdn key



keypad-pgup (class constant)
public constant Keycode.keypad-pgup:Keycode ={Keycode 0xCC}

The Keycode for the keypad-pgup key



keypad-plus (class constant)
public constant Keycode.keypad-plus:Keycode ={Keycode 0xDF}

The Keycode for the keypad-plus key



keypad-prev (class constant)
public constant Keycode.keypad-prev:Keycode ={Keycode 0xCC}

The Keycode for the keypad-pgup key



keypad-right (class constant)
public constant Keycode.keypad-right:Keycode ={Keycode 0xC7}

The Keycode for the keypad-right key



keypad-slash (class constant)
public constant Keycode.keypad-slash:Keycode ={Keycode 0xDC}

The Keycode for the keypad-slash key



keypad-tab (class constant)
public constant Keycode.keypad-tab:Keycode ={Keycode 0xC2}

The Keycode for the keypad-tab key



keypad-up (class constant)
public constant Keycode.keypad-up:Keycode ={Keycode 0xC8}

The Keycode for the keypad-up key



l (class constant)
public constant Keycode.l:Keycode ={Keycode 0x6C}

The Keycode for the l key



left (class constant)
public constant Keycode.left:Keycode ={Keycode 0x86}

The Keycode for the left key



lower-left (class constant)
deprecated public constant Keycode.lower-left:Keycode =Keycode.command-left

Deprecated

This key is now named Keycode.command-left.


lower-right (class constant)
deprecated public constant Keycode.lower-right:Keycode =Keycode.command-right

Deprecated

This key is now named Keycode.command-right.


m (class constant)
public constant Keycode.m:Keycode ={Keycode 0x6D}

The Keycode for the m key



menu-left (class constant)
public constant Keycode.menu-left:Keycode ={Keycode 0x0E}

The Keycode for the menu-left key



menu-right (class constant)
public constant Keycode.menu-right:Keycode ={Keycode 0x0F}

The Keycode for the menu-right key



meta-left (class constant)
deprecated public constant Keycode.meta-left:Keycode =Keycode.menu-left

Deprecated

Use Keycode.menu-left instead.


meta-right (class constant)
deprecated public constant Keycode.meta-right:Keycode =Keycode.menu-right

Deprecated

Use Keycode.menu-right instead.


middle (class constant)
public constant Keycode.middle:Keycode ={Keycode 0x85}

The Keycode for the middle key



minus (class constant)
public constant Keycode.minus:Keycode ={Keycode 0x2D}

The Keycode for the minus key



n (class constant)
public constant Keycode.n:Keycode ={Keycode 0x6E}

The Keycode for the n key



next (class constant)
public constant Keycode.next:Keycode ={Keycode 0x8D}

The Keycode for the pgdn key



none (class constant)
public constant Keycode.none:Keycode ={Keycode 0x0}

The Keycode representing no Keycode



num-key (class constant)
public constant Keycode.num-key:Keycode ={Keycode 0x19}

The Keycode for the num-key key



num-lock (class constant)
public constant Keycode.num-lock:Keycode ={Keycode 0x1D}

The Keycode for the num-lock key



number-0 (class constant)
public constant Keycode.number-0:Keycode ={Keycode 0x30}

The Keycode for the number-0 key



number-1 (class constant)
public constant Keycode.number-1:Keycode ={Keycode 0x31}

The Keycode for the number-1 key



number-2 (class constant)
public constant Keycode.number-2:Keycode ={Keycode 0x32}

The Keycode for the number-2 key



number-3 (class constant)
public constant Keycode.number-3:Keycode ={Keycode 0x33}

The Keycode for the number-3 key



number-4 (class constant)
public constant Keycode.number-4:Keycode ={Keycode 0x34}

The Keycode for the number-4 key



number-5 (class constant)
public constant Keycode.number-5:Keycode ={Keycode 0x35}

The Keycode for the number-5 key



number-6 (class constant)
public constant Keycode.number-6:Keycode ={Keycode 0x36}

The Keycode for the number-6 key



number-7 (class constant)
public constant Keycode.number-7:Keycode ={Keycode 0x37}

The Keycode for the number-7 key



number-8 (class constant)
public constant Keycode.number-8:Keycode ={Keycode 0x38}

The Keycode for the number-8 key



number-9 (class constant)
public constant Keycode.number-9:Keycode ={Keycode 0x39}

The Keycode for the number-9 key



o (class constant)
public constant Keycode.o:Keycode ={Keycode 0x6F}

The Keycode for the o key



other-key (class constant)
public constant Keycode.other-key:Keycode ={Keycode 0x1B}

The Keycode for the other-key key



other-lock (class constant)
public constant Keycode.other-lock:Keycode ={Keycode 0x1F}

The Keycode for the other-lock key



p (class constant)
public constant Keycode.p:Keycode ={Keycode 0x70}

The Keycode for the p key



pause (class constant)
public constant Keycode.pause:Keycode ={Keycode 0x96}

The Keycode for the pause key



period (class constant)
public constant Keycode.period:Keycode ={Keycode 0x2E}

The Keycode for the period key



pgdn (class constant)
public constant Keycode.pgdn:Keycode ={Keycode 0x8D}

The Keycode for the pgdn key



pgup (class constant)
public constant Keycode.pgup:Keycode ={Keycode 0x8C}

The Keycode for the pgup key



power-left (class constant)
public constant Keycode.power-left:Keycode ={Keycode 0x10}

The Keycode for the power-left key



power-right (class constant)
public constant Keycode.power-right:Keycode ={Keycode 0x11}

The Keycode for the power-right key



prev (class constant)
public constant Keycode.prev:Keycode ={Keycode 0x8C}

The Keycode for the pgup key



q (class constant)
public constant Keycode.q:Keycode ={Keycode 0x71}

The Keycode for the q key



r (class constant)
public constant Keycode.r:Keycode ={Keycode 0x72}

The Keycode for the r key



right (class constant)
public constant Keycode.right:Keycode ={Keycode 0x87}

The Keycode for the right key



s (class constant)
public constant Keycode.s:Keycode ={Keycode 0x73}

The Keycode for the s key



scroll-key (class constant)
public constant Keycode.scroll-key:Keycode ={Keycode 0x1A}

The Keycode for the scroll-key key



scroll-lock (class constant)
public constant Keycode.scroll-lock:Keycode ={Keycode 0x1E}

The Keycode for the scroll-lock key



semicolon (class constant)
public constant Keycode.semicolon:Keycode ={Keycode 0x3B}

The Keycode for the semicolon key



shift-left (class constant)
public constant Keycode.shift-left:Keycode ={Keycode 0x08}

The Keycode for the shift-left key



shift-right (class constant)
public constant Keycode.shift-right:Keycode ={Keycode 0x09}

The Keycode for the shift-right key



slash (class constant)
public constant Keycode.slash:Keycode ={Keycode 0x2F}

The Keycode for the slash key



space (class constant)
public constant Keycode.space:Keycode ={Keycode 0x20}

The Keycode for the space key



t (class constant)
public constant Keycode.t:Keycode ={Keycode 0x74}

The Keycode for the t key



tab (class constant)
public constant Keycode.tab:Keycode ={Keycode 0x82}

The Keycode for the tab key



u (class constant)
public constant Keycode.u:Keycode ={Keycode 0x75}

The Keycode for the u key



up (class constant)
public constant Keycode.up:Keycode ={Keycode 0x88}

The Keycode for the up key



upper-left (class constant)
public constant Keycode.upper-left:Keycode ={Keycode 0x16}

The Keycode for the upper-left key



upper-right (class constant)
public constant Keycode.upper-right:Keycode ={Keycode 0x17}

The Keycode for the upper-right key



v (class constant)
public constant Keycode.v:Keycode ={Keycode 0x76}

The Keycode for the v key



w (class constant)
public constant Keycode.w:Keycode ={Keycode 0x77}

The Keycode for the w key



x (class constant)
public constant Keycode.x:Keycode ={Keycode 0x78}

The Keycode for the x key



y (class constant)
public constant Keycode.y:Keycode ={Keycode 0x79}

The Keycode for the y key



z (class constant)
public constant Keycode.z:Keycode ={Keycode 0x7A}

The Keycode for the z key




Class Procedure Details
keycode-for-name (class proc)
public {Keycode.keycode-for-name name:String}:Keycode

Returns the Keycode corresponding to a given name.

Notes

Returns Keycode.none if no match was found for the given name.

Example

As you see here, {Keycode.keycode-for-name "space"} returns Keycode.space (which displays graphically as {Keycode 32}).


Example
{Keycode.keycode-for-name "space"} and {value Keycode.space}
and {Keycode 32} are all the same.


name-for-keycode (class proc)
public {Keycode.name-for-keycode keycode:Keycode}:String

Returns a String name for a Keycode.

Example

As you see here, {Keycode.name-for-keycode Keycode.space} returns the value "space".


Example
{Keycode.name-for-keycode Keycode.space}