nchudleigh / homerow

Keyboard navigation for all of macOS. Click, scroll, and perform tasks with your keyboard.
https://homerow.app
564 stars 7 forks source link

Disable Homerow shortcut while text input focused #76

Open Seanw265 opened 1 year ago

Seanw265 commented 1 year ago

Is your feature suggestion related to a problem? Please describe. When I set my Homerow shortcut to something extremely comfortable to type, like Shift + F, Homerow opens while I'm typing into text inputs across the OS. This applies to both clicking and scrolling.

Describe the solution you'd like I would like to prevent Homerow from triggering while I am actively focused on a text input.

Describe alternatives you've considered I have considered using caps lock as my trigger button, but I already have that remapped to Esc.

eugenesvk commented 1 year ago

Do you know of any app that is aware of whether a text field is active? That would be a very useful funcitonality in other utilities as well

Seanw265 commented 1 year ago

I wish I did. I'm new to this world of accessibility-style applications. Still, it would be a great feature if there is a way to implement it.

Seanw265 commented 12 months ago

@eugenesvk I've come to realize that Grammarly Desktop is aware of whether a text field is active. Notice in the screenshot below that Grammarly has annotated the text field in the native MacOS Messages app with their widget. This happens when I have the text field selected. If I were to select an alternative text field, the Grammarly Desktop widget would move to the new one.

I think this indicates that this feature is possible with the APIs available on MacOS.

I find myself using Vimium whenever I can since I'm able to set a more comfortable shortcut. I can't use Vimium outside of Chrome so this would be a huge plus if it's implemented in Homerow.

Screenshot 2023-11-30 at 4 14 11 PM

eugenesvk commented 12 months ago

Interesting, does it work in Electron/browser's text fields (hopefully detection doesn't depend on a gui framework used)?

I forgot that the old Karabiner was also able to detect text fields, and it's open source so could check how it did use the api

Seanw265 commented 12 months ago

On Slack Electron, it works in the message box but not the search box.

This seems consistent across all search boxes. I've checked Messages, Settings, and Activity Monitor. None of these native app search boxes seem to trigger Grammarly. Grammarly isn't relevant for those inputs though, so I would imagine that they are doing some event filtering on their side.

I think they disable it on the browser intentionally since they have an extension that provides a bit more functionality.