Answers for "disable ctrl p in js"

1

how to disable ctrl key using javascript

document.addEventListener("keydown", function (event) {
    if (event.ctrlKey) {
        event.preventDefault();
    }   
});
Posted by: Guest on May-31-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language