Skip to content
This repository has been archived by the owner on Oct 28, 2019. It is now read-only.

cmd+enter to create paste #23

Open
kylef opened this issue Feb 15, 2014 · 1 comment
Open

cmd+enter to create paste #23

kylef opened this issue Feb 15, 2014 · 1 comment
Labels

Comments

@kylef
Copy link
Member

kylef commented Feb 15, 2014

No description provided.

@kylef kylef added the feature label Feb 15, 2014
@dijit
Copy link
Contributor

dijit commented Feb 15, 2014

var isCtrl = false;

document.onkeyup = function(e) {
    if (e.which == 17) {
        isCtrl = false;
    }
}

document.onkeydown=function(e) {
    if (e.which == 17) {
        isCtrl = true;
    }

    if (e.which == 13 && isCtrl == true) {
        /*{{post crap here}}*/
        return false;
    }
}

this is what I get with the help of google.

idk how to post though; maybe this[0] will help?

[0] http://stackoverflow.com/questions/19476532/send-post-data-from-html-form-with-javascript

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

No branches or pull requests

2 participants