How can i remotely type my passcode while iphone is plugged to my mac I want to backup my iphone 5s but the screen is entirely broken, it's all black and the touchscreen + home button do not work.
I need to control my phone from a keyboard to back it up from icloud on my mac that recognises it.

Is there anyway to do it?
Definitely not possible
no access over computer keyboard if your device has not been jailbrokenwith openssh preinstalled before

You can use iCloud Backup on recognized WIFI networks to sync automatically
if previously enabled, though


  If your iPhone gets recognized by iTunes on your Mac, you are still good to go for a screen replacement considering it not being as expensive as a data loss, nor the lightning keyboard and more important you don't lose your app tokens, for example some banking apps, app-related logins, authenticator apps, etc.