hurdlegroup / robotjs

Node.js Desktop Automation.
http://robotjs.io
MIT License
57 stars 6 forks source link

types definition for keyTap are wrong #15

Closed Oscarz90 closed 8 months ago

Oscarz90 commented 8 months ago

I'm simulating a paste action in an electron app, like this keyTap('v', process.platform === 'darwin' ? 'command' : 'control') but I got a warning from typescript about the first argument of keyTap that it should be one of this values, which is wrong, the code works, but the typescript type (keys) is incomplete

type keys = "backspace" | "delete" | "enter" | "tab" | "escape" | "up" |
    "down" | "left" | "right" | "home" | "end" | "pageup" | "pagedown" | "f1" |
    "f2" | "f3" | "f4" | "f5" | "f6" | "f7" | "f8" | "f9" | "f10" | "f11" | "f12" |
    "command" | "alt" | "control" | "shift" | "right_shift" | "space" | "printscreen" |
    "insert" | "audio_mute" | "audio_vol_up" | "audio_vol_down" | "audio_play" | "audio_stop" |
    "audio_pause" | "audio_prev" | "audio_next" | "audio_rewind" | "audio_forward" | "audio_repeat" |
    "audio_random" | "numpad_0" | "numpad_1" | "numpad_2" | "numpad_3" | "numpad_4" | "numpad_5" |
    "numpad_6" | "numpad_7" | "numpad_8" | "numpad_9" | "lights_mon_up" | "lights_mon_down" |
    "lights_kbd_toggle" | "lights_kbd_up" | "lights_kbd_down";

Expected Behavior

Current Behavior

Possible Solution

Steps to Reproduce (for bugs)

1. 2. 3. 4.

Context

Your Environment

github-actions[bot] commented 8 months ago

:tada: This issue has been resolved in version 0.11.5 :tada:

The release is available on:

Your semantic-release bot :package::rocket: