Alice Community  

Go Back   Alice Community > Alice 2 > Share Worlds

Thread Tools Display Modes
Prev Previous Post   Next Post Next
Individual Mouse Button Detecton
Senior Member
arty-fishL's Avatar
Status: Offline
Posts: 1,878
Join Date: Mar 2008
Location: In the corner of your eye
Lightbulb Individual Mouse Button Detecton - 05-15-2012, 08:35 PM

Currently mouse click events in Alice are triggered no matter what mouse button is pressed. I have discovered how to detect which mouse button was pressed and whether a modifier key (like CTRL or ALT) was held down at the time.

This is all done in pure Alice code, no Jython.

Play the attached world. Try clicking with each mouse button, it will print which one was used. There is also an event for clicking with CTRL, so try doing so and it will print "CTRL click" and whichever button was used.

None of you will have the latest style mod that enables use of this in the editor, so as far as you will be able to see, the events will look normal at your end, as if they should all trigger when any mouse button is clicked.
Attached Files
File Type: a2w individual mouse button detection.a2w (169.3 KB, 43 views)


I have mostly moved on from Alice, but may still respond to messages if important [¬º-°]¬
Reply With Quote

button, hack, individual, modifier, mouse

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Copyright ©2023, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.