def step_impl(ctx, key): mappings = { "enter": b"\x0a", "up": b"\x1b[A", "down": b"\x1b[B", "right": b"\x1b[C", "left": b"\x1b[D", "esc": b"\x1b", "c-c": b"\x03", "c-d": b"\x04", "c-p": b"\x10", "c-q": b"\x11", } util.write(ctx.pty, mappings[key.lower()])
def step_impl(ctx, text): util.write(ctx.pty, text.encode())
def step_impl(ctx, text): util.write(ctx.pty, text)