Use event dispatcher instead of key presses to communicate with extension.