Refactoring

Refactor the KeyboardNavigator and the key  mapping mechanism.