fix keyboardcallback issue