While we can use such tricks, I think what we really want is to
abstract the keymap API such that we can provide keymaps whose elements
are computed dynamically.
There'd need to be at least 2 methods: `lookup-key`, and `map-keymap`,
and adding `where-is` would probably allow better behaviors (but could
introduce other problems given the way where-is currently works).
One application is to create a keymap (on function-key-map) that remaps
all the events of the form "modifiers + mouse-4" to "same-modifiers +
scroll-up".
Another would be a keymap that binds the same keys as some other keymap
except it requires some additional modifier or it removes a modifier, or
it capitalizes all the letters, or it transcribes all the cyrillic
letters to their "equivalent" ASCII, ...