From cf2deaf3067bcda3a60cbf6578656605fb88f15b Mon Sep 17 00:00:00 2001 From: Vlandemart Date: Mon, 7 Nov 2022 17:34:57 +0300 Subject: [PATCH] Update ImGuiPlatformInputSystem.cs --- ImGuiNET.Unity/Platform/ImGuiPlatformInputSystem.cs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/ImGuiNET.Unity/Platform/ImGuiPlatformInputSystem.cs b/ImGuiNET.Unity/Platform/ImGuiPlatformInputSystem.cs index 8062c51..1587569 100644 --- a/ImGuiNET.Unity/Platform/ImGuiPlatformInputSystem.cs +++ b/ImGuiNET.Unity/Platform/ImGuiPlatformInputSystem.cs @@ -129,13 +129,12 @@ void SetupKeyboard(ImGuiIOPtr io, Keyboard kb) io.KeyMap[(int)ImGuiKey.Enter ] = (int)Key.Enter, io.KeyMap[(int)ImGuiKey.Escape ] = (int)Key.Escape, io.KeyMap[(int)ImGuiKey.KeyPadEnter] = (int)Key.NumpadEnter, - // letter keys mapped by display name to avoid being layout agnostic (used as shortcuts) - io.KeyMap[(int)ImGuiKey.A ] = (int)((KeyControl)kb["#(a)"]).keyCode, // for text edit CTRL+A: select all - io.KeyMap[(int)ImGuiKey.C ] = (int)((KeyControl)kb["#(c)"]).keyCode, // for text edit CTRL+C: copy - io.KeyMap[(int)ImGuiKey.V ] = (int)((KeyControl)kb["#(v)"]).keyCode, // for text edit CTRL+V: paste - io.KeyMap[(int)ImGuiKey.X ] = (int)((KeyControl)kb["#(x)"]).keyCode, // for text edit CTRL+X: cut - io.KeyMap[(int)ImGuiKey.Y ] = (int)((KeyControl)kb["#(y)"]).keyCode, // for text edit CTRL+Y: redo - io.KeyMap[(int)ImGuiKey.Z ] = (int)((KeyControl)kb["#(z)"]).keyCode, // for text edit CTRL+Z: undo + io.KeyMap[(int)ImGuiKey.A ] = (int)Key.A, // for text edit CTRL+A: select all + io.KeyMap[(int)ImGuiKey.C ] = (int)Key.C, // for text edit CTRL+C: copy + io.KeyMap[(int)ImGuiKey.V ] = (int)Key.V, // for text edit CTRL+V: paste + io.KeyMap[(int)ImGuiKey.X ] = (int)Key.X, // for text edit CTRL+X: cut + io.KeyMap[(int)ImGuiKey.Y ] = (int)Key.Y, // for text edit CTRL+Y: redo + io.KeyMap[(int)ImGuiKey.Z ] = (int)Key.Z, // for text edit CTRL+Z: undo }; _keyboard.onTextInput += _textInput.Add; }