Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multi-monitor keyboard inputs #553

Closed
MitchellMonaghan opened this issue Feb 16, 2020 · 1 comment
Closed

multi-monitor keyboard inputs #553

MitchellMonaghan opened this issue Feb 16, 2020 · 1 comment

Comments

@MitchellMonaghan
Copy link

MitchellMonaghan commented Feb 16, 2020

I am using puppeteer and robotjs together. I have a browser open and being controlled with puppeteer on my main monitor. I have my node script running on my second monitor with some video recording software. The video recording software is setup to start recording on insert key press and is only recording my main monitor.

When I run my node script the recording only seems to start if my mouse was on my main monitor. I can manually push the video recording software hotkey on any monitor and it works fine so this makes me think this is a issue with robotjs. If my mouse is on my second monitor no key press commands seem to be sent by robotjs/received by my recording software.

I saw this issue I'm not sure if they are related.
#88

"robotjs": "^0.6.0",
"puppeteer-core": "^2.1.1",
node v10.15.1

Video Recording software
Streamlabs OBS Version 0.20.1

I might look further into what the issue is just figured I would log the bug/get feedback.
Some code I was using for this.

    const browser = await puppeteer.connect({
      browserURL: 'http://127.0.0.1:9222'
    })

    const page = await browser.newPage()
    await page.setViewport({ width: 1920, height: 1080 })
    await page.on('close', () => process.exit())

    await page.goto('https://www.google.com')

    await page.waitFor(3000)

    console.log('start recording')
    robot.keyTap('insert')

    await sleep(5000)

    robot.keyTap('insert')
@MitchellMonaghan
Copy link
Author

Never mind this seems to be caused by something else I have modified my code and I can't reproduce it anymore I think it was a timing issue/sending to many inputs the the browser.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant