mirror of
https://github.com/taigrr/JSKeyCapture
synced 2025-01-18 04:13:12 -08:00
Update custom.js
This commit is contained in:
parent
eb776ca75a
commit
17da5c7fcd
10
custom.js
10
custom.js
@ -1,3 +1,4 @@
|
|||||||
|
//Custom Ho
|
||||||
addShortcut(function(){
|
addShortcut(function(){
|
||||||
console.log("You pressed the keys Control, X, and Enter.");
|
console.log("You pressed the keys Control, X, and Enter.");
|
||||||
},[key.CTRL,key.X,key.ENTER]);
|
},[key.CTRL,key.X,key.ENTER]);
|
||||||
@ -10,16 +11,13 @@ addShortcut(function(){
|
|||||||
|
|
||||||
addShortcut(function(){
|
addShortcut(function(){
|
||||||
alert("You pressed the keys Control, Y, and Enter.");
|
alert("You pressed the keys Control, Y, and Enter.");
|
||||||
for(var i=0;i< keyStrokes.length;i++)
|
releaseAllKeys();
|
||||||
{
|
|
||||||
keyStrokes[i] = false;
|
|
||||||
}
|
|
||||||
},[key.CTRL,key.Y,key.ENTER]);
|
},[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.
|
//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(){
|
addShortcut(function(){
|
||||||
alert("You pressed the keys 1, 2, and 3.");
|
alert("You pressed the keys 1, 2, and 3.");
|
||||||
keyStrokes[key.ONE] = false;
|
keyStrokes[key.ONE] = false;
|
||||||
keyStrokes[key.TWO] = false;
|
keyStrokes[key.TWO] = false;
|
||||||
keyStrokes[key.THREE] = false;
|
// keyStrokes[key.THREE] = false;
|
||||||
},[key.ONE,key.TWO,key.THREE]);
|
},[key.ONE,key.TWO,key.THREE]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user