TESTARtool / TESTAR_dev

TESTAR, automated testing through the Graphical User Interface
http://www.testar.org
BSD 3-Clause "New" or "Revised" License
35 stars 24 forks source link

Current key implementation cannot handle all keys #171

Closed GuyT07 closed 1 year ago

GuyT07 commented 5 years ago

The current KBKeys enum looks like this:

public enum KBKeys
{
  KEY_FIRST(2400, 400),
  KEY_LAST(2402, 402),
  KEY_TYPED(2400, 400),
  KEY_PRESSED(2401, 401),
  ...

Mapping JNativeHook keys to a enum is in general a bad idea because it is (nearly) impossible to maintain all the mappings.

eg. VK_EXCLAMATION_MARK(!) or VK_ASTERISK(*) would crash TESTAR because no mapping is available. Please notice that both examples can be inserted when generation mode is random.

Proposal:

pekkakaho commented 4 years ago

The UTF-32 support is introducing some issues elsewhere in TESTAR, so those need to be fixed before merging.

ferpasri commented 1 year ago

Related with https://github.com/TESTARtool/TESTAR_dev/pull/193 To deal with special characters, we have created a PasteText action that allows the use of the system clipboard for inserting special characters.