SKeyMap.h 873 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  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_COUNT,
  19. //! This value is not used. It only forces this enumeration to compile in 32 bit.
  20. EKA_FORCE_32BIT = 0x7fffffff
  21. };
  22. //! Struct storing which key belongs to which action.
  23. struct SKeyMap
  24. {
  25. SKeyMap() {}
  26. SKeyMap(EKEY_ACTION action, EKEY_CODE keyCode) : Action(action), KeyCode(keyCode) {}
  27. EKEY_ACTION Action;
  28. EKEY_CODE KeyCode;
  29. };
  30. } // end namespace irr
  31. #endif