Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send modifier keys to the attached pane via .send_keys() #13

Closed
RPiAwesomeness opened this issue Aug 21, 2016 · 5 comments
Closed

Send modifier keys to the attached pane via .send_keys() #13

RPiAwesomeness opened this issue Aug 21, 2016 · 5 comments

Comments

@RPiAwesomeness
Copy link

I really like the look of this project. However, for something that I need to do, I need to be able to send a modifier key, Ctrl to be exact.

I've tried a few different things and I'll continue looking around for a solution, but I figured I would post an issue here in case this is not currently possible.

@tony
Copy link
Member

tony commented Aug 23, 2016

Would C-key work?

For Ctrl-a, do C-a or ^-a

@RPiAwesomeness
Copy link
Author

@tony Unfortunately I already tried that and it just gives an error, both in zsh and and in bash:
selection_004

@tony tony self-assigned this Aug 25, 2016
@tony
Copy link
Member

tony commented Sep 16, 2016

I'm considering making enter=False and suppress_history=False by default.

Give this a shot, it worked for me:

pane.libtmux.Server().sessions[0].attached_window.panes[0].

Quick snippet:

libtmux.Server().sessions[0].attached_window.panes[0].send_keys('C-c', enter=False, suppress_history=False)

@RPiAwesomeness
Copy link
Author

@tony Sorry for not responding soon, I was gone and didn't take any machines with me. I had to tweak your snippets to work, but running

libtmux.Server().sessions[0].attached_window.panes[0].send_keys('C-c', enter=False, suppress_history=False)

did work, it did seem to send Ctrl-C!

@stale
Copy link

stale bot commented Nov 11, 2017

This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.

This bot is used to handle issues where the issue hasn't been discussed or
has gone out of date. If an issue isn't resolved and handled in a certain
period of time, it may be closed. If you would like your issue re-opened,
please create a fresh issue with the latest, up to date information and
mention this issue in it.

@stale stale bot added the stale label Nov 11, 2017
@stale stale bot closed this as completed Nov 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants