1
Scripting / Signal handling removing key repeat
« on: March 28, 2020, 09:10:57 PM »
Normally when you hold down an arrow key, the key repeat triggers and AM will quickly start scrolling through your list. However, my current theme scrolls sideways instead of vertically, so I handled the signals accordingly in the script to keep things intuitive for the user without having to remap controls specifically for my theme. But doing this stops key repeat from working.
Is there a way to fix this or perhaps a better way to handle a horizontal scroll input?
Code: [Select]
fe.add_signal_handler( this, "on_signal" );
function on_signal( sig ) {
if(sig == "left"){
fe.list.index--;
return true;
}
else if(sig == "right"){
fe.list.index++;
return true;
}
else return false;
}
Is there a way to fix this or perhaps a better way to handle a horizontal scroll input?