Changed key and button storage

All keys are stored as lowercased keys (converted to integers). The
touch presses were associated with a button (left mouse button, right
mouse button, etc.). These are now stored as a single integer.