Opened 13 years ago

Last modified 4 years ago

#8191 assigned enhancement

Cmd+Tab should switch between tabs, not windows

Reported by: rq Owned by: nobody
Priority: normal Milestone: R1.1
Component: Applications/Terminal Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

The "Terminal → Switch Terminals" menu item switches terminal windows instead of tabs, but uses a keyboard shortcut which is commonly emploeyd for switching tabs (Cmd+Tab).

I would suggest that Cmd+Tab should switch tabs instead, and this command (which switches windows) should get a different shortcut if needed (e.g. Shift+Cmd+Tab)

Change History (17)

comment:1 by jscipione, 12 years ago

Owner: changed from jackburton to jscipione
Status: newassigned

This menu option is is silly and should be removed. We already have a way to switch between windows, control+(backtick). Why reproduce it? To switch between tabs use Command+(1-9).

comment:2 by rq, 12 years ago

Command+(1-9) is fine when you want to go to a particular tab. But I'm pretty sure that there's a whole lot of people like me, who never use these numbered shortcuts (except by mistake). For me, the most used scenario is Cmd+Tab to go to the next tab and Cmd+Shift+Tab to go to the previous tab. I'm not sure if having more than nine tabs is common in terminal, but it's a muscular memory thing. I want to use the same shortcuts in terminal that I use in my web browser, and I have loads of tabs in the latter, so Cmd+(1-9) is simply not enough (and it's not like I would be likely to remember particular tab numbers anyway).

comment:3 by bonefish, 12 years ago

You can already use Shift + Cursor Left/Right to switch to the previous/next tab. Control + Shift + Cursor Left/Right moves the current tab to the left/right. These shortcuts are the same as in Konsole BTW. It certainly wouldn't harm to advertise them in the menu as well.

in reply to:  3 ; comment:4 by jscipione, 12 years ago

Replying to bonefish:

You can already use Shift + Cursor Left/Right to switch to the previous/next tab. Control + Shift + Cursor Left/Right moves the current tab to the left/right. These shortcuts are the same as in Konsole BTW. It certainly wouldn't harm to advertise them in the menu as well.

Why did you use Shift and not Command? Is there a technical limitation preventing the shortcut from being switched to the Haiku "standard"?

in reply to:  3 ; comment:5 by rq, 12 years ago

Replying to bonefish:

You can already use Shift + Cursor Left/Right to switch to the previous/next tab. Control + Shift + Cursor Left/Right moves the current tab to the left/right. These shortcuts are the same as in Konsole BTW. It certainly wouldn't harm to advertise them in the menu as well.

I haven't had KDE or used Konsole for a while. I'm using Gnome at the moment, and I just realized that most likely I haven't used the next/previous tab shortcuts in Gnome Terminal, ever.

But that's not my point.

My point is that as long as the usual combination to go to next/previous tab in other applications (most notably, web browser) is Cmd+(Shift+)Tab (please check if that is the case though), and as long as Haiku has separate keys for Command and Control (so there's no 'fight' between GUI and console applications for this particular key combination), I see no reason why Terminal should behave differently with regard to switching tabs.

Last edited 12 years ago by rq (previous) (diff)

in reply to:  4 ; comment:6 by bonefish, 12 years ago

Replying to jscipione:

Replying to bonefish:

You can already use Shift + Cursor Left/Right to switch to the previous/next tab. Control + Shift + Cursor Left/Right moves the current tab to the left/right. These shortcuts are the same as in Konsole BTW. It certainly wouldn't harm to advertise them in the menu as well.

Why did you use Shift and not Command?

Shift is a modifier generally not used in the shell and as mentioned already Konsole uses those shortcuts.

Is there a technical limitation preventing the shortcut from being switched to the Haiku "standard"?

I wasn't aware of any Haiku standard to switch between tabs.

in reply to:  5 ; comment:7 by anevilyak, 12 years ago

Replying to rq:

My point is that as long as the usual combination to go to next/previous tab in other applications (most notably, web browser) is Cmd+(Shift+)Tab (please check if that is the case though), and as long as Haiku has

It isn't, Web+ has no such shortcut.

in reply to:  6 comment:8 by jscipione, 12 years ago

Replying to bonefish:

Replying to jscipione:

Why did you use Shift and not Command?

Shift is a modifier generally not used in the shell and as mentioned already Konsole uses those shortcuts.

Is there a technical limitation preventing the shortcut from being switched to the Haiku "standard"?

I wasn't aware of any Haiku standard to switch between tabs.

There isn't, at least no official ones, but, by standard I meant using the Command key as a modifier. It should be Command+left/right to switch to the left and right tabs and Command+shift+left/right to move tabs left and right.

Although, I could see how that could conflict with Terminal keybindings so perhaps shift is better here? idk

in reply to:  7 ; comment:9 by rq, 12 years ago

Replying to anevilyak:

Replying to rq:

My point is that as long as the usual combination to go to next/previous tab in other applications (most notably, web browser) is Cmd+(Shift+)Tab (please check if that is the case though), and as long as Haiku has

It isn't, Web+ has no such shortcut.

What does Web+ have? If it doesn't have those shortcuts at all, then perhaps you should look at Firefox?. Although I'd stress you should look at it anyway. Cmd´+Tab seems to be a cross-platform de-facto standard shortcut for this functionality.

´ I'm referring to Cmd as a role, not as a keycap here, so Ctrl+Tab on Win/Lin fits in as well.

Last edited 12 years ago by rq (previous) (diff)

in reply to:  9 comment:10 by anevilyak, 12 years ago

Replying to rq:

What does Web+ have? If it doesn't have those shortcuts at all, then perhaps you should look at Firefox?. Although I'd stress you should look at it anyway. Cmd´+Tab seems to be a cross-platform de-facto standard shortcut for this functionality.

Why would I look at an app that's frankly not even remotely native in terms of its UI conventions? My point was simply that you seemed to be saying cmd+tab was already some form of standard on Haiku and hence Terminal should use it as well, and that simply isn't the case.

comment:11 by rq, 12 years ago

Yes, I was presumptious. But I covered the "why" question in that comment. :)

Last edited 12 years ago by rq (previous) (diff)

comment:12 by humdinger, 12 years ago

The solution to all this would of course be to use S&T instead of tabs. There the established shortcut is OPT+cursor. The only concern is that Terminal's window tabs seem to be quite a bit wider that in-app tabs, about 3:1...

comment:13 by jscipione, 12 years ago

We are all arguing different things. rq is arguing that Command+Tab should switch to the next tab because it does on other OSs and so his muscle memory would be retained. That is not necessarily a good reason to do the same on Haiku, but it is an argument.

My argument is that if we are going to implement a way to switch to the next and previous tabs it should involve the Command key as in Command+left/right unless there is a very good reason not to because Command is the preferred key to use for shortcuts on Haiku. Konsole may use Shift but there is a different set of assumptions there that may or may not be true on Haiku.

I see no reason not to implement both Command+Tab/Command+Shift+Tab and Command+Left/Command+Right to switch to the previous and next tab respectively in Terminal. These key modifiers aren't being used for anything else in Terminal right now.

comment:14 by rq, 12 years ago

WRT to muscrular memory and Cmd+left/right: on other OS's these shortcuts are often used to jump to previous/next word in text editors.

in reply to:  14 comment:15 by jscipione, 12 years ago

Replying to rq:

WRT to muscrular memory and Cmd+left/right: on other OS's these shortcuts are often used to jump to previous/next word in text editors.

First of all, catering to the muscle memory of other operating systems, no matter how popular, is unwise IMHO; we should only seek to be internally consistent. How tab switching on other operating systems is immaterial, the question is, how should tab switching behave in Haiku?

Secondly, you have to be more specific when citing examples. The function of Command+left and Command+right is not consistent on all other operating systems. What text editors in what systems use Command+left/Command+right to jump between previous/next word?

For example in my text editor here, TextMate 1.5 on Mac OS X 10.6.8, Command+left/Command+right jump to the beginning and end of the line, not word. This is consistent with how Command+left/Command+right work on Mac OS X (most of the time anyway, see below).

In my terminal application, iTerm2, Command+left/Command+right jump between tabs and not words or lines. This is because in a terminal application the usual conventions do not apply, instead you use your shell's keybindings, which on most Unix-like systems means Emacs keybindings. You can however set your shell to use vi keybindings and probably others as well. Another special case is browsers, in Firefox 17.0.1 Command+left and Command+right perform back and forward respectively. So on this operating system, Command+left and Command+right are not 100% consistent, they yield to application specific needs.

Moving onto Command+tab and Command+shift+tab... on Mac OS X those switch to the next and previous application, similar to how Control+tab and Control+tab work on Haiku. Control+tab and Control+Shift+tab seem to perform switching to the next tab and previous tab on Mac OS X on some application such as Firefox 17.0.1 and Safari 5.1.7 but not on others such as TextMate 1.5 and iTerm2.

All that said, it doesn't really matter how it works on Mac OS X or Windows or Linux or any other OS. On Haiku modifiers involving the command key are reserved for application use. So the only question is, how should tab switching be defined in Terminal?

comment:16 by jscipione, 12 years ago

Owner: changed from jscipione to nobody

This one is too hot for me to handle

comment:17 by pulkomandy, 4 years ago

Milestone: R1R1.1
Note: See TracTickets for help on using tickets.