# platform/desktop/emojipanel (vanilla-engine 0.4.0)

> https://vanillapunch.com/docs/vanilla-engine/0.4.0/api/platform/desktop/emojipanel/

OS emoji panel. (in place of ui::ShowEmojiPanel called by "Emoji" in Chrome's edit field context menu)
- Mac: [NSApp orderFrontCharacterPalette:nil] (same as Chrome ui/base/emoji/emoji_panel_helper_mac.mm)
- Windows: sends the press and release of the Windows key + '.' with SendInput. The emoji panel appears from Windows 10 RS4. (same as emoji_panel_helper_win.cc)
- Linux: none, like Chrome. (IsEmojiPanelSupported in emoji_panel_helper.cc is false, and the menu has no item either)

Example: Show the emoji panel if there is one (not run since a panel opens)

```rust
use vanilla::platform::desktop::emojipanel;

if emojipanel::is_emoji_panel_supported() {
	emojipanel::show_emoji_panel();
}
```

## Functions and constants

- `pub fn is_emoji_panel_supported() -> bool` (method, since 0.4.0): Whether there is an emoji panel. (Chrome IsEmojiPanelSupported, Windows is left true without checking the version)
  - returns bool: true on Mac and Windows, false otherwise.
- `pub fn show_emoji_panel()` (method, since 0.4.0): Shows the emoji panel. (the chosen characters come as committed text, like IME)
