I'm trying to do a little key remapping in Android 5.1 by creating custom keylayout files for my Bluetooth devices, however a few of my devices have keys that either don't do anything in Android (such as iOS specific keys on a keyboard) or get intercepted by Android before it shows up as a key event.
As far as I can tell, the issue is that these keys have scancodes that don't currently map to anything in the generic keylayout list, or they're considered a system key like the Home key and the actual key press never reaches regular apps. Assuming it's because the scancode doesn't map to anything yet in Android, is there any way to get the raw scancodes coming in from the device so I can try to document the codes myself and write a proper keylayout file for it? I have root on my device and I can also connect the devices to my Windows 10 PC if there's a Windows based method to read unknown scancodes from a Bluetooth keyboard.