minor code refactor in KeyboardViewController.m