iPhone 7 not being recognized by computer

If you have a wired lightning keyboard, you can connect it to your iPhone, press the home button twice with 1 second delay to bring up the password screen, type in your password and press Enter. Your phone should unlock and you should be able to back it up. If you didn't sync it with the current computer before, your phone will ask you if you want to trust the current computer. You might be able to use the Tab key or the arrow keys to navigate between yes and no buttons and then press Enter to allow the computer to sync your iPhone (not tested).