Added little script for scanning keycodes
This commit is contained in:
parent
c19a200b8d
commit
1a4575f018
16
guicurses/keycode_scanner.py
Normal file
16
guicurses/keycode_scanner.py
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
import curses
|
||||||
|
from guicurses import widgets, window
|
||||||
|
|
||||||
|
class mainWindow(window.Window):
|
||||||
|
|
||||||
|
def __init__(self, *args, **kwargs):
|
||||||
|
super(mainWindow, self).__init__(*args, **kwargs)
|
||||||
|
self.run()
|
||||||
|
|
||||||
|
def run(self):
|
||||||
|
while 1:
|
||||||
|
c = self.screen.getch()
|
||||||
|
if c != -1:
|
||||||
|
self.setStatus(c)
|
||||||
|
|
||||||
|
curses.wrapper(mainWindow)
|
Loading…
Reference in New Issue
Block a user