How do I disable F1 to F12 keys ?

0 favourites
  • 2 posts
From the Asset Store
Random Maze Generator with Door & Key System - tutorial capx
  • hi

    I am noCoder and I want to disable F1 to F12 keys. I found code for this but don't know how to implement it. I tried by pasting code but not worked. So please help.

    "shortcut.add("F1", function(e) {
    	e.preventDefault();
    
    });
    
    shortcut.add("F2", function(e) {
    	e.preventDefault();
    
    });
    
    shortcut.add("F3", function(e) {
    	e.preventDefault();
    
    });
    
    shortcut.add("F4", function(e) {
    	e.preventDefault();
    
    });
    
    shortcut.add("F5", function(e) {
    	e.preventDefault();
    
    });
    
    shortcut.add("F6", function(e) {
    	e.preventDefault();
    
    });
    
    shortcut.add("F7", function(e) {
    	e.preventDefault();
    
    });
    
    shortcut.add("F8", function(e) {
    	e.preventDefault();
    
    });
    
    shortcut.add("F9", function(e) {
    	e.preventDefault();
    
    });
    
    shortcut.add("F10", function(e) {
    	e.preventDefault();
    
    });
    
    shortcut.add("F11", function(e) {
    	e.preventDefault();
    
    });
    
    shortcut.add("F12", function(e) {
    	e.preventDefault();
     
    });"

    Tagged:

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • still need help on this

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)