Is it possible to bind a local variable to a hotkey or an axis?

Is it possible to bind a local variable to a hotkey or an axis?

Example: we have local variable which not related to any standard sim events.
Currently we must find existed standart hotkey or axis which is not used in the aircraft directelly and write a code to bind local variable to it. As result we have, lets say, wing sweep lever binded to propeller axis, which is looks strange.

Is it possible just add custom axis or hotkey to menu and bind local variable to it?

If not, it would be great to add to sim some “custom use variables” which can be bind to “custom use hotkeys or axis”