Guest User

Untitled

a guest
Jul 15th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 3.01 KB | None | 0 0
  1.                 bool shift = (IsPressed(Keys.LeftShift) || IsPressed(Keys.RightShift));
  2.                 bool ctrl = (IsPressed(Keys.LeftControl) || IsPressed(Keys.RightControl));
  3.                 bool alt = (IsPressed(Keys.LeftAlt) || IsPressed(Keys.RightAlt));
  4.                 //Alphabet, Numbers, Space
  5.                 for (int i = 0; i < 26; i++)
  6.                 {
  7.                     if (IsTapped(Keys.A + i))
  8.                         if (shift)
  9.                         {
  10.                             currentString += (char)('A' + i);
  11.                             hasText = true;
  12.                         }
  13.                         else
  14.                         {
  15.                             currentString += (char)('a' + i);
  16.                             hasText = true;
  17.                         }
  18.  
  19.                     if (i <= 9 && (IsTapped(Keys.D0 + i) || IsTapped(Keys.NumPad0 + i)))
  20.                     {
  21.                         if (!shift)
  22.                         {
  23.                             currentString += (char)('0' + i);
  24.                             hasText = true;
  25.                         }
  26.                         else if (i == 1)
  27.                         {
  28.                             currentString += '!';
  29.                             hasText = true;
  30.                         }
  31.                         else if (i == 2)
  32.                         {
  33.                             currentString += '@';
  34.                             hasText = true;
  35.                         }
  36.                         else if (i == 3)
  37.                         {
  38.                             currentString += '#';
  39.                             hasText = true;
  40.                         }
  41.                         else if (i == 4)
  42.                         {
  43.                             currentString += '$';
  44.                             hasText = true;
  45.                         }
  46.                         else if (i == 5)
  47.                         {
  48.                             currentString += '%';
  49.                             hasText = true;
  50.                         }
  51.                         else if (i == 6)
  52.                         {
  53.                             currentString += '^';
  54.                             hasText = true;
  55.                         }
  56.                         else if (i == 7)
  57.                         {
  58.                             currentString += '&';
  59.                             hasText = true;
  60.                         }
  61.                         else if (i == 8)
  62.                         {
  63.                             currentString += '*';
  64.                             hasText = true;
  65.                         }
  66.                         else if (i == 9)
  67.                         {
  68.                             currentString += '(';
  69.                             hasText = true;
  70.                         }
  71.                         else if (i == 0)
  72.                         {
  73.                             currentString += ')';
  74.                             hasText = true;
  75.                         }
  76.                     }
  77.                 }
Add Comment
Please, Sign In to add comment