diff options
| author | Scott Mansell <phiren@gmail.com> | 2023-02-03 19:11:31 +1300 |
|---|---|---|
| committer | Scott Mansell <phiren@gmail.com> | 2023-02-09 18:36:20 +1300 |
| commit | 9c1fe59cc9e9c3616416d78e1ed4b37be1bb2f66 (patch) | |
| tree | 40cf6dd1090667ce482700d79ab67797d2a06099 /Source/Core/VideoCommon/OnScreenUIKeyMap.h | |
| parent | b2a31103b43c365d4c48a55b805001bfb07d974e (diff) | |
Insert a more solid abstraction between Qt and Imgui
Diffstat (limited to 'Source/Core/VideoCommon/OnScreenUIKeyMap.h')
| -rw-r--r-- | Source/Core/VideoCommon/OnScreenUIKeyMap.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/Source/Core/VideoCommon/OnScreenUIKeyMap.h b/Source/Core/VideoCommon/OnScreenUIKeyMap.h new file mode 100644 index 0000000000..c637f3938b --- /dev/null +++ b/Source/Core/VideoCommon/OnScreenUIKeyMap.h @@ -0,0 +1,37 @@ +// Copyright 2023 Dolphin Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include "Common/EnumMap.h" + +// The main point of this is to allow other parts of dolphin to set ImGui's key map without +// having to import ImGui headers. +// But the idea is that it can be expanded in the future with more keys to support more things. +enum class DolphinKey +{ + Tab, + LeftArrow, + RightArrow, + UpArrow, + DownArrow, + PageUp, + PageDown, + Home, + End, + Insert, + Delete, + Backspace, + Space, + Enter, + Escape, + KeyPadEnter, + A, // for text edit CTRL+A: select all + C, // for text edit CTRL+C: copy + V, // for text edit CTRL+V: paste + X, // for text edit CTRL+X: cut + Y, // for text edit CTRL+Y: redo + Z, // for text edit CTRL+Z: undo +}; + +using DolphinKeyMap = Common::EnumMap<int, DolphinKey::Z>; |
