daily pastebin goal
67%
SHARE
TWEET

Untitled

a guest May 16th, 2018 103 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. void initKeysFromScanCodes()
  2. {
  3.        //memset(keyFromScanCode, 0, sizeof(int[255]));
  4.        keyFromScanCode[9] = 16777216;   //Escape
  5.  
  6.        keyFromScanCode[68] = 16777265;  //F2
  7.        keyFromScanCode[69] = 16777266;  //F3
  8.        keyFromScanCode[70] = 16777267;  //F4
  9.        keyFromScanCode[71] = 16777268;  //F5
  10.        keyFromScanCode[72] = 16777269;  //F6
  11.        keyFromScanCode[73] = 16777270;  //F7
  12.        keyFromScanCode[74] = 16777271;  //F8
  13.        keyFromScanCode[75] = 16777272;  //F9
  14.        keyFromScanCode[76] = 16777273;  //F10
  15.        keyFromScanCode[96] = 16777275;  //F12
  16.  
  17.        keyFromScanCode[49] = 96;           //`
  18.        keyFromScanCode[10] = 49;           //1
  19.        keyFromScanCode[11] = 50;           //2
  20.        keyFromScanCode[12] = 51;           //3
  21.        keyFromScanCode[13] = 52;           //4
  22.        keyFromScanCode[14] = 53;           //5
  23.        keyFromScanCode[15] = 54;           //6
  24.        keyFromScanCode[16] = 55;           //7
  25.        keyFromScanCode[17] = 56;           //8
  26.        keyFromScanCode[18] = 57;           //9
  27.        keyFromScanCode[19] = 48;           //0
  28.        keyFromScanCode[20] = 45;           //-
  29.        keyFromScanCode[21] = 61;           //=
  30.        keyFromScanCode[51] = 92;           //\
  31.        //letters: 24-35
  32.        keyFromScanCode[24] = 81;           //Q
  33.        keyFromScanCode[25] = 87;           //W
  34.        keyFromScanCode[26] = 69;           //E
  35.        keyFromScanCode[27] = 82;           //R
  36.        keyFromScanCode[28] = 84;           //T
  37.        keyFromScanCode[29] = 89;           //Y
  38.        keyFromScanCode[30] = 85;           //U
  39.        keyFromScanCode[31] = 73;           //I
  40.        keyFromScanCode[32] = 79;           //O
  41.        keyFromScanCode[33] = 80;           //P
  42.        keyFromScanCode[34] = 91;           //[
  43.        keyFromScanCode[35] = 93;           //]
  44.        keyFromScanCode[36] = 16777220;  //Return
  45.        //letters: 38-48
  46.        keyFromScanCode[66] = 16777252;  //Caps Lock
  47.        keyFromScanCode[38] = 65;           //A
  48.        keyFromScanCode[39] = 83;           //S
  49.        keyFromScanCode[40] = 68;           //D
  50.        keyFromScanCode[41] = 70;           //F
  51.        keyFromScanCode[42] = 71;           //G
  52.        keyFromScanCode[43] = 72;           //H
  53.        keyFromScanCode[44] = 74;           //J
  54.        keyFromScanCode[45] = 75;           //K
  55.        keyFromScanCode[46] = 76;           //L
  56.        keyFromScanCode[47] = 59;           //;
  57.        keyFromScanCode[48] = 39;           //'
  58.        //letters: 52-61
  59.        keyFromScanCode[50] = 16777248;  //LShift
  60.        keyFromScanCode[52] = 90;           //Z
  61.        keyFromScanCode[53] = 88;           //X
  62.        keyFromScanCode[54] = 67;           //C
  63.        keyFromScanCode[55] = 86;           //V
  64.        keyFromScanCode[56] = 66;           //B
  65.        keyFromScanCode[57] = 78;           //N
  66.        keyFromScanCode[58] = 77;           //M
  67.        keyFromScanCode[59] = 44;           //,
  68.        keyFromScanCode[60] = 46;           //.
  69.        keyFromScanCode[61] = 47;           ///
  70.        keyFromScanCode[62] = 16777248;  //RShift
  71.  
  72.        keyFromScanCode[37] = 16777249;  //LCtrl
  73.        keyFromScanCode[64] = 16777251;  //LAlt
  74.        keyFromScanCode[65] = 32;           //Space
  75.        keyFromScanCode[108] = 16777251; //RAlt
  76.        keyFromScanCode[105] = 16777249; //RCtrl
  77.  
  78.        keyFromScanCode[113] = 16777234; //Left  Arrow
  79.        keyFromScanCode[116] = 16777237; //Down  Arrow
  80.        keyFromScanCode[114] = 16777236; //Right Arrow
  81.        keyFromScanCode[111] = 16777235; //Up    Arrow
  82.  
  83.        keyFromScanCode[22] = 16777219;  //Backspace
  84.        keyFromScanCode[118] = 16777222; //Insert
  85.        keyFromScanCode[110] = 16777232; //Home
  86.        keyFromScanCode[112] = 16777238; //Page Up
  87.        keyFromScanCode[119] = 16777223; //Delete
  88.        keyFromScanCode[115] = 16777233; //End
  89.        keyFromScanCode[117] = 16777239; //Page Down
  90.  
  91.        //NUM KEYS:
  92.  
  93.        keyFromScanCode[77] = 16777253;    //%
  94.        keyFromScanCode[106] = 47;         ///
  95.        keyFromScanCode[63] = 42;          //*
  96.        keyFromScanCode[82] = 45;          //-
  97.        keyFromScanCode[86] = 43;          //+
  98.        keyFromScanCode[104] = 16777221;   //
  99.        keyFromScanCode[91] = 46;          //.
  100.        keyFromScanCode[90] = 48;          //0
  101.        keyFromScanCode[87] = 49;          //1
  102.        keyFromScanCode[88] = 50;          //2
  103.        keyFromScanCode[89] = 51;          //3
  104.        keyFromScanCode[83] = 52;          //4
  105.        keyFromScanCode[84] = 53;          //5
  106.        keyFromScanCode[85] = 54;          //6
  107.        keyFromScanCode[79] = 55;          //7
  108.        keyFromScanCode[80] = 56;          //8
  109.        keyFromScanCode[81] = 57;          //9
  110. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top