Cicode Programming Reference > Cicode Function Categories > Keyboard Functions Introduction > KeySetSeq

KeySetSeq

Adds a keyboard sequence to the current page at runtime. The key sequence is only added to the current window. When the page is closed, the keyboard sequence is deleted.

Syntax

KeySetSeq(sKeySeq, AN, Fn)

sKeySeq:

The keyboard sequence.

AN:

The AN where the keyboard sequence will apply. If you set AN to 0 (zero), the keyboard sequence will apply to all ANs on the page.

Fn:

The function to call when the keyboard sequence matches. This function needs to be a callback function.

Return Value

0 (zero) if successful, otherwise an error is returned.

Related Functions

DspButton, DspButtonFn

Example

/* Set the key sequence and call the "Callback" function when the 
sequence is found. */
KeySetSeq("F2 ### Enter", 0, Callback);
! This function is called when the key sequence is found.
INT
FUNCTION CallBack()
INT Value;
! Get user data.
Value=Arg1;
..
RETURN 0;
END

See Also

Keyboard Functions