Difference between revisions of "AGIWiki/set.key"

From ScummVM :: Wiki
Jump to navigation Jump to search
m
m (Text replacement - "</source>" to "</syntaxhighlight>")
 
(3 intermediate revisions by 2 users not shown)
Line 15: Line 15:
The key combination derived from codes A and B will be assigned to controller cC.
The key combination derived from codes A and B will be assigned to controller cC.


A list of common keyboard assignments can be found in the [[Setting Up Keyboard Shortcuts]] topic.
A list of common keyboard assignments can be found in the [[AGIWiki/Setting Up Keyboard Shortcuts]] topic.


== Example ==
== Example ==


<syntax type = "C++">
<syntaxhighlight lang="cpp">
set.key(0, 59, c1);  //F1 to controller 1  
set.key(0, 59, c1);  //F1 to controller 1  
set.key(9, 0, c2);  //Tab key to controller 2
set.key(9, 0, c2);  //Tab key to controller 2
</syntax>
</syntaxhighlight>


== Technical Information ==
== Technical Information ==

Latest revision as of 15:04, 25 October 2018


AGIWiki


The set.key command assigns a keyboard shortcut to a controller.

Syntax

set.key(byt A, byt B, ctl cC);

Remarks

Multiple menu items and keys can be assigned to the same controller.

The key combination derived from codes A and B will be assigned to controller cC.

A list of common keyboard assignments can be found in the AGIWiki/Setting Up Keyboard Shortcuts topic.

Example

set.key(0, 59, c1);  //F1 to controller 1 
set.key(9, 0, c2);   //Tab key to controller 2

Technical Information

Required interpreter version Available in all AGI versions
Bytecode value 121 (0x79 hex)

See also