KBHit
- class lib.keypress.KBHit(is_gui=False)
Bases:
objectCreates a KBHit object that you can call to do various keyboard things.
Methods Summary
getarrow()Returns an arrow-key code after kbhit() has been called.
getch()Returns a keyboard character after kbhit() has been called.
kbhit()Returns True if keyboard character was hit, False otherwise.
Resets to normal terminal.
Methods Documentation
- getarrow()
Returns an arrow-key code after kbhit() has been called. Codes are 0 : up 1 : right 2 : down 3 : left Should not be called in the same program as getch().
- getch()
Returns a keyboard character after kbhit() has been called. Should not be called in the same program as getarrow().
- kbhit()
Returns True if keyboard character was hit, False otherwise.
- set_normal_term()
Resets to normal terminal. On Windows this is a no-op.
- getarrow()
Returns an arrow-key code after kbhit() has been called. Codes are 0 : up 1 : right 2 : down 3 : left Should not be called in the same program as getch().
- getch()
Returns a keyboard character after kbhit() has been called. Should not be called in the same program as getarrow().
- kbhit()
Returns True if keyboard character was hit, False otherwise.
- set_normal_term()
Resets to normal terminal. On Windows this is a no-op.