Modify the my_kbd_read_keys() in that way, that it does not mask out any bits in kbd_new_state / physw_status.
e.g. disable this code:
remote_key = (physw_status[2] & USB_MASK)==USB_MASK;
if (remote_key) remote_count += 1;
else if (remote_count) {
usb_power = remote_count;
remote_count = 0;
}
if (conf.remote_enable) {
physw_status[2] = physw_status[2] & ~(SD_READONLY_FLAG | USB_MASK);
}
else physw_status[2] = physw_status[2] & ~SD_READONLY_FLAG;
Maybe your values for:
#define SD_READONLY_FLAG (0x20000)
#define USB_MASK (0x80000)
are wrong an does not depend to the SD-Card, but to the display.
