It seems with this modification, loadKeyboard() function is no longer required.