You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

keyboard-test.txt 5.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  1. Test protocol for keyboard handling
  2. ===================================
  3. Platform specific tests/issues are marked with [].
  4. These tests are primarily about what is sent over the protocol and some
  5. may be difficult or impossible to test using normal applications. One
  6. such case is that xev will see fake KeyRelease events on key repeat,
  7. even when no such events were sent by the client. In these cases you
  8. can turn on debug logging in either the client or the server by
  9. specifying "-Log *:stderr:100".
  10. We currently have a limitation in Xvnc where it can run out of symbols,
  11. resulting in nothing being sent to the applications. Just run setxkbmap
  12. with any layout to reset the symbol table.
  13. Client (classic, non-raw, mode)
  14. -------------------------------
  15. - Normal symbols:
  16. - ASCII characters
  17. - Latin 1 character
  18. - Unicode BMP characters
  19. - Unicode non-BMP characters (does any layout actually have these?)
  20. - Dead keys:
  21. These are not available on a single layout, so you need to switch to
  22. test everything. The useful layouts also differ per platform:
  23. X11: US International for most, Greek for some specific diacretics
  24. Win: US International, Czech, Greek Polytonic, Vietnamese
  25. OS X: ABC Extended (FIXME: lots of broken keys),
  26. Greek (FIXME: cannot be used with TigerVNC)
  27. - Grave
  28. - Acute
  29. - Circumflex
  30. - Tilde
  31. - Macron (FIXME: broken on Win)
  32. - Breve
  33. - Dot above
  34. - Dot below
  35. - Diaeresis
  36. - Ring above
  37. - Double acute
  38. - Caron
  39. - Cedilla
  40. - Ogonek
  41. - Ypogegrammeni (iota below) (FIXME: broken on Win)
  42. - Dialytika tonos [Win] (Diaresis on X11, and maybe OS X?)
  43. - Comma above (FIXME: broken on Win)
  44. - Reversed comma above (FIXME: broken on Win)
  45. - Horn [X11?]
  46. - Hook above [Win?]
  47. - Hook below [X11?, Win?]
  48. - Dakuten (Katakana voiced mark) (Only Input Methods layouts?)
  49. - Handakuten (Katakana semi-voiced mark) (Only Input Methods layouts?)
  50. - FIXME: Many more that we currently probably don't support
  51. - No composition on client
  52. - Modifiers:
  53. X11: You can usually toggle Hyper/Super and Compose/Scroll_Lock using
  54. XKB options.
  55. - CapsLock, NumLock
  56. - Shift, Ctrl
  57. - Alt, AltGr, Super [Win, X11]
  58. - Ctrl+AltGr [Win]
  59. - Meta [X11]
  60. - Left/right identification (FIXME: broken release for Shift on Win)
  61. - CmdL => AltL, CmdR => SuperL, AltL => ModeSwitch, AltR => Level3Shift [OS X]
  62. - Hyper sends Super [X11]
  63. - CapsLock, Shift and AltGr affect symbol lookup
  64. - Ctrl does not affect symbol lookup
  65. - Ctrl+Alt+<ANY> sends the same symbol as <ANY>
  66. - "Shift press, A press, Shift release, A release" should not send "a release"
  67. - Numpad:
  68. - NumLock affects symbol lookup [Win, X11]
  69. - Numpad specific symbols are sent
  70. - Decimal key should send Decimal for layouts with . as a symbol, and
  71. Separator for layouts with , as a symbol
  72. - Shift inverts NumLock behaviour [X11]
  73. - Shift turns NumLock off, but not on [Win] (FIXME: fake Shifts also sent)
  74. - Multimedia keys:
  75. OS X: FIXME: all broken
  76. - Back, Forward, Refresh, Stop
  77. - HomePage, Search, Favourites (FIXME: broken on Win)
  78. - Mail, Calculator
  79. - Volume up, down, mute
  80. - Media next, previous, stop, play
  81. - Sleep (FIXME: broken on Win)
  82. - FIXME: probably more keys exist
  83. - Non-character keys:
  84. - F1-F24 (FIXME: F14-F15 broken on OS X)
  85. - Tab, Space, Backspace, Return, Esc
  86. - LeftTab sends Tab [X11]
  87. - PrntScrn, ScrollLock, Pause [X11, Win]
  88. - Help [X11?, OS X]
  89. - Insert [X11, Win]
  90. - Delete, Home, End, PageUp, PageDown
  91. - Arrow keys
  92. - Menu
  93. - Alt+PrntScrn sends Sys_Req [Win]
  94. - French layout (AZERTY and inverted shift behaviour for many keys)
  95. - Local layout changes are respected
  96. Client (raw mode)
  97. -----------------
  98. - All physical keys (modifiers or type of symbol shouldn't matter)
  99. - Normal keys
  100. - Dead keys
  101. - Numpad
  102. - Multimedia keys
  103. - Non-character keys
  104. Client (both modes)
  105. -------------------
  106. - Key repeat should not send repeated release events
  107. - Keys are released on loss of focus
  108. - Local input methods are disabled/enabled with focus
  109. - System keys should be grabbed in full screen (FIXME: lots missing on Win)
  110. The exact keys depends on the system and configuration, but it
  111. is usually variants of these:
  112. - Alt+Tab
  113. - Super (and Super+other)
  114. - Multimedia keys
  115. - Ctrl+Alt+Delete
  116. - Ctrl+Esc
  117. - F8-F12
  118. - Lock key states:
  119. - Adjusted on server when connecting
  120. - Adjusted on server when regaining focus
  121. - Server changes are honored when focused
  122. - Server changes are not honored when not focused
  123. - CapsLock
  124. - NumLock (hidden state on macOS)
  125. - ScollLock* [X11, Win]
  126. * Usually needs to be enabled with: xmodmap -e "add mod3 = Scroll_Lock"
  127. - Virtual keyboard (as much of the above as is possible)
  128. Server
  129. ------
  130. - Fake key events
  131. An extra press or release should be added before the real key press
  132. in order to get the correct state to get the desired symbol. A second
  133. fake event should be added after the real key press to restore state.
  134. No extra events should be added for a key release.
  135. Possible fake keys:
  136. - Shift
  137. - AltGr
  138. - Shift+Tab bypasses this and never fake releases Shift
  139. - Alternative keys
  140. A semantically equivalent key is sent when the desired key cannot be
  141. reached in the current keyboard state:
  142. - Left modifier <=> Right modifier (e.g. Alt_R for Alt_L)
  143. - Keypad key <=> Standard key
  144. - ISO_Level3_Shift <=> Mode_Switch
  145. - Meta for Shift+Alt (if server keymap agrees)
  146. - Lock key heuristics (for clients without lock key extension)
  147. - CapsLock is corrected when A-Z or a-z are pressed
  148. - CapsLock is corrected when Shift and A-Z or a-z are pressed*
  149. - NumLock is corrected when 0-9 on the keypad are pressed
  150. * Gives incorrect behaviour if the client doesn't have "Shift cancels
  151. CapsLock behaviour", e.g. macOS