Update as of 19th October, 2022: you should swap to Prism Launcher which is a drop-in replacement for PolyMC.
Want to get a better Minecraft experience on Steam Deck or with Gamepads as a whole? Thanks to a new mod, it's easily possibly with the latest versions of Minecraft.
The new mod is named MidnightControls, a fork of the old and unmaintained LambdaControls and it's open source. The developer who has taken it on has made sure it's cleaned up and working again, along with adding in support for the Steam Deck and in my own testing it works rather nicely. For this, I used the PolyMC launcher available easily for Linux and Steam Deck. You can see a previous guide on PolyMC in this article.
First up is the video example on how to do it followed by the text guide:
How to do it:
- First with PolyMC, set Steam Input into Gamepad with Mouse, and set the right trackpad to Left Mouse Click.
- Open PolyMC, add a new instance and set the mod loader to Fabric and click Okay.
- Now hit the View Mods button and then Download Mods.
- Pick the Fabric API, MidnightLib and MidnightControls.
- Once downloaded, load up your new Minecraft instance.
- Go into the Options -> Controls -> Controller.
- Set the Mode to Controller and under Appearance set Controller Type to Steam Deck.
- Now you're all set and it will just work.