The macro kbd only works with string constants, not with variables.

`(kbd open)` generates an error: `"wrong-type-argument integer-or-marker-p open"`. 
As I understand it, `kbd` is a macro and should be called with string constants. The function `read-kbd-macro`, which is what the `kbd` macro calls, can be used instead. See also http://stackoverflow.com/q/7549628/386327 .