"Keys to car" or "keys of car"

I saw in a grammar book a sentence that looks weird to me.

Kyle gave Loren the keys to his new car.

I would have hoped to see of instead of to but it must be correct since it was the sample sentence.

Kyle gave Loren the keys of his new car.

What grammar rule is this?


Comparing usage of keys to the versus keys of the between 1800 and 2008 provides the following Google NGram:

http://ngrams.googlelabs.com/chart?content=keys%20to%20the%2Ckeys%20of%20the&corpus=0&smoothing=3&year_start=1800&year_end=2000

Examples of keys of the include:

The use of the preposition of matches with what you expected. However, these uses are very old and seem old-fashioned now.

Keys to the car is now idiomatic: even though both of and to are logical, to is used most often:

http://ngrams.googlelabs.com/chart?content=keys%20of%20the%20car%2Ckeys%20to%20the%20car&corpus=0&smoothing=3&year_start=1920&year_end=2000

There is no solid explanation of why this shift happened, but over time keys to became the idiomatic phrase over keys of.


"key of" is common when the key is a property of something rather than the key for a lock (whether the lock is literal or metaphorical). So you write a piece of music in the key of C. A really mushy romantic might say something like:

She read the poem in the key of my soul.

In software development we often talk about key/value pairs, which are used in associative arrays and similar data structures, and "key of" would be more appropriate in that context. We also speak about the "keys of" a keyboard.

Speculating a bit, I'll point out that "of" connotes possession, so "key of" makes sense when the key in question is clearly possessed by, say, a piano or an aria. The relationship indicated by "to" is correspondence:

He studied the blueprints to the building.

A classic martini is five parts gin to one part vermouth.

It's easy to see that there's always a correspondence between keys and locks, but we don't think of the key or the lock possessing the other. That's why we talk about the "key to" a particular lock and not the "key of" that lock.