Closed jerone closed 9 years ago
:+1:
Took me some time to figure out, but I think I've got the shortcuts working great now.
The following shortcuts are supported:
*) Shortcut the same as on StackOverflow answer fields.
I'm not releasing this feature just yet, but if anyone interested you can try the development version: https://github.com/jerone/UserScripts/tree/Github_Comment_Enhancer/Github_Comment_Enhancer
Awesome! I was considering trying to do it myself, but I'm not proficient in Javascript so I'm not sure I would have succeeded...
I noticed that some of the shortcuts you picked conflict with pre-defined browser shortcuts, which should be avoided if possible:
Also, I don't think that we need a shortcut for each and every command, just for the most common. For instance, to write a horizontal line you just need to type "***", so the shortcut isn't very useful; I'd rather have ctrl+l be used for Link (as on Stackoverflow), because it's more obvious than ctrl+shift+w, and not have any shortcut for Line.
Thank you for your feedback!
I noticed that some of the shortcuts you picked conflict with pre-defined browser shortcuts, which should be avoided if possible:
All shortcuts are caught in only the comment fields, where the default behavior is prevented. For example ctrl+s won't open the save dialog for the page when pressed in the comment field.
ctrl+c is traditionally reserved for "Copy", so it's probably not a good idea... Stackoverflow uses ctrl+k, which seems a good choice to me
Should have seen that!
I'd rather have ctrl+l be used for Link (as on Stackoverflow) [...]
Good suggestion to look at StackOverflow, didn't know they had shortcuts too.
I've updated above list with the new shortcuts.
Perfect !
And thanks for writing this script, it makes writing on Github so much easier
Thanks for using! I've got more userscript for GitHub that make things just a bit easier.
If you've got other features or feedback, feel free to open an issue. And sometimes I need another push :smile:
Is the user script supposed to work on Chrome as well? It shows the buttons, but they don't do anything and the keyboard shortcuts don't work.
If I use Tampermonkey to install the script, the buttons work, but the shortcuts don't
Thanks for testing! There were some issues with Chrome that needed attention. One of those issues resulted in new shortcuts. I have updated above list with the new combinations.
It should now work in both Firefox and Chrome.
Yes, it works
:+1:
Thanks!
@thomaslevesque commented on 27 apr. 2015 17:52 CEST:
Yes, it
works
:+1:
Haha
The only one I'm not happy with is table alt+shift+t. But both ctrl+t & ctrl+shift+t can't be overridden in Chrome.
https://github.com/ccampbell/mousetraphttps://github.com/jeresig/jquery.hotkeys