The most common way to do this is using driver commands.
Doors will open and close automatically at stations when using the Navigate to or Drive to command configured for a station followed by the load command. When a passenger train stops at the station, the doors will open and the passengers will teleport on and off the trains.
The other method uses a Navigate to or Drive to track mark followed by door-open and then door-close commands. Since this method is manual, there are Door Open Right, and Door Close Right, and the corresponding left-side commands.
Unfortunately, there are no keyboard shortcuts by default. This would have to be custom programmed for the train. I came across some for operating Russian or Ukranian trams. I don't know what the key combo is but there was a console switch to do that. This was one of only a few switches I could figure out due to their Cyrillic text tags.