vercel / hyper

A terminal built on web technologies
https://hyper.is
MIT License
43.27k stars 3.52k forks source link

Certain Tmux Meta (Alt) key bindings don't work #1260

Open flybayer opened 7 years ago

flybayer commented 7 years ago

Issue

I have the following in my .tmux.conf:

bind -n M-i next-window
bind -n M-u previous-window
bind -n M-y last-window

When I have two windows open, Alt-y works to toggle the windows, but neither Alt-i or Alt-u do anything. No response, no errors. These key bindings work fine in other terminals, just not in Hyper.

Any ideas?

P.S. This has been broken for a long time. I'm not sure if it ever worked.

ppot commented 7 years ago

@flybayer I think this is hterm related. Can you tell me how to set those keys in tmux and what they do? Il test it locally and see the problem.

flybayer commented 7 years ago

@ppot

  1. Put those three bind lines from my last comment in ~/.tmux.conf
  2. Run tmux
  3. Press Ctrl-B followed immediately by c (to create a new "window" (essentially a tab))
  4. Then press Alt-i or Alt-u or Alt-y to switch between the tmux "windows".
ppot commented 7 years ago

Alright gonna try this! Il keep you posted

ppot commented 7 years ago

@flybayer To test I use iterm2. For me it just make the character ˆ¨¥ inside tmux

flybayer commented 7 years ago

@ppot it works fine for me in iTerm2

But I just realized I have Option set as +Esc under Profiles > Keys screen shot 2016-12-19 at 10 12 25 pm

It doesn't work if Option is set to Normal or Meta.

So, maybe we need to add the AltIsPlusEsc option to Hyper, or maybe there is a tmux workaround...

pertrai1 commented 7 years ago

@flybayer Can you share your .tmux.conf file - gist? My setup works fine with my config for being able to switch between panes and windows. Maybe it has something to do with you using alt while I use my binding ctrl+a and then | or - for splits, c for new window, and p for going between the windows.

flybayer commented 7 years ago

@pertrai1 here's my tmux.conf. And yes, I think the meta key is the only one with problems.

pertrai1 commented 7 years ago

@flybayer - I see the problem you are seeing as well when using meta. Like the tmux setup you have

curioussavage commented 7 years ago

I also have this same issue.

FelikZ commented 7 years ago

Same on Windows 10

ClaytonJY commented 5 years ago

re-confirming w/ Mint 19.1 (~Ubuntu 18.04) and hyper v. 3.0.2.

I used slightly different bindings (alt + arrow, e.g. M-Up, M-Left, etc.), but the issues seems to be the alt modifier not passing into tmux.

hozza commented 5 years ago

@ClaytonJY same here, alt not being passed to tmux (via ssh) even with altIsMeta setting.

noim210 commented 4 years ago

I have same issues, Anybody found the solution? My Alt+j key very rarely work accordingly. most of the time do not do anything.

jamiroph commented 3 years ago

Same issue but I'm using M-Keys to move between panes in tmux same as ClaytonJY, Linux gdev-it-js 5.4.0-66-generic #74-Ubuntu SMP Wed Jan 27 22:54:38 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux Hyper v.3.0.2

mmngreco commented 3 years ago

Same, I could check that It works in kitty but not in xterm.