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

FULLY customisable keyboard shortcuts #197

Open
neocotic opened this issue May 17, 2013 · 4 comments
Open

FULLY customisable keyboard shortcuts #197

neocotic opened this issue May 17, 2013 · 4 comments
Milestone

Comments

@neocotic
Copy link
Member

Although this was originally raised back in the early days (see #5), keyboard shortcuts were never fully customisable as you couldn't change the modifiers and were restricted to only alphanumeric keys (still probably wise).

However, inspired by user feedback, I'm going to look into doing this... again.

First off, I want Windows, Mac, and Linux users to get a native-feeling experience (i.e. Mac users getting their fancy symbols 😉). Also, at least one modifier is required and modifiers will be global and covers all templates. The "trigger key" will be the only thing bound to the template, as it is now. Perhaps the only change to the "trigger key" is to loosen its restrictions.

Here's a list of valid modifiers:

  • Ctrl
  • Alt
  • Shift
  • Option (OS X)
  • Command (OS X)
  • Alt Gr (?)

Finally, I'll probably create/find one or more external libraries to manage the setting and identification of shortcut modifiers. This would need to be injected as a content script before content.coffee.

@ghost ghost assigned neocotic May 17, 2013
@CKHarwood
Copy link

I'll keep an eye on this thread; thanks for tackling custom modifier keys again.

@neocotic
Copy link
Member Author

I started looking at doing this myself as I found the challenge interesting (repo: hotkeys). I was going to base it on this script but have since found that John Resig himself has already done this but in the form of a jQuery plugin, jQuery.hotkeys. Although I wasn't wanting to depend on jQuery for this functionality since the content scripts interact with the DOM directly right now, I might experiment with using this plugin to suit our needs. I need to make sure that whatever solution is decided upon supports all operating systems and detects shortcuts trigger within input fields.

Also, although not as important at this stage, I can't decide how best to allow the user to configure their modifiers. One option is to do something fancy based on something along these lines or simply use drop down boxes (more likely).

@neocotic
Copy link
Member Author

I'm still hoping to find time to work on this soon. Just found a library called [Mousetrap|http://craig.is/killing/mice] that may also be useful.

@CKHarwood
Copy link

Cool, thanks Alasdair. Even if template does not end up having fully
customizable shortcuts, I'm interested in this JS library :)

Thanks for keeping me in the loop.

On Fri, Jul 12, 2013 at 6:53 AM, Alasdair Mercer
notifications@github.comwrote:

I'm still hoping to find time to work on this soon. Just found a library
called [Mousetrap|http://craig.is/killing/mice] that may also be useful.


Reply to this email directly or view it on GitHubhttps://github.com//issues/197#issuecomment-20872210
.

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

2 participants