In technical jargon you need to "refactor out an association between keys and directions". This association can be refactored into a function:
vector2 choose_direction(key_type k);
You give the function a key value and it returns the direction vector, you can use it like this:
player.move(area.get_size(), choose_direction(movement_key));
This new function can look like anything you want, really, a simple implementation could be this:
vector2 choose_direction(key_type key){ switch (key) { case 'w': return vector2(0, 1); case 'a': return vector2(-1, 0); case 's': return vector2(0, -1); case 'd': return vector2(1, 0); default: throw std::invalid_argument("Invalid key value"); }}
A more sophisticated game might need lots of key mappings, or dynamically settable ones, you could use a std::map in this case.