diff --git a/BizHawk.MultiClient/Input/Input.cs b/BizHawk.MultiClient/Input/Input.cs index 1065b62aeb..dc1b539999 100644 --- a/BizHawk.MultiClient/Input/Input.cs +++ b/BizHawk.MultiClient/Input/Input.cs @@ -99,9 +99,7 @@ namespace BizHawk.MultiClient } } - // TODO: poll keyboard input - - return null; + return KeyInput.GetPressedKey(); } } } diff --git a/BizHawk.MultiClient/Input/Keyboard.cs b/BizHawk.MultiClient/Input/Keyboard.cs index b9cdac558e..e008dcecac 100644 --- a/BizHawk.MultiClient/Input/Keyboard.cs +++ b/BizHawk.MultiClient/Input/Keyboard.cs @@ -1,4 +1,5 @@ using System.Collections.Generic; +using System.Text; using SlimDX; using SlimDX.DirectInput; @@ -64,20 +65,79 @@ namespace BizHawk.MultiClient return false; } - public static Key? GetPressedKey() + public static string GetPressedKey() { - // TODO uhh this will return the same key over and over though. if (state.PressedKeys.Count == 0) return null; - if (state.PressedKeys[0] == Key.NumberPad8) - return Key.UpArrow; - if (state.PressedKeys[0] == Key.NumberPad2) - return Key.DownArrow; - if (state.PressedKeys[0] == Key.NumberPad4) - return Key.LeftArrow; - if (state.PressedKeys[0] == Key.NumberPad6) - return Key.RightArrow; - return state.PressedKeys[0]; + + Key? key = null; + for (int i=0; i