Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jul 29th, 2012  |  syntax: None  |  size: 17.94 KB  |  hits: 49  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #include <Windows.h>
  2. #include <iostream>
  3. #include <string>
  4.  
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9.         int Key[300] = {0};
  10.         while(0 == 0)
  11.         {
  12.                 if (GetAsyncKeyState(0x01) != Key[0])
  13.                 {
  14.                         if (Key[0] == 0)
  15.                         {
  16.                                 cout << "(Left Mouse)";
  17.                                 Key[0] = -32768;
  18.                         }
  19.                         else if (Key[0] == -32768)
  20.                         {
  21.                                 Key[0] = 0;
  22.                         }
  23.                 }
  24.                 else if (GetAsyncKeyState(0x02) != Key[1])
  25.                 {
  26.                         if (Key[1] == 0)
  27.                         {
  28.                                 cout << "(Right Mouse)";
  29.                                 Key[1] = -32768;
  30.                         }
  31.                         else if (Key[1] == -32768)
  32.                         {
  33.                                 Key[1] = 0;
  34.                         }
  35.                 }
  36.                 else if (GetAsyncKeyState(0x03) != Key[2])
  37.                 {
  38.                         if (Key[2] == 0)
  39.                         {
  40.                                 cout << "(Cancel)";
  41.                                 Key[2] = -32768;
  42.                         }
  43.                         else if (Key[2] == -32768)
  44.                         {
  45.                                 Key[2] = 0;
  46.                         }
  47.                 }
  48.                         else if (GetAsyncKeyState(0x04) != Key[3])
  49.                 {
  50.                         if (Key[3] == 0)
  51.                         {
  52.                                 cout << "(Middle Mouse)";
  53.                                 Key[3] = -32768;
  54.                         }
  55.                         else if (Key[3] == -32768)
  56.                         {
  57.                                 Key[3] = 0;
  58.                         }
  59.                 }
  60.                 else if (GetAsyncKeyState(0x05) != Key[4])
  61.                 {
  62.                         if (Key[4] == 0)
  63.                         {
  64.                                 cout << "(X1 Mouse)";
  65.                                 Key[4] = -32768;
  66.                         }
  67.                         else if (Key[4] == -32768)
  68.                         {
  69.                                 Key[4] = 0;
  70.                         }
  71.                 }
  72.                 else if (GetAsyncKeyState(0x06) != Key[5])
  73.                 {
  74.                         if (Key[5] == 0)
  75.                         {
  76.                                 cout << "(X2 Mouse)";
  77.                                 Key[5] = -32768;
  78.                         }
  79.                         else if (Key[5] == -32768)
  80.                         {
  81.                                 Key[5] = 0;
  82.                         }
  83.                 }
  84.                 else if (GetAsyncKeyState(0x07) != Key[6])
  85.                 {
  86.                         if (Key[6] == 0)
  87.                         {
  88.                                 cout << "(Undefined)";
  89.                                 Key[6] = -32768;
  90.                         }
  91.                         else if (Key[6] == -32768)
  92.                         {
  93.                                 Key[6] = 0;
  94.                         }
  95.                 }
  96.                 else if (GetAsyncKeyState(0x08) != Key[7])
  97.                 {
  98.                         if (Key[7] == 0)
  99.                         {
  100.                                 cout << "(Backspace)";
  101.                                 Key[7] = -32768;
  102.                         }
  103.                         else if (Key[7] == -32768)
  104.                         {
  105.                                 Key[7] = 0;
  106.                         }
  107.                 }
  108.                 else if (GetAsyncKeyState(0x09) != Key[8])
  109.                 {
  110.                         if (Key[8] == 0)
  111.                         {
  112.                                 cout << "(Tab)";
  113.                                 Key[8] = -32768;
  114.                         }
  115.                         else if (Key[8] == -32768)
  116.                         {
  117.                                 Key[8] = 0;
  118.                         }
  119.                 }
  120.                 else if (GetAsyncKeyState(0x0C) != Key[9])
  121.                 {
  122.                         if (Key[9] == 0)
  123.                         {
  124.                                 cout << "(Clear Key)";
  125.                                 Key[9] = -32768;
  126.                         }
  127.                         else if (Key[9] == -32768)
  128.                         {
  129.                                 Key[9] = 0;
  130.                         }
  131.                 }
  132.                 else if (GetAsyncKeyState(0x0D) != Key[10])
  133.                 {
  134.                         if (Key[10] == 0)
  135.                         {
  136.                                 cout << "(Enter)";
  137.                                 Key[10] = -32768;
  138.                         }
  139.                         else if (Key[10] == -32768)
  140.                         {
  141.                                 Key[10] = 0;
  142.                         }
  143.                 }
  144.                 else if (GetAsyncKeyState(0x10) != Key[11])
  145.                 {
  146.                         if (Key[11] == 0)
  147.                         {
  148.                                 cout << "(Shift)";
  149.                                 Key[11] = -32768;
  150.                         }
  151.                         else if (Key[11] == -32768)
  152.                         {
  153.                                 Key[11] = 0;
  154.                                 cout << "(Shift Released)";
  155.                         }
  156.                 }
  157.                 else if (GetAsyncKeyState(0x11) != Key[12])
  158.                 {
  159.                         if (Key[12] == 0)
  160.                         {
  161.                                 cout << "(Control)";
  162.                                 Key[12] = -32768;
  163.                         }
  164.                         else if (Key[12] == -32768)
  165.                         {
  166.                                 Key[12] = 0;
  167.                                 cout << "(Control Released)";
  168.                         }
  169.                 }
  170.                 else if (GetAsyncKeyState(0x12) != Key[13])
  171.                 {
  172.                         if (Key[13] == 0)
  173.                         {
  174.                                 cout << "(Alt)";
  175.                                 Key[13] = -32768;
  176.                         }
  177.                         else if (Key[13] == -32768)
  178.                         {
  179.                                 Key[13] = 0;
  180.                                 cout << "(Alt Released)";
  181.                         }
  182.                 }
  183.                 else if (GetAsyncKeyState(0x13) != Key[14])
  184.                 {
  185.                         if (Key[14] == 0)
  186.                         {
  187.                                 cout << "(Pause)";
  188.                                 Key[14] = -32768;
  189.                         }
  190.                         else if (Key[14] == -32768)
  191.                         {
  192.                                 Key[14] = 0;
  193.                         }
  194.                 }
  195.                 else if (GetAsyncKeyState(0x14) != Key[15])
  196.                 {
  197.                         if (Key[15] == 0)
  198.                         {
  199.                                 cout << "(Caps Lock)";
  200.                                 Key[15] = -32768;
  201.                         }
  202.                         else if (Key[15] == -32768)
  203.                         {
  204.                                 Key[15] = 0;
  205.                         }
  206.                 }
  207.                 else if (GetAsyncKeyState(0x1B) != Key[16])
  208.                 {
  209.                         if (Key[16] == 0)
  210.                         {
  211.                                 cout << "(Escape)";
  212.                                 Key[16] = -32768;
  213.                         }
  214.                         else if (Key[16] == -32768)
  215.                         {
  216.                                 Key[16] = 0;
  217.                         }
  218.                 }
  219.                 else if (GetAsyncKeyState(0x20) != Key[17])
  220.                 {
  221.                         if (Key[17] == 0)
  222.                         {
  223.                                 cout << " ";
  224.                                 Key[17] = -32768;
  225.                         }
  226.                         else if (Key[17] == -32768)
  227.                         {
  228.                                 Key[17] = 0;
  229.                         }
  230.                 }
  231.                 else if (GetAsyncKeyState(0x21) != Key[18])
  232.                 {
  233.                         if (Key[18] == 0)
  234.                         {
  235.                                 cout << "(Page Up)";
  236.                                 Key[18] = -32768;
  237.                         }
  238.                         else if (Key[18] == -32768)
  239.                         {
  240.                                 Key[18] = 0;
  241.                         }
  242.                 }
  243.                 else if (GetAsyncKeyState(0x22) != Key[19])
  244.                 {
  245.                         if (Key[19] == 0)
  246.                         {
  247.                                 cout << "(Page Down)";
  248.                                 Key[19] = -32768;
  249.                         }
  250.                         else if (Key[19] == -32768)
  251.                         {
  252.                                 Key[19] = 0;
  253.                         }
  254.                 }
  255.                 else if (GetAsyncKeyState(0x23) != Key[20])
  256.                 {
  257.                         if (Key[20] == 0)
  258.                         {
  259.                                 cout << "(End)";
  260.                                 Key[20] = -32768;
  261.                         }
  262.                         else if (Key[20] == -32768)
  263.                         {
  264.                                 Key[20] = 0;
  265.                         }
  266.                 }
  267.                 else if (GetAsyncKeyState(0x24) != Key[21])
  268.                 {
  269.                         if (Key[21] == 0)
  270.                         {
  271.                                 cout << "(Home)";
  272.                                 Key[21] = -32768;
  273.                         }
  274.                         else if (Key[21] == -32768)
  275.                         {
  276.                                 Key[21] = 0;
  277.                         }
  278.                 }
  279.                 else if (GetAsyncKeyState(0x25) != Key[22])
  280.                 {
  281.                         if (Key[22] == 0)
  282.                         {
  283.                                 cout << "(Left Arrow)";
  284.                                 Key[22] = -32768;
  285.                         }
  286.                         else if (Key[22] == -32768)
  287.                         {
  288.                                 Key[22] = 0;
  289.                         }
  290.                 }
  291.                 else if (GetAsyncKeyState(0x26) != Key[23])
  292.                 {
  293.                         if (Key[23] == 0)
  294.                         {
  295.                                 cout << "(Up Arrow)";
  296.                                 Key[23] = -32768;
  297.                         }
  298.                         else if (Key[23] == -32768)
  299.                         {
  300.                                 Key[23] = 0;
  301.                         }
  302.                 }
  303.                 else if (GetAsyncKeyState(0x27) != Key[24])
  304.                 {
  305.                         if (Key[24] == 0)
  306.                         {
  307.                                 cout << "(Right Arrow)";
  308.                                 Key[24] = -32768;
  309.                         }
  310.                         else if (Key[24] == -32768)
  311.                         {
  312.                                 Key[24] = 0;
  313.                         }
  314.                 }
  315.                 else if (GetAsyncKeyState(0x28) != Key[25])
  316.                 {
  317.                         if (Key[25] == 0)
  318.                         {
  319.                                 cout << "(Down Arrow)";
  320.                                 Key[25] = -32768;
  321.                         }
  322.                         else if (Key[25] == -32768)
  323.                         {
  324.                                 Key[25] = 0;
  325.                         }
  326.                 }
  327.                 else if (GetAsyncKeyState(0x29) != Key[26])
  328.                 {
  329.                         if (Key[26] == 0)
  330.                         {
  331.                                 cout << "(Select)";
  332.                                 Key[26] = -32768;
  333.                         }
  334.                         else if (Key[26] == -32768)
  335.                         {
  336.                                 Key[26] = 0;
  337.                         }
  338.                 }
  339.                 else if (GetAsyncKeyState(0x2A) != Key[27])
  340.                 {
  341.                         if (Key[27] == 0)
  342.                         {
  343.                                 cout << "(Print)";
  344.                                 Key[27] = -32768;
  345.                         }
  346.                         else if (Key[27] == -32768)
  347.                         {
  348.                                 Key[27] = 0;
  349.                         }
  350.                 }
  351.                 else if (GetAsyncKeyState(0x2B) != Key[28])
  352.                 {
  353.                         if (Key[28] == 0)
  354.                         {
  355.                                 cout << "(Execute)";
  356.                                 Key[28] = -32768;
  357.                         }
  358.                         else if (Key[28] == -32768)
  359.                         {
  360.                                 Key[28] = 0;
  361.                         }
  362.                 }
  363.                 else if (GetAsyncKeyState(0x2C) != Key[29])
  364.                 {
  365.                         if (Key[29] == 0)
  366.                         {
  367.                                 cout << "(Print Screen)";
  368.                                 Key[29] = -32768;
  369.                         }
  370.                         else if (Key[29] == -32768)
  371.                         {
  372.                                 Key[29] = 0;
  373.                         }
  374.                 }
  375.                 else if (GetAsyncKeyState(0x2D) != Key[30])
  376.                 {
  377.                         if (Key[30] == 0)
  378.                         {
  379.                                 cout << "(Insert)";
  380.                                 Key[30] = -32768;
  381.                         }
  382.                         else if (Key[30] == -32768)
  383.                         {
  384.                                 Key[30] = 0;
  385.                         }
  386.                 }
  387.                 else if (GetAsyncKeyState(0x2E) != Key[31])
  388.                 {
  389.                         if (Key[31] == 0)
  390.                         {
  391.                                 cout << "(Delete)";
  392.                                 Key[31] = -32768;
  393.                         }
  394.                         else if (Key[31] == -32768)
  395.                         {
  396.                                 Key[31] = 0;
  397.                         }
  398.                 }
  399.                 else if (GetAsyncKeyState(0x2F) != Key[32])
  400.                 {
  401.                         if (Key[32] == 0)
  402.                         {
  403.                                 cout << "(Help)";
  404.                                 Key[32] = -32768;
  405.                         }
  406.                         else if (Key[32] == -32768)
  407.                         {
  408.                                 Key[32] = 0;
  409.                         }
  410.                 }
  411.                 else if (GetAsyncKeyState(0x30) != Key[33])
  412.                 {
  413.                         if (Key[33] == 0)
  414.                         {
  415.                                 cout << "0";
  416.                                 Key[33] = -32768;
  417.                         }
  418.                         else if (Key[33] == -32768)
  419.                         {
  420.                                 Key[33] = 0;
  421.                         }
  422.                 }
  423.                 else if (GetAsyncKeyState(0x31) != Key[34])
  424.                 {
  425.                         if (Key[34] == 0)
  426.                         {
  427.                                 cout << "1";
  428.                                 Key[34] = -32768;
  429.                         }
  430.                         else if (Key[34] == -32768)
  431.                         {
  432.                                 Key[34] = 0;
  433.                         }
  434.                 }
  435.                 else if (GetAsyncKeyState(0x32) != Key[35])
  436.                 {
  437.                         if (Key[35] == 0)
  438.                         {
  439.                                 cout << "2";
  440.                                 Key[35] = -32768;
  441.                         }
  442.                         else if (Key[35] == -32768)
  443.                         {
  444.                                 Key[35] = 0;
  445.                         }
  446.                 }
  447.                 else if (GetAsyncKeyState(0x33) != Key[36])
  448.                 {
  449.                         if (Key[36] == 0)
  450.                         {
  451.                                 cout << "3";
  452.                                 Key[36] = -32768;
  453.                         }
  454.                         else if (Key[36] == -32768)
  455.                         {
  456.                                 Key[36] = 0;
  457.                         }
  458.                 }
  459.                 else if (GetAsyncKeyState(0x34) != Key[37])
  460.                 {
  461.                         if (Key[37] == 0)
  462.                         {
  463.                                 cout << "4";
  464.                                 Key[37] = -32768;
  465.                         }
  466.                         else if (Key[37] == -32768)
  467.                         {
  468.                                 Key[37] = 0;
  469.                         }
  470.                 }
  471.                 else if (GetAsyncKeyState(0x35) != Key[38])
  472.                 {
  473.                         if (Key[38] == 0)
  474.                         {
  475.                                 cout << "5";
  476.                                 Key[38] = -32768;
  477.                         }
  478.                         else if (Key[38] == -32768)
  479.                         {
  480.                                 Key[38] = 0;
  481.                         }
  482.                 }
  483.                 else if (GetAsyncKeyState(0x36) != Key[39])
  484.                 {
  485.                         if (Key[39] == 0)
  486.                         {
  487.                                 cout << "6";
  488.                                 Key[39] = -32768;
  489.                         }
  490.                         else if (Key[39] == -32768)
  491.                         {
  492.                                 Key[39] = 0;
  493.                         }
  494.                 }
  495.                 else if (GetAsyncKeyState(0x37) != Key[40])
  496.                 {
  497.                         if (Key[40] == 0)
  498.                         {
  499.                                 cout << "7";
  500.                                 Key[40] = -32768;
  501.                         }
  502.                         else if (Key[40] == -32768)
  503.                         {
  504.                                 Key[40] = 0;
  505.                         }
  506.                 }
  507.                 else if (GetAsyncKeyState(0x38) != Key[41])
  508.                 {
  509.                         if (Key[41] == 0)
  510.                         {
  511.                                 cout << "8";
  512.                                 Key[41] = -32768;
  513.                         }
  514.                         else if (Key[41] == -32768)
  515.                         {
  516.                                 Key[41] = 0;
  517.                         }
  518.                 }
  519.                 else if (GetAsyncKeyState(0x39) != Key[42])
  520.                 {
  521.                         if (Key[42] == 0)
  522.                         {
  523.                                 cout << "9";
  524.                                 Key[42] = -32768;
  525.                         }
  526.                         else if (Key[42] == -32768)
  527.                         {
  528.                                 Key[42] = 0;
  529.                         }
  530.                 }
  531.                 else if (GetAsyncKeyState(0x41) != Key[43])
  532.                 {
  533.                         if (Key[43] == 0)
  534.                         {
  535.                                 cout << "a";
  536.                                 Key[43] = -32768;
  537.                         }
  538.                         else if (Key[43] == -32768)
  539.                         {
  540.                                 Key[43] = 0;
  541.                         }
  542.                 }
  543.                 else if (GetAsyncKeyState(0x42) != Key[44])
  544.                 {
  545.                         if (Key[44] == 0)
  546.                         {
  547.                                 cout << "b";
  548.                                 Key[44] = -32768;
  549.                         }
  550.                         else if (Key[44] == -32768)
  551.                         {
  552.                                 Key[44] = 0;
  553.                         }
  554.                 }
  555.                 else if (GetAsyncKeyState(0x43) != Key[45])
  556.                 {
  557.                         if (Key[45] == 0)
  558.                         {
  559.                                 cout << "c";
  560.                                 Key[45] = -32768;
  561.                         }
  562.                         else if (Key[45] == -32768)
  563.                         {
  564.                                 Key[45] = 0;
  565.                         }
  566.                 }
  567.                 else if (GetAsyncKeyState(0x44) != Key[46])
  568.                 {
  569.                         if (Key[46] == 0)
  570.                         {
  571.                                 cout << "d";
  572.                                 Key[46] = -32768;
  573.                         }
  574.                         else if (Key[46] == -32768)
  575.                         {
  576.                                 Key[46] = 0;
  577.                         }
  578.                 }
  579.                 else if (GetAsyncKeyState(0x45) != Key[47])
  580.                 {
  581.                         if (Key[47] == 0)
  582.                         {
  583.                                 cout << "e";
  584.                                 Key[47] = -32768;
  585.                         }
  586.                         else if (Key[47] == -32768)
  587.                         {
  588.                                 Key[47] = 0;
  589.                         }
  590.                 }
  591.                 else if (GetAsyncKeyState(0x46) != Key[48])
  592.                 {
  593.                         if (Key[48] == 0)
  594.                         {
  595.                                 cout << "f";
  596.                                 Key[48] = -32768;
  597.                         }
  598.                         else if (Key[48] == -32768)
  599.                         {
  600.                                 Key[48] = 0;
  601.                         }
  602.                 }
  603.                 else if (GetAsyncKeyState(0x47) != Key[49])
  604.                 {
  605.                         if (Key[49] == 0)
  606.                         {
  607.                                 cout << "g";
  608.                                 Key[49] = -32768;
  609.                         }
  610.                         else if (Key[49] == -32768)
  611.                         {
  612.                                 Key[49] = 0;
  613.                         }
  614.                 }
  615.                 else if (GetAsyncKeyState(0x48) != Key[50])
  616.                 {
  617.                         if (Key[50] == 0)
  618.                         {
  619.                                 cout << "h";
  620.                                 Key[50] = -32768;
  621.                         }
  622.                         else if (Key[50] == -32768)
  623.                         {
  624.                                 Key[50] = 0;
  625.                         }
  626.                 }
  627.                 else if (GetAsyncKeyState(0x49) != Key[51])
  628.                 {
  629.                         if (Key[51] == 0)
  630.                         {
  631.                                 cout << "i";
  632.                                 Key[51] = -32768;
  633.                         }
  634.                         else if (Key[51] == -32768)
  635.                         {
  636.                                 Key[51] = 0;
  637.                         }
  638.                 }
  639.                 else if (GetAsyncKeyState(0x4a) != Key[52])
  640.                 {
  641.                         if (Key[52] == 0)
  642.                         {
  643.                                 cout << "j";
  644.                                 Key[52] = -32768;
  645.                         }
  646.                         else if (Key[52] == -32768)
  647.                         {
  648.                                 Key[52] = 0;
  649.                         }
  650.                 }
  651.                 else if (GetAsyncKeyState(0x4b) != Key[53])
  652.                 {
  653.                         if (Key[53] == 0)
  654.                         {
  655.                                 cout << "k";
  656.                                 Key[53] = -32768;
  657.                         }
  658.                         else if (Key[53] == -32768)
  659.                         {
  660.                                 Key[53] = 0;
  661.                         }
  662.                 }
  663.                 else if (GetAsyncKeyState(0x4c) != Key[54])
  664.                 {
  665.                         if (Key[54] == 0)
  666.                         {
  667.                                 cout << "l";
  668.                                 Key[54] = -32768;
  669.                         }
  670.                         else if (Key[54] == -32768)
  671.                         {
  672.                                 Key[54] = 0;
  673.                         }
  674.                 }
  675.                 else if (GetAsyncKeyState(0x4d) != Key[55])
  676.                 {
  677.                         if (Key[55] == 0)
  678.                         {
  679.                                 cout << "m";
  680.                                 Key[55] = -32768;
  681.                         }
  682.                         else if (Key[55] == -32768)
  683.                         {
  684.                                 Key[55] = 0;
  685.                         }
  686.                 }
  687.                 else if (GetAsyncKeyState(0x4e) != Key[56])
  688.                 {
  689.                         if (Key[56] == 0)
  690.                         {
  691.                                 cout << "n";
  692.                                 Key[56] = -32768;
  693.                         }
  694.                         else if (Key[56] == -32768)
  695.                         {
  696.                                 Key[56] = 0;
  697.                         }
  698.                 }
  699.                 else if (GetAsyncKeyState(0x4f) != Key[57])
  700.                 {
  701.                         if (Key[57] == 0)
  702.                         {
  703.                                 cout << "o";
  704.                                 Key[57] = -32768;
  705.                         }
  706.                         else if (Key[57] == -32768)
  707.                         {
  708.                                 Key[57] = 0;
  709.                         }
  710.                 }
  711.                 else if (GetAsyncKeyState(0x50) != Key[58])
  712.                 {
  713.                         if (Key[58] == 0)
  714.                         {
  715.                                 cout << "p";
  716.                                 Key[58] = -32768;
  717.                         }
  718.                         else if (Key[58] == -32768)
  719.                         {
  720.                                 Key[58] = 0;
  721.                         }
  722.                 }
  723.                 else if (GetAsyncKeyState(0x51) != Key[59])
  724.                 {
  725.                         if (Key[59] == 0)
  726.                         {
  727.                                 cout << "q";
  728.                                 Key[59] = -32768;
  729.                         }
  730.                         else if (Key[59] == -32768)
  731.                         {
  732.                                 Key[59] = 0;
  733.                         }
  734.                 }
  735.                 else if (GetAsyncKeyState(0x52) != Key[60])
  736.                 {
  737.                         if (Key[60] == 0)
  738.                         {
  739.                                 cout << "r";
  740.                                 Key[60] = -32768;
  741.                         }
  742.                         else if (Key[60] == -32768)
  743.                         {
  744.                                 Key[60] = 0;
  745.                         }
  746.                 }
  747.                 else if (GetAsyncKeyState(0x53) != Key[61])
  748.                 {
  749.                         if (Key[61] == 0)
  750.                         {
  751.                                 cout << "s";
  752.                                 Key[61] = -32768;
  753.                         }
  754.                         else if (Key[61] == -32768)
  755.                         {
  756.                                 Key[61] = 0;
  757.                         }
  758.                 }
  759.                 else if (GetAsyncKeyState(0x54) != Key[62])
  760.                 {
  761.                         if (Key[62] == 0)
  762.                         {
  763.                                 cout << "t";
  764.                                 Key[62] = -32768;
  765.                         }
  766.                         else if (Key[62] == -32768)
  767.                         {
  768.                                 Key[62] = 0;
  769.                         }
  770.                 }
  771.                 else if (GetAsyncKeyState(0x55) != Key[63])
  772.                 {
  773.                         if (Key[63] == 0)
  774.                         {
  775.                                 cout << "u";
  776.                                 Key[63] = -32768;
  777.                         }
  778.                         else if (Key[63] == -32768)
  779.                         {
  780.                                 Key[63] = 0;
  781.                         }
  782.                 }
  783.                 else if (GetAsyncKeyState(0x56) != Key[64])
  784.                 {
  785.                         if (Key[64] == 0)
  786.                         {
  787.                                 cout << "v";
  788.                                 Key[64] = -32768;
  789.                         }
  790.                         else if (Key[64] == -32768)
  791.                         {
  792.                                 Key[64] = 0;
  793.                         }
  794.                 }
  795.                 else if (GetAsyncKeyState(0x57) != Key[65])
  796.                 {
  797.                         if (Key[65] == 0)
  798.                         {
  799.                                 cout << "w";
  800.                                 Key[65] = -32768;
  801.                         }
  802.                         else if (Key[65] == -32768)
  803.                         {
  804.                                 Key[65] = 0;
  805.                         }
  806.                 }
  807.                 else if (GetAsyncKeyState(0x58) != Key[66])
  808.                 {
  809.                         if (Key[66] == 0)
  810.                         {
  811.                                 cout << "x";
  812.                                 Key[66] = -32768;
  813.                         }
  814.                         else if (Key[66] == -32768)
  815.                         {
  816.                                 Key[66] = 0;
  817.                         }
  818.                 }
  819.                 else if (GetAsyncKeyState(0x59) != Key[67])
  820.                 {
  821.                         if (Key[67] == 0)
  822.                         {
  823.                                 cout << "y";
  824.                                 Key[67] = -32768;
  825.                         }
  826.                         else if (Key[67] == -32768)
  827.                         {
  828.                                 Key[67] = 0;
  829.                         }
  830.                 }
  831.                 else if (GetAsyncKeyState(0x5A) != Key[68])
  832.                 {
  833.                         if (Key[68] == 0)
  834.                         {
  835.                                 cout << "z";
  836.                                 Key[68] = -32768;
  837.                         }
  838.                         else if (Key[68] == -32768)
  839.                         {
  840.                                 Key[68] = 0;
  841.                         }
  842.                 }
  843.                 else if (GetAsyncKeyState(0x60) != Key[69])
  844.                 {
  845.                         if (Key[69] == 0)
  846.                         {
  847.                                 cout << "0";
  848.                                 Key[69] = -32768;
  849.                         }
  850.                         else if (Key[69] == -32768)
  851.                         {
  852.                                 Key[69] = 0;
  853.                         }
  854.                 }
  855.                 else if (GetAsyncKeyState(0x61) != Key[70])
  856.                 {
  857.                         if (Key[70] == 0)
  858.                         {
  859.                                 cout << "1";
  860.                                 Key[70] = -32768;
  861.                         }
  862.                         else if (Key[70] == -32768)
  863.                         {
  864.                                 Key[70] = 0;
  865.                         }
  866.                 }
  867.                 else if (GetAsyncKeyState(0x62) != Key[71])
  868.                 {
  869.                         if (Key[71] == 0)
  870.                         {
  871.                                 cout << "2";
  872.                                 Key[71] = -32768;
  873.                         }
  874.                         else if (Key[71] == -32768)
  875.                         {
  876.                                 Key[71] = 0;
  877.                         }
  878.                 }
  879.                 else if (GetAsyncKeyState(0x63) != Key[72])
  880.                 {
  881.                         if (Key[72] == 0)
  882.                         {
  883.                                 cout << "3";
  884.                                 Key[72] = -32768;
  885.                         }
  886.                         else if (Key[72] == -32768)
  887.                         {
  888.                                 Key[72] = 0;
  889.                         }
  890.                 }
  891.                 else if (GetAsyncKeyState(0x64) != Key[73])
  892.                 {
  893.                         if (Key[73] == 0)
  894.                         {
  895.                                 cout << "4";
  896.                                 Key[73] = -32768;
  897.                         }
  898.                         else if (Key[73] == -32768)
  899.                         {
  900.                                 Key[73] = 0;
  901.                         }
  902.                 }
  903.                 else if (GetAsyncKeyState(0x65) != Key[74])
  904.                 {
  905.                         if (Key[74] == 0)
  906.                         {
  907.                                 cout << "5";
  908.                                 Key[74] = -32768;
  909.                         }
  910.                         else if (Key[74] == -32768)
  911.                         {
  912.                                 Key[74] = 0;
  913.                         }
  914.                 }
  915.                 else if (GetAsyncKeyState(0x66) != Key[75])
  916.                 {
  917.                         if (Key[75] == 0)
  918.                         {
  919.                                 cout << "6";
  920.                                 Key[75] = -32768;
  921.                         }
  922.                         else if (Key[75] == -32768)
  923.                         {
  924.                                 Key[75] = 0;
  925.                         }
  926.                 }
  927.                 else if (GetAsyncKeyState(0x67) != Key[76])
  928.                 {
  929.                         if (Key[76] == 0)
  930.                         {
  931.                                 cout << "7";
  932.                                 Key[76] = -32768;
  933.                         }
  934.                         else if (Key[76] == -32768)
  935.                         {
  936.                                 Key[76] = 0;
  937.                         }
  938.                 }
  939.                 else if (GetAsyncKeyState(0x68) != Key[77])
  940.                 {
  941.                         if (Key[77] == 0)
  942.                         {
  943.                                 cout << "8";
  944.                                 Key[77] = -32768;
  945.                         }
  946.                         else if (Key[77] == -32768)
  947.                         {
  948.                                 Key[77] = 0;
  949.                         }
  950.                 }
  951.                 else if (GetAsyncKeyState(0x69) != Key[78])
  952.                 {
  953.                         if (Key[78] == 0)
  954.                         {
  955.                                 cout << "9";
  956.                                 Key[78] = -32768;
  957.                         }
  958.                         else if (Key[78] == -32768)
  959.                         {
  960.                                 Key[78] = 0;
  961.                         }
  962.                 }
  963.                 else if (GetAsyncKeyState(0x70) != Key[79])
  964.                 {
  965.                         if (Key[79] == 0)
  966.                         {
  967.                                 cout << "(F1)";
  968.                                 Key[79] = -32768;
  969.                         }
  970.                         else if (Key[79] == -32768)
  971.                         {
  972.                                 Key[79] = 0;
  973.                         }
  974.                 }
  975.                 else if (GetAsyncKeyState(0x71) != Key[80])
  976.                 {
  977.                         if (Key[80] == 0)
  978.                         {
  979.                                 cout << "(F2)";
  980.                                 Key[80] = -32768;
  981.                         }
  982.                         else if (Key[80] == -32768)
  983.                         {
  984.                                 Key[80] = 0;
  985.                         }
  986.                 }
  987.                 else if (GetAsyncKeyState(0x72) != Key[81])
  988.                 {
  989.                         if (Key[81] == 0)
  990.                         {
  991.                                 cout << "(F3)";
  992.                                 Key[81] = -32768;
  993.                         }
  994.                         else if (Key[81] == -32768)
  995.                         {
  996.                                 Key[81] = 0;
  997.                         }
  998.                 }
  999.                 else if (GetAsyncKeyState(0x73) != Key[82])
  1000.                 {
  1001.                         if (Key[82] == 0)
  1002.                         {
  1003.                                 cout << "(F4)";
  1004.                                 Key[82] = -32768;
  1005.                         }
  1006.                         else if (Key[82] == -32768)
  1007.                         {
  1008.                                 Key[82] = 0;
  1009.                         }
  1010.                 }
  1011.                 else if (GetAsyncKeyState(0x74) != Key[83])
  1012.                 {
  1013.                         if (Key[83] == 0)
  1014.                         {
  1015.                                 cout << "(F5)";
  1016.                                 Key[83] = -32768;
  1017.                         }
  1018.                         else if (Key[83] == -32768)
  1019.                         {
  1020.                                 Key[83] = 0;
  1021.                         }
  1022.                 }
  1023.                 else if (GetAsyncKeyState(0x75) != Key[84])
  1024.                 {
  1025.                         if (Key[84] == 0)
  1026.                         {
  1027.                                 cout << "(F6)";
  1028.                                 Key[84] = -32768;
  1029.                         }
  1030.                         else if (Key[84] == -32768)
  1031.                         {
  1032.                                 Key[84] = 0;
  1033.                         }
  1034.                 }
  1035.                 else if (GetAsyncKeyState(0x76) != Key[85])
  1036.                 {
  1037.                         if (Key[85] == 0)
  1038.                         {
  1039.                                 cout << "(F7)";
  1040.                                 Key[85] = -32768;
  1041.                         }
  1042.                         else if (Key[85] == -32768)
  1043.                         {
  1044.                                 Key[85] = 0;
  1045.                         }
  1046.                 }
  1047.                 else if (GetAsyncKeyState(0x77) != Key[86])
  1048.                 {
  1049.                         if (Key[86] == 0)
  1050.                         {
  1051.                                 cout << "(F8)";
  1052.                                 Key[86] = -32768;
  1053.                         }
  1054.                         else if (Key[86] == -32768)
  1055.                         {
  1056.                                 Key[86] = 0;
  1057.                         }
  1058.                 }
  1059.                 else if (GetAsyncKeyState(0x78) != Key[87])
  1060.                 {
  1061.                         if (Key[87] == 0)
  1062.                         {
  1063.                                 cout << "(F9)";
  1064.                                 Key[87] = -32768;
  1065.                         }
  1066.                         else if (Key[87] == -32768)
  1067.                         {
  1068.                                 Key[87] = 0;
  1069.                         }
  1070.                 }
  1071.                 else if (GetAsyncKeyState(0x79) != Key[88])
  1072.                 {
  1073.                         if (Key[88] == 0)
  1074.                         {
  1075.                                 cout << "(F10)";
  1076.                                 Key[88] = -32768;
  1077.                         }
  1078.                         else if (Key[88] == -32768)
  1079.                         {
  1080.                                 Key[88] = 0;
  1081.                         }
  1082.                 }
  1083.                 else if (GetAsyncKeyState(0x7A) != Key[89])
  1084.                 {
  1085.                         if (Key[89] == 0)
  1086.                         {
  1087.                                 cout << "(F11)";
  1088.                                 Key[89] = -32768;
  1089.                         }
  1090.                         else if (Key[89] == -32768)
  1091.                         {
  1092.                                 Key[89] = 0;
  1093.                         }
  1094.                 }
  1095.                 else if (GetAsyncKeyState(0x7B) != Key[90])
  1096.                 {
  1097.                         if (Key[90] == 0)
  1098.                         {
  1099.                                 cout << "(F12)";
  1100.                                 Key[90] = -32768;
  1101.                         }
  1102.                         else if (Key[90] == -32768)
  1103.                         {
  1104.                                 Key[90] = 0;
  1105.                         }
  1106.                 }
  1107.                 else if (GetAsyncKeyState(0x82) != Key[91])
  1108.                 {
  1109.                         if (Key[91] == 0)
  1110.                         {
  1111.                                 cout << "(Figure this one out #1)";
  1112.                                 Key[91] = -32768;
  1113.                         }
  1114.                         else if (Key[91] == -32768)
  1115.                         {
  1116.                                 Key[91] = 0;
  1117.                         }
  1118.                 }
  1119.         }
  1120. }