delphyne_demos
|
A keyboard-interrupt poller. Allows users to read a keyboard input with a non-locking behavior making use of the select function, available on most *nix systems. This class is based on the work done by Frank Deng, available on GitHub as part of a set of python tools released under the MIT licence: https://github.com/frank-deng/experimental-works/blob/master/kbhit.py .
Public Member Functions | |
def | __init__ (self) |
def | get_character (self) |
def | key_hit (self) |
Public Attributes | |
input_stream | |
file_descriptor | |
new_terminal | |
old_terminal | |
def __init__ | ( | self | ) |
def get_character | ( | self | ) |
Reads a character from the keyboard.
Reimplemented from KeyboardHandler.
def key_hit | ( | self | ) |
Returns True if a keyboard key has been pressed, False otherwise.
Reimplemented from KeyboardHandler.
file_descriptor |
input_stream |
new_terminal |
old_terminal |