SessionSync icon indicating copy to clipboard operation
SessionSync copied to clipboard

Support AutoHotKey scripts by creating consistent tabindex hierarchy

Open JakubKoralewski opened this issue 4 years ago • 3 comments

Feature request

Currently the behavior when you open the extension panel (Ctrl+Shift+F) and try pressing TAB is very weird and inconsistent. I propose for the search to be the first element to be highlighted by first tab press; i.e. setting it to tabindex=0.

Why

This would allow scripting with AutoHotKey to open Firefox, then press Ctrl+Shift+F, then TAB, then write the name of the session, then press TAB again to select the first found session, then open the session with something like Ctrl+Enter.

JakubKoralewski avatar Aug 12 '20 11:08 JakubKoralewski

Now I understand why tab might be important. Not 100% sure how to design it but I will consider this idea.

ReDEnergy avatar Aug 12 '20 11:08 ReDEnergy

Not 100% sure how to design it

Assuming the cause of #91 is fixed (I dunno why options would open when pressing tab) then, when creating the search element, create it with the attribute tabindex equal to 0, then when filtering results, loop over the sessions and using i as the loop iteration count set the sessions' tabindex value to i+1, and also for each filtered session add a keypress event listener, check if ctrl is pressed and Enter is the value of the key, then open the session. I think that's it.

JakubKoralewski avatar Aug 12 '20 11:08 JakubKoralewski

Maybe when I do that the problem from #91 will be fixed. Because it seems to be something automatically created by how Firefox handles the HTML i write and certainly not because I handle tab press in any way because I don't do that right now.

ReDEnergy avatar Aug 12 '20 12:08 ReDEnergy