WhatPumpkin/Sburb-Legacy

Keys get stuck in room change

Closed this issue · 2 comments

Control of the keyboard is lost at some point during room change, this means the keyRelease event is often missed at the keys get "stuck" down.

I recommend either wiping out all keys when the room changes as a quick fix (see _onblur in Jterniabound.js).

Keyboard control is lost during loading of the XML file, as the update loop stops at that point (Event handlers turn off when the update loop stops to avoid preloader errors).

You said "either", what's the other option? :P

Started the thought and then couldn't think of a good alternative. Just calling the _onblur function when update loop is killed seems adequate.