Simulate input/Keyboard: Difference between revisions

no edit summary
No edit summary
Line 388:
AW_SendKeys("123+3=")
EndIf</lang>
 
=={{header|Python}}==
{{works with|Python|2.5+}}
{{works with|Python|3.1+}}
{{libheader|PyAutoGUI}}
 
Target may be externally created.
 
<lang Python>>>> import pyautogui
>>> pyautogui.typewrite('Hello world!') # prints out "Hello world!" instantly
>>> pyautogui.typewrite('Hello world!', interval=0.25) # prints out "Hello world!" with a quarter second delay after each character
>>> pyautogui.press('enter') # press the Enter key
>>> pyautogui.press('f1') # press the F1 key
>>> pyautogui.press('left') # press the left arrow key
>>> pyautogui.keyDown('shift') # hold down the shift key
>>> pyautogui.press('left') # press the left arrow key
>>> pyautogui.keyUp('shift') # release the shift key
>>> pyautogui.hotkey('ctrl', 'shift', 'esc')</lang>
 
 
=={{header|Racket}}==