move app specific HID code to main.c