question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Feature Request] Command to pass a single keystroke through to the page

See original GitHub issue

Prelude

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:closed
  • Created 4 years ago
  • Reactions:12
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

4reactions
brookhongcommented, Nov 7, 2019

I refined the implementation, p comes as default for ephemeral passthrough mode. Please see https://github.com/brookhong/Surfingkeys/blob/master/pages/default.js#L263

Hope that helps.

3reactions
aspierscommented, Nov 7, 2019

Works fantastically, thank you so much! 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Keyboard shortcuts in Word - Microsoft Support
Move the cursor by scrolling the document view down by one screen. Page down. Move the cursor to the top of the next...
Read more >
Keystrokes - Freedom Scientific
In your browser, press and hold INSERT and press. F1 twice quickly. Once JAWS help is open, press F6 to move to the...
Read more >
GitLab keyboard shortcuts
Global shortcuts ; f, Put cursor in the filter bar. ; Shift + i, Go to your Issues page. ; Shift + m,...
Read more >
Keyboard Shortcuts for Chrome
Press Ctrl+Shift and click a link. Opens the link in a new window. Press Shift and click a link. Reopens the last tab...
Read more >
Use keyboard shortcuts | Jira Software Cloud - Atlassian Support
Click Help > Keyboard shortcuts; Press the ? on your keyboard from any page (Shift + / ). The Keyboard shortcuts dialog is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found