Alice Community

Alice Community (http://www.alice.org/community/index.php)
-   Suggestion Box (http://www.alice.org/community/forumdisplay.php?f=26)
-   -   Add more Keys to the When Key Is Pressed Event (http://www.alice.org/community/showthread.php?t=10216)

AliceMaster00 07-31-2013 08:37 AM

Add more Keys to the When Key Is Pressed Event
 
Can you guys add keys like Left Shift or Control, or even Escape?

aikmin 11-18-2013 12:02 AM

More keys for When "<key> is typed" event
 
Edit your \Required\resources\common\StandardResources.py file.

Find this section in the file:
["edu.cmu.cs.stage3.alice.core.behavior.KeyClickBehavior",
["keyCode",
java.awt.event.KeyEvent.VK_SPACE,
java.awt.event.KeyEvent.VK_ENTER, ...

Add the items/keys you want.

If you are not sure of the keyCode, refer to [url]http://docs.oracle.com/javase/7/docs/api/java/awt/event/KeyEvent.html[/url]

Repeat for (if needed):
["edu.cmu.cs.stage3.alice.core.behavior.KeyIsPressedBehavior",
["keyCode",
java.awt.event.KeyEvent.VK_SPACE,
java.awt.event.KeyEvent.VK_ENTER,...


All times are GMT -5. The time now is 04:50 AM.

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