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

Trigger window focus / blur on browsermode #114

Open
simon-zk opened this issue Nov 20, 2022 · 1 comment
Open

Trigger window focus / blur on browsermode #114

simon-zk opened this issue Nov 20, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@simon-zk
Copy link

Is your feature request related to a problem? Please describe.

Plash is awesome. You can use a hotkey anytime to switch to the browsermode and get that window in front of other apps. However, for someone like me, who is using it for writing, it lacks one little feature to make it perfect - trigger to for automatic Plash window (app) focus and blur.

Currently the javascript "onfocus" or "onblur" listeners doesn't work until you click somewhere on that Plash window. So if you are writing something on Plash and you are currently have Chrome open, you could just do the hotkey and start writing into your Plash page immediately - however, it still requires you to focus that Plash window (unless you haven't focused another window after focusing Plash).

Describe the solution you'd like

It's simple - just trigger the Plash window focus or blur when switched to/from the browsermode. Maybe at least the hotkey could trigger the app window focus / blur? I don't think it's needed to have that focus when toggling browsermode from the Plash menu.

Describe alternatives you've considered

Using something like Alfred, to create another hotkey to toggle Plash browsermode from terminal/hotkey and then deliver a mouse click via AppleScripts. Then just simply using the hotkey created on Alfred - it does the job. However it includes 3d apps and it's hard to use for blurring the Plash window and refocusing the window used before, after switching back from the Plash browsingmode.

Additional context

Thank you @sindresorhus for creating this and other awesome apps. You are doing a great job! 😍

@simon-zk simon-zk added the enhancement New feature or request label Nov 20, 2022
@simon-zk
Copy link
Author

What about focusing the Plash app window or the previous window when key is pressed?

https://github.com/sindresorhus/Plash/blob/011c22e977e53f921416a838cce0326a21dff066/Plash/Events.swift#LL122C38-L122C38

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

1 participant