[Feature Request] Command to pass a single keystroke through to the page
See original GitHub issuePrelude
Some web sites implement their own keyboard shortcuts. For example, on GitHub you can focus the search bar by typing ‘s’ or ‘/’. Or while viewing a file (e.g. Surfingkeys/README.md), you can hit the ‘b’ key to jump into blame mode. (See GitHub’s page Using keyboard shortcuts for a full list.)
Surfingkeys by its nature occupies a lot of keys on the keyboard, and most of the time it precludes using a web site’s own keyboard shortcuts, if any.
Existing Workarounds
PassThrough Mode helps here:
Alt-i
to enter PassThrough mode to temporarily suppress SurfingKeys.
So a user on GitHub can enter <kbd>Alt-i</kbd> <kbd>s</kbd> <kbd>Alt-i</kbd> to access the search bar.
But I think we can improve on this experience by implementing a single-keystroke passthrough mode.
Proposal
Add a command and to Surfingkeys which enables PassThrough mode, but only for a single keystroke, and bind it to the <kbd>r</kbd> key. That way a user on GitHub can access the search bar just by typing <kbd>r</kbd><kbd>s</kbd>.
Alternate Proposal
Or, perhaps instead of passing a single keystroke, this new command should enable PassThrough mode, then wait for the next keystroke, and then an additional timeout—say, 300ms—before disabling PassThrough mode. That would allow easy access to web sites with multi-key shortcuts, like GitHub’s <kbd>g</kbd><kbd>p</kbd> for “Go to pull requests tab”. Under this alternate proposal, a user could type <kbd>r</kbd><kbd>g</kbd><kbd>p</kbd> to access the pull requests tab.
This alternate proposal might be nice or it might be too complicated and thus finicky; I guess if someone implements it they will need to experiment a bit to see how well it works.
Prior Discussion
For reference: there was some discussion on Issue #656 about this idea, including a proposal for it in this comment, and then a request from @aspiers in this later comment for a ticket to track the idea. Hence this ticket.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:12
- Comments:7 (6 by maintainers)
Top GitHub Comments
I refined the implementation,
p
comes as default for ephemeral passthrough mode. Please see https://github.com/brookhong/Surfingkeys/blob/master/pages/default.js#L263Hope that helps.
Works fantastically, thank you so much! 😃