KeyboardEventModifier.js 584 B

1234567891011121314151617181920212223242526272829303132
  1. /**
  2. * This enumerated type is for representing keyboard modifiers. These are keys
  3. * that are held down in addition to other event types.
  4. *
  5. * @enum {number}
  6. */
  7. const KeyboardEventModifier = {
  8. /**
  9. * Represents the shift key being held down.
  10. *
  11. * @type {number}
  12. * @constant
  13. */
  14. SHIFT: 0,
  15. /**
  16. * Represents the control key being held down.
  17. *
  18. * @type {number}
  19. * @constant
  20. */
  21. CTRL: 1,
  22. /**
  23. * Represents the alt key being held down.
  24. *
  25. * @type {number}
  26. * @constant
  27. */
  28. ALT: 2,
  29. };
  30. export default Object.freeze(KeyboardEventModifier);