I’m a rod or a tree branch a parent can whack;
I can turn on a light; put your train on a track;
I can bat either way; change from Windows to Mac;
And put calls through a board with a cord in a jack.
Who am I?
UPDATE: Riddle solved by Rebecca. See comments for answer.