... < Day Day Up > Using the Key Class to Add Interactivity The Key class is a useful tool for capturing key events from the user (that is, user interaction ... (such as Caps Lock) is toggled on or off The Key class is a top-level class, which means you cannot create a new instance of it. The most common use of the Key class is to determine whether a ... pressed. You would use this syntax to determine whether a key is being pressed: Key.isDown(Key.TAB); The script uses the isDown() method of the Key class to determine whether the Tab key...