lwouis / alt-tab-macos

Windows alt-tab on macOS
https://alt-tab-macos.netlify.app
GNU General Public License v3.0
10.59k stars 322 forks source link

Select window by direct shortcut #210

Open baest opened 4 years ago

baest commented 4 years ago

It would be very nice to be able to select the window to focus by using the other keys on the keyboard. So alt-tab and then the windows appears with a character in front of it (like the Desktop number). When you press that character (I'm thinking a-z, 0-9) then the window opens. If you have more windows than 35 I don't know if there should be multiple characters or just no character for the last ones.

lwouis commented 4 years ago

Hi @baest! Thank you for sharing this idea!

There is a similar ticket with #178. Before anyone spends time implementing such a feature, I think it is important that there is a more developed specification for it. You mentioned for example the shortcut would be a-z, 0-9. Is this really a good mapping on the keyboard, when you left hand is already holding a modifier key, probably with your thumb? Look at RTS games like Starcraft 2. They use shortcuts close to the left hand like number, for control groups.

Also what happens for conflicting shortcuts, let's say if you set your main alt-tab shortcut to alt-1 already?

I think all these questions and more should be answered now, so that we get a clearer picture of:

SoPat712 commented 4 years ago

This doesn't seem like a very logical issue, and mouse hover app selection seemed like it was the best solution to this problem. I think this should just be marked closed, to be honest.

lwouis commented 4 years ago

I think @baest suggestion is interesting. Are you sure you understand the scenario? They basically would like hardcoded shortcuts like alt+1 always focuses the first window, alt+2 the second, etc. It's a very popular feature of other similar apps so I don't think we should discard it.

I think it could be done in a lightweight way by adding a checkbox Number keys here:

image

A deeper implementation would maybe allow more than 1 to 9, customize windows, etc. @baest What do you think?

SoPat712 commented 4 years ago

I think it would personally be a feature that I would never use, but I could see it being useful. I have too many windows open at a time for that to work well, however.

baest commented 4 years ago

@lwouis I think that could be a good solution. You had good points for my original suggestion and I have to admit I didn't consider them before posting this issue. I'm always a fan of keyboard shortcuts and when AltTab is in focus I guess we could bind whatever keys to it. I think the lightweight checkbox suggestion is a very good start, might be more than enough and if popular, but people need more, then I guess new issues would be raised and the feature expanded if there is enough tuits.

justinnoel commented 2 years ago

I added this comment in #1082:

Place a hotkey like "a", "b", "c", etc at the bottom right of each app/window that will let me just press that key to activate that app. Command Tab Plus does this with numbers, but that doesn't work well with lots of apps in the switcher.

Sample screenshot:

Screenshot of macOS app switcher using Command Tab Plus. Each app has a number selector for quick switching.

I already use an app that does exactly this. It's not awkward at all.

Scenario:

1) You use the keyboard shortcut to trigger the AltTab switcher (⌘ ⇥) in my case.

2) AltTab switcher opens with all the apps displaying a letter like "a", "b", "c", etc.

3) Let go of the second portion of the hot key (⇥ in my case) while still holding down the first key in the sequence (⌘ in my case) and then tap the "h" key to open the app that has the "h" label. There is no need for another modifier key.

I do this every day with Command Tab Plus with numbers. The problem is that there are only numbers 1 through 0 so the available quick selections is way too limited.

====

@SoPat712 : I purposefully disable the "Mouse hover" option. So often in the regular macOS switcher, my mouse happens to be in a spot hovered over an app and I decide NOT to switch so I let go of the keys. BOOM! Because I was "hovered" over one of the apps in the switcher, macOS switches to it.

In Command Tab Plus and now in AltTab, I've disabled that. "Hover" is not a solution to this feature request.

lwouis commented 2 years ago

@justinnoel regarding mouse hover, you may be interested in research I did to make it better here: https://github.com/lwouis/alt-tab-macos/issues/286#issuecomment-658685978

justinnoel commented 2 years ago

@lwouis As usual, that's some in-depth thought and analysis into the right solution. Thanks!

I just realized I also failed to point out the benefits of the hotkey suggestion 🤦‍♂️. The user doesn't need to move their hand to a mouse to quickly choose the right app!

xbladesub commented 2 years ago

I added this comment in #1082:

Place a hotkey like "a", "b", "c", etc at the bottom right of each app/window that will let me just press that key to activate that app. Command Tab Plus does this with numbers, but that doesn't work well with lots of apps in the switcher.

Sample screenshot:

Screenshot of macOS app switcher using Command Tab Plus. Each app has a number selector for quick switching.

I already use an app that does exactly this. It's not awkward at all.

Scenario:

  1. You use the keyboard shortcut to trigger the AltTab switcher (⌘ ⇥) in my case.
  2. AltTab switcher opens with all the apps displaying a letter like "a", "b", "c", etc.
  3. Let go of the second portion of the hot key (⇥ in my case) while still holding down the first key in the sequence (⌘ in my case) and then tap the "h" key to open the app that has the "h" label. There is no need for another modifier key.

I do this every day with Command Tab Plus with numbers. The problem is that there are only numbers 1 through 0 so the available quick selections is way too limited.

====

@SoPat712 : I purposefully disable the "Mouse hover" option. So often in the regular macOS switcher, my mouse happens to be in a spot hovered over an app and I decide NOT to switch so I let go of the keys. BOOM! Because I was "hovered" over one of the apps in the switcher, macOS switches to it.

In Command Tab Plus and now in AltTab, I've disabled that. "Hover" is not a solution to this feature request.

try rcmd.app. The best! (only 4$) worth it

muescha commented 1 year ago

i would like to see shortcuts for example the first letter of the app following by a number of a tab - or  allow to search for a app name / title (for this mode the shortcuts for close/minimize/... maybe are disabled)

thimplicity commented 1 year ago

I have read through this thread, because I opened a duplicate of this question. Is this still under consideration?

patschl commented 1 week ago

This issue has now been open for more than 4 years. Is this something that is happening in the future? I would also be happy to donate for this feature 🙂

lwouis commented 1 week ago

Anyone can decide to step in and contribute this feature. Please see my message above for required next steps: https://github.com/lwouis/alt-tab-macos/issues/210#issuecomment-608483487. Essentially someone needs to write comprehensive specs for this feature, draw mockups, then we can move on to implementing it.