1

Both ranger and the gnome-terminal use Alt + 1, Alt + 2 etc to switch to the corresponding tab. So if a gnome-terminal window only has one tab and ranger is open, then pressing Alt + 2 will go the second tab in ranger, but as soon as a second tab in the gnome-terminal window is open, ranger will no longer receive this command, it will always be captured by the gnome-terminal window.

Now this issue could easily be resolved by changing one or the other keybindings, but I'd like to avoid that.

Is there an alternative way to send the Alt + 1, Alt + 2 etc commands to ranger even if we have multiple tabs in our gnome-terminal while using the default keybindings in both programs?

EDIT: I believe there was a similar issue in this question, but maybe something has changed over the past 10 years.

flawr
  • 113
  • 4
  • If the terminal app uses some keyboard bindings it won't send it further down, period. Disable Alt + N bindings in the app and live happily ever after. – Artem S. Tashkinov Jun 09 '22 at 09:31
  • I'm asking because I can very well imagine this is not the case, for instance if there is only one tab the terminal *does* in fact send it further down. I know there are alternatives but I'm wondering specifically if there is a way to send these keys anyway. – flawr Jun 09 '22 at 09:39
  • When you have only one tab, Alt+number is not consumed by the xterminal, that's why you see this behaviour. Change/disable those xterminal shortcuts. – thanasisp Jun 09 '22 at 10:01
  • 2
    Press `Esc` followed by `1`. – egmont Jun 15 '22 at 20:25
  • 1
    @egmont Please consider adding that as an answer! – flawr Jun 16 '22 at 11:51
  • Turns you with`Esc,1` doesn't do the same thing in the situation described above. For anyone with the similar problem of gnome-terminal tabs and ranger: You can also use `gn` to create new tabs, and use `gt, gT` or `shift+Tab` to switch between them. – flawr Aug 08 '22 at 07:50

0 Answers0