You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it possible to increase the delay time of a combination?
I have longer combinations on my web app like 'a r c g' or 'a r c g k' and they take a bit time to think & press.
It has no effect... i changed to 2000 miliseconds but i still need to type very fast for the combo to get count.
See my small fiddle: https://jsfiddle.net/ombjs132/5/
The code:
var listener = new window.keypress.Listener();
listener.sequence_delay = 2000;
var my_scope = this;
var my_combos = listener.register_many([
{
"keys" : "r c g",
"is_exclusive" : true,
"on_keyup" : function(event) {
console.log("You pressed r c g.");
return true
}
},
{
"keys" : "r c",
"is_exclusive" : true,
"on_keyup" : function(event) {
console.log("You pressed r c.");
return true
}
}
]);
I don't know what changed, but I found sequence_delay in the g property of the listener, so my code (which works) looks like this:
if('g'inkeyListener&&'sequence_delay'in(keyListenerasany)!.g){(keyListenerasany).g.sequence_delay=MaxSequenceTimeoutInMillis;}elseif('sequence_delay'inkeyListener){// this one is just in case the "global" property starts working some day(keyListenerasany).sequence_delay=MaxSequenceTimeoutInMillis;}
Activity
dmauro commentedon Dec 12, 2018
Yup! Check out https://github.com/dmauro/Keypress/blob/development/keypress.coffee#L95, it's a little hidden but
sequence_delayis a public property on thekeypress.Listenerwhich you can set (it's milliseconds).tifDev commentedon Dec 13, 2018
It has no effect... i changed to 2000 miliseconds but i still need to type very fast for the combo to get count.
See my small fiddle: https://jsfiddle.net/ombjs132/5/
The code:
ContraTrouble commentedon Dec 26, 2022
I don't know what changed, but I found
sequence_delayin thegproperty of the listener, so my code (which works) looks like this: