Skip to content

keyToggle doesn't hit shift and command together #405

@relsqui

Description

@relsqui

Expected Behavior

I used keyToggle to hold down shift and command, and used the Mac keyboard viewer to observe what keys were being pressed. The expected result was that both shift and command would be highlighted on the keyboard viewer.

Current Behavior

Only shift was pressed:

keytoggle-cropped

If I reversed it so that it was holding command-with-shift instead of shift-with-command, only command was pressed.

Notably, the equivalent on Windows (using shift and control) is working fine! I didn't make a minimal repro for it, but the real script succeeds in Windows where it fails on Mac.

Steps to Reproduce (for bugs)

Here's the code I used to test:

var robot = require('robotjs');

robot.keyToggle('shift', 'down', 'command');

Context

The actual thing I'm trying to do is ctrl-shift-click on something, so merging #356 would be a better long-term solution for me -- but this seems like an unexpected behavior you'd probably want to know about anyway. :)

Your Environment

  • RobotJS version: 0.5.1
  • Node.js version: 9.8.0
  • npm version: 5.7.1
  • Operating System: macOS 10.13.4 (High Sierra)

Activity

shubhibhatt2007

shubhibhatt2007 commented on Nov 18, 2019

@shubhibhatt2007

I am rying to send a shortcut to my applicattion using robot.keyTap('<',['command','shift']), this is also not working(expected keys are not tapped). Strangely, other shortcut on my application - robot.keyTap('[',['command','shift']) seems to be workig fine.

RobotJS version: 0.5.1
Node.js version:node-v8.9.1
npm version:5.5.1
Operating System:Mojave 10.14.6

oktapodia

oktapodia commented on Nov 24, 2019

@oktapodia
Collaborator

@shubhibhatt2007 can you please open another issue with a reproducible example? Closing as the issue is stale

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @relsqui@oktapodia@shubhibhatt2007

        Issue actions

          keyToggle doesn't hit shift and command together · Issue #405 · octalmage/robotjs