about summary refs log tree commit diff stats
path: root/AnodyneArchipelago/Menu
diff options
context:
space:
mode:
Diffstat (limited to 'AnodyneArchipelago/Menu')
-rw-r--r--AnodyneArchipelago/Menu/InputHandler.cs12
1 files changed, 12 insertions, 0 deletions
diff --git a/AnodyneArchipelago/Menu/InputHandler.cs b/AnodyneArchipelago/Menu/InputHandler.cs index 284d321..432b40c 100644 --- a/AnodyneArchipelago/Menu/InputHandler.cs +++ b/AnodyneArchipelago/Menu/InputHandler.cs
@@ -1,6 +1,7 @@
1using AnodyneSharp.Input; 1using AnodyneSharp.Input;
2using Microsoft.Xna.Framework.Input; 2using Microsoft.Xna.Framework.Input;
3using System.Collections.Generic; 3using System.Collections.Generic;
4using System.Threading;
4 5
5namespace AnodyneArchipelago.Menu 6namespace AnodyneArchipelago.Menu
6{ 7{
@@ -86,6 +87,17 @@ namespace AnodyneArchipelago.Menu
86 87
87 public static string ReturnCharacter() 88 public static string ReturnCharacter()
88 { 89 {
90 if (KeyInput.JustPressedKey(Keys.V) && (KeyInput.IsKeyPressed(Keys.LeftControl) || KeyInput.IsKeyPressed(Keys.RightControl)))
91 {
92 string result = "";
93 Thread clipboardThread = new(() => result = System.Windows.Forms.Clipboard.GetText());
94 clipboardThread.SetApartmentState(ApartmentState.STA);
95 clipboardThread.Start();
96 clipboardThread.Join();
97
98 return result;
99 }
100
89 foreach (InputCharacter inputCharacter in _characters) 101 foreach (InputCharacter inputCharacter in _characters)
90 { 102 {
91 if (KeyInput.JustPressedKey(inputCharacter.ReturnKey())) 103 if (KeyInput.JustPressedKey(inputCharacter.ReturnKey()))