CAS CS 101 Chapter Notes - Chapter 6: Usability, Space Bar
Document Summary
There are 2 steps to making a program respond when an event occurs: Choose (or define) a method providing the behavior to occur in response to the event. Mnemonic values - a" is the first letter of ascend" and d" is the first letter of. Descend", these are easy to remember | the arrows point in the direction the object would go. Convenient positions - a" and d" are near one another on most keyboards = easy to control, the 4 arrow keys are grouped together important to consider human factors when building interactive stories. Using when a key is pressed/typed event : contains three different handlers: Begin - a handler here is performed once, when the key is first pressed. During - a handler here is performed continuously, as long as the key remains down. End - a handler here is performed once, when the key is released.