<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff></diff>
      <filename>code/InfiniminerClient/Content/menus/tex_menu_help.png</filename>
    </modified>
    <modified>
      <diff>@@ -97,6 +97,8 @@ Content\icons\tex_icon_beacon.xnb
 Content\icons\tex_icon_road.xnb
 Content\ui\tex_radar_north.xnb
 Content\menus\tex_menu_settings.xnb
+Content\blocks\tex_block_road_top.xnb
+Content\blocks\tex_block_road_bottom.xnb
 Content\font_04b08.xnb
 Content\font_04b03b.xnb
 Content\sounds\build.xnb
@@ -115,6 +117,4 @@ Content\sounds\teleport.xnb
 Content\sounds\radar-high.xnb
 Content\sounds\radar-low.xnb
 Content\song_title.xnb
-Content\blocks\tex_block_road_top.xnb
-Content\blocks\tex_block_road_bottom.xnb
 Content\song_title.wma</diff>
      <filename>code/InfiniminerClient/InfiniminerClient.csproj.Debug.cachefile</filename>
    </modified>
    <modified>
      <diff>@@ -2,7 +2,6 @@ using System;
 using System.Collections.Generic;
 using System.Net;
 using System.IO;
-//using System.Windows.Forms;
 using System.Threading;
 using Microsoft.Xna.Framework;
 using Microsoft.Xna.Framework.Audio;
@@ -32,8 +31,6 @@ namespace Infiniminer
         public bool NoSound = false;
         public float mouseSensitivity = 0.005f;
 
-        //public Dictionary&lt;Buttons, Keys&gt; keyBinds = new Dictionary&lt;Buttons, Keys&gt;();
-        //public Dictionary&lt;Buttons, MouseButton&gt; mouseBinds = new Dictionary&lt;Buttons, MouseButton&gt;();
         public KeyBindHandler keyBinds = new KeyBindHandler();
 
         public bool anyPacketsReceived = false;
@@ -432,7 +429,7 @@ namespace Infiniminer
             BlockType upperBlock = propertyBag.blockEngine.BlockAtPoint(movePosition);
             if (upperBlock == BlockType.Lava || lowerBlock == BlockType.Lava || midBlock == BlockType.Lava)
             {
-                propertyBag.KillPlayer(Defines.deathByLava);//&quot;HAD AN UNFORTUNATE SMELTING ACCIDENT&quot;);////&quot;WAS INCINERATED BY LAVA!&quot;);
+                propertyBag.KillPlayer(Defines.deathByLava);
             }
         }
 </diff>
      <filename>code/InfiniminerClient/InfiniminerGame.cs</filename>
    </modified>
    <modified>
      <diff>@@ -37,6 +37,10 @@ namespace InterfaceItems
             _P = pb;
         }
 
+        public virtual void OnCharEntered(EventInput.CharacterEventArgs e)
+        {
+        }
+
         public virtual void OnKeyDown(Keys key)
         {
         }</diff>
      <filename>code/InfiniminerClient/InterfaceItems/InterfaceElement.cs</filename>
    </modified>
    <modified>
      <diff>@@ -23,24 +23,24 @@ namespace InterfaceItems
         public string value = &quot;&quot;;
         private bool partialInFocus = false;
         private bool inFocus=false;
-        Infiniminer.KeyMap keyMap;
+        //Infiniminer.KeyMap keyMap;
 
         public InterfaceTextInput()
         {
-            keyMap = new Infiniminer.KeyMap();
+            //keyMap = new Infiniminer.KeyMap();
         }
 
         public InterfaceTextInput(Infiniminer.InfiniminerGame gameInstance)
         {
             uiFont = gameInstance.Content.Load&lt;SpriteFont&gt;(&quot;font_04b08&quot;);
-            keyMap = new Infiniminer.KeyMap();
+            //keyMap = new Infiniminer.KeyMap();
         }
 
         public InterfaceTextInput(Infiniminer.InfiniminerGame gameInstance, Infiniminer.PropertyBag pb)
         {
             uiFont = gameInstance.Content.Load&lt;SpriteFont&gt;(&quot;font_04b08&quot;);
             _P = pb;
-            keyMap = new Infiniminer.KeyMap();
+            //keyMap = new Infiniminer.KeyMap();
         }
 
         public override void OnMouseDown(MouseButton button, int x, int y)
@@ -61,6 +61,18 @@ namespace InterfaceItems
             partialInFocus = false;
         }
 
+        public override void OnCharEntered(EventInput.CharacterEventArgs e)
+        {
+            base.OnCharEntered(e);
+            if ((int)e.Character &lt; 32 || (int)e.Character &gt; 126) //From space to tilde
+                return; //Do nothing
+
+            if (inFocus)
+            {
+                value += e.Character;
+            }
+        }
+
         public override void OnKeyDown(Keys key)
         {
             base.OnKeyDown(key);
@@ -73,10 +85,10 @@ namespace InterfaceItems
                 }
                 else if (key == Keys.Back&amp;&amp;value.Length&gt;0)
                     value = value.Substring(0, value.Length - 1);
-                else if (keyMap.IsKeyMapped(key))
+                /*else if (keyMap.IsKeyMapped(key))
                 {
                     value += keyMap.TranslateKey(key, Keyboard.GetState().IsKeyDown(Keys.LeftShift) || Keyboard.GetState().IsKeyDown(Keys.RightShift));
-                }
+                }*/
             }
         }
 </diff>
      <filename>code/InfiniminerClient/InterfaceItems/InterfaceTextInput.cs</filename>
    </modified>
    <modified>
      <diff>@@ -7,6 +7,7 @@ namespace Infiniminer
 {
     public class KeyBindHandler
     {
+        //Cases where there are multiple keys under the same name
         enum SpecialKeys
         {
             Control,
@@ -31,6 +32,63 @@ namespace Infiniminer
             return false;
         }
 
+        public bool IsPressed(Buttons button)
+        {
+            KeyboardState state = Keyboard.GetState();
+            foreach (Keys key in keyBinds.Keys)
+            {
+                if (keyBinds[key] == button)
+                {
+                    if (state.IsKeyDown(key))
+                        return true;
+                }
+            }
+            MouseState ms = Mouse.GetState();
+            foreach (MouseButton mb in mouseBinds.Keys)
+            {
+                if (mouseBinds[mb] == button)
+                {
+                    switch (mb)
+                    {
+                        case MouseButton.LeftButton:
+                            if (ms.LeftButton == ButtonState.Pressed)
+                                return true;
+                            break;
+                        case MouseButton.MiddleButton:
+                            if (ms.MiddleButton == ButtonState.Pressed)
+                                return true;
+                            break;
+                        case MouseButton.RightButton:
+                            if (ms.RightButton == ButtonState.Pressed)
+                                return true;
+                            break;
+                    }
+                }
+            }
+            foreach (SpecialKeys key in specialKeyBinds.Keys)
+            {
+                if (specialKeyBinds[key] == button)
+                {
+                    switch (key)
+                    {
+                        case SpecialKeys.Alt:
+                            if (state.IsKeyDown(Keys.LeftAlt) || state.IsKeyDown(Keys.RightAlt))
+                                return true;
+                            break;
+                        case SpecialKeys.Control:
+                            if (state.IsKeyDown(Keys.LeftControl) || state.IsKeyDown(Keys.RightControl))
+                                return true;
+                            break;
+                        case SpecialKeys.Shift:
+                            if (state.IsKeyDown(Keys.LeftShift) || state.IsKeyDown(Keys.RightShift))
+                                return true;
+                            break;
+                    }
+                }
+            }
+            return false;
+        }
+
         public bool IsBound(Buttons button, MouseButton mb)
         {
             if (mouseBinds.ContainsKey(mb) &amp;&amp; mouseBinds[mb] == button)
@@ -103,6 +161,7 @@ namespace Infiniminer
         }
 
         //Note that multiple binds to the same key won't work right now due to the way DatafileWriter handles input and how Dictionary works
+        //Macro support is a future goal
         public void SaveBinds(DatafileWriter output, string filename)
         {
             foreach (Keys key in keyBinds.Keys)</diff>
      <filename>code/InfiniminerClient/KeyBindHandler.cs</filename>
    </modified>
    <modified>
      <diff>@@ -6,7 +6,7 @@ using System.Diagnostics;
 using Microsoft.Xna.Framework;
 using Microsoft.Xna.Framework.Input;
 
-namespace Infiniminer
+namespace Infiniminer1
 {
     public class KeyMap
     {</diff>
      <filename>code/InfiniminerClient/KeyMap.cs</filename>
    </modified>
    <modified>
      <diff>@@ -497,20 +497,25 @@ namespace Infiniminer
 
         public void SetPlayerClass(PlayerClass playerClass)
         {
-            if (netClient.Status != NetConnectionStatus.Connected)
-                return;
+            if (this.playerClass != playerClass)
+            {
+                if (netClient.Status != NetConnectionStatus.Connected)
+                    return;
 
-            this.playerClass = playerClass;
+                this.playerClass = playerClass;
 
-            NetBuffer msgBuffer = netClient.CreateBuffer();
-            msgBuffer.Write((byte)InfiniminerMessage.SelectClass);
-            msgBuffer.Write((byte)playerClass);
-            netClient.SendMessage(msgBuffer, NetChannel.ReliableUnordered);
+                NetBuffer msgBuffer = netClient.CreateBuffer();
+                msgBuffer.Write((byte)InfiniminerMessage.SelectClass);
+                msgBuffer.Write((byte)playerClass);
+                netClient.SendMessage(msgBuffer, NetChannel.ReliableUnordered);
 
-            playerToolSelected = 0;
-            playerBlockSelected = 0;
+                playerToolSelected = 0;
+                playerBlockSelected = 0;
 
-            equipWeps();
+                equipWeps();
+            }
+            this.KillPlayer(&quot;&quot;);
+            this.RespawnPlayer();
         }
 
         public void FireRadar()</diff>
      <filename>code/InfiniminerClient/PropertyBag.cs</filename>
    </modified>
    <modified>
      <diff>@@ -124,22 +124,6 @@ namespace StateMasher
                 if (newState != null)
                     ChangeState(newState);
 
-                // Check for keyboard events.
-                /*KeyboardState keyState = Keyboard.GetState();
-                Dictionary&lt;Keys, bool&gt; keysDownNow = new Dictionary&lt;Keys, bool&gt;();
-                foreach (Keys k in keyState.GetPressedKeys())
-                    keysDownNow.Add(k, true);
-                if (WindowHasFocus())
-                {
-                    foreach (Keys k in keysDownNow.Keys)
-                        if (!keysDown.ContainsKey(k))
-                            currentState.OnKeyDown(k);
-                    foreach (Keys k in keysDown.Keys)
-                        if (!keysDownNow.ContainsKey(k))
-                            currentState.OnKeyUp(k);
-                }
-                keysDown = keysDownNow;*/
-
                 // Check for mouse events.
                 MouseState msNew = Mouse.GetState();
                 if (WindowHasFocus())</diff>
      <filename>code/InfiniminerClient/StateMasher/StateMachine.cs</filename>
    </modified>
    <modified>
      <diff>@@ -26,7 +26,8 @@ namespace Infiniminer.States
 	        new ClickRegion(new Rectangle(54,168,142,190), &quot;miner&quot;), 
 	        new ClickRegion(new Rectangle(300,169,142,190), &quot;prospector&quot;), 
 	        new ClickRegion(new Rectangle(580,170,133,187), &quot;engineer&quot;), 
-	        new ClickRegion(new Rectangle(819,172,133,190), &quot;sapper&quot;)
+	        new ClickRegion(new Rectangle(819,172,133,190), &quot;sapper&quot;)//,
+            //new ClickRegion(new Rectangle(0,0,0,0), &quot;cancel&quot;)
         };
 
         public override void OnEnter(string oldState)
@@ -41,12 +42,12 @@ namespace Infiniminer.States
                                      1024,
                                      1024);
 
-            _P.KillPlayer(&quot;&quot;);
+            //_P.KillPlayer(&quot;&quot;);
         }
 
         public override void OnLeave(string newState)
         {
-            _P.RespawnPlayer();
+            //_P.RespawnPlayer();
         }
 
         public override string OnUpdate(GameTime gameTime, KeyboardState keyState, MouseState mouseState)
@@ -111,6 +112,10 @@ namespace Infiniminer.States
                     nextState = &quot;Infiniminer.States.MainGameState&quot;;
                     _P.PlaySound(InfiniminerSound.ClickHigh);
                     break;
+                case &quot;cancel&quot;:
+                    nextState = &quot;Infiniminer.States.MainGameState&quot;;
+                    _P.PlaySound(InfiniminerSound.ClickHigh);
+                    break;
             }
         }
 </diff>
      <filename>code/InfiniminerClient/States/ClassSelectionState.cs</filename>
    </modified>
    <modified>
      <diff>@@ -27,13 +27,10 @@ namespace Infiniminer.States
 
         string nextState = null;
         bool mouseInitialized = false;
-        //KeyMap keyMap;
 
         public override void OnEnter(string oldState)
         {
             _SM.IsMouseVisible = false;
-
-            //keyMap = new KeyMap();
         }
 
         public override void OnLeave(string newState)
@@ -75,8 +72,8 @@ namespace Infiniminer.States
                     if ((_SM as InfiniminerGame).InvertMouseYAxis)
                         dy = -dy;
 
-                    _P.playerCamera.Yaw -= dx * _P.mouseSensitivity;//0.005f;
-                    _P.playerCamera.Pitch = (float)Math.Min(Math.PI * 0.49, Math.Max(-Math.PI * 0.49, _P.playerCamera.Pitch - dy * _P.mouseSensitivity));//0.005f));
+                    _P.playerCamera.Yaw -= dx * _P.mouseSensitivity;
+                    _P.playerCamera.Pitch = (float)Math.Min(Math.PI * 0.49, Math.Max(-Math.PI * 0.49, _P.playerCamera.Pitch - dy * _P.mouseSensitivity));
                 }
                 else
                 {
@@ -92,10 +89,6 @@ namespace Infiniminer.States
             {
                 _P.FirePickaxe();
                 _P.playerToolCooldown = _P.GetToolCooldown(PlayerTools.Pickaxe) * (_P.playerClass == PlayerClass.Miner ? 0.4f : 1.0f);
-                /*if (_P.playerClass == PlayerClass.Miner)
-                    _P.playerToolCooldown = _P.GetToolCooldown(PlayerTools.Pickaxe) * 0.4f;
-                else
-                    _P.playerToolCooldown = _P.GetToolCooldown(PlayerTools.Pickaxe);*/
             }
 
             // Prospector radar stuff.
@@ -116,7 +109,7 @@ namespace Infiniminer.States
             if (!_P.playerDead)
                 UpdatePlayerPosition(gameTime, keyState);
 
-            // Update the camera regardless of if we&quot;re alive or not.
+            // Update the camera regardless of if we're alive or not.
             _P.UpdateCamera(gameTime);
 
             return nextState;
@@ -149,7 +142,7 @@ namespace Infiniminer.States
                     }
                     else if (fallDamage &gt; 0.5)
                     {
-                        // Fall damage of 0.5 maps to a screenEffectCounter value of 2, meaning that the effect doesn&quot;t appear.
+                        // Fall damage of 0.5 maps to a screenEffectCounter value of 2, meaning that the effect doesn't appear.
                         // Fall damage of 1.0 maps to a screenEffectCounter value of 0, making the effect very strong.
                         if (standingOnBlock != BlockType.Jump)
                         {
@@ -168,7 +161,7 @@ namespace Infiniminer.States
                 }
 
                 // If the player is stuck in the ground, bring them out.
-                // This happens because we&quot;re standing on a block at -1.5, but stuck in it at -1.4, so -1.45 is the sweet spot.
+                // This happens because we're standing on a block at -1.5, but stuck in it at -1.4, so -1.45 is the sweet spot.
                 if (_P.blockEngine.SolidAtPointForPlayer(footPosition))
                 {
                     int blockOn = (int)(footPosition.Y);
@@ -189,20 +182,8 @@ namespace Infiniminer.States
                         movingOnRoad = true;
                         break;
 
-                    //case BlockType.Teleporter:
-                    //    if (!_P.playerDead)
-                    //    {
-                    //        _P.Teleport();
-                    //        _P.PlaySoundForEveryone(InfiniminerSound.Teleporter, _P.playerPosition);
-                    //    }
-                    //    break;
-
-                    //case BlockType.Shock:
-                    //    _P.KillPlayer(&quot;WAS ELECTROCUTED!&quot;);
-                    //    return;
-
                     case BlockType.Lava:
-                        _P.KillPlayer(Defines.deathByLava);//&quot;WAS INCINERATED BY LAVA!&quot;);
+                        _P.KillPlayer(Defines.deathByLava);
                         return;
                 }
 
@@ -210,11 +191,11 @@ namespace Infiniminer.States
                 switch (hittingHeadOnBlock)
                 {
                     case BlockType.Shock:
-                        _P.KillPlayer(Defines.deathByElec);//&quot;WAS ELECTROCUTED!&quot;);
+                        _P.KillPlayer(Defines.deathByElec);
                         return;
 
                     case BlockType.Lava:
-                        _P.KillPlayer(Defines.deathByLava);//&quot;WAS INCINERATED BY LAVA!&quot;);
+                        _P.KillPlayer(Defines.deathByLava);
                         return;
                 }
             }
@@ -223,7 +204,7 @@ namespace Infiniminer.States
             // Death by falling off the map.
             if (_P.playerPosition.Y &lt; -30)
             {
-                _P.KillPlayer(Defines.deathByMiss);//&quot;WAS KILLED BY MISADVENTURE!&quot;);
+                _P.KillPlayer(Defines.deathByMiss);
                 return;
             }
 
@@ -232,17 +213,17 @@ namespace Infiniminer.States
 
             if (_P.chatMode == ChatMessageType.None)
             {
-                if (keyState.IsKeyDown(Keys.W))
+                if ((_SM as InfiniminerGame).keyBinds.IsPressed(Buttons.Forward))//keyState.IsKeyDown(Keys.W))
                     moveVector += _P.playerCamera.GetLookVector();
-                if (keyState.IsKeyDown(Keys.S))
+                if ((_SM as InfiniminerGame).keyBinds.IsPressed(Buttons.Backward))//keyState.IsKeyDown(Keys.S))
                     moveVector -= _P.playerCamera.GetLookVector();
-                if (keyState.IsKeyDown(Keys.D))
+                if ((_SM as InfiniminerGame).keyBinds.IsPressed(Buttons.Right))//keyState.IsKeyDown(Keys.D))
                     moveVector += _P.playerCamera.GetRightVector();
-                if (keyState.IsKeyDown(Keys.A))
+                if ((_SM as InfiniminerGame).keyBinds.IsPressed(Buttons.Left))//keyState.IsKeyDown(Keys.A))
                     moveVector -= _P.playerCamera.GetRightVector();
-                /*//Sprinting
-                if (keyState.IsKeyDown(Keys.LeftShift) || keyState.IsKeyDown(Keys.RightShift))
-                    sprinting = true;*/
+                //Sprinting
+                if ((_SM as InfiniminerGame).keyBinds.IsPressed(Buttons.Sprint))//keyState.IsKeyDown(Keys.LeftShift) || keyState.IsKeyDown(Keys.RightShift))
+                    sprinting = true;
             }
 
             if (moveVector.X != 0 || moveVector.Z != 0)
@@ -255,7 +236,7 @@ namespace Infiniminer.States
                     moveVector *= 2;
                 // Sprinting doubles speed, even if already on road
                 if (sprinting)
-                    moveVector *= 2;
+                    moveVector *= 1.5f;
 
                 // Attempt to move, doing collision stuff.
                 if (TryToMoveTo(moveVector, gameTime)) { }
@@ -283,32 +264,19 @@ namespace Infiniminer.States
                 return true;
             }
 
-            // It&quot;s solid there, so while we can&quot;t move we have officially collided with it.
+            // It's solid there, so while we can't move we have officially collided with it.
             BlockType lowerBlock = _P.blockEngine.BlockAtPoint(lowerBodyPoint);
             BlockType midBlock = _P.blockEngine.BlockAtPoint(midBodyPoint);
             BlockType upperBlock = _P.blockEngine.BlockAtPoint(movePosition);
 
-            //// It&quot;s solid there, so see if it&quot;s a spike block. If so, touching it will kill us!
-            //if (upperBlock == BlockType.Shock || lowerBlock == BlockType.Shock || midBlock == BlockType.Shock)
-            //{
-            //    _P.KillPlayer(&quot;WAS ELECTROCUTED!&quot;);
-            //    return true;
-            //}
-
-            // It&quot;s solid there, so see if it&quot;s a lava block. If so, touching it will kill us!
+            // It's solid there, so see if it's a lava block. If so, touching it will kill us!
             if (upperBlock == BlockType.Lava || lowerBlock == BlockType.Lava || midBlock == BlockType.Lava)
             {
-                _P.KillPlayer(Defines.deathByLava);//&quot;WAS INCINERATED BY LAVA!&quot;);
+                _P.KillPlayer(Defines.deathByLava);
                 return true;
             }
 
-            //// If it&quot;s our home block, deposit our money.
-            //if ((upperBlock == BlockType.HomeRed || lowerBlock == BlockType.HomeRed || midBlock == BlockType.HomeRed) &amp;&amp; _P.playerTeam == PlayerTeam.Red)
-            //    _P.DepositLoot();
-            //if ((upperBlock == BlockType.HomeBlue || lowerBlock == BlockType.HomeBlue || midBlock == BlockType.HomeBlue) &amp;&amp; _P.playerTeam == PlayerTeam.Blue)
-            //    _P.DepositLoot();
-
-            // If it&quot;s a ladder, move up.
+            // If it's a ladder, move up.
             if (upperBlock == BlockType.Ladder || lowerBlock == BlockType.Ladder || midBlock == BlockType.Ladder)
             {
                 _P.playerVelocity.Y = CLIMBVELOCITY;
@@ -353,12 +321,6 @@ namespace Infiniminer.States
                         _P.chatEntryBuffer += e.Character;
                     }
             }
-            /*else if (e.Character.ToString().ToLower().Equals(&quot;y&quot;))
-            {
-                _P.chatMode = ChatMessageType.SayAll;
-            }else if (e.Character.ToString().ToLower().Equals(&quot;u&quot;))
-                _P.chatMode = _P.playerTeam == PlayerTeam.Red ? ChatMessageType.SayRedTeam : ChatMessageType.SayBlueTeam;
-            */
         }
 
         private void HandleInput(Buttons input)
@@ -420,16 +382,19 @@ namespace Infiniminer.States
                     break;
                 case Buttons.Tool1:
                     _P.playerToolSelected = 0;
+                    _P.PlaySound(InfiniminerSound.ClickLow);
                     if (_P.playerToolSelected &gt;= _P.playerTools.Length)
                         _P.playerToolSelected = _P.playerTools.Length - 1;
                     break;
                 case Buttons.Tool2:
                     _P.playerToolSelected = 1;
+                    _P.PlaySound(InfiniminerSound.ClickLow);
                     if (_P.playerToolSelected &gt;= _P.playerTools.Length)
                         _P.playerToolSelected = _P.playerTools.Length - 1;
                     break;
                 case Buttons.Tool3:
                     _P.playerToolSelected = 2;
+                    _P.PlaySound(InfiniminerSound.ClickLow);
                     if (_P.playerToolSelected &gt;= _P.playerTools.Length)
                         _P.playerToolSelected = _P.playerTools.Length - 1;
                     break;
@@ -582,134 +547,7 @@ namespace Infiniminer.States
                 return;
             }else if (!_P.playerDead)
                 HandleInput((_SM as InfiniminerGame).keyBinds.GetBound(key));
-                
-
-            /*if (key == Keys.Y)
-                _P.chatMode = ChatMessageType.SayAll;
-
-            if (key == Keys.U)
-                _P.chatMode = _P.playerTeam == PlayerTeam.Red ? ChatMessageType.SayRedTeam : ChatMessageType.SayBlueTeam;
-            */
-
-            if (false)//!_P.playerDead)
-            {
-                // Jump!
-                if ((_SM as InfiniminerGame).keyBinds.IsBound(Buttons.Jump,key))
-                {
-                //if (key == Keys.Space)
-                //{
-                    Vector3 footPosition = _P.playerPosition + new Vector3(0f, -1.5f, 0f);
-                    if (_P.blockEngine.SolidAtPointForPlayer(footPosition) &amp;&amp; _P.playerVelocity.Y == 0)
-                    {
-                        _P.playerVelocity.Y = JUMPVELOCITY;
-                        float amountBelowSurface = ((ushort)footPosition.Y) + 1 - footPosition.Y;
-                        _P.playerPosition.Y += amountBelowSurface + 0.01f;
-                    }
-                }
-
-                // Change weapon!
-                if ((_SM as InfiniminerGame).keyBinds.IsBound(Buttons.ToolUp, key))
-                {
-                //if (key == Keys.E)
-                //{
-                    _P.PlaySound(InfiniminerSound.ClickLow);
-                    _P.playerToolSelected += 1;
-                    if (_P.playerToolSelected &gt;= _P.playerTools.Length)
-                        _P.playerToolSelected = 0;
-                }
-
-                // Change weapon directly!
-                {
-                    bool toolDirect = false;
-                    if ((_SM as InfiniminerGame).keyBinds.IsBound(Buttons.Tool1,key)){
-                        _P.playerToolSelected = 0;
-                        toolDirect = true;
-                    }else if ((_SM as InfiniminerGame).keyBinds.IsBound(Buttons.Tool2,key)){
-                        _P.playerToolSelected = 1;
-                        toolDirect = true;
-                    }else if ((_SM as InfiniminerGame).keyBinds.IsBound(Buttons.Tool3,key)){
-                        _P.playerToolSelected = 2;
-                        toolDirect = true;
-                    }else if ((_SM as InfiniminerGame).keyBinds.IsBound(Buttons.Tool4,key)){
-                        _P.playerToolSelected = 3;
-                        toolDirect = true;
-                    }else if ((_SM as InfiniminerGame).keyBinds.IsBound(Buttons.Tool5,key)){
-                        _P.playerToolSelected = 4;
-                        toolDirect = true;
-                    }
-                
-                    if (toolDirect){
-                        _P.PlaySound(InfiniminerSound.ClickLow);
-                        // Make sure we don't go out of bounds
-                        if (_P.playerToolSelected &gt;= _P.playerTools.Length)
-                            _P.playerToolSelected = _P.playerTools.Length - 1;
-                    }
-                }    
-
-                /*if (key == Keys.D1 || key == Keys.D2 || key == Keys.D3 || key == Keys.D4 || key == Keys.D5)
-                {
-                    _P.PlaySound(InfiniminerSound.ClickLow);
-                    switch (key)
-                    {
-                        case Keys.D1:
-                            _P.playerToolSelected = 0; break;
-                        case Keys.D2:
-                            _P.playerToolSelected = 1; break;
-                        case Keys.D3:
-                            _P.playerToolSelected = 2; break;
-                        case Keys.D4:
-                            _P.playerToolSelected = 3; break;
-                        case Keys.D5:
-                            _P.playerToolSelected = 4; break;
-                    }
-                    // Make sure we don't go out of bounds
-                    if (_P.playerToolSelected &gt;= _P.playerTools.Length)
-                        _P.playerToolSelected = _P.playerTools.Length - 1;
-                }*/
-                
-
-                // Change block type!
-                if ((_SM as InfiniminerGame).keyBinds.IsBound(Buttons.ToolUp, key) &amp;&amp; _P.playerTools[_P.playerToolSelected] == PlayerTools.ConstructionGun) // &amp;&amp; key == Keys.R
-                {
-                    _P.PlaySound(InfiniminerSound.ClickLow);
-                    _P.playerBlockSelected += 1;
-                    if (_P.playerBlockSelected &gt;= _P.playerBlocks.Length)
-                        _P.playerBlockSelected = 0;
-                }
-
-                // Deposit and withdraw from a bank.
-                if (_P.AtBankTerminal())
-                {
-                    //Now 8 and 9 keys
-                    if ((_SM as InfiniminerGame).keyBinds.IsBound(Buttons.Deposit,key))//if (key == Keys.D8)
-                    {
-                        _P.DepositOre();
-                        _P.PlaySound(InfiniminerSound.ClickHigh);
-                    }
-                    if ((_SM as InfiniminerGame).keyBinds.IsBound(Buttons.Withdraw, key)) //if (key == Keys.D9)
-                    {
-                        _P.WithdrawOre();
-                        _P.PlaySound(InfiniminerSound.ClickHigh);
-                    }
-                }
-
-                // Radar pings.
-                if ((_SM as InfiniminerGame).keyBinds.IsBound(Buttons.Ping,key))// key == Keys.Q)
-                {
-                    NetBuffer msgBuffer = _P.netClient.CreateBuffer();
-                    msgBuffer.Write((byte)InfiniminerMessage.PlayerPing);
-                    msgBuffer.Write(_P.playerMyId);
-                    _P.netClient.SendMessage(msgBuffer, NetChannel.ReliableUnordered);
-                }
-
-                // Change class.
-                if ((_SM as InfiniminerGame).keyBinds.IsBound(Buttons.ChangeClass,key))//if (key == Keys.M &amp;&amp; _P.playerPosition.Y &gt; 64 - Defines.GROUND_LEVEL)
-                    nextState = &quot;Infiniminer.States.ClassSelectionState&quot;;
-
-                // Change team.
-                if ((_SM as InfiniminerGame).keyBinds.IsBound(Buttons.ChangeTeam,key))//if (key == Keys.N)
-                    nextState = &quot;Infiniminer.States.TeamSelectionState&quot;;
-            }
+            
         }
 
         public override void OnKeyUp(Keys key)
@@ -719,44 +557,11 @@ namespace Infiniminer.States
 
         public override void OnMouseDown(MouseButton button, int x, int y)
         {
-            // If we&quot;re dead, come back to life.
+            // If we're dead, come back to life.
             if (_P.playerDead &amp;&amp; _P.screenEffectCounter &gt; 2)
-            {
                 _P.RespawnPlayer();
-            }else if (!_P.playerDead)
-            {
+            else if (!_P.playerDead)
                 HandleInput((_SM as InfiniminerGame).keyBinds.GetBound(button));
-            }
-            /*
-            // If we&quot;re alive, use our currently selected tool!
-            if (!_P.playerDead &amp;&amp; _P.playerToolCooldown == 0)
-            {
-                switch (_P.playerTools[_P.playerToolSelected])
-                {
-                    // Disabled as everyone speed-mines now.
-                    //case PlayerTools.Pickaxe:
-                    //    if (_P.playerClass != PlayerClass.Miner)
-                    //        _P.FirePickaxe();
-                    //    break;
-
-                    case PlayerTools.ConstructionGun:
-                        _P.FireConstructionGun(_P.playerBlocks[_P.playerBlockSelected]);//, !(button == MouseButton.LeftButton));//_P.FireConstructionGun(_P.playerBlocks[_P.playerBlockSelected]);
-                        break;
-
-                    case PlayerTools.DeconstructionGun:
-                        _P.FireDeconstructionGun();
-                        break;
-
-                    case PlayerTools.Detonator:
-                        _P.PlaySound(InfiniminerSound.ClickHigh);
-                        _P.FireDetonator();
-                        break;
-
-                    case PlayerTools.ProspectingRadar:
-                        _P.FireRadar();
-                        break;
-                }
-            }*/
         }
 
         public override void OnMouseUp(MouseButton button, int x, int y)
@@ -779,23 +584,6 @@ namespace Infiniminer.States
                 {
                     HandleInput((_SM as InfiniminerGame).keyBinds.GetBound(MouseButton.WheelDown));
                 }
-                return;
-            }
-
-            if (scrollDelta == 120 &amp;&amp; _P.playerTools[_P.playerToolSelected] == PlayerTools.ConstructionGun)
-            {
-                _P.PlaySound(InfiniminerSound.ClickLow);
-                _P.playerBlockSelected += 1;
-                if (_P.playerBlockSelected &gt;= _P.playerBlocks.Length)
-                    _P.playerBlockSelected = 0;
-            }
-
-            if (scrollDelta == -120 &amp;&amp; _P.playerTools[_P.playerToolSelected] == PlayerTools.ConstructionGun)
-            {
-                _P.PlaySound(InfiniminerSound.ClickLow);
-                _P.playerBlockSelected -= 1;
-                if (_P.playerBlockSelected &lt; 0)
-                    _P.playerBlockSelected = _P.playerBlocks.Length - 1;
             }
         }
     }</diff>
      <filename>code/InfiniminerClient/States/MainGameState.cs</filename>
    </modified>
    <modified>
      <diff>@@ -26,7 +26,7 @@ namespace Infiniminer.States
         SpriteFont uiFont;
         bool directConnectIPEnter = false;
         string directConnectIP = &quot;&quot;;
-        KeyMap keyMap;
+        //KeyMap keyMap;
 
         ClickRegion[] clkMenuServer = new ClickRegion[3] {
             new ClickRegion(new Rectangle(0,713,425,42), &quot;direct&quot;),
@@ -48,7 +48,7 @@ namespace Infiniminer.States
                                      1024);
 
             uiFont = _SM.Content.Load&lt;SpriteFont&gt;(&quot;font_04b08&quot;);
-            keyMap = new KeyMap();
+            //keyMap = new KeyMap();
             
             serverList = (_SM as InfiniminerGame).EnumerateServers(0.5f);
         }
@@ -87,7 +87,7 @@ namespace Infiniminer.States
                 }
             }
 
-            spriteBatch.DrawString(uiFont, InfiniminerGame.INFINIMINER_VERSION, new Vector2(10, _SM.GraphicsDevice.Viewport.Height - 20), Color.White);
+            spriteBatch.DrawString(uiFont, Defines.INFINIMINER_VERSION, new Vector2(10, _SM.GraphicsDevice.Viewport.Height - 20), Color.White);
 
             if (directConnectIPEnter)
                 spriteBatch.DrawString(uiFont, &quot;ENTER IP: &quot; + directConnectIP, new Vector2(drawRect.X + 30, drawRect.Y + 690), Color.White);
@@ -95,6 +95,18 @@ namespace Infiniminer.States
             spriteBatch.End();
         }
 
+        public override void OnCharEntered(EventInput.CharacterEventArgs e)
+        {
+            if ((int)e.Character &lt; 32 || (int)e.Character &gt; 126) //From space to tilde
+                return; //Do nothing
+
+            //Only respond if entering an ip and control is not pressed
+            if (directConnectIPEnter &amp;&amp; !(Keyboard.GetState().IsKeyDown(Keys.LeftControl) || Keyboard.GetState().IsKeyDown(Keys.RightControl)))
+            {
+                directConnectIP += e.Character;
+            }
+        }
+
         public override void OnKeyDown(Keys key)
         {
             if (directConnectIPEnter)
@@ -151,10 +163,10 @@ namespace Infiniminer.States
                     }
                     catch { }
                 }
-                else if (keyMap.IsKeyMapped(key))
+                /*else if (keyMap.IsKeyMapped(key))
                 {
                     directConnectIP += keyMap.TranslateKey(key, false);
-                }
+                }*/
             }
             else
             {</diff>
      <filename>code/InfiniminerClient/States/ServerBrowserState.cs</filename>
    </modified>
    <modified>
      <diff>@@ -33,6 +33,7 @@ namespace Infiniminer.States
         ClickRegion[] clkMenuSettings = new ClickRegion[2] {
             new ClickRegion(new Rectangle(0,713,255,42),&quot;cancel&quot;),
             new ClickRegion(new Rectangle(524,713,500,42),&quot;accept&quot;)
+            //new ClickRegion(new Rectangle(0,0,0,0),&quot;keylayout&quot;)
         };
 
         protected string nextState = null;
@@ -73,7 +74,7 @@ namespace Infiniminer.States
             temp.maxVal=maxVal;
             temp.setValue(initVal);
             temp.integers=integerOnly;
-            elements.Add(temp);//sliders.Add(temp);
+            elements.Add(temp);
         }
 
         public void addButtonAutomatic(string text, string onText, string offText, bool clicked)
@@ -95,7 +96,7 @@ namespace Infiniminer.States
             temp.onText = onText;
             temp.offText = offText;
             temp.clicked = clicked;
-            elements.Add(temp); //buttons.Add(temp);
+            elements.Add(temp);
         }
 
         public void addTextInputAutomatic(string text, string initVal)
@@ -178,30 +179,17 @@ namespace Infiniminer.States
             addSpace(16);
 
             
-            _P.KillPlayer(&quot;&quot;);
+            //_P.KillPlayer(&quot;&quot;);
         }
 
         public override void OnLeave(string newState)
         {
             base.OnLeave(newState);
-            //Retrieve variables
-            foreach (InterfaceElement element in elements)
-            {
-
-            }
         }
 
         public override void OnMouseDown(MouseButton button, int x, int y)
         {
             base.OnMouseDown(button, x, y);
-            /*foreach(InterfaceSlider slider in sliders)
-            {
-                slider.OnMouseDown(button, x, y);
-            }
-            foreach (InterfaceButtonToggle buttonI in buttons)
-            {
-                buttonI.OnMouseDown(button, x, y);
-            }*/
             foreach (InterfaceElement element in elements)
             {
                 element.OnMouseDown(button, x, y);
@@ -215,20 +203,16 @@ namespace Infiniminer.States
                     if (saveData()&gt;=1)
                         _SM.Exit();
                     break;
+                /*case &quot;keylayout&quot;:
+                    saveData();
+                    nextState = &quot;Infiniminer.States.KeySettingsState&quot;;
+                    break;*/
             }
         }
 
         public override void OnMouseUp(MouseButton button, int x, int y)
         {
             base.OnMouseUp(button, x, y);
-            /*foreach (InterfaceSlider slider in sliders)
-            {
-                slider.OnMouseUp(button, x, y);
-            }
-            foreach (InterfaceButtonToggle buttonI in buttons)
-            {
-                buttonI.OnMouseUp(button, x, y);
-            }*/
             foreach (InterfaceElement element in elements)
             {
                 element.OnMouseUp(button, x, y);
@@ -268,38 +252,20 @@ namespace Infiniminer.States
             return dw.WriteChanges(&quot;client.config.txt&quot;);
         }
 
-        /*
-            addTextInputAutomatic(&quot;Scrn  Width&quot;, &quot;1024&quot;);
-            addTextInputAutomatic(&quot;Scrn Height&quot;, &quot;780&quot;);
-            addButtonAutomatic(&quot;Screen Mode&quot;, &quot;Fullscreen&quot;, &quot;Windowed&quot;, false);
-            addSpace(16);
-
-            addLabelAutomatic(&quot;Sound Settings&quot;);
-            addSliderAutomatic(&quot;Volume&quot;, 1f, 100f, 100f, true);
-            addButtonAutomatic(&quot;Enable Sound&quot;, &quot;On&quot;, &quot;NoSound&quot;, true);
-            addSpace(16);
-
-            shiftColumn();
-
-            addLabelAutomatic(&quot;Mouse Settings&quot;);
-            addButtonAutomatic(&quot;Invert Mouse&quot;, &quot;Yes&quot;, &quot;No&quot;, false);
-            addSliderAutomatic(&quot;Mouse Sensitivity&quot;, 1f, 10f, 5f, true);
-            addSpace(16);
-
-            addLabelAutomatic(&quot;Misc Settings&quot;);
-            addButtonAutomatic(&quot;Bloom&quot;, &quot;Pretty&quot;, &quot;Boring&quot;, true);
-            addButtonAutomatic(&quot;Show FPS&quot;, &quot;Yes&quot;, &quot;No&quot;, true);
-            addSpace(16);
-        */
+        public override void OnCharEntered(EventInput.CharacterEventArgs e)
+        {
+            base.OnCharEntered(e);
+            foreach (InterfaceElement element in elements)
+            {
+                element.OnCharEntered(e);
+            }
+        }
 
         public override void OnKeyDown(Keys key)
         {
             base.OnKeyDown(key);
             if (key == Keys.Escape)
-            {
-                //saveData();
                 nextState = &quot;Infiniminer.States.ServerBrowserState&quot;;
-            }
             else
             {
                 foreach (InterfaceElement element in elements)
@@ -329,14 +295,6 @@ namespace Infiniminer.States
             spriteBatch.Begin(SpriteBlendMode.AlphaBlend, SpriteSortMode.Deferred, SaveStateMode.SaveState);
             spriteBatch.Draw(texSettings, drawRect, Color.White);
             spriteBatch.End();
-            /*foreach (InterfaceSlider slider in sliders)
-            {
-                slider.Render(graphicsDevice);
-            }
-            foreach (InterfaceButtonToggle button in buttons)
-            {
-                button.Render(graphicsDevice);
-            }*/
             foreach (InterfaceElement element in elements)
             {
                 element.Render(graphicsDevice);</diff>
      <filename>code/InfiniminerClient/States/SettingsState.cs</filename>
    </modified>
    <modified>
      <diff>@@ -25,7 +25,8 @@ namespace Infiniminer.States
 
         ClickRegion[] clkTeamMenu = new ClickRegion[2] {
 	        new ClickRegion(new Rectangle(229,156,572,190), &quot;red&quot;), 
-	        new ClickRegion(new Rectangle(135,424,761,181), &quot;blue&quot;)
+	        new ClickRegion(new Rectangle(135,424,761,181), &quot;blue&quot;)//,
+            //new ClickRegion(new Rectangle(0,0,0,0), &quot;cancel&quot;)
         };
 
         public override void OnEnter(string oldState)
@@ -124,6 +125,13 @@ namespace Infiniminer.States
                     }
                     _P.PlaySound(InfiniminerSound.ClickHigh);
                     break;
+                case &quot;cancel&quot;:
+                    if (canCancel)
+                    {
+                        nextState = &quot;Infiniminer.States.MainGameState&quot;;
+                        _P.PlaySound(InfiniminerSound.ClickHigh);
+                    }
+                    break;
             }
         }
 </diff>
      <filename>code/InfiniminerClient/States/TeamSelectionState.cs</filename>
    </modified>
    <modified>
      <diff>@@ -54,6 +54,11 @@ namespace Infiniminer
         {
             try
             {
+                if (!File.Exists(filename))
+                {
+                    FileStream temp = File.Create(filename);
+                    temp.Close();
+                }
                 Dictionary&lt;string, bool&gt;seen = new Dictionary&lt;string, bool&gt;();
 
                 FileStream file = new FileStream(filename, FileMode.Open, FileAccess.Read);</diff>
      <filename>code/InfiniminerShared/DataFileWriter.cs</filename>
    </modified>
    <modified>
      <diff></diff>
      <filename>images/class-selection.psd</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>code/InfiniminerShared/Content/obj/x86/Debug/ResolveAssemblyReference.cache</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>9fad7597f27933a846af1dd27a68bcb440443a63</id>
    </parent>
  </parents>
  <author>
    <name>Metroid48</name>
    <email>metroid48@gmail.com</email>
  </author>
  <url>http://github.com/krispykrem/Infiniminer/commit/93e2c1803a16404d01ee1db421747f3635b0645a</url>
  <id>93e2c1803a16404d01ee1db421747f3635b0645a</id>
  <committed-date>2009-06-15T17:21:15-07:00</committed-date>
  <authored-date>2009-06-04T20:28:17-07:00</authored-date>
  <message>Several changes - mostly code cleanups. Fixed server browser/settings menu not using buffered keyboard input + localization. Fixed lack of proper key binds for movement (WASD default). Added sprint mechanic back but at a smaller multiplier. Removed all dependencies on KeyMap.cs. Prepared for new &quot;Cancel&quot; button on class/team select menus.

Signed-off-by: Zach Barth &lt;zachbarth@gmail.com&gt;</message>
  <tree>939bef392783ec76d014a27386f50d65efef3b8d</tree>
  <committer>
    <name>Zach Barth</name>
    <email>zachbarth@gmail.com</email>
  </committer>
</commit>
