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

Create keyboard shortcuts for plugin #13

Open
dalmaer opened this issue Dec 29, 2010 · 3 comments
Open

Create keyboard shortcuts for plugin #13

dalmaer opened this issue Dec 29, 2010 · 3 comments
Labels

Comments

@dalmaer
Copy link
Member

dalmaer commented Dec 29, 2010

Enable keyboard shortcuts for actions (e.g. Apple-S to shorten).

@dalmaer
Copy link
Member Author

dalmaer commented Jan 11, 2011

one simple example:

$("p").bind("myCustomEvent", function(e, myName, myValue){
$(this).text(myName + ", hi there!");
$("span").stop().css("opacity", 1)
.text("myName = " + myName)
.fadeIn(30).fadeOut(1000);
});
$("button").click(function () {
$("p").trigger("myCustomEvent", [ "John" ]);
});

@ewpreston
Copy link
Contributor

Thinking of using jquery.hotkeys to handle keyboard mapping. Sound right to you? Doesn't seem to support Apple+key combos, just Ctrl+ or Alt/Option+, etc. See https://github.com/jeresig/jquery.hotkeys and let me know what you think

@ewpreston
Copy link
Contributor

Added support for shrink tweet (Ctrl/Meta+s). Need to add others; be nice to alias CMD, and perhaps there's a better way to encapsulate all this so not so much code. Using the jquery.trigger event mechanism which isn't too bad.

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

No branches or pull requests

2 participants