For electron applications, is there a way for me to simulate keyboard stroke actions. For example, sending the letter 'a' to the app level rather than the front end level. Another example would be for mac to simulate programmatically the command (hold) and tab to shift between applications, this triggered from electron.
I tried things like BrowserWindow.webContents.sendInputEvent and robotjs without any success so if you feel like you have a working example that would be great. I am using the electron-react-boilerplate as the starting point for these, and am using a mac os X!
EDIT: example > on a click of a button within the electron app, I want electron to fire some keyboard events to the OS level such as (cmd + tab + tab + tab, cmd + Q), in order to see my native app switch between apps and then to quit one of those. Please note that I am not interested in going through the process pid route, just keyboard manipulation.