From 17da5c7fcd7bf8e6563a120d643ad15ba85deaac Mon Sep 17 00:00:00 2001 From: Tai Groot Date: Sat, 16 Jan 2016 11:07:38 -0800 Subject: [PATCH] Update custom.js --- custom.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/custom.js b/custom.js index 23d8137..0b3885f 100644 --- a/custom.js +++ b/custom.js @@ -1,3 +1,4 @@ +//Custom Ho addShortcut(function(){ console.log("You pressed the keys Control, X, and Enter."); },[key.CTRL,key.X,key.ENTER]); @@ -10,16 +11,13 @@ addShortcut(function(){ addShortcut(function(){ alert("You pressed the keys Control, Y, and Enter."); - for(var i=0;i< keyStrokes.length;i++) - { - keyStrokes[i] = false; - } + releaseAllKeys(); },[key.CTRL,key.Y,key.ENTER]); //This may not be desireable, as the user might still have keys pressed on the keyboard, and this would require the user to let up all keys. -//It might be better to only release one key: +//It might be better to only release one key, but check out how only releasing select keys might be problematic: addShortcut(function(){ alert("You pressed the keys 1, 2, and 3."); keyStrokes[key.ONE] = false; keyStrokes[key.TWO] = false; - keyStrokes[key.THREE] = false; +// keyStrokes[key.THREE] = false; },[key.ONE,key.TWO,key.THREE]);