function handleKeyPress(event){
    
      if (event.altKey) {
          setKeyPress(key_press+1);
          swal('Alt Key Press Detected',"Action has been Recorded", "error");
          return false;
      }
      else if(event.ctrlKey) {
          setKeyPress(key_press+1);
          swal('Ctrl Key Press Detected',"Action has been Recorded", "error");
          return false;
      }
      else {
          return true;
      }
      
  }
/**
   * This function is triggered every time a key is pressed. It the pressed 
   * key is Ctrl or Alt it shows an error and updates count
   * @param {Keypress Event} event 
   * @returns false if key is Ctrl or Alt else true
   */
This function is triggered every time a key is pressed. It the pressed
key is Ctrl or Alt it shows an error and updates count
@param {Keypress Event} event
@returns false if key is Ctrl or Alt else true
This function is triggered every time a key is pressed . It the pressed key is Ctrl or Alt it shows an error and updates count @param { Keypress Event } event @returns false if key is Ctrl or Alt else true
function handleKeyPress(event){
      if (event.altKey) {
          setKeyPress(key_press+1);
          swal('Alt Key Press Detected',"Action has been Recorded", "error");
          return false;
      }
      else if(event.ctrlKey) {
          setKeyPress(key_press+1);
          swal('Ctrl Key Press Detected',"Action has been Recorded", "error");
          return false;
      }
      else {
          return true;
      }
  }
function handleKeyPress ( event ) { if ( event . altKey ) { setKeyPress ( key_press + 1 ) ; swal ( 'Alt Key Press Detected' , "Action has been Recorded" , "error" ) ; return false ; } else if ( event . ctrlKey ) { setKeyPress ( key_press + 1 ) ; swal ( 'Ctrl Key Press Detected' , "Action has been Recorded" , "error" ) ; return false ; } else { return true ; } }
This function is triggered every time a key is pressed.
This function is triggered every time a key is pressed .