AndrewDant / screen-spots

Save a set of screen locations to later click on or move to using talon voice
21 stars 2 forks source link

Feature Request/Discussion: Trigger Talon Action on Hover of Screen Spot #5

Closed C-Loftus closed 8 months ago

C-Loftus commented 8 months ago

With Talon, there are some instances in which voice commands can't be issued, but we may still want to have some sort of hands free input. ( voice calls, those with TMJ, etc) For those that use eyetrackers, it could potentially be very useful to have certain parts of the screen act like a macro system. For instance, if someone looks at the Talon icon in the system tray for four seconds, one could automatically trigger speech.toggle() and toggle talon without needing to either press a button or issue voice command.

Before I was aware of your repository I implemented most of this myself by forking the code used for Andreas's mode indicator ( now in the community repository) https://github.com/C-Loftus/colton_talon/blob/master/stare/hotspot.py Essentially all I did was maintain a mapping of spots to talon functions and the time the mouse has been hovered on them. I imagine a good amount of this code could probably be copied directly.

Considering your code is more used and there is precedent for a certain screen spot API, I'm wondering if this is worth including into your repository. (With some modifications to fit your code style obviously) I realize that this might be burdensome to implement and perhaps not frequently used, so there's no worries either way, but I just wanted to bring it up in case it might be of interest.

AndrewDant commented 8 months ago

It's an interesting idea. I originally made this repo when I didn't have an eye tracker and I was using the spots to make it a lot easier to control the cursor without needing one (using a mouse grid), so I get a lot less use out of it these days to be honest. The first thing I thought of when I read your comment is this idea that I heard of in the talon slack awhile back, which sounds fairly similar: https://github.com/ganeshsar/TalonInteractionZones

There's a channel on the slack for it but it doesn't look like that channel is very active: https://talonvoice.slack.com/archives/C04LE2B5W65

Take a look at that and tell me what you think of it, to be honest I know very little about what they actually have working but I'm curious how much the two ideas overlap.

I'm skimming some of your code and it's pretty neat, honestly a lot more impressive than what I've done here. It looks like currently the hotspots are a hard coded list, right? Screen Spots could be an easy way to feed in coordinates using defaults for the diameter/color/alpha/gradient, but I'm not sure what the best method for updating those values on the fly would be. Regardless it shouldn't be too hard to get a proof of concept working. Let me know what you think of the interaction zones projects, but even if that's a more robust long term option we could still try to bang out an integration up your hotspots with screen spots to how something that's functional ASAP.

C-Loftus commented 8 months ago

Thanks for your response, it looks like the Talon interaction zones is is exactly what I'm looking for! I had no idea that repository even existed. The only downside of that repository is that setup does look rather long for many people, but given the fact that this wouldn't be a particularly commonly used feature to begin with, I think it is totally fine.

With regards to my own code it wasn't all finished and I didn't settle on the best way to store the settings for each hot spot. ( I wanted a user to be able to change how large the spot was and the xy position, along with a few other setting. However, t's not entirely clear what the best way to store groups of many settings would be. I was probably going to just serialize a json file)

I think for the time being we can probably just close this.