How to close the emoji palette using the keyboard shortcut?

If your emoji window looks as on the screenshot below - it means that you might have accidentally switched it from the default popup mode into that half-broken "window" mode. I did it once as well, no idea how. You need to press the highlighted button and it's going to get back to the popup mode.

In the popup mode it disappears once you press the esc or select an emoji with the arrow keys and press enter.

enter image description here


The behaviour is somewhat awkward.

Even the Menu option doesn't toggle it on/off, only on.

If you simply double-click your emoji without doing anything else, it doesn't even bring the window to the front...

..so, the only real option is after you open it, click its header bar [while you're over there anyway to grab your emoji]
It will then respond to Cmd ⌘ W the same as any other window.

Of course, if you forget, it will close the window you were working in :\