Home | History | Annotate | Download | only in input
      1 /*
      2  * Copyright (c) 2009-2010 jMonkeyEngine
      3  * All rights reserved.
      4  *
      5  * Redistribution and use in source and binary forms, with or without
      6  * modification, are permitted provided that the following conditions are
      7  * met:
      8  *
      9  * * Redistributions of source code must retain the above copyright
     10  *   notice, this list of conditions and the following disclaimer.
     11  *
     12  * * Redistributions in binary form must reproduce the above copyright
     13  *   notice, this list of conditions and the following disclaimer in the
     14  *   documentation and/or other materials provided with the distribution.
     15  *
     16  * * Neither the name of 'jMonkeyEngine' nor the names of its contributors
     17  *   may be used to endorse or promote products derived from this software
     18  *   without specific prior written permission.
     19  *
     20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
     21  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
     22  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
     24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
     25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
     26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
     27  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
     28  * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
     29  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
     30  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     31  */
     32 
     33 package com.jme3.input;
     34 
     35 /**
     36  * A specific API for interfacing with the keyboard.
     37  */
     38 public interface KeyInput extends Input {
     39 
     40     /**
     41      * escape key.
     42      */
     43     public static final int KEY_ESCAPE = 0x01;
     44     /**
     45      * 1 key.
     46      */
     47     public static final int KEY_1 = 0x02;
     48     /**
     49      * 2 key.
     50      */
     51     public static final int KEY_2 = 0x03;
     52     /**
     53      * 3 key.
     54      */
     55     public static final int KEY_3 = 0x04;
     56     /**
     57      * 4 key.
     58      */
     59     public static final int KEY_4 = 0x05;
     60     /**
     61      * 5 key.
     62      */
     63     public static final int KEY_5 = 0x06;
     64     /**
     65      * 6 key.
     66      */
     67     public static final int KEY_6 = 0x07;
     68     /**
     69      * 7 key.
     70      */
     71     public static final int KEY_7 = 0x08;
     72     /**
     73      * 8 key.
     74      */
     75     public static final int KEY_8 = 0x09;
     76     /**
     77      * 9 key.
     78      */
     79     public static final int KEY_9 = 0x0A;
     80     /**
     81      * 0 key.
     82      */
     83     public static final int KEY_0 = 0x0B;
     84     /**
     85      * - key.
     86      */
     87     public static final int KEY_MINUS = 0x0C;
     88     /**
     89      * = key.
     90      */
     91     public static final int KEY_EQUALS = 0x0D;
     92     /**
     93      * back key.
     94      */
     95     public static final int KEY_BACK = 0x0E;
     96     /**
     97      * tab key.
     98      */
     99     public static final int KEY_TAB = 0x0F;
    100     /**
    101      * q key.
    102      */
    103     public static final int KEY_Q = 0x10;
    104     /**
    105      * w key.
    106      */
    107     public static final int KEY_W = 0x11;
    108     /**
    109      * e key.
    110      */
    111     public static final int KEY_E = 0x12;
    112     /**
    113      * r key.
    114      */
    115     public static final int KEY_R = 0x13;
    116     /**
    117      * t key.
    118      */
    119     public static final int KEY_T = 0x14;
    120     /**
    121      * y key.
    122      */
    123     public static final int KEY_Y = 0x15;
    124     /**
    125      * u key.
    126      */
    127     public static final int KEY_U = 0x16;
    128     /**
    129      * i key.
    130      */
    131     public static final int KEY_I = 0x17;
    132     /**
    133      * o key.
    134      */
    135     public static final int KEY_O = 0x18;
    136     /**
    137      * p key.
    138      */
    139     public static final int KEY_P = 0x19;
    140     /**
    141      * [ key.
    142      */
    143     public static final int KEY_LBRACKET = 0x1A;
    144     /**
    145      * ] key.
    146      */
    147     public static final int KEY_RBRACKET = 0x1B;
    148     /**
    149      * enter (main keyboard) key.
    150      */
    151     public static final int KEY_RETURN = 0x1C;
    152     /**
    153      * left control key.
    154      */
    155     public static final int KEY_LCONTROL = 0x1D;
    156     /**
    157      * a key.
    158      */
    159     public static final int KEY_A = 0x1E;
    160     /**
    161      * s key.
    162      */
    163     public static final int KEY_S = 0x1F;
    164     /**
    165      * d key.
    166      */
    167     public static final int KEY_D = 0x20;
    168     /**
    169      * f key.
    170      */
    171     public static final int KEY_F = 0x21;
    172     /**
    173      * g key.
    174      */
    175     public static final int KEY_G = 0x22;
    176     /**
    177      * h key.
    178      */
    179     public static final int KEY_H = 0x23;
    180     /**
    181      * j key.
    182      */
    183     public static final int KEY_J = 0x24;
    184     /**
    185      * k key.
    186      */
    187     public static final int KEY_K = 0x25;
    188     /**
    189      * l key.
    190      */
    191     public static final int KEY_L = 0x26;
    192     /**
    193      * ; key.
    194      */
    195     public static final int KEY_SEMICOLON = 0x27;
    196     /**
    197      * ' key.
    198      */
    199     public static final int KEY_APOSTROPHE = 0x28;
    200     /**
    201      * ` key.
    202      */
    203     public static final int KEY_GRAVE = 0x29;
    204     /**
    205      * left shift key.
    206      */
    207     public static final int KEY_LSHIFT = 0x2A;
    208     /**
    209      * \ key.
    210      */
    211     public static final int KEY_BACKSLASH = 0x2B;
    212     /**
    213      * z key.
    214      */
    215     public static final int KEY_Z = 0x2C;
    216     /**
    217      * x key.
    218      */
    219     public static final int KEY_X = 0x2D;
    220     /**
    221      * c key.
    222      */
    223     public static final int KEY_C = 0x2E;
    224     /**
    225      * v key.
    226      */
    227     public static final int KEY_V = 0x2F;
    228     /**
    229      * b key.
    230      */
    231     public static final int KEY_B = 0x30;
    232     /**
    233      * n key.
    234      */
    235     public static final int KEY_N = 0x31;
    236     /**
    237      * m key.
    238      */
    239     public static final int KEY_M = 0x32;
    240     /**
    241      * , key.
    242      */
    243     public static final int KEY_COMMA = 0x33;
    244     /**
    245      * . key (main keyboard).
    246      */
    247     public static final int KEY_PERIOD = 0x34;
    248     /**
    249      * / key (main keyboard).
    250      */
    251     public static final int KEY_SLASH = 0x35;
    252     /**
    253      * right shift key.
    254      */
    255     public static final int KEY_RSHIFT = 0x36;
    256     /**
    257      * * key (on keypad).
    258      */
    259     public static final int KEY_MULTIPLY = 0x37;
    260     /**
    261      * left alt key.
    262      */
    263     public static final int KEY_LMENU = 0x38;
    264     /**
    265      * space key.
    266      */
    267     public static final int KEY_SPACE = 0x39;
    268     /**
    269      * caps lock key.
    270      */
    271     public static final int KEY_CAPITAL = 0x3A;
    272     /**
    273      * F1 key.
    274      */
    275     public static final int KEY_F1 = 0x3B;
    276     /**
    277      * F2 key.
    278      */
    279     public static final int KEY_F2 = 0x3C;
    280     /**
    281      * F3 key.
    282      */
    283     public static final int KEY_F3 = 0x3D;
    284     /**
    285      * F4 key.
    286      */
    287     public static final int KEY_F4 = 0x3E;
    288     /**
    289      * F5 key.
    290      */
    291     public static final int KEY_F5 = 0x3F;
    292     /**
    293      * F6 key.
    294      */
    295     public static final int KEY_F6 = 0x40;
    296     /**
    297      * F7 key.
    298      */
    299     public static final int KEY_F7 = 0x41;
    300     /**
    301      * F8 key.
    302      */
    303     public static final int KEY_F8 = 0x42;
    304     /**
    305      * F9 key.
    306      */
    307     public static final int KEY_F9 = 0x43;
    308     /**
    309      * F10 key.
    310      */
    311     public static final int KEY_F10 = 0x44;
    312     /**
    313      * NumLK key.
    314      */
    315     public static final int KEY_NUMLOCK = 0x45;
    316     /**
    317      * Scroll lock key.
    318      */
    319     public static final int KEY_SCROLL = 0x46;
    320     /**
    321      * 7 key (num pad).
    322      */
    323     public static final int KEY_NUMPAD7 = 0x47;
    324     /**
    325      * 8 key (num pad).
    326      */
    327     public static final int KEY_NUMPAD8 = 0x48;
    328     /**
    329      * 9 key (num pad).
    330      */
    331     public static final int KEY_NUMPAD9 = 0x49;
    332     /**
    333      * - key (num pad).
    334      */
    335     public static final int KEY_SUBTRACT = 0x4A;
    336     /**
    337      * 4 key (num pad).
    338      */
    339     public static final int KEY_NUMPAD4 = 0x4B;
    340     /**
    341      * 5 key (num pad).
    342      */
    343     public static final int KEY_NUMPAD5 = 0x4C;
    344     /**
    345      * 6 key (num pad).
    346      */
    347     public static final int KEY_NUMPAD6 = 0x4D;
    348     /**
    349      * + key (num pad).
    350      */
    351     public static final int KEY_ADD = 0x4E;
    352     /**
    353      * 1 key (num pad).
    354      */
    355     public static final int KEY_NUMPAD1 = 0x4F;
    356     /**
    357      * 2 key (num pad).
    358      */
    359     public static final int KEY_NUMPAD2 = 0x50;
    360     /**
    361      * 3 key (num pad).
    362      */
    363     public static final int KEY_NUMPAD3 = 0x51;
    364     /**
    365      * 0 key (num pad).
    366      */
    367     public static final int KEY_NUMPAD0 = 0x52;
    368     /**
    369      * . key (num pad).
    370      */
    371     public static final int KEY_DECIMAL = 0x53;
    372     /**
    373      * F11 key.
    374      */
    375     public static final int KEY_F11 = 0x57;
    376     /**
    377      * F12 key.
    378      */
    379     public static final int KEY_F12 = 0x58;
    380     /**
    381      * F13 key.
    382      */
    383     public static final int KEY_F13 = 0x64;
    384     /**
    385      * F14 key.
    386      */
    387     public static final int KEY_F14 = 0x65;
    388     /**
    389      * F15 key.
    390      */
    391     public static final int KEY_F15 = 0x66;
    392     /**
    393      * kana key (Japanese).
    394      */
    395     public static final int KEY_KANA = 0x70;
    396     /**
    397      * convert key (Japanese).
    398      */
    399     public static final int KEY_CONVERT = 0x79;
    400     /**
    401      * noconvert key (Japanese).
    402      */
    403     public static final int KEY_NOCONVERT = 0x7B;
    404     /**
    405      * yen key (Japanese).
    406      */
    407     public static final int KEY_YEN = 0x7D;
    408     /**
    409      * = on num pad (NEC PC98).
    410      */
    411     public static final int KEY_NUMPADEQUALS = 0x8D;
    412     /**
    413      * circum flex key (Japanese).
    414      */
    415     public static final int KEY_CIRCUMFLEX = 0x90;
    416     /**
    417      * @ key (NEC PC98).
    418      */
    419     public static final int KEY_AT = 0x91;
    420     /**
    421      * : key (NEC PC98)
    422      */
    423     public static final int KEY_COLON = 0x92;
    424     /**
    425      * _ key (NEC PC98).
    426      */
    427     public static final int KEY_UNDERLINE = 0x93;
    428     /**
    429      * kanji key (Japanese).
    430      */
    431     public static final int KEY_KANJI = 0x94;
    432     /**
    433      * stop key (NEC PC98).
    434      */
    435     public static final int KEY_STOP = 0x95;
    436     /**
    437      * ax key (Japanese).
    438      */
    439     public static final int KEY_AX = 0x96;
    440     /**
    441      * (J3100).
    442      */
    443     public static final int KEY_UNLABELED = 0x97;
    444     /**
    445      * Enter key (num pad).
    446      */
    447     public static final int KEY_NUMPADENTER = 0x9C;
    448     /**
    449      * right control key.
    450      */
    451     public static final int KEY_RCONTROL = 0x9D;
    452     /**
    453      * , key on num pad (NEC PC98).
    454      */
    455     public static final int KEY_NUMPADCOMMA = 0xB3;
    456     /**
    457      * / key (num pad).
    458      */
    459     public static final int KEY_DIVIDE = 0xB5;
    460     /**
    461      * SysRq key.
    462      */
    463     public static final int KEY_SYSRQ = 0xB7;
    464     /**
    465      * right alt key.
    466      */
    467     public static final int KEY_RMENU = 0xB8;
    468     /**
    469      * pause key.
    470      */
    471     public static final int KEY_PAUSE = 0xC5;
    472     /**
    473      * home key.
    474      */
    475     public static final int KEY_HOME = 0xC7;
    476     /**
    477      * up arrow key.
    478      */
    479     public static final int KEY_UP = 0xC8;
    480     /**
    481      * PgUp key.
    482      */
    483     public static final int KEY_PRIOR = 0xC9;
    484     /**
    485      * PgUp key.
    486      */
    487     public static final int KEY_PGUP = KEY_PRIOR;
    488 
    489     /**
    490      * left arrow key.
    491      */
    492     public static final int KEY_LEFT = 0xCB;
    493     /**
    494      * right arrow key.
    495      */
    496     public static final int KEY_RIGHT = 0xCD;
    497     /**
    498      * end key.
    499      */
    500     public static final int KEY_END = 0xCF;
    501     /**
    502      * down arrow key.
    503      */
    504     public static final int KEY_DOWN = 0xD0;
    505     /**
    506      * PgDn key.
    507      */
    508     public static final int KEY_NEXT = 0xD1;
    509     /**
    510      * PgDn key.
    511      */
    512     public static final int KEY_PGDN = KEY_NEXT;
    513 
    514     /**
    515      * insert key.
    516      */
    517     public static final int KEY_INSERT = 0xD2;
    518     /**
    519      * delete key.
    520      */
    521     public static final int KEY_DELETE = 0xD3;
    522 
    523     /**
    524      * Left "Windows" key on PC keyboards, left "Option" key on Mac keyboards.
    525      */
    526     public static final int KEY_LMETA  = 0xDB;
    527 
    528     /**
    529      * Right "Windows" key on PC keyboards, right "Option" key on Mac keyboards.
    530      */
    531     public static final int KEY_RMETA = 0xDC;
    532 
    533     public static final int KEY_APPS = 0xDD;
    534     /**
    535      * power key.
    536      */
    537     public static final int KEY_POWER = 0xDE;
    538     /**
    539      * sleep key.
    540      */
    541     public static final int KEY_SLEEP = 0xDF;
    542 
    543 }
    544