key.js 565 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /*!
  2. * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
  3. * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
  4. * v1.0.0-beta.82
  5. */
  6. export function isActivationKey(key) {
  7. return key === "Enter" || key === " ";
  8. }
  9. export const numberKeys = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"];
  10. export const letterKeys = [
  11. "a",
  12. "b",
  13. "c",
  14. "d",
  15. "e",
  16. "f",
  17. "g",
  18. "h",
  19. "i",
  20. "j",
  21. "k",
  22. "l",
  23. "m",
  24. "n",
  25. "o",
  26. "p",
  27. "q",
  28. "r",
  29. "s",
  30. "t",
  31. "u",
  32. "v",
  33. "w",
  34. "x",
  35. "y",
  36. "z"
  37. ];