minor refactoring in virtual keys