You would have to crack the games engine and recode it to function as desired. It's not a simple mod and can't be done with a hex edit. On top of that it would defy all in-game button icons so it would be visually unedited but control differently. On top of that layer is the icing, it could break touch screen buttons that share hardcoded keys. So pressing B on the touchscreen could trigger two buttons since the HID has patches.