Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revisit scriptable / shortcut invocation of switcher window (without dismissing) for binding to a mouse click / trackpad gesture. #573

Closed
frypf opened this issue Sep 3, 2020 · 4 comments
Labels
enhancement New feature or request

Comments

@frypf
Copy link

frypf commented Sep 3, 2020

Is your feature suggestion related to a problem? Please describe.
Following on from #458 and touched upon briefly in #566, it would be very useful to be able to bring up the switcher without it being dismissed upon release of the modifier key. #458 already implements this via the "then release" behaviour, although this then applies to both shortcuts 1 and 2, ie. sacrificing the existing keyboard functionality in order to have the mouse binding.

Ideally I'd love to be able to keep the standard modifier-release behaviour with the keyboard but also have the option of calling the switcher with the mouse and having it hang around onscreen until I click to select an app (or click outside to cancel). I use BetterTouchTool for binding shortcuts / scripts to gestures... other options are available.

Describe the solution you'd like
A few thoughts on this front as I'm aware of @lwouis's ongoing battle with bloat in the preferences UI while still wanting to give users maximum options for tailoring the app to their own workflow. I'd personally be happy with any of these (they're not in order of preference), although it's entirely at his discretion as to how feasible any of them may be. And obviously this is just for my own use-case, others please comment if they have any insight!

  • Separate the "then release" behaviour for shortcuts 1 and 2:
    This was mooted in Alternate control scheme: can release the shortcut without the UI going away #458 although would seemingly require quite a bit of code refactoring. Personally I don't currently use shortcut 2, although for those who do this may still represent something of a sacrifice for one bit of functionality over another. I'm definitely not advocating any option for "shortcut 3" 😅.

  • A script trigger eg. Applescript to show the window without dismissing it:
    Clicking "Show" in the menubar currently does exactly this, although it'd be great to be able to bind this specific function directly to a trackpad gesture without having to go via a keyboard shortcut. This would also avoid any changes in the prefs UI, and allow shortcuts 1 and 2 to retain their current functionality / usefulness. This could be a toggle, either showing or hiding, but this is definitely not integral as we can already simply click outside of the switcher to dismiss it. I have no idea how difficult or long-winded this would be to implement.

  • Allow selection of what is shown when AltTab is reopened whilst already running:
    Currently if I reopen AltTab whilst it's running (via Spotlight or double-clicking the app), the prefs window is brought up. Perhaps a dropdown in the prefs could allow users to select between prefs, shortcut 1 switcher or shortcut 2 switcher. I can foresee issues with this for those who hide the menu bar icon, as they could then be left without a means to bring up the preferences.

(For either of the latter 2 options, it'd be the icing on the cake if it didn't automatically highlight the 2nd app in the list, but by no means a dealbreaker).

Describe alternatives you've considered
I had a look at (dirty, dirty) GUI scripting a click on "Show" in the menu bar, but couldn't get anywhere with it:

tell application "System Events" to click menu item 1 of menu bar 2 of process "AltTab"

correctly activates the menu, but it seems impossible for Applescript to interact with the items within the menu. Accessibility Inspector shows the following:

Screenshot 2020-09-03 at 17 53 40

Maybe it's a limitation of menu extras, maybe it's as simple as adding an accessibility description. Maybe I'm just missing something obvious.

@frypf frypf added the enhancement New feature or request label Sep 3, 2020
@lwouis
Copy link
Owner

lwouis commented Sep 3, 2020

Your solution 2 and 3 are very creative, I like that! 👍

I think I'll go for number 1. Hopefully I don't re-discover the reason I scoped this out of #458. Hopefully it was not motivated by a tricky technical blocker.

@frypf
Copy link
Author

frypf commented Sep 3, 2020

Hopefully I don't re-discover the reason I scoped this out of #458. Hopefully it was not motivated by a tricky technical blocker.

I was conscious that might've been the case so I just thought I'd come up with some alternative options. My programming knowledge is limited and I've spent the last few days reading through a number of your reasoned arguments for and against certain features, wanting to keep the UI clean and self-explanatory and also trying to offset effort against gain. Having said that, I'm pretty sure implementing a whole Applescript Dictionary for a single function that no-one else is asking for would be non-trivial 😂

@lwouis
Copy link
Owner

lwouis commented Sep 4, 2020

I implemented this ticket. Could you please try it out and let me know if it works for you?

@frypf
Copy link
Author

frypf commented Sep 4, 2020

Yep seems fine! Thanks again 👍

@lwouis lwouis closed this as completed in 2a9c33b Sep 4, 2020
lwouis pushed a commit that referenced this issue Sep 4, 2020
# [6.2.0](v6.1.0...v6.2.0) (2020-09-04)

### Bug Fixes

* apps would not quit properly sometimes (regression from 10b2c71) ([41384d9](41384d9))
* avoid random delay after releasing shortcut (closes [#563](#563)) ([cbc4c39](cbc4c39))
* crash on launch if the user didn't have sf symbols font ([58e9026](58e9026))
* focused wrong window in rare scenario ([66820a1](66820a1))
* issue when selecting windowless app from fullscreen window ([657c9e5](657c9e5))
* smoother behavior when summoned during a space transition ([e6ded6c](e6ded6c))
* thumbnail sizes could be wrong when switching between screens ([e13a263](e13a263))
* triggering alt-tab during space transition failed (closes [#566](#566)) ([d66d788](d66d788))
* windowless apps would rarely show despite the blacklist ([355225b](355225b))
* workaround a quick in photoshop (closes [#571](#571)) ([7218418](7218418))

### Features

* allow per-shortcut release action preference (closes [#573](#573)) ([2a9c33b](2a9c33b))
* first blacklist can now match prefixes instead of full ids ([10693d0](10693d0))
* new preference to hide thumbnails (closes [#384](#384)) ([877c93c](877c93c))
* show about item in menubar menu (closes [#574](#574)) ([78d1d8f](78d1d8f))
* show apps with no open window (closes [#397](#397)) ([f0fa02c](f0fa02c))
* update fi, hu, nl, pl, ru, zn-tw localizations ([df3010a](df3010a))
* update japanese and korean localizations ([2a2368d](2a2368d))

### Performance Improvements

* add preferences cache to reduce app latency by a few ms ([17863b5](17863b5))
* menubar takes a few frame less to compute ([3b7350f](3b7350f))
* reduce image assets size even further using optimage ([63d8545](63d8545))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants