LDTP  3.5.0
 All Pages
keyrelease

Syntax

keyrelease('<data>')

Description

Functionality of keyrelease is similar to typekey of LTFX project.

ImplementationDetails

Used SPI_generateKeyboardEvent to generate the keyboard events.

Return values
Returns1 on success, LdtpExecutionError exception will be thrown on failure

Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/keypress_actions.py

Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/keypress_actions.py

Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Text.cs

Example

keypress('<shift>');generatekeyevent('hELLO');keyrelease('<shift>');generatekeyevent('<space>World')

This function supports

<alt> - for alt key

<ctrl> - for control key

<shift> - for pressing shift key

<enter> - for pressing enter key

<tab> - for pressing tab key

<del> - for pressing del key

<bksp> - for pressing back space key

<f1> - for pressing F1 function key

...

<f12> - for pressing F1 function key

<up> - for pressing up arrow key

<down> - for pressing down arrow key

<right> - for pressing right arrow key

<left> - for pressing left arrow key

<esc> - for pressing escape key

<space> - for pressing space bar

<home> - for pressing home key

<end> - for pressing end key

<pageup> - for pressing page up key

<pagedown> - for pressing page down key

<prtscrn> - for pressing print screen key

Author
Nagappan Alagappan nagap.nosp@m.pan@.nosp@m.gmail.nosp@m..com


Linux Desktop Testing Project