LDTP
3.5.0
|
generatekeyevent('<data>')
Functionality of generatekeyevent is similar to typekey of LTFX project.
Used SPI_generateKeyboardEvent to generate the keyboard events.
Returns | 1 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
generatekeyevent('Testing LDTP\'s enterstring function')
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
NOTE: <<> - To enter < symbol, it has to be escaped within <>