package arc.backend.android;

import arc.input.*;

public class AndroidInputMap{

    static KeyCode getKeyCode(int key){
        switch(key){
            case -1: return KeyCode.anyKey;
            case 7: return KeyCode.num0;
            case 8: return KeyCode.num1;
            case 9: return KeyCode.num2;
            case 10: return KeyCode.num3;
            case 11: return KeyCode.num4;
            case 12: return KeyCode.num5;
            case 13: return KeyCode.num6;
            case 14: return KeyCode.num7;
            case 15: return KeyCode.num8;
            case 16: return KeyCode.num9;
            case 29: return KeyCode.a;
            case 57: return KeyCode.altLeft;
            case 58: return KeyCode.altRight;
            case 75: return KeyCode.apostrophe;
            case 77: return KeyCode.at;
            case 30: return KeyCode.b;
            case 4: return KeyCode.back;
            case 73: return KeyCode.backslash;
            case 31: return KeyCode.c;
            case 5: return KeyCode.call;
            case 27: return KeyCode.camera;
            case 28: return KeyCode.clear;
            case 55: return KeyCode.comma;
            case 32: return KeyCode.d;
            case 67: return KeyCode.backspace;
            case 112: return KeyCode.forwardDel;
            case 23: return KeyCode.center;
            case 20: return KeyCode.down;
            case 21: return KeyCode.left;
            case 22: return KeyCode.right;
            case 19: return KeyCode.up;
            case 33: return KeyCode.e;
            case 6: return KeyCode.endcall;
            case 66: return KeyCode.enter;
            case 65: return KeyCode.envelope;
            case 70: return KeyCode.equals;
            case 34: return KeyCode.f;
            case 80: return KeyCode.focus;
            case 35: return KeyCode.g;
            case 68: return KeyCode.backtick;
            case 36: return KeyCode.h;
            case 79: return KeyCode.headsetHook;
            case 3: return KeyCode.home;
            case 37: return KeyCode.i;
            case 38: return KeyCode.j;
            case 39: return KeyCode.k;
            case 40: return KeyCode.l;
            case 71: return KeyCode.leftBracket;
            case 41: return KeyCode.m;
            case 90: return KeyCode.mediaFastForward;
            case 87: return KeyCode.mediaNext;
            case 85: return KeyCode.mediaPlayPause;
            case 88: return KeyCode.mediaPrevious;
            case 89: return KeyCode.mediaRewind;
            case 86: return KeyCode.mediaStop;
            case 82: return KeyCode.menu;
            case 69: return KeyCode.minus;
            case 91: return KeyCode.mute;
            case 42: return KeyCode.n;
            case 83: return KeyCode.notification;
            case 78: return KeyCode.num;
            case 43: return KeyCode.o;
            case 44: return KeyCode.p;
            case 56: return KeyCode.period;
            case 81: return KeyCode.plus;
            case 18: return KeyCode.pound;
            case 26: return KeyCode.power;
            case 45: return KeyCode.q;
            case 46: return KeyCode.r;
            case 72: return KeyCode.rightBracket;
            case 47: return KeyCode.s;
            case 84: return KeyCode.search;
            case 74: return KeyCode.semicolon;
            case 59: return KeyCode.shiftLeft;
            case 60: return KeyCode.shiftRight;
            case 76: return KeyCode.slash;
            case 1: return KeyCode.softLeft;
            case 2: return KeyCode.softRight;
            case 62: return KeyCode.space;
            case 17: return KeyCode.star;
            case 63: return KeyCode.sym;
            case 48: return KeyCode.t;
            case 61: return KeyCode.tab;
            case 49: return KeyCode.u;
            case 0: return KeyCode.unknown;
            case 50: return KeyCode.v;
            case 25: return KeyCode.volumeDown;
            case 24: return KeyCode.volumeUp;
            case 51: return KeyCode.w;
            case 52: return KeyCode.x;
            case 53: return KeyCode.y;
            case 54: return KeyCode.z;
            case 64: return KeyCode.metaShiftLeftOn;
            case 128: return KeyCode.metaShiftRightOn;
            case 129: return KeyCode.controlLeft;
            case 130: return KeyCode.controlRight;
            case 111: return KeyCode.escape;
            case 123: return KeyCode.end;
            case 124: return KeyCode.insert;
            case 92: return KeyCode.pageUp;
            case 93: return KeyCode.pageDown;
            case 94: return KeyCode.pictSymbols;
            case 95: return KeyCode.switchCharset;
            case 255: return KeyCode.buttonC;
            case 96: return KeyCode.buttonA;
            case 97: return KeyCode.buttonB;
            case 98: return KeyCode.buttonC;
            case 99: return KeyCode.buttonX;
            case 100: return KeyCode.buttonY;
            case 101: return KeyCode.buttonZ;
            case 102: return KeyCode.buttonL1;
            case 103: return KeyCode.buttonL1;
            case 104: return KeyCode.buttonL2;
            case 105: return KeyCode.buttonL2;
            case 106: return KeyCode.buttonThumbL;
            case 107: return KeyCode.buttonThumbR;
            case 108: return KeyCode.buttonStart;
            case 109: return KeyCode.buttonSelect;
            case 110: return KeyCode.buttonMode;
            case 144: return KeyCode.numpad0;
            case 145: return KeyCode.numpad1;
            case 146: return KeyCode.numpad2;
            case 147: return KeyCode.numpad3;
            case 148: return KeyCode.numpad4;
            case 149: return KeyCode.numpad5;
            case 150: return KeyCode.numpad6;
            case 151: return KeyCode.numpad7;
            case 152: return KeyCode.numpad8;
            case 153: return KeyCode.numpad9;
            case 243: return KeyCode.colon;
            case 131: return KeyCode.f1;
            case 132: return KeyCode.f2;
            case 133: return KeyCode.f3;
            case 134: return KeyCode.f4;
            case 135: return KeyCode.f5;
            case 136: return KeyCode.f6;
            case 137: return KeyCode.f7;
            case 138: return KeyCode.f8;
            case 139: return KeyCode.f9;
            case 140: return KeyCode.f10;
            case 141: return KeyCode.f11;
            case 142: return KeyCode.f12;
            default: return KeyCode.unknown;
        }
    }
}
