Print

JOSF – Special Keys

Special Keys allow you to simulate keyboard input in test steps such as Send Keys or Type.
They can be used to press navigation keys, function keys, modifier keys, or combinations exactly as if the user pressed them on a real keyboard.


How to Enter a Special Key

  • Always type the key name literally in uppercase (case-insensitive).
    Example: ENTERTABESCAPE.
  • Do not use the Selenium/WebDriver Unicode codes (e.g., \ue007).
    These codes will fail in JOSF with an “Invalid special keys” error.
  • You can send a sequence of keys by using the other type text action:
    Example: HELLOENTER.

Valid Key Names

Navigation

Key NameAliasesFunction
TABMove focus to next field
ARROW_UPUPMove up
ARROW_DOWNDOWNMove down
ARROW_LEFTLEFTMove left
ARROW_RIGHTRIGHTMove right
PAGE_UPScroll up a page
PAGE_DOWNScroll down a page
HOMEJump to start
ENDJump to end

Editing

Key NameAliasesFunction
BACK_SPACEDelete character before
DELETEDelete character after
INSERTToggle insert/overwrite
CLEARClear the field

Confirmation & Control

Key NameAliasesFunction
ENTERConfirm / submit
RETURNSame as Enter
ESCAPECancel or close
CANCELCancel action
HELPShow help
SPACESpace character / toggle checkbox

Modifier Keys

Key NameFunction
SHIFTShift modifier
LEFT_SHIFTShift modifier
CONTROLControl modifier
LEFT_CONTROLControl modifier
ALTAlt modifier
LEFT_CONTROLAlt modifier
METACommand/Windows key

Function Keys

Key NameFunction
F1 … F12Function keys 1 to 12
NUMPAD0 … NUMPAD9Numpad keys 0 to 9
MULTIPLYInsert *
ADDInsert +
SEPARATORInsert file separator key(// e.g.)
SUBTRACTInsert –
DECIMALInsert . or , (depending on machine settings)
SEMICOLONInsert ;
EQUALSInsert =
DEVIDEInsert /

Examples

Single Key

ActionInput in JOSF
Press EnterENTER
Move focus forwardTAB
Press EscapeESCAPE

Common Mistakes

MistakeWhy it failsCorrect approach
\ue007Selenium/WebDriver code, not accepted in JOSFENTER
"ENTER" (with quotes)Quotes are treated as literal charactersENTER
enterr (typo)Not a valid keyENTER

Error Messages

  • Invalid special keys found – This happens when:
    • The key name is not in the valid list.
    • A Selenium Unicode code was used instead of a literal name.

What to do: Use the written key name (e.g., ENTERTABESCAPE).

In this document