My car is a keyless ignition and as such just has a button I press to have it start. My question is... what happens if I hit it while I'm driving?
It could work exactly the same as a keyed ignition, in which case your starter motor would engage, but manufacturers (and I think this is true for all) have added a simple piece of logic which only engages the starter if the engine is not already running.
This would be the ideal solution for keyed ignition as well, but it has only been in relatively recent years that engine control units have had the functionality, and there hasn't been much of a drive to implement it. Whereas with keyless ignition the stage was set to implement a wide range of improvements.
I rented a ford mustang, while reaching to adjust the a/c controls while driving on the interstate my finger accidentally hit the stop start button and at 70 mph the engine immediately shut down.
The only way to restart was to coast across 3 lanes of traffic, stop the car, put it in park, put my foot on the brake and push the start button.
I can't believe that one, it would let you shut off the engine above a specific speed, or two, there would not be a sensor/override that would allow a restart at that speed.
I did this accidentally on the interstate, then repeated it in a parking lot, the result was the same there was no 3 second push/hold, if you touch that button engine will stop.
Early keyless ignitions varied by manufacturer, but nowadays most don't just let you turn the car off. Typically it's a 3-5 second hold. Today, all the OEM keyless ignition buttons are software controlled, they aren't directly connected to the starter.
Due to recent "unintended acceleration" events and hoo-haa, a standard "3 second hold" has become the norm. I think even a panic detection algorithm has been added as well, when the button is pressed multiple times within a certain amount of time.
Custom keyless ignition systems or older OEM ones are typically 'dumb', and just replace/duplicate the switch behind the ignition cylinder with a button. So they are directly connected to the starter and will attempt to engage it making horrid noises, or they are just simple 'if engine is running, turn off engine; else crank starter' logic.
New cars however have abstracted the ignition button from the starter wire by many layers of software. Even more so after Toyota-gate.
If you just push it, nothing. It would be rather hazardous if you could find yourself without engine power just by bumping a button.
If you hold it down for some time (e.g. 3 seconds on a Lexus (pg 117)), it'll shut off the engine, same as turning the key to off on a conventional ignition.
I have a 2011 Ford Taurus and two times I have accidentally hit the button going down the road and it has completely shut down and the only way to restart it is to pull over with no power steering put it in park with no power brakes and hit the button again. Maybe this is a Ford thing I don't know but not a very safe feature.
Keyless ignition was the "normal" system prior to the ´80s - a key to switch on the ignition and a push button to operate the starter.
So many errors of people pushing the button with the engine already running.
The progress now is the interlock logic which limits the consequences of pushing the button in error for most models (mind you I don't get the mustang example...).
On Toyota vehicles, there are two ways to shut off the engine while driving. The first way is to push the keyless ignition button for at least several seconds. The second way is to push it multiple times in a limited timespan. If you push the button less than several seconds, and push it only once, it won't do anything. So accidentally pushing it won't turn off the vehicle.
Of course, before resorting to the keyless ignition button, you should first try braking, and if that doesn't help, switch the transmission to neutral. Don't pump the brakes; on most vehicles, a throttle stuck fully open will mean there is no vacuum in the intake manifold, meaning brake booster is working on stored vacuum that doesn't last if you pump the brakes.