Simulate input/Keyboard: Difference between revisions
Content added Content deleted
Thundergnat (talk | contribs) (Rename Perl 6 -> Raku, alphabetize, minor clean-up) |
|||
Line 357: | Line 357: | ||
Compile and run it by (assuming we have GNU C compiler): |
Compile and run it by (assuming we have GNU C compiler): |
||
<pre>nim c -r ourfile.nim</pre> |
<pre>nim c -r ourfile.nim</pre> |
||
=={{header|OCaml}}== |
=={{header|OCaml}}== |
||
Line 492: | Line 493: | ||
This only works with internal windows. |
This only works with internal windows. |
||
=={{header|Perl}}== |
=={{header|Perl}}== |
||
Line 518: | Line 518: | ||
<lang perl>SendKeys("Hello, how are you?\n");</lang> |
<lang perl>SendKeys("Hello, how are you?\n");</lang> |
||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
=={{header|PicoLisp}}== |
=={{header|PicoLisp}}== |
||
Line 631: | Line 595: | ||
>>> pyautogui.keyUp('shift') # release the shift key |
>>> pyautogui.keyUp('shift') # release the shift key |
||
>>> pyautogui.hotkey('ctrl', 'shift', 'esc')</lang> |
>>> pyautogui.hotkey('ctrl', 'shift', 'esc')</lang> |
||
=={{header|Racket}}== |
=={{header|Racket}}== |
||
Line 658: | Line 621: | ||
(send canvas simulate-key (new key-event% (key-code #\k))) ; Sends the simulated key press (with a key-event% instance) |
(send canvas simulate-key (new key-event% (key-code #\k))) ; Sends the simulated key press (with a key-event% instance) |
||
;outputs k</lang> |
;outputs k</lang> |
||
⚫ | |||
(formerly Perl 6) |
|||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
=={{header|REXX}}== |
=={{header|REXX}}== |
||
Line 669: | Line 669: | ||
/* [↑] text will be available for any program to use (including DOS).*/ |
/* [↑] text will be available for any program to use (including DOS).*/ |
||
/*stick a fork in it, we're all done. */</lang><br><br> |
/*stick a fork in it, we're all done. */</lang><br><br> |
||
=={{header|Rust}}== |
=={{header|Rust}}== |
||
Line 679: | Line 678: | ||
autopilot::key::type_string("Hello, world!", None, None, &[]); |
autopilot::key::type_string("Hello, world!", None, None, &[]); |
||
}</lang> |
}</lang> |
||
=={{header|Scala}}== |
=={{header|Scala}}== |
||
{{libheader|Scala}} |
{{libheader|Scala}} |