VideoCommon: add SHIFT and CTRL keys to be visible to imgui

This commit is contained in:
iwubcode 2023-07-30 15:24:13 -05:00
parent 53b4e989ce
commit 2f2adbd6af
3 changed files with 9 additions and 7 deletions

View file

@ -574,12 +574,12 @@ void RenderWidget::PassEventToPresenter(const QEvent* event)
void RenderWidget::SetPresenterKeyMap()
{
static constexpr DolphinKeyMap key_map = {
Qt::Key_Tab, Qt::Key_Left, Qt::Key_Right, Qt::Key_Up, Qt::Key_Down,
Qt::Key_PageUp, Qt::Key_PageDown, Qt::Key_Home, Qt::Key_End, Qt::Key_Insert,
Qt::Key_Delete, Qt::Key_Backspace, Qt::Key_Space, Qt::Key_Return, Qt::Key_Escape,
Qt::Key_Tab, Qt::Key_Left, Qt::Key_Right, Qt::Key_Up, Qt::Key_Down,
Qt::Key_PageUp, Qt::Key_PageDown, Qt::Key_Home, Qt::Key_End, Qt::Key_Insert,
Qt::Key_Delete, Qt::Key_Backspace, Qt::Key_Space, Qt::Key_Return, Qt::Key_Escape,
Qt::Key_Enter, // Keypad enter
Qt::Key_A, Qt::Key_C, Qt::Key_V, Qt::Key_X, Qt::Key_Y,
Qt::Key_Z,
Qt::Key_Control, Qt::Key_Shift, Qt::Key_A, Qt::Key_C, Qt::Key_V,
Qt::Key_X, Qt::Key_Y, Qt::Key_Z,
};
g_presenter->SetKeyMap(key_map);

View file

@ -453,8 +453,8 @@ void OnScreenUI::SetKeyMap(const DolphinKeyMap& key_map)
ImGuiKey_DownArrow, ImGuiKey_PageUp, ImGuiKey_PageDown, ImGuiKey_Home,
ImGuiKey_End, ImGuiKey_Insert, ImGuiKey_Delete, ImGuiKey_Backspace,
ImGuiKey_Space, ImGuiKey_Enter, ImGuiKey_Escape, ImGuiKey_KeypadEnter,
ImGuiKey_A, ImGuiKey_C, ImGuiKey_V, ImGuiKey_X,
ImGuiKey_Y, ImGuiKey_Z,
ImGuiMod_Ctrl, ImGuiMod_Shift, ImGuiKey_A, ImGuiKey_C,
ImGuiKey_V, ImGuiKey_X, ImGuiKey_Y, ImGuiKey_Z,
};
auto lock = GetImGuiLock();

View file

@ -26,6 +26,8 @@ enum class DolphinKey
Enter,
Escape,
KeyPadEnter,
CTRL,
SHIFT,
A, // for text edit CTRL+A: select all
C, // for text edit CTRL+C: copy
V, // for text edit CTRL+V: paste