Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Do JS Function on CTRL+O ?

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #35795
    schart
    Participant

    Not specifically CTRL+O, but something like that. I want to perform a function, called schartupdate2() on a CTRL + something. Can anyone leave a sample code below?

    #93268
    markthema3
    Participant
    #93269
    Mottie
    Member
    #93290
    Mottie
    Member

    The problem with using Ctrl-O in Chrome is that is the browser shortcut key to open a file. I would recommend using Shift-O or some other letter (demo).

    $(document).keyup(function(event){
    if (event.ctrlKey && event.which === 79) {
    alert('You pressed Ctrl-o');
    return false;
    }
    });
Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.