Rework key handling, tweak configuration

I don't understand how this could work before.. I talked a bit to Danny about this rework.

Let me know if you have any questions.