code: def getkeystroke(self, scr, vs=None):
          'Get keystroke and display it on status bar.'
          k = None
          try:
              k = scr.get_wch()
              self.drawRightStatus(scr, vs or self.sheets[0]) # continue to display progress %
          except curses.error:
              return ''  # curses timeout
  
          if isinstance(k, str):
              if ord(k) >= 32 and ord(k) != 127:  # 127 == DEL or ^?
                  return k
              k = ord(k)
          return curses.keyname(k).decode('utf-8'f getkeystroke(self, scr, vs=None):
          'Get keystroke and display it on status bar.'
          k = None
          try:
              k = scr.get_wch()
              self.drawRightStatus(scr, vs or self.sheets[0]) # continue to display progress %
          except curses.error:
              return ''  # curses timeout
  
          if isinstance(k, str):
              if ord(k) >= 32 and ord(k) != 127:  # 127 == DEL or ^?
                  return k
              k = ord(k)
          return curses.keyname(k).decode('utf-8')
docs: Get keystroke and display it on status bar.