I don't know about a mouse (I hate those things), but you can use a wireless keyboard (~$20 USD) via bluetooth with tablets and phones.
I use one for my phones, but also do not think that a virtual keyboard has to be a pain.
There are many keyboard apps that can give options that make using them very easy.
In fact, as I am typing this, I am using the virtual keyboard on my screen- using only the index fingers on both hands.
I actually can make reasonable time doing this after just a little bit of practice, and finding the keyboard that cooperates the best for that situation.
Also, the keyboards that I use are small and secure.
The small size allows for me to have multiple options available on a single device.
Things like GBoard and others are not so small, keep growing, and are not secure at all- and generally are not very user friendly.
Here are links to the ones that I have on my devices.
https://f-droid.org/en/packages/com.vlath.keyboard/
https://f-droid.org/en/packages/dev.patrickgold.florisboard/
https://f-droid.org/en/packages/org.pocketworkstation.pckeyboard/
https://f-droid.org/en/packages/rkr.simplekeyboard.inputmethod/
https://apt.izzysoft.de/fdroid/index/apk/rkr.tinykeyboard.inputmethod
https://f-droid.org/en/packages/com.simplemobiletools.keyboard/
Personally, I find that Florisboard is the best overall, although for some things I still prefer Simple Keyboard.
Florisboard offers the most options, even allowing custom spacing between keys (which also controls the size of the keys), and there are more features in the works from the developer.