WDKeys.pm 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. package Selenium::Remote::WDKeys;
  2. # ABSTRACT: Representation of keystrokes used by Selenium::Remote::WebDriver
  3. =head1 DESCRIPTION
  4. The constant KEYS is defined here.
  5. =cut
  6. use strict;
  7. use warnings;
  8. use base 'Exporter';
  9. # http://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/element/:id/value
  10. use constant KEYS => {
  11. 'null' => "\N{U+E000}",
  12. 'cancel' => "\N{U+E001}",
  13. 'help' => "\N{U+E002}",
  14. 'backspace' => "\N{U+E003}",
  15. 'tab' => "\N{U+E004}",
  16. 'clear' => "\N{U+E005}",
  17. 'return' => "\N{U+E006}",
  18. 'enter' => "\N{U+E007}",
  19. 'shift' => "\N{U+E008}",
  20. 'control' => "\N{U+E009}",
  21. 'alt' => "\N{U+E00A}",
  22. 'pause' => "\N{U+E00B}",
  23. 'escape' => "\N{U+E00C}",
  24. 'space' => "\N{U+E00D}",
  25. 'page_up' => "\N{U+E00E}",
  26. 'page_down' => "\N{U+E00f}",
  27. 'end' => "\N{U+E010}",
  28. 'home' => "\N{U+E011}",
  29. 'left_arrow' => "\N{U+E012}",
  30. 'up_arrow' => "\N{U+E013}",
  31. 'right_arrow' => "\N{U+E014}",
  32. 'down_arrow' => "\N{U+E015}",
  33. 'insert' => "\N{U+E016}",
  34. 'delete' => "\N{U+E017}",
  35. 'semicolon' => "\N{U+E018}",
  36. 'equals' => "\N{U+E019}",
  37. 'numpad_0' => "\N{U+E01A}",
  38. 'numpad_1' => "\N{U+E01B}",
  39. 'numpad_2' => "\N{U+E01C}",
  40. 'numpad_3' => "\N{U+E01D}",
  41. 'numpad_4' => "\N{U+E01E}",
  42. 'numpad_5' => "\N{U+E01f}",
  43. 'numpad_6' => "\N{U+E020}",
  44. 'numpad_7' => "\N{U+E021}",
  45. 'numpad_8' => "\N{U+E022}",
  46. 'numpad_9' => "\N{U+E023}",
  47. 'multiply' => "\N{U+E024}",
  48. 'add' => "\N{U+E025}",
  49. 'separator' => "\N{U+E026}",
  50. 'subtract' => "\N{U+E027}",
  51. 'decimal' => "\N{U+E028}",
  52. 'divide' => "\N{U+E029}",
  53. 'f1' => "\N{U+E031}",
  54. 'f2' => "\N{U+E032}",
  55. 'f3' => "\N{U+E033}",
  56. 'f4' => "\N{U+E034}",
  57. 'f5' => "\N{U+E035}",
  58. 'f6' => "\N{U+E036}",
  59. 'f7' => "\N{U+E037}",
  60. 'f8' => "\N{U+E038}",
  61. 'f9' => "\N{U+E039}",
  62. 'f10' => "\N{U+E03A}",
  63. 'f11' => "\N{U+E03B}",
  64. 'f12' => "\N{U+E03C}",
  65. 'command_meta' => "\N{U+E03D}",
  66. 'ZenkakuHankaku' => "\N{U+E040}", #Asian language keys, maybe altGr too?
  67. #There are other code points for say, left versus right meta/shift/alt etc, but I don't seriously believe anyone uses that level of sophistication on the web yet.
  68. };
  69. our @EXPORT = ('KEYS');
  70. 1;