OnScreenUIKeyMap.h 835 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. // Copyright 2023 Dolphin Emulator Project
  2. // SPDX-License-Identifier: GPL-2.0-or-later
  3. #pragma once
  4. #include "Common/EnumMap.h"
  5. // The main point of this is to allow other parts of dolphin to set ImGui's key map without
  6. // having to import ImGui headers.
  7. // But the idea is that it can be expanded in the future with more keys to support more things.
  8. enum class DolphinKey
  9. {
  10. Tab,
  11. LeftArrow,
  12. RightArrow,
  13. UpArrow,
  14. DownArrow,
  15. PageUp,
  16. PageDown,
  17. Home,
  18. End,
  19. Insert,
  20. Delete,
  21. Backspace,
  22. Space,
  23. Enter,
  24. Escape,
  25. KeyPadEnter,
  26. A, // for text edit CTRL+A: select all
  27. C, // for text edit CTRL+C: copy
  28. V, // for text edit CTRL+V: paste
  29. X, // for text edit CTRL+X: cut
  30. Y, // for text edit CTRL+Y: redo
  31. Z, // for text edit CTRL+Z: undo
  32. };
  33. using DolphinKeyMap = Common::EnumMap<int, DolphinKey::Z>;