The userInput module contains the UserInput class which provides the ability to process keyboard presses from a user and call a specific function when certain keys are received.
An abstract input device attached to a Linux evdev device node
Receive and process all available input events
Read device identity and capabilities via ioctl()
Scale the absolute axis into the range [-1, 1] using absAxisInfo
The UserInput class uses the amp.ui.input.evdev module to receive the user’s keyboard presses given the specific Linux keyboard device.
This class provides to ability to add a series of callbacks for specific keyboard presses. These functions will be called in the event that the key presses occur.
Add codes for given key press events. The key can be a tuple where the first index is a list of keys and the second index is a list of modifiers. Or it can be simply a list of keys, or it can be a single key.
Add codes for given key press events. Each key in the keys dictionary can be a tuple where the first index is a list of keys and the second index is a list of modifiers. Or it can be simply a list of keys, or it can be a single key.
Add a single key to the key press cases. The key can be a tuple where the first argument is the list of keys, or a single key, and the second argument is a list of modifiers. Optionally, is can just be a list of keys, or it can be a single key.
Add a list of keys mapped to a single function. Keys can be a tuple where the first index the a list of keys, or a single key, and the second index is the list of modifiers. Or it can be a list of keys, and finally it can be just a single key.