User Tools

Site Tools


code:device:keyboard

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

code:device:keyboard [2011/01/26 20:35] – created jmgrcode:device:keyboard [2011/04/20 20:33] (current) – removed jmgr
Line 1: Line 1:
-====== Keyboard ====== 
-This object allows you to simulate keyboard actions. 
- 
-===== Functions ===== 
- 
-==== Keyboard ==== 
-Constructor function. 
- 
-=== Syntax === 
-<code javascript> 
-var myObject = new Keyboard(); 
-</code> 
- 
-===== Methods ===== 
- 
-==== pressKey ==== 
-Presses a key. 
- 
-=== Syntax === 
-<code javascript> 
-myObject.pressKey(key); 
-</code> 
- 
-=== Arguments === 
-  - key - (string) the key to press 
- 
-=== Returns === 
-  * (Keyboard) this Keyboard 
- 
-=== Exceptions === 
-  * (PressKeyError) unable to press the key 
- 
-=== Notes === 
-The key parameter can be a single letter or a key name. 
- 
-==== releaseKey ==== 
-Releases a key. 
- 
-=== Syntax === 
-<code javascript> 
-myObject.releaseKey(key); 
-</code> 
- 
-=== Arguments === 
-  - key - (string) the key to release 
- 
-=== Returns === 
-  * (Keyboard) this Keyboard 
- 
-=== Exceptions === 
-  * (ReleaseKeyError) unable to release the key 
- 
-=== Notes === 
-The key parameter can be a single letter or a key name. 
- 
-==== triggerKey ==== 
-Triggers a key. (press and release) 
- 
-=== Syntax === 
-<code javascript> 
-myObject.triggerKey(key); 
-</code> 
- 
-=== Arguments === 
-  - key - (string) the key to trigger 
- 
-=== Returns === 
-  * (Keyboard) this Keyboard 
- 
-=== Exceptions === 
-  * (TriggerKeyError) unable to trigger the key 
- 
-=== Notes === 
-The key parameter can be a single letter or a key name. 
- 
-==== writeText ==== 
-Write text. 
- 
-=== Syntax === 
-<code javascript> 
-myObject.writeText(text); 
-</code> 
- 
-=== Arguments === 
-  - text - (string) the text to write 
- 
-=== Returns === 
-  * (Keyboard) this Keyboard 
- 
-=== Exceptions === 
-  * (WriteTextError) unable to write the text 
- 
- 
- 
- 
- 
  
code/device/keyboard.1296074127.txt.gz · Last modified: 2021/02/13 11:23 (external edit)