citronneur / node-rdpjs

Remote Desktop Protocol for Node.js
GNU General Public License v3.0
887 stars 154 forks source link

Windows key requires extra third parameter to sendKeyEventScancode, documentation on this would be helpful! #12

Open untoldone opened 8 years ago

untoldone commented 8 years ago

using the unicode 91, or non-unicode 0xE05B or 0x5B all fail to act as if the Windows key has been sent. Sending a combination of ctrl (0x001D) + esc (0x0001) brings up the windows menu but since it doesn't act as a windows key, it cant be used for other shortcuts

untoldone commented 8 years ago

Updating bug description to be to update the docs for sendKeyEventScancode given super key requires KBDFLAGS_EXTENDED to be set but node-rdpjs already supports it.

For others that may see this before docs are updated, when sending the Windows keycode (0x5B), you must also pass a third parameter of the value true to sendKeyEventScancode, e.g.

// Keypress
client.sendKeyEventScancode(0x5B, true, true)

setTimeout(function () {
  client.sendKeyEventScancode(0x5B, false, true)
}, 100);