But he decried risks taken by some Aucklanders, especially with the looming introduction of quieter and faster electric trains.
"Every second day in this city a member of the public attempts to dodge the barrier arms or put their own lives at risk," he said.
"This a major issue and we are working with local government agencies to reduce this risk."
In the front-line of a campaign to be ramped up in schools in a fortnight is the TrackSAFE foundation, a joint venture of KiwiRail, Auckland rail operator Transdev and the Government's Transport Agency.
Children from Newmarket Primary School, who sang a waiata at the switch-on event, are becoming ambassadors for the campaign because many of them live in apartments close to the route along which the first electric trains will start running between Onehunga and Britomart on April 28.
Although Auckland Transport intends closing the only nearby railway crossing next year, at the end of Sarawia Street, eight others remain on the Onehunga branch line.
Foundation Megan Drayton said electrification presented extra hazards such as from people flying kites near overhead lines.
Mr Key, who was accompanied by Transport Minister Gerry Brownlee, was guarded over whether the Government would provide joint funding for an $2.86 billion underground rail link earlier than a 2020 start date he indicated last year.
He said that still depended on increasing rail patronage, which he quoted at 10.7 million passenger trips in the 12 months to January 31, possibly not having been briefed on a record of 11 million trips reached last week.
But he said the Government was continuing to work with Auckland Council on whether an earlier start may be possible, in view of a number of property investors wanting to tie new developments to the project.
"To ensure Auckland and New Zealand are efficient and competitive on the world stage, we have to have good access to public transport," he said.
"So I have absolutely no doubt that over time, that will look like a highly efficient, very regular, electric train service that runs through the CBD rail tunnel and connects greater parts of Auckland."