def WinProcKeySess(self):
kp = 0
while (kp != 27) & (kp != 9) & (kp!=45) & (kp!=84) & (kp!=122): # while not press: esc,tab,minus,T,z
kp = self.WinCgetch()
if kp == 101: # e key
self.DBsessionOrder = 1
if kp == 108 : # l key
self.DBsessionOrder = 2
if kp == 120: # x key
self.DBsessionOrder = 3
if kp == 114: # r key
self.DBsessionOrder = 4
if kp == 32: # space key
if not self.WinTxtSessSpool():
self.WinPrintError('Error txt spooling.')
if kp == 104: # h key
pass
self.WinShowSubMenu()
if kp == 27:
self.PRG_EXIT = 1
curses.ungetch(kp) # push key to main loop
return(kp)
评论列表
文章目录