For mobile, use the joystick to move the player and the button to fire. For keyboard controls, use arrow keys or wasd to move and click or space key to fire.
When using the mobile joystick, you will notice that when you let go, you keep moving. I don't think there is any way to fix this, because I am using a trick to allow the multi-touch joystick in the first place.