TRIGGER_KEY_DOWN

TRIGGER_KEY_DOWN N,C,S

SIMULATES THE EVENT ON_KEY_DOWN ON THE SYSTEM OBJECT NUMBER N

  • Type: Command
  • Parameter: 1
  • Group: System Objects

ACTION

The command TRIGGER_KEY_DOWN N,C,S simulates ON_KEY_DOWN, the event generated when a key of the beyboard is pressed on the system object designated by the number N.

C is the code of simulated key.

S is a code to simulate a combined key

0 for single key

1 for SHIFT

2 for ALT

3 for CONTROL

4 for SHIFT + ALT

5 for SHIFT + CONTROL

6 for ALT + CONTROL

SYNTAX: TRIGGER_KEY_DOWN N,C,S

  • N = system object number (integer or real). Must be greater than 0 and less than or equal to the allowed maximum number of system objects.
  • C = code of simulated key (integer or real).
  • S = code of combined key (integer or real).

USE

  • The command TRIGGER_KEY_DOWN is used to simulate the event ON_KEY_DOWN on a system object.

ERROR

  • If number N is not a correct expression.
  • If number N exceeds the allowed maximum number of system objects.
  • If number N is less than or equal to 0.
  • If the object number N is not of type : BUTTON, EDIT, MEMO, COMBO, FORM, LIST, CHECK, OPTION, SPIN, GRID, MEMO_RICH, BUTTON_PICTURE, SCENE2D, GRID_DRAW, SYNEDIT.
  • If C is not a correct expression.
  • If S is not a correct expression.

EXAMPLE

label keydown

edit 1

on_key_down 1,keydown

wait 1000

trigger_key_down 1,65,1

end

keydown:

caption 0,"KEY DOWN done: "+CHR$(key_down_code)+" "+STR$(key_down_special)

return

SEE ALSO

TRIGGER_CLICK

TRIGGER_KEY_UP