code: def read_actions():
      
      while True:
          key = get_key()
  
          # Handle arrows, j/k (qwerty), and n/e (colemak)
          if key in (const.KEY_UP, const.KEY_CTRL_N, 'k', 'e'):
              yield const.ACTION_PREVIOUS
          elif key in (const.KEY_DOWN, const.KEY_CTRL_P, 'j', 'n'):
              yield const.ACTION_NEXT
          elif key in (const.KEY_CTRL_C, 'q'):
              yield const.ACTION_ABORT
          elif key in ('\n', '\r'):
              yield const.ACTION_SELECT
docs: Yields actions for pressed keys.