Live data from Hacker News

Show HN: Switch windows of same app with hotkey (alt + `)

github.com

31–40 of 51 posts

Re: Show HN: Switch windows of same app with hotkey (alt + `)

#31

Earlier quoted context omitted.

>i want to switch window of the same app or switch app. That sounds like a total nightmare to have the same keyboard shortcut do 2 different things. Cmd-Tab switches app, Cmd-` switches windows in an app. I just don't understand how that is difficult. Then again, some people find math hard, others find it easy. To each their own.

> Then again, some people find math hard, others find it easy. To each their own. Way to be condescending. The presented opinion is clearly reasonable, as is yours.

No condescension intended. It was just a regocnition that what someone finds instinctual others find less so. It was one of the lessons not learned until much later in life for me that allowed me to become much less frustrated when working with others.

Re: Show HN: Switch windows of same app with hotkey (alt + `)

#32

Earlier quoted context omitted.

> How is alt-tabbing near useless? I think the parent refers to MacOS/Gnome treating alt-tab as a "switch program" shortcut, not a "switch window" shortcut. I find it very convenient to press "alt-tab" to go to the previously-focused window, or "alt-tab-tab" to the even-previously focused window. It's much easier for me to think in terms of context switches (go back to my N-previous activity) than have to consciously…

>i want to switch window of the same app or switch app. That sounds like a total nightmare to have the same keyboard shortcut do 2 different things. Cmd-Tab switches app, Cmd-` switches windows in an app. I just don't understand how that is difficult. Then again, some people find math hard, others find it easy. To each their own.

MacOS is app centric and Windows is document-centric, in large part because of the differences in window management. MacOS window management encourages users to focus on which app is open, leading to users talking about apps rather than documents (I made it in Keynote, Pages, or Numbers). Windows windows management encourages users to focus on which document is open, leading to users talking about documents rather than apps (it's a Word Doc, an Excel Sheet, a PowerPoint Deck). The difference is subtle but significant. If you're a long time MacOS user, you can't imagine not just knowing what app your document/window is hosted in. If you're a long time Windows user, you can't imagine mentally sorting your windows by which app launched them.

This difference almost certainly has its roots back in the dawn of the original Macintosh, which could only run one application at a time and context-switching or Multi-Tasking had to be explicitly added to the OS after the fact[0]. Windows, which was developed later, was designed as an inherently multi-application OS from the beginning. Today, it's pretty much only in the windows management where you still see the vestiges of those original differences.

[0]https://en.m.wikipedia.org/wiki/MultiFinder

Re: Show HN: Switch windows of same app with hotkey (alt + `)

#33
post #10

Earlier quoted context omitted.

Does not work in all keyboard layouts though. One more reason to use US layout.

Surely you can re-map it though.

You can remap it in system preferences. For a UK keyboard it makes the most sense to map it to “section” which is directly above tab.

Re: Show HN: Switch windows of same app with hotkey (alt + `)

#34
post #7

FYI in macOS you can do this using ⌘ + ` I'm assuming most of you know this but just in case

FYI, this is configurable via System Preferences → Keyboard → Shortcuts → Keyboard → Move focus to active or next window.

to exapnd, there are three similar shortcuts (add shift to reverse order):

  1. ⌘⇥ (cmd-tab) - regular mac app switching
  
  2. ⌘-`(cmd-grave) - "Move focus to next window"

  3. ⌥⌘⇥ (opt-cmd-tab) - "Move focus to active or next window"
this last one needs manual configuration iirc, and this is what mine is configured to. it's the one that acts most like "switch back to the last active context". however, the system is somewhat unintuitive about how it designates the "next" window (especially if you intermingle all three shortcuts), so it's not very reliable.

Re: Show HN: Switch windows of same app with hotkey (alt + `)

#35
post #33

Earlier quoted context omitted.

Surely you can re-map it though.

You can remap it in system preferences. For a UK keyboard it makes the most sense to map it to “section” which is directly above tab.

I map that key (without Cmd) to Escape on my Touch Bar MacBook... The best, yet should be unnecessary, key map tweak.

Re: Show HN: Switch windows of same app with hotkey (alt + `)

#39

I do not understand. What does this add, that my desktop environment does not already provide? Why should I download and use this instead? Most desktop environments I know already allow me to set a key binding for this task.

I think it adds the thumbnails? I’m puzzled as well, gotta admit even after switching to Mac Mini last year, from Ubuntu & Windows, I didn’t even pay attention to that.

On the other hand, the Win + (number) shortcuts I can’t live without and there are very few solutions on macOS which surprises me, because those min/max/switch shortcuts ate incredibly simple and intuitive.

Re: Show HN: Switch windows of same app with hotkey (alt + `)

#40
Classic win32 programming mistake on this line: https://github.com/sigoden/windows-switcher/blob/f2088e7f05a.... `GetMessage` can return a negative value when there is an error but before the program is quitting, see https://docs.microsoft.com/en-us/windows/win32/api/winuser/n....
Post reply on HN