I built just such a macro late last year, but just now posted.
Please let us know if this meets your needs.
It remaps the macOS standard key for app preferences, ⌘,, to open KM Preferences to the Variables pane, and then selects the Variable Search box. Of course you can change the trigger to be whatever you like.