You can setup "UsefulFunction[a, b]" to use custom infix notation "a ↔ b" as follows:
Needs["Notation`"];
AddInputAlias["4" -> ParsedBoxWrapper["↔"]];
InfixNotation[ParsedBoxWrapper["↔"], FlatJoin];
But using a unicode character that does not have a mathematica definition (e.g. "\[name]") such as ":27d7" gives you an error:
Now the syntax highlighting is broken, and that is really my question: how can you tell mathematica to correctly syntax highlight new unicode infix operators?
(Note: the messages can by avoided by adding internal information on the character as follows:
Notation`Private`internalCharacterInformation["⋗"] = {"0x2295", "Infix", "450", "None", "3", "3", "MyOp"}; InfixNotation[ParsedBoxWrapper["⋗"], FlatJoin]
Edit:
I'm now pretty sure that the answer will involve editing /Applications/Mathematica.app/SystemFiles/FrontEnd/TextResources/UnicodeCharacters.tr
and adding something like
0x22D7 \[FlatJoin] ($fj$ $&FlatJoin;$ $\oplus$) Infix 320 None 4 4
and then using the Notations package...
internalCharacterInformation
method fix highlighting to your satisfaction? $\endgroup$Private
internalCharacterInformation trick only stops InfixNotation from complaining. $\endgroup$