Bug 973456 - Refactor keyboard panels using AMD

https://bugzilla.mozilla.org/show_bug.cgi?id=973456