move keyscan code to keycode function from lib to app