package com.sun.glass.events;
import java.lang.annotation.Native;
import com.sun.glass.ui.Application;
public class KeyEvent {
@Native public final static int PRESS = 111;
@Native public final static int RELEASE = 112;
@Native public final static int TYPED = 113;
@Native public final static int MODIFIER_NONE = 0;
@Native public final static int MODIFIER_SHIFT = 1 << 0;
@Native public final static int MODIFIER_FUNCTION = 1 << 1;
@Native public final static int MODIFIER_CONTROL = 1 << 2;
@Native public final static int MODIFIER_OPTION = 1 << 3;
@Native public final static int MODIFIER_ALT = 1 << 3;
@Native public final static int MODIFIER_COMMAND = 1 << 4;
@Native public final static int MODIFIER_WINDOWS = 1 << 4;
@Native public final static int MODIFIER_BUTTON_PRIMARY = 1 << 5;
@Native public final static int MODIFIER_BUTTON_SECONDARY = 1 << 6;
@Native public final static int MODIFIER_BUTTON_MIDDLE = 1 << 7;
@Native public final static int MODIFIER_BUTTON_BACK = 1 << 8;
@Native public final static int MODIFIER_BUTTON_FORWARD = 1 << 9;
@Native public final static int VK_UNDEFINED = 0x0;
@Native public final static int VK_ENTER = '\n';
@Native public final static int VK_BACKSPACE = '\b';
@Native public final static int VK_TAB = '\t';
@Native public final static int VK_CLEAR = 0x0C;
@Native public final static int VK_PAUSE = 0x13;
@Native public final static int VK_ESCAPE = 0x1B;
@Native public final static int VK_SPACE = 0x20;
@Native public final static int VK_DELETE = 0x7F;
@Native public final static int VK_PRINTSCREEN = 0x9A;
@Native public final static int VK_INSERT = 0x9B;
@Native public final static int VK_HELP = 0x9C;
@Native public final static int VK_SHIFT = 0x10;
@Native public final static int VK_CONTROL = 0x11;
@Native public final static int VK_ALT = 0x12;
@Native public final static int VK_ALT_GRAPH = 0xFF7E;
@Native public final static int VK_WINDOWS = 0x020C;
@Native public static final int = 0x020D;
@Native public final static int VK_CAPS_LOCK = 0x14;
@Native public final static int VK_NUM_LOCK = 0x90;
@Native public final static int VK_SCROLL_LOCK = 0x91;
@Native public final static int VK_COMMAND = 0x0300;
@Native public final static int VK_PAGE_UP = 0x21;
@Native public final static int VK_PAGE_DOWN = 0x22;
@Native public final static int VK_END = 0x23;
@Native public final static int VK_HOME = 0x24;
@Native public final static int VK_LEFT = 0x25;
@Native public final static int VK_UP = 0x26;
@Native public final static int VK_RIGHT = 0x27;
@Native public final static int VK_DOWN = 0x28;
@Native public final static int VK_COMMA = 0x2C;
@Native public final static int VK_MINUS = 0x2D;
@Native public final static int VK_PERIOD = 0x2E;
@Native public final static int VK_SLASH = 0x2F;
@Native public final static int VK_SEMICOLON = 0x3B;
@Native public final static int VK_EQUALS = 0x3D;
@Native public final static int VK_OPEN_BRACKET = 0x5B;
@Native public final static int VK_BACK_SLASH = 0x5C;
@Native public final static int VK_CLOSE_BRACKET = 0x5D;
@Native public final static int VK_MULTIPLY = 0x6A;
@Native public final static int VK_ADD = 0x6B;
@Native public final static int VK_SEPARATOR = 0x6C;
@Native public final static int VK_SUBTRACT = 0x6D;
@Native public final static int VK_DECIMAL = 0x6E;
@Native public final static int VK_DIVIDE = 0x6F;
@Native public final static int VK_AMPERSAND = 0x96;
@Native public final static int VK_ASTERISK = 0x97;
@Native public final static int VK_DOUBLE_QUOTE = 0x98;
@Native public final static int VK_LESS = 0x99;
@Native public final static int VK_GREATER = 0xa0;
@Native public final static int VK_BRACELEFT = 0xa1;
@Native public final static int VK_BRACERIGHT = 0xa2;
@Native public final static int VK_BACK_QUOTE = 0xC0;
@Native public final static int VK_QUOTE = 0xDE;
@Native public final static int VK_AT = 0x0200;
@Native public final static int VK_COLON = 0x0201;
@Native public final static int VK_CIRCUMFLEX = 0x0202;
@Native public final static int VK_DOLLAR = 0x0203;
@Native public final static int VK_EURO_SIGN = 0x0204;
@Native public final static int VK_EXCLAMATION = 0x0205;
@Native public final static int VK_INV_EXCLAMATION = 0x0206;
@Native public final static int VK_LEFT_PARENTHESIS = 0x0207;
@Native public final static int VK_NUMBER_SIGN = 0x0208;
@Native public final static int VK_PLUS = 0x0209;
@Native public final static int VK_RIGHT_PARENTHESIS = 0x020A;
@Native public final static int VK_UNDERSCORE = 0x020B;
@Native public final static int VK_0 = 0x30;
@Native public final static int VK_1 = 0x31;
@Native public final static int VK_2 = 0x32;
@Native public final static int VK_3 = 0x33;
@Native public final static int VK_4 = 0x34;
@Native public final static int VK_5 = 0x35;
@Native public final static int VK_6 = 0x36;
@Native public final static int VK_7 = 0x37;
@Native public final static int VK_8 = 0x38;
@Native public final static int VK_9 = 0x39;
@Native public final static int VK_A = 0x41;
@Native public final static int VK_B = 0x42;
@Native public final static int VK_C = 0x43;
@Native public final static int VK_D = 0x44;
@Native public final static int VK_E = 0x45;
@Native public final static int VK_F = 0x46;
@Native public final static int VK_G = 0x47;
@Native public final static int VK_H = 0x48;
@Native public final static int VK_I = 0x49;
@Native public final static int VK_J = 0x4A;
@Native public final static int VK_K = 0x4B;
@Native public final static int VK_L = 0x4C;
@Native public final static int VK_M = 0x4D;
@Native public final static int VK_N = 0x4E;
@Native public final static int VK_O = 0x4F;
@Native public final static int VK_P = 0x50;
@Native public final static int VK_Q = 0x51;
@Native public final static int VK_R = 0x52;
@Native public final static int VK_S = 0x53;
@Native public final static int VK_T = 0x54;
@Native public final static int VK_U = 0x55;
@Native public final static int VK_V = 0x56;
@Native public final static int VK_W = 0x57;
@Native public final static int VK_X = 0x58;
@Native public final static int VK_Y = 0x59;
@Native public final static int VK_Z = 0x5A;
@Native public final static int VK_NUMPAD0 = 0x60;
@Native public final static int VK_NUMPAD1 = 0x61;
@Native public final static int VK_NUMPAD2 = 0x62;
@Native public final static int VK_NUMPAD3 = 0x63;
@Native public final static int VK_NUMPAD4 = 0x64;
@Native public final static int VK_NUMPAD5 = 0x65;
@Native public final static int VK_NUMPAD6 = 0x66;
@Native public final static int VK_NUMPAD7 = 0x67;
@Native public final static int VK_NUMPAD8 = 0x68;
@Native public final static int VK_NUMPAD9 = 0x69;
@Native public final static int VK_F1 = 0x70;
@Native public final static int VK_F2 = 0x71;
@Native public final static int VK_F3 = 0x72;
@Native public final static int VK_F4 = 0x73;
@Native public final static int VK_F5 = 0x74;
@Native public final static int VK_F6 = 0x75;
@Native public final static int VK_F7 = 0x76;
@Native public final static int VK_F8 = 0x77;
@Native public final static int VK_F9 = 0x78;
@Native public final static int VK_F10 = 0x79;
@Native public final static int VK_F11 = 0x7A;
@Native public final static int VK_F12 = 0x7B;
@Native public final static int VK_F13 = 0xF000;
@Native public final static int VK_F14 = 0xF001;
@Native public final static int VK_F15 = 0xF002;
@Native public final static int VK_F16 = 0xF003;
@Native public final static int VK_F17 = 0xF004;
@Native public final static int VK_F18 = 0xF005;
@Native public final static int VK_F19 = 0xF006;
@Native public final static int VK_F20 = 0xF007;
@Native public final static int VK_F21 = 0xF008;
@Native public final static int VK_F22 = 0xF009;
@Native public final static int VK_F23 = 0xF00A;
@Native public final static int VK_F24 = 0xF00B;
@Native public final static int VK_DEAD_GRAVE = 0x80;
@Native public final static int VK_DEAD_ACUTE = 0x81;
@Native public final static int VK_DEAD_CIRCUMFLEX = 0x82;
@Native public final static int VK_DEAD_TILDE = 0x83;
@Native public final static int VK_DEAD_MACRON = 0x84;
@Native public final static int VK_DEAD_BREVE = 0x85;
@Native public final static int VK_DEAD_ABOVEDOT = 0x86;
@Native public final static int VK_DEAD_DIAERESIS = 0x87;
@Native public final static int VK_DEAD_ABOVERING = 0x88;
@Native public final static int VK_DEAD_DOUBLEACUTE = 0x89;
@Native public final static int VK_DEAD_CARON = 0x8a;
@Native public final static int VK_DEAD_CEDILLA = 0x8b;
@Native public final static int VK_DEAD_OGONEK = 0x8c;
@Native public final static int VK_DEAD_IOTA = 0x8d;
@Native public final static int VK_DEAD_VOICED_SOUND = 0x8e;
@Native public final static int VK_DEAD_SEMIVOICED_SOUND = 0x8f;
public static int getKeyCodeForChar(char c) {
return Application.getKeyCodeForChar(c);
}
public final static String getTypeString(int type) {
switch (type) {
case PRESS: return "PRESS";
case RELEASE: return "RELEASE";
case TYPED: return "TYPED";
default: return "UNKNOWN";
}
}
}