dt doesn’t get passed to the key up/down function. It’s tricky to use the concept of deltatime in the keydown callbacks.
I would recommend using the keyboard isPressed function in the update loop: https://developer.playcanvas.com/en/api/pc.Keyboard.html
eg
ProgressBar.prototype.update = function(dt) {
if (this.app.keyboard.isPressed(pc.KEY_0)) {
// Do something
}
};