Occasionally the container is mounted twice but not destroyed, and this results in keydown events triggering the listener more than once.
Unfortunately I have been unable to reproduce this consistently in order to fix the real underlying issue. For now we just unregister the keydown listener before registering it. If it has not yet been registered nothing will happen, but if it has we will prevent registering it twice.
Occasionally the container is mounted twice but not destroyed, and this results in keydown events triggering the listener more than once.
Unfortunately I have been unable to reproduce this consistently in order to fix the real underlying issue. For now we just unregister the keydown listener before registering it. If it has not yet been registered nothing will happen, but if it has we will prevent registering it twice.
Fixes #94