aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx/Ui/Input/KeyboardKeyAssigner.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx/Ui/Input/KeyboardKeyAssigner.cs')
-rw-r--r--Ryujinx/Ui/Input/KeyboardKeyAssigner.cs51
1 files changed, 0 insertions, 51 deletions
diff --git a/Ryujinx/Ui/Input/KeyboardKeyAssigner.cs b/Ryujinx/Ui/Input/KeyboardKeyAssigner.cs
deleted file mode 100644
index 2a29c366..00000000
--- a/Ryujinx/Ui/Input/KeyboardKeyAssigner.cs
+++ /dev/null
@@ -1,51 +0,0 @@
-using OpenTK.Input;
-using System;
-using Key = Ryujinx.Configuration.Hid.Key;
-
-namespace Ryujinx.Ui.Input
-{
- class KeyboardKeyAssigner : ButtonAssigner
- {
- private int _index;
-
- private KeyboardState _keyboardState;
-
- public KeyboardKeyAssigner(int index)
- {
- _index = index;
- }
-
- public void Init() { }
-
- public void ReadInput()
- {
- _keyboardState = KeyboardController.GetKeyboardState(_index);
- }
-
- public bool HasAnyButtonPressed()
- {
- return _keyboardState.IsAnyKeyDown;
- }
-
- public bool ShouldCancel()
- {
- return Mouse.GetState().IsAnyButtonDown || Keyboard.GetState().IsKeyDown(OpenTK.Input.Key.Escape);
- }
-
- public string GetPressedButton()
- {
- string keyPressed = "";
-
- foreach (Key key in Enum.GetValues(typeof(Key)))
- {
- if (_keyboardState.IsKeyDown((OpenTK.Input.Key)key))
- {
- keyPressed = key.ToString();
- break;
- }
- }
-
- return !ShouldCancel() ? keyPressed : "";
- }
- }
-} \ No newline at end of file