Keys.go 836 B

12345678910111213141516171819202122232425262728
  1. package imgui
  2. // Constants to fill IO.KeyMap() lookup with indices into the IO.KeysDown[512] array.
  3. // The mapped indices are then the ones reported to IO.KeyPress() and IO.KeyRelease().
  4. const (
  5. KeyTab = 0
  6. KeyLeftArrow = 1
  7. KeyRightArrow = 2
  8. KeyUpArrow = 3
  9. KeyDownArrow = 4
  10. KeyPageUp = 5
  11. KeyPageDown = 6
  12. KeyHome = 7
  13. KeyEnd = 8
  14. KeyInsert = 9
  15. KeyDelete = 10
  16. KeyBackspace = 11
  17. KeySpace = 12
  18. KeyEnter = 13
  19. KeyEscape = 14
  20. KeyKeyPadEnter = 15
  21. KeyA = 16 // for text edit CTRL+A: select all
  22. KeyC = 17 // for text edit CTRL+C: copy
  23. KeyV = 18 // for text edit CTRL+V: paste
  24. KeyX = 19 // for text edit CTRL+X: cut
  25. KeyY = 20 // for text edit CTRL+Y: redo
  26. KeyZ = 21 // for text edit CTRL+Z: undo
  27. )