Skip to content

Do not send-keys literally by default #88

Closed
@ritiek

Description

@ritiek

I noticed that libtmux sends keys to a window pane literally. A minimal reproduction:

import libtmux

server = libtmux.Server()
session = server.new_session('happy_session')
window = session.new_window('happy_window')
pane = window.attached_pane

# instead of KeyboardInterrupt, libtmux sends 'C-c'
pane.send_keys('C-c')

tmux uses -l to specifiy if the keys are to be sent literally:

# not literally
tmux send-keys -t happy_session C-c

# literally
tmux send-keys -l -t happy_session C-c

It would be nice if there were an option to override this behavior in libtmux and preferably set as defaults Pane.send_keys(literal=False) just as in tmux.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions