Here is a solution that has been tested. This solution assumes that all the action bars are not in use nor shown. Go in to the Interface menu then set an hidden action bar to show. Next add an action or macro to that bar. Once the action has been added to the bar, go in to the built in Key Binding option menu, find the bar and action-button combo that you just set the action to, then bind the wanted key to that combo. Once finish, go back in to the Interface menu, set the bar to hide then test it out.
If all of the action bars are shown then there is a second solution. However, this solution does requires a addon call Clique. Clique is an addon, which is very popular among players, that allows spells and actions to be binded to keys and mouse-clicks without the use of an action bar. Clique doesn't change the physical UI of the normal view. It only adds another tab to the spell book. Go in to the tab, bind the a action to a key or mouse button and forget about it.
After reading the body of your question again, I believe the first solution is the current solution you use. However, I will not remove that part of the answer as it might help a future user with a similar question.