I'm not sure that's possible to create an action key. If you're trying to have ease of access to a function caller, why not just make a small frame that houses a button so you can click it? Drag it over to your hot bar/where ever and click it.
Or from what you're saying, if you want to click it from a hotkey there's another option. Create a macro with a command for w/e function you want. Tailor your addon to that. so it'll run set function with w/e that's written in the macro.