$.keys.durationDown( key)

Returns how many frames has this been held down

  • key : string //

Examples



function update() {
    $.text.alignment.x = "center";
    $.text.alignment.y = "center";
    $.text.size=20;
    if($.keys.durationDown("a")>0){
        $.text.print(
            $.w/2,
            $.h/2,
            $.keys.durationDown("a").toString()
        );
    }
}