Applies To:
  • CitectSCADA 1.00 1.01 1.10 1.11 1.20 2.00 2.01 3.00 4.00

Question: I have a keyboard command configured on top of a symbols. The Key Sequence is LBUTTON_DN, ie execute this command when the left mouse button is pressed. However if the command cursor in on the symbol and the user clicks the mouse button over some other part of the window, the command is executed. Is there any way to stop this effect. I only want the command to execute if the user clicks the mouse button on top of the symbol, ie the same way buttons work.. 

Using the LBUTTON_DN key is the same as using a keyboard key. So the command will execute ignoring of where the mouse cursor is. This is the effect you want if the key you had defined was say F1. You want the keyboard command to execute no matter where the mouse cursor is.

To only have a command execute on top of a symbol use the key LBUTTON_CMD_DN. This is the same as LBUTTON_DN, however it only executes when you are on top of the object. The raw key code associated with this key name is KEY_LBTN_CMD_DN. There is also commands for right buttons and up commands.