Using Advanced User Interactions API for mouse and keyboard events