Added preliminary keyboard and gamepad support