In the classic client, go into options, macros
click add, choose your key combination.
Click in the first "Actions" box, scroll ALL the way down to the bottom.
Third from the bottom is "Bandage Self"
Click it, and hit the Apply button.
That's it, for bandage self, but note that it only works with bandages pointed the normal way. The "reversed" bandages from some bandage summoning talismans and stealable from some strongboxes in town don't work with the macro.
Second from the bottom is the "Bandage Target" selection, which requires you to use the "new targeting system" (in other words, you can't have "Disable new targeting system" box checked on in your settings). I believe it attempts to bandage the item currently targeted in that system.