<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# NO CHECKED-IN PROTOBUF GENCODE
# source: hotKey.proto

namespace Rv\Data;

use UnexpectedValueException;

/**
 * Protobuf type <code>rv.data.KeyCode</code>
 */
class KeyCode
{
    /**
     * Generated from protobuf enum <code>KEY_CODE_UNKNOWN = 0;</code>
     */
    const KEY_CODE_UNKNOWN = 0;
    /**
     * Generated from protobuf enum <code>KEY_CODE_ANSI_A = 1;</code>
     */
    const KEY_CODE_ANSI_A = 1;
    /**
     * Generated from protobuf enum <code>KEY_CODE_ANSI_B = 2;</code>
     */
    const KEY_CODE_ANSI_B = 2;
    /**
     * Generated from protobuf enum <code>KEY_CODE_ANSI_C = 3;</code>
     */
    const KEY_CODE_ANSI_C = 3;
    /**
     * Generated from protobuf enum <code>KEY_CODE_ANSI_D = 4;</code>
     */
    const KEY_CODE_ANSI_D = 4;
    /**
     * Generated from protobuf enum <code>KEY_CODE_ANSI_E = 5;</code>
     */
    const KEY_CODE_ANSI_E = 5;
    /**
     * Generated from protobuf enum <code>KEY_CODE_ANSI_F = 6;</code>
     */
    const KEY_CODE_ANSI_F = 6;
    /**
     * Generated from protobuf enum <code>KEY_CODE_ANSI_G = 7;</code>
     */
    const KEY_CODE_ANSI_G = 7;
    /**
     * Generated from protobuf enum <code>KEY_CODE_ANSI_H = 8;</code>
     */
    const KEY_CODE_ANSI_H = 8;
    /**
     * Generated from protobuf enum <code>KEY_CODE_ANSI_I = 9;</code>
     */
    const KEY_CODE_ANSI_I = 9;
    /**
     * Generated from protobuf enum <code>KEY_CODE_ANSI_J = 10;</code>
     */
    const KEY_CODE_ANSI_J = 10;
    /**
     * Generated from protobuf enum <code>KEY_CODE_ANSI_K = 11;</code>
     */
    const KEY_CODE_ANSI_K = 11;
    /**
     * Generated from protobuf enum <code>KEY_CODE_ANSI_L = 12;</code>
     */
    const KEY_CODE_ANSI_L = 12;
    /**
     * Generated from protobuf enum <code>KEY_CODE_ANSI_M = 13;</code>
     */
    const KEY_CODE_ANSI_M = 13;
    /**
     * Generated from protobuf enum <code>KEY_CODE_ANSI_N = 14;</code>
     */
    const KEY_CODE_ANSI_N = 14;
    /**
     * Generated from protobuf enum <code>KEY_CODE_ANSI_O = 15;</code>
     */
    const KEY_CODE_ANSI_O = 15;
    /**
     * Generated from protobuf enum <code>KEY_CODE_ANSI_P = 16;</code>
     */
    const KEY_CODE_ANSI_P = 16;
    /**
     * Generated from protobuf enum <code>KEY_CODE_ANSI_Q = 17;</code>
     */
    const KEY_CODE_ANSI_Q = 17;
    /**
     * Generated from protobuf enum <code>KEY_CODE_ANSI_R = 18;</code>
     */
    const KEY_CODE_ANSI_R = 18;
    /**
     * Generated from protobuf enum <code>KEY_CODE_ANSI_S = 19;</code>
     */
    const KEY_CODE_ANSI_S = 19;
    /**
     * Generated from protobuf enum <code>KEY_CODE_ANSI_T = 20;</code>
     */
    const KEY_CODE_ANSI_T = 20;
    /**
     * Generated from protobuf enum <code>KEY_CODE_ANSI_U = 21;</code>
     */
    const KEY_CODE_ANSI_U = 21;
    /**
     * Generated from protobuf enum <code>KEY_CODE_ANSI_V = 22;</code>
     */
    const KEY_CODE_ANSI_V = 22;
    /**
     * Generated from protobuf enum <code>KEY_CODE_ANSI_W = 23;</code>
     */
    const KEY_CODE_ANSI_W = 23;
    /**
     * Generated from protobuf enum <code>KEY_CODE_ANSI_X = 24;</code>
     */
    const KEY_CODE_ANSI_X = 24;
    /**
     * Generated from protobuf enum <code>KEY_CODE_ANSI_Y = 25;</code>
     */
    const KEY_CODE_ANSI_Y = 25;
    /**
     * Generated from protobuf enum <code>KEY_CODE_ANSI_Z = 26;</code>
     */
    const KEY_CODE_ANSI_Z = 26;
    /**
     * Generated from protobuf enum <code>KEY_CODE_ANSI_0 = 27;</code>
     */
    const KEY_CODE_ANSI_0 = 27;
    /**
     * Generated from protobuf enum <code>KEY_CODE_ANSI_1 = 28;</code>
     */
    const KEY_CODE_ANSI_1 = 28;
    /**
     * Generated from protobuf enum <code>KEY_CODE_ANSI_2 = 29;</code>
     */
    const KEY_CODE_ANSI_2 = 29;
    /**
     * Generated from protobuf enum <code>KEY_CODE_ANSI_3 = 30;</code>
     */
    const KEY_CODE_ANSI_3 = 30;
    /**
     * Generated from protobuf enum <code>KEY_CODE_ANSI_4 = 31;</code>
     */
    const KEY_CODE_ANSI_4 = 31;
    /**
     * Generated from protobuf enum <code>KEY_CODE_ANSI_5 = 32;</code>
     */
    const KEY_CODE_ANSI_5 = 32;
    /**
     * Generated from protobuf enum <code>KEY_CODE_ANSI_6 = 33;</code>
     */
    const KEY_CODE_ANSI_6 = 33;
    /**
     * Generated from protobuf enum <code>KEY_CODE_ANSI_7 = 34;</code>
     */
    const KEY_CODE_ANSI_7 = 34;
    /**
     * Generated from protobuf enum <code>KEY_CODE_ANSI_8 = 35;</code>
     */
    const KEY_CODE_ANSI_8 = 35;
    /**
     * Generated from protobuf enum <code>KEY_CODE_ANSI_9 = 36;</code>
     */
    const KEY_CODE_ANSI_9 = 36;
    /**
     * Generated from protobuf enum <code>KEY_CODE_ANSI_EQUAL = 37;</code>
     */
    const KEY_CODE_ANSI_EQUAL = 37;
    /**
     * Generated from protobuf enum <code>KEY_CODE_ANSI_MINUS = 38;</code>
     */
    const KEY_CODE_ANSI_MINUS = 38;
    /**
     * Generated from protobuf enum <code>KEY_CODE_ANSI_RIGHT_BRACKET = 39;</code>
     */
    const KEY_CODE_ANSI_RIGHT_BRACKET = 39;
    /**
     * Generated from protobuf enum <code>KEY_CODE_ANSI_LEFT_BRACKET = 40;</code>
     */
    const KEY_CODE_ANSI_LEFT_BRACKET = 40;
    /**
     * Generated from protobuf enum <code>KEY_CODE_ANSI_QUOTE = 41;</code>
     */
    const KEY_CODE_ANSI_QUOTE = 41;
    /**
     * Generated from protobuf enum <code>KEY_CODE_ANSI_SEMICOLON = 42;</code>
     */
    const KEY_CODE_ANSI_SEMICOLON = 42;
    /**
     * Generated from protobuf enum <code>KEY_CODE_ANSI_BACKSLASH = 43;</code>
     */
    const KEY_CODE_ANSI_BACKSLASH = 43;
    /**
     * Generated from protobuf enum <code>KEY_CODE_ANSI_COMMA = 44;</code>
     */
    const KEY_CODE_ANSI_COMMA = 44;
    /**
     * Generated from protobuf enum <code>KEY_CODE_ANSI_SLASH = 45;</code>
     */
    const KEY_CODE_ANSI_SLASH = 45;
    /**
     * Generated from protobuf enum <code>KEY_CODE_ANSI_PERIOD = 46;</code>
     */
    const KEY_CODE_ANSI_PERIOD = 46;
    /**
     * Generated from protobuf enum <code>KEY_CODE_ANSI_GRAVE = 47;</code>
     */
    const KEY_CODE_ANSI_GRAVE = 47;
    /**
     * Generated from protobuf enum <code>KEY_CODE_ANSI_KEYPAD_DECIMAL = 48;</code>
     */
    const KEY_CODE_ANSI_KEYPAD_DECIMAL = 48;
    /**
     * Generated from protobuf enum <code>KEY_CODE_ANSI_KEYPAD_PLUS = 49;</code>
     */
    const KEY_CODE_ANSI_KEYPAD_PLUS = 49;
    /**
     * Generated from protobuf enum <code>KEY_CODE_ANSI_KEYPAD_CLEAR = 50;</code>
     */
    const KEY_CODE_ANSI_KEYPAD_CLEAR = 50;
    /**
     * Generated from protobuf enum <code>KEY_CODE_ANSI_KEYPAD_DIVIDE = 51;</code>
     */
    const KEY_CODE_ANSI_KEYPAD_DIVIDE = 51;
    /**
     * Generated from protobuf enum <code>KEY_CODE_ANSI_KEYPAD_ENTER = 52;</code>
     */
    const KEY_CODE_ANSI_KEYPAD_ENTER = 52;
    /**
     * Generated from protobuf enum <code>KEY_CODE_ANSI_KEYPAD_MINUS = 53;</code>
     */
    const KEY_CODE_ANSI_KEYPAD_MINUS = 53;
    /**
     * Generated from protobuf enum <code>KEY_CODE_ANSI_KEYPAD_EQUALS = 54;</code>
     */
    const KEY_CODE_ANSI_KEYPAD_EQUALS = 54;
    /**
     * Generated from protobuf enum <code>KEY_CODE_ANSI_KEYPAD_0 = 55;</code>
     */
    const KEY_CODE_ANSI_KEYPAD_0 = 55;
    /**
     * Generated from protobuf enum <code>KEY_CODE_ANSI_KEYPAD_1 = 56;</code>
     */
    const KEY_CODE_ANSI_KEYPAD_1 = 56;
    /**
     * Generated from protobuf enum <code>KEY_CODE_ANSI_KEYPAD_2 = 57;</code>
     */
    const KEY_CODE_ANSI_KEYPAD_2 = 57;
    /**
     * Generated from protobuf enum <code>KEY_CODE_ANSI_KEYPAD_3 = 58;</code>
     */
    const KEY_CODE_ANSI_KEYPAD_3 = 58;
    /**
     * Generated from protobuf enum <code>KEY_CODE_ANSI_KEYPAD_4 = 59;</code>
     */
    const KEY_CODE_ANSI_KEYPAD_4 = 59;
    /**
     * Generated from protobuf enum <code>KEY_CODE_ANSI_KEYPAD_5 = 60;</code>
     */
    const KEY_CODE_ANSI_KEYPAD_5 = 60;
    /**
     * Generated from protobuf enum <code>KEY_CODE_ANSI_KEYPAD_6 = 61;</code>
     */
    const KEY_CODE_ANSI_KEYPAD_6 = 61;
    /**
     * Generated from protobuf enum <code>KEY_CODE_ANSI_KEYPAD_7 = 62;</code>
     */
    const KEY_CODE_ANSI_KEYPAD_7 = 62;
    /**
     * Generated from protobuf enum <code>KEY_CODE_ANSI_KEYPAD_8 = 63;</code>
     */
    const KEY_CODE_ANSI_KEYPAD_8 = 63;
    /**
     * Generated from protobuf enum <code>KEY_CODE_ANSI_KEYPAD_9 = 64;</code>
     */
    const KEY_CODE_ANSI_KEYPAD_9 = 64;
    /**
     * Generated from protobuf enum <code>KEY_CODE_F1 = 65;</code>
     */
    const KEY_CODE_F1 = 65;
    /**
     * Generated from protobuf enum <code>KEY_CODE_F2 = 66;</code>
     */
    const KEY_CODE_F2 = 66;
    /**
     * Generated from protobuf enum <code>KEY_CODE_F3 = 67;</code>
     */
    const KEY_CODE_F3 = 67;
    /**
     * Generated from protobuf enum <code>KEY_CODE_F4 = 68;</code>
     */
    const KEY_CODE_F4 = 68;
    /**
     * Generated from protobuf enum <code>KEY_CODE_F5 = 69;</code>
     */
    const KEY_CODE_F5 = 69;
    /**
     * Generated from protobuf enum <code>KEY_CODE_F6 = 70;</code>
     */
    const KEY_CODE_F6 = 70;
    /**
     * Generated from protobuf enum <code>KEY_CODE_F7 = 71;</code>
     */
    const KEY_CODE_F7 = 71;
    /**
     * Generated from protobuf enum <code>KEY_CODE_F8 = 72;</code>
     */
    const KEY_CODE_F8 = 72;
    /**
     * Generated from protobuf enum <code>KEY_CODE_F9 = 73;</code>
     */
    const KEY_CODE_F9 = 73;
    /**
     * Generated from protobuf enum <code>KEY_CODE_F10 = 74;</code>
     */
    const KEY_CODE_F10 = 74;
    /**
     * Generated from protobuf enum <code>KEY_CODE_F11 = 75;</code>
     */
    const KEY_CODE_F11 = 75;
    /**
     * Generated from protobuf enum <code>KEY_CODE_F12 = 76;</code>
     */
    const KEY_CODE_F12 = 76;
    /**
     * Generated from protobuf enum <code>KEY_CODE_F13 = 77;</code>
     */
    const KEY_CODE_F13 = 77;
    /**
     * Generated from protobuf enum <code>KEY_CODE_F14 = 78;</code>
     */
    const KEY_CODE_F14 = 78;
    /**
     * Generated from protobuf enum <code>KEY_CODE_F15 = 79;</code>
     */
    const KEY_CODE_F15 = 79;
    /**
     * Generated from protobuf enum <code>KEY_CODE_F16 = 80;</code>
     */
    const KEY_CODE_F16 = 80;
    /**
     * Generated from protobuf enum <code>KEY_CODE_F17 = 81;</code>
     */
    const KEY_CODE_F17 = 81;
    /**
     * Generated from protobuf enum <code>KEY_CODE_F18 = 82;</code>
     */
    const KEY_CODE_F18 = 82;
    /**
     * Generated from protobuf enum <code>KEY_CODE_F19 = 83;</code>
     */
    const KEY_CODE_F19 = 83;
    /**
     * Generated from protobuf enum <code>KEY_CODE_F20 = 84;</code>
     */
    const KEY_CODE_F20 = 84;
    /**
     * Generated from protobuf enum <code>KEY_CODE_FUNCTION = 85;</code>
     */
    const KEY_CODE_FUNCTION = 85;
    /**
     * Generated from protobuf enum <code>KEY_CODE_RETURN = 86;</code>
     */
    const KEY_CODE_RETURN = 86;
    /**
     * Generated from protobuf enum <code>KEY_CODE_TAB = 87;</code>
     */
    const KEY_CODE_TAB = 87;
    /**
     * Generated from protobuf enum <code>KEY_CODE_SPACE = 88;</code>
     */
    const KEY_CODE_SPACE = 88;
    /**
     * Generated from protobuf enum <code>KEY_CODE_DELETE = 89;</code>
     */
    const KEY_CODE_DELETE = 89;
    /**
     * Generated from protobuf enum <code>KEY_CODE_ESCAPE = 90;</code>
     */
    const KEY_CODE_ESCAPE = 90;
    /**
     * Generated from protobuf enum <code>KEY_CODE_COMMAND = 91;</code>
     */
    const KEY_CODE_COMMAND = 91;
    /**
     * Generated from protobuf enum <code>KEY_CODE_SHIFT = 92;</code>
     */
    const KEY_CODE_SHIFT = 92;
    /**
     * Generated from protobuf enum <code>KEY_CODE_CAPS_LOCK = 93;</code>
     */
    const KEY_CODE_CAPS_LOCK = 93;
    /**
     * Generated from protobuf enum <code>KEY_CODE_OPTION = 94;</code>
     */
    const KEY_CODE_OPTION = 94;
    /**
     * Generated from protobuf enum <code>KEY_CODE_CONTROL = 95;</code>
     */
    const KEY_CODE_CONTROL = 95;
    /**
     * Generated from protobuf enum <code>KEY_CODE_RIGHT_SHIFT = 96;</code>
     */
    const KEY_CODE_RIGHT_SHIFT = 96;
    /**
     * Generated from protobuf enum <code>KEY_CODE_RIGHT_OPTION = 97;</code>
     */
    const KEY_CODE_RIGHT_OPTION = 97;
    /**
     * Generated from protobuf enum <code>KEY_CODE_RIGHT_CONTROL = 98;</code>
     */
    const KEY_CODE_RIGHT_CONTROL = 98;
    /**
     * Generated from protobuf enum <code>KEY_CODE_VOLUME_UP = 99;</code>
     */
    const KEY_CODE_VOLUME_UP = 99;
    /**
     * Generated from protobuf enum <code>KEY_CODE_VOLUME_DOWN = 100;</code>
     */
    const KEY_CODE_VOLUME_DOWN = 100;
    /**
     * Generated from protobuf enum <code>KEY_CODE_MUTE = 101;</code>
     */
    const KEY_CODE_MUTE = 101;
    /**
     * Generated from protobuf enum <code>KEY_CODE_HELP = 102;</code>
     */
    const KEY_CODE_HELP = 102;
    /**
     * Generated from protobuf enum <code>KEY_CODE_HOME = 103;</code>
     */
    const KEY_CODE_HOME = 103;
    /**
     * Generated from protobuf enum <code>KEY_CODE_PAGE_UP = 104;</code>
     */
    const KEY_CODE_PAGE_UP = 104;
    /**
     * Generated from protobuf enum <code>KEY_CODE_FORWARD_DELETE = 105;</code>
     */
    const KEY_CODE_FORWARD_DELETE = 105;
    /**
     * Generated from protobuf enum <code>KEY_CODE_END = 106;</code>
     */
    const KEY_CODE_END = 106;
    /**
     * Generated from protobuf enum <code>KEY_CODE_PAGE_DOWN = 107;</code>
     */
    const KEY_CODE_PAGE_DOWN = 107;
    /**
     * Generated from protobuf enum <code>KEY_CODE_LEFT_ARROW = 108;</code>
     */
    const KEY_CODE_LEFT_ARROW = 108;
    /**
     * Generated from protobuf enum <code>KEY_CODE_RIGHT_ARROW = 109;</code>
     */
    const KEY_CODE_RIGHT_ARROW = 109;
    /**
     * Generated from protobuf enum <code>KEY_CODE_DOWN_ARROW = 110;</code>
     */
    const KEY_CODE_DOWN_ARROW = 110;
    /**
     * Generated from protobuf enum <code>KEY_CODE_UP_ARROW = 111;</code>
     */
    const KEY_CODE_UP_ARROW = 111;
    /**
     * Generated from protobuf enum <code>KEY_CODE_ISO_SELECTION = 112;</code>
     */
    const KEY_CODE_ISO_SELECTION = 112;
    /**
     * Generated from protobuf enum <code>KEY_CODE_JIS_YEN = 113;</code>
     */
    const KEY_CODE_JIS_YEN = 113;
    /**
     * Generated from protobuf enum <code>KEY_CODE_JIS_UNDERSCORE = 114;</code>
     */
    const KEY_CODE_JIS_UNDERSCORE = 114;
    /**
     * Generated from protobuf enum <code>KEY_CODE_JIS_KEYPAD_COMMA = 115;</code>
     */
    const KEY_CODE_JIS_KEYPAD_COMMA = 115;
    /**
     * Generated from protobuf enum <code>KEY_CODE_JIS_EISU = 116;</code>
     */
    const KEY_CODE_JIS_EISU = 116;
    /**
     * Generated from protobuf enum <code>KEY_CODE_JIS_KANA = 117;</code>
     */
    const KEY_CODE_JIS_KANA = 117;

    private static $valueToName = [
        self::KEY_CODE_UNKNOWN => 'KEY_CODE_UNKNOWN',
        self::KEY_CODE_ANSI_A => 'KEY_CODE_ANSI_A',
        self::KEY_CODE_ANSI_B => 'KEY_CODE_ANSI_B',
        self::KEY_CODE_ANSI_C => 'KEY_CODE_ANSI_C',
        self::KEY_CODE_ANSI_D => 'KEY_CODE_ANSI_D',
        self::KEY_CODE_ANSI_E => 'KEY_CODE_ANSI_E',
        self::KEY_CODE_ANSI_F => 'KEY_CODE_ANSI_F',
        self::KEY_CODE_ANSI_G => 'KEY_CODE_ANSI_G',
        self::KEY_CODE_ANSI_H => 'KEY_CODE_ANSI_H',
        self::KEY_CODE_ANSI_I => 'KEY_CODE_ANSI_I',
        self::KEY_CODE_ANSI_J => 'KEY_CODE_ANSI_J',
        self::KEY_CODE_ANSI_K => 'KEY_CODE_ANSI_K',
        self::KEY_CODE_ANSI_L => 'KEY_CODE_ANSI_L',
        self::KEY_CODE_ANSI_M => 'KEY_CODE_ANSI_M',
        self::KEY_CODE_ANSI_N => 'KEY_CODE_ANSI_N',
        self::KEY_CODE_ANSI_O => 'KEY_CODE_ANSI_O',
        self::KEY_CODE_ANSI_P => 'KEY_CODE_ANSI_P',
        self::KEY_CODE_ANSI_Q => 'KEY_CODE_ANSI_Q',
        self::KEY_CODE_ANSI_R => 'KEY_CODE_ANSI_R',
        self::KEY_CODE_ANSI_S => 'KEY_CODE_ANSI_S',
        self::KEY_CODE_ANSI_T => 'KEY_CODE_ANSI_T',
        self::KEY_CODE_ANSI_U => 'KEY_CODE_ANSI_U',
        self::KEY_CODE_ANSI_V => 'KEY_CODE_ANSI_V',
        self::KEY_CODE_ANSI_W => 'KEY_CODE_ANSI_W',
        self::KEY_CODE_ANSI_X => 'KEY_CODE_ANSI_X',
        self::KEY_CODE_ANSI_Y => 'KEY_CODE_ANSI_Y',
        self::KEY_CODE_ANSI_Z => 'KEY_CODE_ANSI_Z',
        self::KEY_CODE_ANSI_0 => 'KEY_CODE_ANSI_0',
        self::KEY_CODE_ANSI_1 => 'KEY_CODE_ANSI_1',
        self::KEY_CODE_ANSI_2 => 'KEY_CODE_ANSI_2',
        self::KEY_CODE_ANSI_3 => 'KEY_CODE_ANSI_3',
        self::KEY_CODE_ANSI_4 => 'KEY_CODE_ANSI_4',
        self::KEY_CODE_ANSI_5 => 'KEY_CODE_ANSI_5',
        self::KEY_CODE_ANSI_6 => 'KEY_CODE_ANSI_6',
        self::KEY_CODE_ANSI_7 => 'KEY_CODE_ANSI_7',
        self::KEY_CODE_ANSI_8 => 'KEY_CODE_ANSI_8',
        self::KEY_CODE_ANSI_9 => 'KEY_CODE_ANSI_9',
        self::KEY_CODE_ANSI_EQUAL => 'KEY_CODE_ANSI_EQUAL',
        self::KEY_CODE_ANSI_MINUS => 'KEY_CODE_ANSI_MINUS',
        self::KEY_CODE_ANSI_RIGHT_BRACKET => 'KEY_CODE_ANSI_RIGHT_BRACKET',
        self::KEY_CODE_ANSI_LEFT_BRACKET => 'KEY_CODE_ANSI_LEFT_BRACKET',
        self::KEY_CODE_ANSI_QUOTE => 'KEY_CODE_ANSI_QUOTE',
        self::KEY_CODE_ANSI_SEMICOLON => 'KEY_CODE_ANSI_SEMICOLON',
        self::KEY_CODE_ANSI_BACKSLASH => 'KEY_CODE_ANSI_BACKSLASH',
        self::KEY_CODE_ANSI_COMMA => 'KEY_CODE_ANSI_COMMA',
        self::KEY_CODE_ANSI_SLASH => 'KEY_CODE_ANSI_SLASH',
        self::KEY_CODE_ANSI_PERIOD => 'KEY_CODE_ANSI_PERIOD',
        self::KEY_CODE_ANSI_GRAVE => 'KEY_CODE_ANSI_GRAVE',
        self::KEY_CODE_ANSI_KEYPAD_DECIMAL => 'KEY_CODE_ANSI_KEYPAD_DECIMAL',
        self::KEY_CODE_ANSI_KEYPAD_PLUS => 'KEY_CODE_ANSI_KEYPAD_PLUS',
        self::KEY_CODE_ANSI_KEYPAD_CLEAR => 'KEY_CODE_ANSI_KEYPAD_CLEAR',
        self::KEY_CODE_ANSI_KEYPAD_DIVIDE => 'KEY_CODE_ANSI_KEYPAD_DIVIDE',
        self::KEY_CODE_ANSI_KEYPAD_ENTER => 'KEY_CODE_ANSI_KEYPAD_ENTER',
        self::KEY_CODE_ANSI_KEYPAD_MINUS => 'KEY_CODE_ANSI_KEYPAD_MINUS',
        self::KEY_CODE_ANSI_KEYPAD_EQUALS => 'KEY_CODE_ANSI_KEYPAD_EQUALS',
        self::KEY_CODE_ANSI_KEYPAD_0 => 'KEY_CODE_ANSI_KEYPAD_0',
        self::KEY_CODE_ANSI_KEYPAD_1 => 'KEY_CODE_ANSI_KEYPAD_1',
        self::KEY_CODE_ANSI_KEYPAD_2 => 'KEY_CODE_ANSI_KEYPAD_2',
        self::KEY_CODE_ANSI_KEYPAD_3 => 'KEY_CODE_ANSI_KEYPAD_3',
        self::KEY_CODE_ANSI_KEYPAD_4 => 'KEY_CODE_ANSI_KEYPAD_4',
        self::KEY_CODE_ANSI_KEYPAD_5 => 'KEY_CODE_ANSI_KEYPAD_5',
        self::KEY_CODE_ANSI_KEYPAD_6 => 'KEY_CODE_ANSI_KEYPAD_6',
        self::KEY_CODE_ANSI_KEYPAD_7 => 'KEY_CODE_ANSI_KEYPAD_7',
        self::KEY_CODE_ANSI_KEYPAD_8 => 'KEY_CODE_ANSI_KEYPAD_8',
        self::KEY_CODE_ANSI_KEYPAD_9 => 'KEY_CODE_ANSI_KEYPAD_9',
        self::KEY_CODE_F1 => 'KEY_CODE_F1',
        self::KEY_CODE_F2 => 'KEY_CODE_F2',
        self::KEY_CODE_F3 => 'KEY_CODE_F3',
        self::KEY_CODE_F4 => 'KEY_CODE_F4',
        self::KEY_CODE_F5 => 'KEY_CODE_F5',
        self::KEY_CODE_F6 => 'KEY_CODE_F6',
        self::KEY_CODE_F7 => 'KEY_CODE_F7',
        self::KEY_CODE_F8 => 'KEY_CODE_F8',
        self::KEY_CODE_F9 => 'KEY_CODE_F9',
        self::KEY_CODE_F10 => 'KEY_CODE_F10',
        self::KEY_CODE_F11 => 'KEY_CODE_F11',
        self::KEY_CODE_F12 => 'KEY_CODE_F12',
        self::KEY_CODE_F13 => 'KEY_CODE_F13',
        self::KEY_CODE_F14 => 'KEY_CODE_F14',
        self::KEY_CODE_F15 => 'KEY_CODE_F15',
        self::KEY_CODE_F16 => 'KEY_CODE_F16',
        self::KEY_CODE_F17 => 'KEY_CODE_F17',
        self::KEY_CODE_F18 => 'KEY_CODE_F18',
        self::KEY_CODE_F19 => 'KEY_CODE_F19',
        self::KEY_CODE_F20 => 'KEY_CODE_F20',
        self::KEY_CODE_FUNCTION => 'KEY_CODE_FUNCTION',
        self::KEY_CODE_RETURN => 'KEY_CODE_RETURN',
        self::KEY_CODE_TAB => 'KEY_CODE_TAB',
        self::KEY_CODE_SPACE => 'KEY_CODE_SPACE',
        self::KEY_CODE_DELETE => 'KEY_CODE_DELETE',
        self::KEY_CODE_ESCAPE => 'KEY_CODE_ESCAPE',
        self::KEY_CODE_COMMAND => 'KEY_CODE_COMMAND',
        self::KEY_CODE_SHIFT => 'KEY_CODE_SHIFT',
        self::KEY_CODE_CAPS_LOCK => 'KEY_CODE_CAPS_LOCK',
        self::KEY_CODE_OPTION => 'KEY_CODE_OPTION',
        self::KEY_CODE_CONTROL => 'KEY_CODE_CONTROL',
        self::KEY_CODE_RIGHT_SHIFT => 'KEY_CODE_RIGHT_SHIFT',
        self::KEY_CODE_RIGHT_OPTION => 'KEY_CODE_RIGHT_OPTION',
        self::KEY_CODE_RIGHT_CONTROL => 'KEY_CODE_RIGHT_CONTROL',
        self::KEY_CODE_VOLUME_UP => 'KEY_CODE_VOLUME_UP',
        self::KEY_CODE_VOLUME_DOWN => 'KEY_CODE_VOLUME_DOWN',
        self::KEY_CODE_MUTE => 'KEY_CODE_MUTE',
        self::KEY_CODE_HELP => 'KEY_CODE_HELP',
        self::KEY_CODE_HOME => 'KEY_CODE_HOME',
        self::KEY_CODE_PAGE_UP => 'KEY_CODE_PAGE_UP',
        self::KEY_CODE_FORWARD_DELETE => 'KEY_CODE_FORWARD_DELETE',
        self::KEY_CODE_END => 'KEY_CODE_END',
        self::KEY_CODE_PAGE_DOWN => 'KEY_CODE_PAGE_DOWN',
        self::KEY_CODE_LEFT_ARROW => 'KEY_CODE_LEFT_ARROW',
        self::KEY_CODE_RIGHT_ARROW => 'KEY_CODE_RIGHT_ARROW',
        self::KEY_CODE_DOWN_ARROW => 'KEY_CODE_DOWN_ARROW',
        self::KEY_CODE_UP_ARROW => 'KEY_CODE_UP_ARROW',
        self::KEY_CODE_ISO_SELECTION => 'KEY_CODE_ISO_SELECTION',
        self::KEY_CODE_JIS_YEN => 'KEY_CODE_JIS_YEN',
        self::KEY_CODE_JIS_UNDERSCORE => 'KEY_CODE_JIS_UNDERSCORE',
        self::KEY_CODE_JIS_KEYPAD_COMMA => 'KEY_CODE_JIS_KEYPAD_COMMA',
        self::KEY_CODE_JIS_EISU => 'KEY_CODE_JIS_EISU',
        self::KEY_CODE_JIS_KANA => 'KEY_CODE_JIS_KANA',
    ];

    public static function name($value)
    {
        if (!isset(self::$valueToName[$value])) {
            throw new UnexpectedValueException(sprintf(
                    'Enum %s has no name defined for value %s', __CLASS__, $value));
        }
        return self::$valueToName[$value];
    }


    public static function value($name)
    {
        $const = __CLASS__ . '::' . strtoupper($name);
        if (!defined($const)) {
            throw new UnexpectedValueException(sprintf(
                    'Enum %s has no value defined for name %s', __CLASS__, $name));
        }
        return constant($const);
    }
}

