refactoring keyboard special