SKeyMap.h 945 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. // Copyright (C) 2002-2012 Nikolaus Gebhardt
  2. // This file is part of the "Irrlicht Engine".
  3. // For conditions of distribution and use, see copyright notice in irrlicht.h
  4. #ifndef S_KEY_MAP_H_INCLUDED
  5. #define S_KEY_MAP_H_INCLUDED
  6. #include "Keycodes.h"
  7. namespace irr
  8. {
  9. //! enumeration for key actions. Used for example in the FPS Camera.
  10. enum EKEY_ACTION
  11. {
  12. EKA_MOVE_FORWARD = 0,
  13. EKA_MOVE_BACKWARD,
  14. EKA_STRAFE_LEFT,
  15. EKA_STRAFE_RIGHT,
  16. EKA_JUMP_UP,
  17. EKA_CROUCH,
  18. EKA_ROTATE_LEFT,
  19. EKA_ROTATE_RIGHT,
  20. EKA_COUNT,
  21. //! This value is not used. It only forces this enumeration to compile in 32 bit.
  22. EKA_FORCE_32BIT = 0x7fffffff
  23. };
  24. //! Struct storing which key belongs to which action.
  25. struct SKeyMap
  26. {
  27. SKeyMap() {}
  28. SKeyMap(EKEY_ACTION action, EKEY_CODE keyCode) : Action(action), KeyCode(keyCode) {}
  29. EKEY_ACTION Action;
  30. EKEY_CODE KeyCode;
  31. };
  32. } // end namespace irr
  33. #endif