Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keyboard Shortcuts? #52

Open
eckdanny opened this issue Sep 26, 2014 · 5 comments
Open

Keyboard Shortcuts? #52

eckdanny opened this issue Sep 26, 2014 · 5 comments

Comments

@eckdanny
Copy link

Dunno if this could be a thing... but it'd be great to be able to invoke snippets via keyboard shortcuts.

Burden for supporting that is agreeably not on this repo. If wiring keyboard shortcuts to snippets is possible, however, I'd love to see how to do it on the README.

I use the heck out of hashlink.js, but having to open up the dev tools panel is a bit cumbersome.

@joeyespo
Copy link

If this is a thing, I've had a good experience with this library for setting up keyboard shortcuts.

You could also put some of these snippets in a bookmarklet.

@bgrins
Copy link
Owner

bgrins commented Sep 29, 2014

AFAIK the best way to do this right now would probably be a bookmarklet and assign a keyword then use keyboard shortcuts to focus the URL bar and enter the keyword + enter. This surely doesn't seem ideal but I don't know of any other way to run it without using the tools. May be useful to generate the bookmarklets in the Rakefile then add instructions for using them in this way.

@jon-freed
Copy link

How can a snippet be run from a bookmarklet? (Is it even possible to do so? Perhaps there is or could be a Chrome browser extension that can help expose them to bookmarklet javascript?)

@mkdizajn
Copy link

Just to let you know guys,, that has landed in Chrome 59 natively,,

do something like:

`CTRL+SHIFT+P` -> `I` and name of your snippet

snippets

cheers

@jon-freed
Copy link

jon-freed commented Jun 21, 2017

@mkdizajn, thanks for the notice, and that's a great use of a GIF.

So, as the GIF shows, the new Chrome 59 key-press steps for a command menu to execute a snippet are as follows:

  1. Press "F12" to open your developer console (if you didn't have it open already).
  2. Press "Ctrl-Shift-P" to open a command menu window.
  3. Delete the ">" that is already there.
  4. Type "!" and then the snippet name (or select it from the list) and then press "Enter".

This process could certainly be shortened. I vote for keeping this issue open until it is shortened.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants