i never thought about the edge cases of that :D
but if you do type \n~ then followed by a character that isn't a command (e.g. \n~/), you get ~/
and if you're confused about ~ not showing up, you might as well press it again, and then it just types ~