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

Auto-Paste Functionality via Keyboard Shortcuts #98

Closed
neocotic opened this issue Apr 24, 2012 · 2 comments
Closed

Auto-Paste Functionality via Keyboard Shortcuts #98

neocotic opened this issue Apr 24, 2012 · 2 comments
Assignees
Milestone

Comments

@neocotic
Copy link
Member

Same as #95, but auto-pastes a template to a input field/textarea when it was focused by the user while using a keyboard shortcut to access the template.

@ghost ghost assigned neocotic Apr 24, 2012
@neocotic
Copy link
Member Author

Attempt to find focused UI component using document.querySelector(':focus').

@neocotic
Copy link
Member Author

I've tested this again after fixing a bug and I'm happy with the results. That said; it's worth noting the following additional changes to keyboard shortcuts;

  • They now have an independent section in the Options page
  • Content scripts are now kept up-to-date with those in use and only send requests to the controller for active hotkeys
  • Event.preventDefault is called when triggered by an input/textarea element (preventing accent characters being inserted - again, only done when active hotkeys are detected)
  • Event listener is now bound to keydown instead of keyup

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

No branches or pull requests

1 participant