Forgetting to shut off a keyless vehicle has been a safety hazard for years, causing a growing number of carbon-monoxide deaths. But a proposed regulation to require warning signals and other precautions has languished in the face of opposition from the auto industry.

Now an effort is underway in Congress to force action on the issue, and at least one automaker has enlisted in the cause.

General Motors says it supports a bill introduced this week by Senator Richard Blumenthal, a Connecticut Democrat, that would direct the National Highway Traffic Safety Administration to adopt a rule addressing the danger. It would require automakers to include a feature that automatically shuts off an engine after a specified period of idling. The rule would apply to all new keyless vehicles, which make up more than half of new cars sold in the United States.

Because they don’t need to turn a physical key, drivers can forget to shut off a keyless vehicle. Some motorists, particularly older ones, have inadvertently left cars with the engine running in garages attached to homes, which have filled up with carbon monoxide and poisoned occupants, often while they slept.