PDA

View Full Version : Add more Keys to the When Key Is Pressed Event


AliceMaster00
07-31-2013, 08:37 AM
Can you guys add keys like Left Shift or Control, or even Escape?

aikmin
11-18-2013, 12:02 AM
Edit your \Required\resources\common\StandardResources.py file.

Find this section in the file:
["edu.cmu.cs.stage3.alice.core.behavior.KeyClickBeha vior",
["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 http://docs.oracle.com/javase/7/docs/api/java/awt/event/KeyEvent.html

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