ID:1960636
 
(See the best response by Konlet.)

Problem description:

I'm trying to define a CtrlClick() for when usr clicks an interface control while holding down ctrl.

I have no problem performing that with atoms since Client.Click() will just call the appropriate proc

but how can I do that with controls??

I mean is there a control.click() ???

and lastly what are the other ways to create custom interfaces instead of winset??
Best response
When using a process to set the user's macros, you can do like this:
mob/proc/loadMacros()
winset(src, "macro1", "parent=macro;name=CTRL;command=controlDown")
winset(src, "macro2", "parent=macro;name=CTRL+UP;command=controlUp")

mob/var/tmp/control = FALSE //Whether or not the user is holding control.
mob/verb
controlDown()
control = TRUE //The user is now holding control.
controlUp()
control = FALSE //The user is no longer holding control.

atom/Click()
..()
if(usr.control)
return
I though of something like storing the pressed state of the ctrl key. But isn't there a keyboard proc like get key state or get key??

Also where can I find these macro commands like controlDown?? because when I tried to create the macro from the editor it wouldn't let me use ctrl alone but only in a combination

thx for the help this will work just fine
Also do you know how button click is implemented?? I mean it all starts at client.click() what happens after that??