Anki desktop does not have controller support built in, but there is a great add-on: https://ankiweb.net/shared/info/1898790263
As for android - the newest version of ankidroid should work as-is, you can customize your buttons in Settings / Controlls.