Like this:
RMB
<kbd>![RMB][RMB] RMB</kbd>
[RMB]: https://i.sstatic.net/LPwD4.png (Right Mouse Button)
The mouse icon is simply an image, embedded via markdown syntax just like any other image.
I and some other users have written a userscriptwritten a userscript which allows these and other <kbd>
buttons to be inserted with a single keyboard shortcut.
The links for each icon are as follows:
RMB https://i.sstatic.net/LPwD4.png
LMB https://i.sstatic.net/FwrAW.png
MMB https://i.sstatic.net/OASpJ.png
MW https://i.sstatic.net/v1vyT.png
The icons originate from the wiki, but it was decided during the development of the userscript to host them on imgur in case the wiki versions changed.