I know I tried several things.
I recall that there were apps that would let you type with one hand; for example, you use the index finger on your left hand to type an 'f' and on your right hand to type a 'j'. With the software, you'd use the correct finger (say, always typing 'f's whenever you wanted an 'f' or a 'j') and it would look up what you typed and figure out the word you meant. I think this falls into that class: http://www.onehandkeyboard.org
I looked into various hardware assistive devices, and was amazed that they were extremely expensive. I believe this one-handed keyboard falls into that category: https://tipykeyboard.com/en/home/
I looked into typing by voice. On my Mac, you could type a letter at a time -- so painful! Someone came up with an incredibly way to code -- see https://www.youtube.com/watch?v=8SkdfdXWYaI -- but as I recall, on a Mac, it required having a Windows box to do the voice recognition (the Mac's built-in recognition is decent, but didn't have good enough APIs, IIRC), buy Dragon Naturally Speaking (for something like $500!) and use a little glue to make it all work together.
I wondered if any phone keyboard could be commandeered to become useful -- something like using Swype on your phone and having it routed to your computer. Alternatively, the Mac has assistive technologies built-in (and I imagine other OSes do too) where you can control the entire machine using one button -- including doing mouse drags and such -- but it looks so incredibly tedious that it would only be something to pursue if you had no alternative.
As I recall, needing to type as a programmer, and not wanting to spend tons of money -- I would've if I'd had a permanent injury, mind you -- that I found I could type with one-and-a-half hands, slowly, and use the intellisense/code completion like crazy, and that worked poorly but was workable.