Mapping keys to onscreen buttons

Is there a way to map keyboard keys to onscreen buttons? Preferably gui. Something like dragable markers which can be mapped to a specific key or key combination?