Didn't text it. Its just the way I would start to, in case that the camera looks to arbitrary directions.
vec_set(temp, camera.pan);//set an interims vector to the angel of the camera
(for key_a you don't need to change anything here, but for the other keys do something like the following here: temp.pan += 180;//for key_s - temp.pan += 90;// for key_d or a)
vec_for_angle(temp, temp);//change the angle to a vector
vec_scale(temp, key_w);//multiply the vector with the key value (1 or 0)
vec_add(object.x, temp);//add the vector to the object's position