How to change cursor with ctrl and shift?
Eric Chatonet
eric.chatonet at sosmartsoftware.com
Mon Jan 14 06:40:50 EST 2008
Hi Sakari,
Le 14 janv. 08 à 12:07, Sakari Ruoho a écrit :
> Hello folks,
>
> Was wondering how to change the mouse cursor behavior, when user
> presses either ctrl or shift key? Like in photoshop with select
> tool where u can add to selection by pressing shift and remove from
> selection by pressing ctrl? If anyone has implemented anything like
> this, any help would be appreaciated. Thank you!
>
> Sakari Ruoho
> Software Designer
> sakari.ruoho at academica.com
To achieve this you can use a mouseWithin handler:
on mouseWithin
if the shiftKey is dow then set the cursor to x
else if the optionKey is down then set the cursor to y
else set the cursor to z
lock cursor
end mouseWithin
-------------------------------------
on mouseLeave
unlock cursor
end mouseLeave
By default mouseWithin will be sent every 200 ms but you can adjust
this value by setting the idleRate (or idleTicks) property.
Best regards from Paris,
Eric Chatonet.
----------------------------------------------------------------
Plugins and tutorials for Revolution: http://www.sosmartsoftware.com/
Email: eric.chatonet at sosmartsoftware.com/
----------------------------------------------------------------
More information about the use-livecode
mailing list