Skip to content

Commit 09d8b21

Browse files
committed
printscreen is only supported on Windows.
1 parent ae004c8 commit 09d8b21

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/robotjs.cc

+5-1
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,11 @@ int CheckKeyCodes(char* k, MMKeyCode *key)
357357
}
358358
else if (strcmp(k, "printscreen") == 0)
359359
{
360-
*key = K_PRINTSCREEN;
360+
#if defined(IS_WINDOWS)
361+
*key = K_PRINTSCREEN;
362+
#else
363+
NanThrowError("printscreen is only supported on Windows.");
364+
#endif
361365
}
362366
else if (strlen(k) == 1)
363367
{

0 commit comments

Comments
 (0)