Tmux prefix key not working #6177

Closed
opened 2026-01-31 00:31:43 +00:00 by claunia · 7 comments
Owner

Originally created by @alexeyre on GitHub (Jan 28, 2020).

Environment

Windows build number: 10.0.18362.0
Windows Terminal version (if applicable): 0.8.10091.0
tmux: 2.6

Steps to reproduce

  1. Open Ubuntu WSL v1
  2. Start a tumx session with tmux
  3. Press prefix combination (Ctrl-A in my case, but I've tried without my .tmux.conf and Ctrl-B also doesn't work)

Expected behavior

Tmux to catch my prefix key and allow me to access its keychords.

Actual behavior

The input doesn't appear to have been registered anywhere.

I've tried with an empty keybindings section and both of the following, none of which work:

    "keybindings": [
	{ "command": null, "keys": ["ctrl-a"] },
	{ "command": null, "keys": ["ctrl-b"] }
    ]
    "keybindings": [
	{ "command": "unbound", "keys": ["ctrl-a"] },
	{ "command": "unbound", "keys": ["ctrl-b"] }
    ]

My (naive) guess would be that terminal is still grabbing the key combination just not acting on it, rather than passing it through to the instance itself when you set the keybind to "unbound", but I don't really know anything about the internals of terminal so that's a stab in the dark.

Originally created by @alexeyre on GitHub (Jan 28, 2020). # Environment ```none Windows build number: 10.0.18362.0 Windows Terminal version (if applicable): 0.8.10091.0 tmux: 2.6 ``` # Steps to reproduce 1. Open Ubuntu WSL v1 2. Start a tumx session with `tmux` 3. Press prefix combination (Ctrl-A in my case, but I've tried without my .tmux.conf and Ctrl-B also doesn't work) <!-- A description of how to trigger this bug. --> # Expected behavior Tmux to catch my prefix key and allow me to access its keychords. <!-- A description of what you're expecting, possibly containing screenshots or reference material. --> # Actual behavior The input doesn't appear to have been registered anywhere. I've tried with an empty keybindings section and both of the following, none of which work: ```javascript "keybindings": [ { "command": null, "keys": ["ctrl-a"] }, { "command": null, "keys": ["ctrl-b"] } ] ``` ```javascript "keybindings": [ { "command": "unbound", "keys": ["ctrl-a"] }, { "command": "unbound", "keys": ["ctrl-b"] } ] ``` My (naive) guess would be that terminal is still grabbing the key combination just not acting on it, rather than passing it through to the instance itself when you set the keybind to "unbound", but I don't really know anything about the internals of terminal so that's a stab in the dark.
claunia added the Needs-TriageNeeds-Tag-FixNeeds-Attention labels 2026-01-31 00:31:43 +00:00
Author
Owner

@DHowett-MSFT commented on GitHub (Jan 31, 2020):

I can't reproduce this. If you (outside of tmux, in WSL) run showkey -a and press Ctrl+B and Ctrl+A, what do you get?

I get this:

image

incidentally, i think your bindings need to use ctrl+ and not ctrl-.

@DHowett-MSFT commented on GitHub (Jan 31, 2020): I can't reproduce this. If you (outside of tmux, in WSL) run `showkey -a` and press <kbd>Ctrl+B</kbd> and <kbd>Ctrl+A</kbd>, what do you get? I get this: ![image](https://user-images.githubusercontent.com/14316954/73519610-65d83b00-43b6-11ea-8d4d-5a1573c48504.png) _incidentally, i think your bindings need to use `ctrl+` and not `ctrl-`._
Author
Owner

@alexeyre commented on GitHub (Feb 2, 2020):

Well I think that's my new record for most stupid issue, replacing the "-"s for "+"s in my binding fixed everything...
closing.

@alexeyre commented on GitHub (Feb 2, 2020): Well I think that's my new record for most stupid issue, replacing the "-"s for "+"s in my binding fixed everything... closing.
Author
Owner

@alexeyre commented on GitHub (Feb 3, 2020):

Hm, strange, this worked earlier but this morning: nothing. I opened up showkey to have a look and now it's sending keycode 0x1b along with the Ctrl-A and Ctrl-B.
Interestingly this behaviour persists if I remove everything from my keybinds config block, every control key works except Ctrl-A and Ctrl-B.
Just for testing I assigned my prefix key to Ctrl-o, and everything was functional inside tmux.
showkeys

@alexeyre commented on GitHub (Feb 3, 2020): Hm, strange, this worked earlier but this morning: nothing. I opened up showkey to have a look and now it's sending keycode 0x1b along with the Ctrl-A and Ctrl-B. Interestingly this behaviour persists if I remove everything from my keybinds config block, every control key works except Ctrl-A and Ctrl-B. Just for testing I assigned my prefix key to Ctrl-o, and everything was functional inside tmux. ![showkeys](https://user-images.githubusercontent.com/38869148/73644987-4d924580-466e-11ea-9252-de3225a79ac9.png)
Author
Owner

@DHowett-MSFT commented on GitHub (Feb 3, 2020):

Puzzling: those are coming in as Alt+Ctrl+A (and B)

@DHowett-MSFT commented on GitHub (Feb 3, 2020): Puzzling: those are coming in as <kbd>Alt+Ctrl+A</kbd> (and B)
Author
Owner

@alexeyre commented on GitHub (Feb 5, 2020):

Right, I think I've figured out the culprit: Programmer Dvorak (
https://www.kaufmann.no/roland/dvorak/) causes the Ctrl+A and Ctrl+B inputs
to be broken, if I switch my windows input layout to QWERTY then they
register just fine. I have no idea why a keyboard layout would be messing
with the ctrl modifier like that nor why it only affects the a and b keys,
I use the same layout on a Linux box and I run into no such issue, so it's
the way the layout has been compiled for windows.

I just switched my layout back to Programmer Dvorak, suddenly it's working again like it did previously?

On Mon, 3 Feb 2020 at 17:05, Dustin L. Howett (MSFT) <
notifications@github.com> wrote:

Puzzling: those are coming in as Alt+Ctrl+A (and B)


You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/microsoft/terminal/issues/4377?email_source=notifications&email_token=AJIRRHAZRXPLH6R2OK7DCJTRBBFD3A5CNFSM4KMP4BM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKUTTAI#issuecomment-581515649,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AJIRRHABXXHB5CPTTWMBXSTRBBFD3ANCNFSM4KMP4BMQ
.

@alexeyre commented on GitHub (Feb 5, 2020): Right, I think I've figured out the culprit: Programmer Dvorak ( https://www.kaufmann.no/roland/dvorak/) causes the Ctrl+A and Ctrl+B inputs to be broken, if I switch my windows input layout to QWERTY then they register just fine. I have no idea why a keyboard layout would be messing with the ctrl modifier like that nor why it only affects the a and b keys, I use the same layout on a Linux box and I run into no such issue, so it's the way the layout has been compiled for windows. I just switched my layout back to Programmer Dvorak, suddenly it's working again like it did previously? On Mon, 3 Feb 2020 at 17:05, Dustin L. Howett (MSFT) < notifications@github.com> wrote: > Puzzling: those are coming in as Alt+Ctrl+A (and B) > > — > You are receiving this because you modified the open/close state. > Reply to this email directly, view it on GitHub > <https://github.com/microsoft/terminal/issues/4377?email_source=notifications&email_token=AJIRRHAZRXPLH6R2OK7DCJTRBBFD3A5CNFSM4KMP4BM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKUTTAI#issuecomment-581515649>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/AJIRRHABXXHB5CPTTWMBXSTRBBFD3ANCNFSM4KMP4BMQ> > . >
Author
Owner

@alexeyre commented on GitHub (Feb 18, 2020):

Closing because this isn't an issue with Terminal.

@alexeyre commented on GitHub (Feb 18, 2020): Closing because this isn't an issue with Terminal.
Author
Owner

@DHowett-MSFT commented on GitHub (Feb 18, 2020):

Thank you for following up. Really sorry about that -- we're looking at our input stack for a bunch of other reasons, anyway, so perhaps this'll get a bit better?

@DHowett-MSFT commented on GitHub (Feb 18, 2020): Thank you for following up. Really sorry about that -- we're looking at our input stack for a bunch of other reasons, anyway, so perhaps this'll get a bit better?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#6177