Alt arrow keys do nothing; key unbinding broken? #5222

Closed
opened 2026-01-31 00:07:57 +00:00 by claunia · 16 comments
Owner

Originally created by @paulwhiting on GitHub (Nov 27, 2019).

Originally assigned to: @zadjii-msft on GitHub.

Environment

Windows build number: 10.0.18362.0
Windows Terminal version:  0.7.3291.0

Any other software?
- Ubuntu 16.04.3 LTS
- byobu version 5.106
- tmux 2.1

Note

This issue is a follow-on to #3101. In that issue superfluous keys were being generated. Now it appears no keys are being generated. Alt arrows are dead to me.

Steps to reproduce

  • Start Byobu: byobu
  • Create a new Byobu tab: F2
  • Press alt left or alt right to switch between the tabs

Expected behavior

Byobu switches between the two tabs.

Actual behavior

Nothing happens.

Originally created by @paulwhiting on GitHub (Nov 27, 2019). Originally assigned to: @zadjii-msft on GitHub. <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> <!-- This bug tracker is monitored by Windows Terminal development team and other technical folks. **Important: When reporting BSODs or security issues, DO NOT attach memory dumps, logs, or traces to Github issues**. Instead, send dumps/traces to secure@microsoft.com, referencing this GitHub issue. If this is an application crash, please also provide a Feedback Hub submission link so we can find your diagnostic data on the backend. Use the category "Apps > Windows Terminal (Preview)" and choose "Share My Feedback" after submission to get the link. Please use this form and describe your issue, concisely but precisely, with as much detail as possible. --> # Environment ```none Windows build number: 10.0.18362.0 Windows Terminal version: 0.7.3291.0 Any other software? - Ubuntu 16.04.3 LTS - byobu version 5.106 - tmux 2.1 ``` # Note This issue is a follow-on to #3101. In that issue superfluous keys were being generated. Now it appears no keys are being generated. Alt arrows are dead to me. # Steps to reproduce - Start Byobu: byobu - Create a new Byobu tab: F2 - Press alt left or alt right to switch between the tabs # Expected behavior Byobu switches between the two tabs. # Actual behavior Nothing happens.
Author
Owner

@paulwhiting commented on GitHub (Nov 27, 2019):

This behavior is due to #3585. Proper expected behavior is restored with the following:

    "keybindings": [
	{ "command": "unbound", "keys": [ "alt+shift+-" ] },
        { "command": "unbound", "keys": [ "alt+shift+plus" ] },
        { "command": "unbound", "keys": [ "alt+down" ] },
        { "command": "unbound", "keys": [ "alt+left" ] },
        { "command": "unbound", "keys": [ "alt+right" ] },
        { "command": "unbound", "keys": [ "alt+up" ] },
        { "command": "unbound", "keys": [ "alt+shift+down" ] },
        { "command": "unbound", "keys": [ "alt+shift+left" ] },
        { "command": "unbound", "keys": [ "alt+shift+right" ] },
        { "command": "unbound", "keys": [ "alt+shift+up" ] }
    ]
@paulwhiting commented on GitHub (Nov 27, 2019): This behavior is due to #3585. Proper expected behavior is restored with the following: ``` "keybindings": [ { "command": "unbound", "keys": [ "alt+shift+-" ] }, { "command": "unbound", "keys": [ "alt+shift+plus" ] }, { "command": "unbound", "keys": [ "alt+down" ] }, { "command": "unbound", "keys": [ "alt+left" ] }, { "command": "unbound", "keys": [ "alt+right" ] }, { "command": "unbound", "keys": [ "alt+up" ] }, { "command": "unbound", "keys": [ "alt+shift+down" ] }, { "command": "unbound", "keys": [ "alt+shift+left" ] }, { "command": "unbound", "keys": [ "alt+shift+right" ] }, { "command": "unbound", "keys": [ "alt+shift+up" ] } ] ```
Author
Owner

@sivaramn commented on GitHub (Nov 27, 2019):

This behavior is due to #3585. Proper expected behavior is restored with the following:

    "keybindings": [
	{ "command": "unbound", "keys": [ "alt+shift+-" ] },
        { "command": "unbound", "keys": [ "alt+shift+plus" ] },
        { "command": "unbound", "keys": [ "alt+down" ] },
        { "command": "unbound", "keys": [ "alt+left" ] },
        { "command": "unbound", "keys": [ "alt+right" ] },
        { "command": "unbound", "keys": [ "alt+up" ] },
        { "command": "unbound", "keys": [ "alt+shift+down" ] },
        { "command": "unbound", "keys": [ "alt+shift+left" ] },
        { "command": "unbound", "keys": [ "alt+shift+right" ] },
        { "command": "unbound", "keys": [ "alt+shift+up" ] }
    ]

I also have the same issue. Do we have to unbind the keys for tmux to work? And what about mouse-focus? Prior to this release, in tmux clicking with mouse on any pane would focus the cursor in that pane. Now apparently that's gone. How does one restore mouse clicky behaviour ?

@sivaramn commented on GitHub (Nov 27, 2019): > > > This behavior is due to #3585. Proper expected behavior is restored with the following: > > ``` > "keybindings": [ > { "command": "unbound", "keys": [ "alt+shift+-" ] }, > { "command": "unbound", "keys": [ "alt+shift+plus" ] }, > { "command": "unbound", "keys": [ "alt+down" ] }, > { "command": "unbound", "keys": [ "alt+left" ] }, > { "command": "unbound", "keys": [ "alt+right" ] }, > { "command": "unbound", "keys": [ "alt+up" ] }, > { "command": "unbound", "keys": [ "alt+shift+down" ] }, > { "command": "unbound", "keys": [ "alt+shift+left" ] }, > { "command": "unbound", "keys": [ "alt+shift+right" ] }, > { "command": "unbound", "keys": [ "alt+shift+up" ] } > ] > ``` I also have the same issue. Do we have to unbind the keys for tmux to work? And what about mouse-focus? Prior to this release, in `tmux` clicking with mouse on any pane would focus the cursor in that pane. Now apparently that's gone. How does one restore mouse clicky behaviour ?
Author
Owner

@zadjii-msft commented on GitHub (Nov 27, 2019):

I'm confident that clicking in a pane in tmux never worked in the Windows Terminal, since we don't yet support mouse mode (#376, #545)...

@zadjii-msft commented on GitHub (Nov 27, 2019): I'm confident that clicking in a pane in `tmux` never worked in the Windows Terminal, since we don't yet support mouse mode (#376, #545)...
Author
Owner

@sivaramn commented on GitHub (Nov 27, 2019):

I'm confident that clicking in a pane in tmux never worked in the Windows Terminal, since we don't yet support mouse mode (#376, #545)...

thanks for that. I could be mistaken, as I use versions of tmux in wsl & cygwin using mintty.

And the key unbounding didn't work. I'm still not able to use the alt keys to switch panes

@sivaramn commented on GitHub (Nov 27, 2019): > > > I'm confident that clicking in a pane in `tmux` never worked in the Windows Terminal, since we don't yet support mouse mode (#376, #545)... thanks for that. I could be mistaken, as I use versions of tmux in wsl & cygwin using `mintty`. And the key unbounding didn't work. I'm still not able to use the alt keys to switch panes
Author
Owner

@zadjii-msft commented on GitHub (Nov 27, 2019):

@sivaramn what exactly do you have in your profiles.json, and what's in your tmux.conf?

@zadjii-msft commented on GitHub (Nov 27, 2019): @sivaramn what exactly do you have in your `profiles.json`, and what's in your `tmux.conf`?
Author
Owner

@sivaramn commented on GitHub (Nov 27, 2019):

bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
bind -n S-Left  previous-window
bind -n S-Right next-window

that's in .tmux.conf

in profiles.json

 // Add any keybinding overrides to this array.
    // To unbind a default keybinding, set the command to "unbound"
    "keybindings": [{ "unbound": "nextTab", "keys": ["ctrl+tab"] },
		    {"command": "paste","keys": ["shift+insert"]},
		    //{ "keys": ["shift+insert"], "command": "paste" },
                    { "keys": ["ctrl+shift+v"], "command": "paste" },
		    { "command": "unbound", "keys": [ "alt+shift+-" ] },
       		    { "command": "unbound", "keys": [ "alt+shift+plus" ] },
       		    { "command": "unbound", "keys": [ "alt+down" ] },
       		    { "command": "unbound", "keys": [ "alt+left" ] },
                    { "command": "unbound", "keys": [ "alt+right" ] },
                    { "command": "unbound", "keys": [ "alt+up" ] },
                    { "command": "unbound", "keys": [ "alt+shift+down" ] },
                    { "command": "unbound", "keys": [ "alt+shift+left" ] },
                    { "command": "unbound", "keys": [ "alt+shift+right" ] },
                    { "command": "unbound", "keys": [ "alt+shift+up" ] }
			
                   ]
}
@sivaramn commented on GitHub (Nov 27, 2019): ```` bind -n M-Left select-pane -L bind -n M-Right select-pane -R bind -n M-Up select-pane -U bind -n M-Down select-pane -D bind -n S-Left previous-window bind -n S-Right next-window ```` that's in `.tmux.conf` in `profiles.json` ```` // Add any keybinding overrides to this array. // To unbind a default keybinding, set the command to "unbound" "keybindings": [{ "unbound": "nextTab", "keys": ["ctrl+tab"] }, {"command": "paste","keys": ["shift+insert"]}, //{ "keys": ["shift+insert"], "command": "paste" }, { "keys": ["ctrl+shift+v"], "command": "paste" }, { "command": "unbound", "keys": [ "alt+shift+-" ] }, { "command": "unbound", "keys": [ "alt+shift+plus" ] }, { "command": "unbound", "keys": [ "alt+down" ] }, { "command": "unbound", "keys": [ "alt+left" ] }, { "command": "unbound", "keys": [ "alt+right" ] }, { "command": "unbound", "keys": [ "alt+up" ] }, { "command": "unbound", "keys": [ "alt+shift+down" ] }, { "command": "unbound", "keys": [ "alt+shift+left" ] }, { "command": "unbound", "keys": [ "alt+shift+right" ] }, { "command": "unbound", "keys": [ "alt+shift+up" ] } ] } ````
Author
Owner

@samba2 commented on GitHub (Dec 11, 2019):

...
       		    { "command": "unbound", "keys": [ "alt+down" ] },
       		    { "command": "unbound", "keys": [ "alt+left" ] },
                    { "command": "unbound", "keys": [ "alt+right" ] },
                    { "command": "unbound", "keys": [ "alt+up" ] },
                    { "command": "unbound", "keys": [ "alt+shift+down" ] },
                    { "command": "unbound", "keys": [ "alt+shift+left" ] },
                    { "command": "unbound", "keys": [ "alt+shift+right" ] },
                    { "command": "unbound", "keys": [ "alt+shift+up" ] }
                   ]
}

Just want do confirm that unbinding the alt key bindings worked for me. tmux resizing is now working as expected.

@samba2 commented on GitHub (Dec 11, 2019): > ``` >... > { "command": "unbound", "keys": [ "alt+down" ] }, > { "command": "unbound", "keys": [ "alt+left" ] }, > { "command": "unbound", "keys": [ "alt+right" ] }, > { "command": "unbound", "keys": [ "alt+up" ] }, > { "command": "unbound", "keys": [ "alt+shift+down" ] }, > { "command": "unbound", "keys": [ "alt+shift+left" ] }, > { "command": "unbound", "keys": [ "alt+shift+right" ] }, > { "command": "unbound", "keys": [ "alt+shift+up" ] } > ] > } > ``` Just want do confirm that **unbinding** the alt key bindings **worked for me**. tmux resizing is now working as expected.
Author
Owner

@demfabris commented on GitHub (Jan 8, 2020):

Thank you so much for this!
This is an issue with Tmux alt key commands too.

@demfabris commented on GitHub (Jan 8, 2020): Thank you so much for this! This is an issue with Tmux alt key commands too.
Author
Owner

@finlaybob commented on GitHub (Mar 9, 2020):

Thanks for the example keybindings. Adding the unbound entries helped with behaviour in micro, which uses "alt+direction" by default for moving word at a time.

@finlaybob commented on GitHub (Mar 9, 2020): Thanks for the example keybindings. Adding the unbound entries helped with behaviour in [micro](https://github.com/zyedidia/micro), which uses "alt+direction" by default for moving word at a time.
Author
Owner

@paulwhiting commented on GitHub (Mar 18, 2020):

Reopening issue because my alt-arrow buttons stopped working after upgrading Terminal to 0.10.761.0.

Windows build number: 10.0.18363.720
Windows Terminal version: 0.10.761.0

Any other software?

  • Ubuntu 16.04.6 LTS
  • byobu version 5.106
  • tmux 2.1
@paulwhiting commented on GitHub (Mar 18, 2020): Reopening issue because my alt-arrow buttons stopped working after upgrading Terminal to 0.10.761.0. Windows build number: 10.0.18363.720 Windows Terminal version: 0.10.761.0 Any other software? - Ubuntu 16.04.6 LTS - byobu version 5.106 - tmux 2.1
Author
Owner

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

Yep, fair enough. Bet we broke this with VT input tunneling.

@DHowett-MSFT commented on GitHub (Mar 18, 2020): Yep, fair enough. Bet we broke this with VT input tunneling.
Author
Owner

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

Actually, no, I think we broke unbinding. /cc @zadjii-msft.

@DHowett-MSFT commented on GitHub (Mar 18, 2020): Actually, no, I think we broke _unbinding_. /cc @zadjii-msft.
Author
Owner

@yveslange commented on GitHub (Mar 18, 2020):

Same issue :)
ALT-LEFT, RIGHT, TOP, DOWN does not react. Really feel that the "unbounds" are not working anymore.

@yveslange commented on GitHub (Mar 18, 2020): Same issue :) ALT-LEFT, RIGHT, TOP, DOWN does not react. Really feel that the "unbounds" are not working anymore.
Author
Owner

@zadjii-msft commented on GitHub (Mar 18, 2020):

looking now

@zadjii-msft commented on GitHub (Mar 18, 2020): looking now
Author
Owner

@onefuncman commented on GitHub (May 27, 2020):

Why is this the default behavior? Seems like a bad UX -- what's the tradeoff?

edit: nevermind, i see the conflict with Panes functionality now

@onefuncman commented on GitHub (May 27, 2020): Why is this the default behavior? Seems like a bad UX -- what's the tradeoff? edit: nevermind, i see the conflict with Panes functionality now
Author
Owner

@zadjii-msft commented on GitHub (May 27, 2020):

You know, you've just inspired an idea - if the user has no panes, then the Terminal could probably pass the Alt+Arrow through, similar to the way that Ctrl+C for copy sends a ^C when there's no text selected.

@zadjii-msft commented on GitHub (May 27, 2020): You know, you've just inspired an idea - if the user has _no_ panes, then the Terminal could probably pass the Alt+Arrow through, similar to the way that Ctrl+C for copy sends a ^C when there's no text selected.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#5222