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