It is a setting within the in-game configuration menus.
It is how I use my dual-shock, so I know this to be true!

Unsure about anything keyboard related.
Sorry about that; but hope this helps.