Difference between revisions of "SET KEY"

From Recital Documentation Wiki
Jump to: navigation, search
(Products)
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
=SET KEY=
 
 
 
==Class==
 
Keyboard Events
 
 
 
 
==Purpose==
 
==Purpose==
 
Define hot keys
 
Define hot keys
Line 15: Line 8:
  
 
==See Also==
 
==See Also==
[[SET KEY]], [[SET PCKEYS]], [[INKEY()]], [[PRINTSCREEN()]], [[PROCNAME()]], [[PROCLINE()]], [[READKEY()]], [[READVAR()]]
+
[[INKEY()]], [[PRINTSCREEN()]], [[PROCNAME()]], [[PROCLINE()]], [[READKEY()]], [[READVAR()]], [[SET KEY TO]], [[SET PCKEYS]]
  
  
Line 21: Line 14:
 
The SET KEY...TO command enables a user, running an application, to press a key which will cause execution of the specified procedure whenever the program is waiting for keyboard input.  All keys, excluding a through z and 0 through 9, may be used.
 
The SET KEY...TO command enables a user, running an application, to press a key which will cause execution of the specified procedure whenever the program is waiting for keyboard input.  All keys, excluding a through z and 0 through 9, may be used.
  
NOTE: It is important to distinguish this command from the previous command (SET KEY TO <expN>) which has a different purpose.
+
NOTE: It is important to distinguish this command from [[SET KEY TO|SET KEY TO <expN>]] which has a different purpose.
  
On completion of the procedure, execution of the application continues from the point at which it left.  Any valid Recital command can be used in the procedure.  The <expN> is the INKEY() value of the key and <procedure name> is the procedure to be executed when the key is pressed.  The executed procedure specified in the SET KEY...TO command is passed three parameters with the values of PROCNAME(), PROCLINE(), and READVAR() respectively.
+
On completion of the procedure, execution of the application continues from the point at which it left.  Any valid Recital command can be used in the procedure.  The <expN> is the [[INKEY()]] value of the key and <procedure name> is the procedure to be executed when the key is pressed.  The executed procedure specified in the SET KEY command is passed three parameters with the values of PROCNAME(), PROCLINE(), and READVAR() respectively.
  
  
 
==Example==
 
==Example==
<pre>
+
<code lang="recital">
 
procedure showlist
 
procedure showlist
save screen
+
  save screen
aliasnam = select()
+
  aliasnam = select()
use shows in workarea()
+
  use shows in workarea()
display all
+
  display all
select &aliasnam
+
  select &aliasnam
restore screen
+
  restore screen
 
return
 
return
  
 
set key 28 to showlist
 
set key 28 to showlist
accept "Enter Show Name (F1 for Help)" to event</pre>
+
accept "Enter Show Name (F1 for Help)" to event</code>
  
  
 
==Products==
 
==Products==
Recital Mirage Server, Recital Terminal Developer
+
Recital  
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Commands]]
 
[[Category:Commands]]
 
[[Category:Set_Commands|KEY]]
 
[[Category:Set_Commands|KEY]]
 +
[[Category:Keyboard Events]]
 +
[[Category:Keyboard Events Set Commands]]

Latest revision as of 16:12, 23 November 2009

Purpose

Define hot keys


Syntax

SET KEY <expN> TO <procedure name>


See Also

INKEY(), PRINTSCREEN(), PROCNAME(), PROCLINE(), READKEY(), READVAR(), SET KEY TO, SET PCKEYS


Description

The SET KEY...TO command enables a user, running an application, to press a key which will cause execution of the specified procedure whenever the program is waiting for keyboard input. All keys, excluding a through z and 0 through 9, may be used.

NOTE: It is important to distinguish this command from SET KEY TO <expN> which has a different purpose.

On completion of the procedure, execution of the application continues from the point at which it left. Any valid Recital command can be used in the procedure. The <expN> is the INKEY() value of the key and <procedure name> is the procedure to be executed when the key is pressed. The executed procedure specified in the SET KEY command is passed three parameters with the values of PROCNAME(), PROCLINE(), and READVAR() respectively.


Example

procedure showlist
  save screen
  aliasnam = select()
  use shows in workarea()
  display all
  select &aliasnam
  restore screen
return
 
set key 28 to showlist
accept "Enter Show Name (F1 for Help)" to event


Products

Recital