Go to Macros menu and choose Edit Macros

Click on the Add button and insert a new macro, as in the image below (the Name you can choose, of course).

The Type should be Normal and the LaTeX Content should be \textrm{%|%|}. Click on OK and then you can insert the macro from Macros menu or using its shortcut (in my case, Shift+F5).
The macro will insert \textrm{} with the cursor inside the braces {}.
Note 1. You can select some text (foo) first and execute the macro after to obtain \textrm{foo}.
Note 2. You can change its shortcut using Options menu, Configure TeXstudio

and then Shortcuts
