Key.php 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <?php
  2. /**
  3. * Copyright 2011-2017 Anthon Pang. All Rights Reserved.
  4. *
  5. * Licensed under the Apache License, Version 2.0 (the "License");
  6. * you may not use this file except in compliance with the License.
  7. * You may obtain a copy of the License at
  8. *
  9. * http://www.apache.org/licenses/LICENSE-2.0
  10. *
  11. * Unless required by applicable law or agreed to in writing, software
  12. * distributed under the License is distributed on an "AS IS" BASIS,
  13. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. * See the License for the specific language governing permissions and
  15. * limitations under the License.
  16. *
  17. * @package WebDriver
  18. *
  19. * @author Anthon Pang <apang@softwaredevelopment.ca>
  20. * @author Fabrizio Branca <mail@fabrizio-branca.de>
  21. */
  22. namespace WebDriver;
  23. /**
  24. * WebDriver\Key class
  25. *
  26. * @package WebDriver
  27. */
  28. final class Key
  29. {
  30. /*
  31. * The Unicode "Private Use Area" code points (0xE000-0xF8FF) are used to represent
  32. * pressable, non-text keys.
  33. *
  34. * @link http://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/element/:id/value
  35. *
  36. * key_name = "UTF-8"; // UCS-2
  37. */
  38. const NULL_KEY = "\xEE\x80\x80"; // E000
  39. const CANCEL = "\xEE\x80\x81"; // E001
  40. const HELP = "\xEE\x80\x82"; // E002
  41. const BACKSPACE = "\xEE\x80\x83"; // E003
  42. const TAB = "\xEE\x80\x84"; // E004
  43. const CLEAR = "\xEE\x80\x85"; // E005
  44. const RETURN_KEY = "\xEE\x80\x86"; // E006
  45. const ENTER = "\xEE\x80\x87"; // E007
  46. const SHIFT = "\xEE\x80\x88"; // E008
  47. const CONTROL = "\xEE\x80\x89"; // E009
  48. const ALT = "\xEE\x80\x8A"; // E00A
  49. const PAUSE = "\xEE\x80\x8B"; // E00B
  50. const ESCAPE = "\xEE\x80\x8C"; // E00C
  51. const SPACE = "\xEE\x80\x8D"; // E00D
  52. const PAGE_UP = "\xEE\x80\x8E"; // E00E
  53. const PAGE_DOWN = "\xEE\x80\x8F"; // E00F
  54. const END = "\xEE\x80\x90"; // E010
  55. const HOME = "\xEE\x80\x91"; // E011
  56. const LEFT_ARROW = "\xEE\x80\x92"; // E012
  57. const UP_ARROW = "\xEE\x80\x93"; // E013
  58. const RIGHT_ARROW = "\xEE\x80\x94"; // E014
  59. const DOWN_ARROW = "\xEE\x80\x95"; // E015
  60. const INSERT = "\xEE\x80\x96"; // E016
  61. const DELETE = "\xEE\x80\x97"; // E017
  62. const SEMICOLON = "\xEE\x80\x98"; // E018
  63. const EQUALS = "\xEE\x80\x99"; // E019
  64. const NUMPAD_0 = "\xEE\x80\x9A"; // E01A
  65. const NUMPAD_1 = "\xEE\x80\x9B"; // E01B
  66. const NUMPAD_2 = "\xEE\x80\x9C"; // E01C
  67. const NUMPAD_3 = "\xEE\x80\x9D"; // E01D
  68. const NUMPAD_4 = "\xEE\x80\x9E"; // E01E
  69. const NUMPAD_5 = "\xEE\x80\x9F"; // E01F
  70. const NUMPAD_6 = "\xEE\x80\xA0"; // E020
  71. const NUMPAD_7 = "\xEE\x80\xA1"; // E021
  72. const NUMPAD_8 = "\xEE\x80\xA2"; // E022
  73. const NUMPAD_9 = "\xEE\x80\xA3"; // E023
  74. const MULTIPLY = "\xEE\x80\xA4"; // E024
  75. const ADD = "\xEE\x80\xA5"; // E025
  76. const SEPARATOR = "\xEE\x80\xA6"; // E026
  77. const SUBTRACT = "\xEE\x80\xA7"; // E027
  78. const DECIMAL = "\xEE\x80\xA8"; // E028
  79. const DIVIDE = "\xEE\x80\xA9"; // E029
  80. const F1 = "\xEE\x80\xB1"; // E031
  81. const F2 = "\xEE\x80\xB2"; // E032
  82. const F3 = "\xEE\x80\xB3"; // E033
  83. const F4 = "\xEE\x80\xB4"; // E034
  84. const F5 = "\xEE\x80\xB5"; // E035
  85. const F6 = "\xEE\x80\xB6"; // E036
  86. const F7 = "\xEE\x80\xB7"; // E037
  87. const F8 = "\xEE\x80\xB8"; // E038
  88. const F9 = "\xEE\x80\xB9"; // E039
  89. const F10 = "\xEE\x80\xBA"; // E03A
  90. const F11 = "\xEE\x80\xBB"; // E03B
  91. const F12 = "\xEE\x80\xBC"; // E03C
  92. const COMMAND = "\xEE\x80\xBD"; // E03D
  93. const META = "\xEE\x80\xBD"; // E03D
  94. }