The latest major update for Windows 10, "Fall Creators Update" (AKA RedStone3), has added the functionality of a system-wide emoji pop-up that can be used in any textbox.
I'm trying to make a program that would launch that same pop-up emoji window when clicking on a button. As suggested in another discussion about similar topic, I've tried to use the InputSimulator project. There are also other ways, as suggest here, but seems like that simulator is wrapping them pretty well.
All I did was to create a new small WPF application, with one main window which has a TextBox and a button. Pressing the button would run the following code:
textBox.Focus()
new InputSimulator().Keyboard.ModifiedKeyStroke(VirtualKeyCode.LWIN, VirtualKeyCode.OEM_PERIOD);
This seems to have no affect! I've also tried OEM_1 (which is the ":;" keycode) instead of OEM_PERIOD, but still no luck. The thing is, any other combination of LWIN with another key (such as VK_P) would work with the same simulator's code.
If I try to press the Emoji Hotkeys on the real keyboard, after running that code, the first press does nothing (sometimes the emoji pop-up shows for half a second and disappears right after) and then need to press the hotkeys again in order for the popup to show. This makes me suspect that maybe the popup does show, only outside of the screen bounds, or perhaps waiting for another keyboard event to happen/finish?