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

Allow the use of keyboard shortcuts #8

Open
cedricfrancoys opened this issue May 17, 2024 · 0 comments
Open

Allow the use of keyboard shortcuts #8

cedricfrancoys opened this issue May 17, 2024 · 0 comments

Comments

@cedricfrancoys
Copy link
Collaborator

Example: ctrl+s in the current context

  • Capture on the entire document

  • Relay to the current context (at the top of the stack)

  • Management at the view level (if mode = edit): associate with the main ACTION.SAVE button

$(document).bind("keyup keydown", function(e){
    if(e.ctrlKey && (e.which == 83 || e.which == 115)){
        myfunction();
    }
});

function myfunction(){
    alert("Key pressed Ctrl+s");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

1 participant