Skip to content

Commit

Permalink
Keytap fix (#1)
Browse files Browse the repository at this point in the history
* try fixing keyTap wrapper

* add extra test file

* remove extra test file
  • Loading branch information
meganemcclure authored Jun 8, 2022
1 parent 5c33127 commit 4b1e25e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/robotjs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -511,8 +511,11 @@ Napi::Value keyTapWrapper(const Napi::CallbackInfo& info)
MMKeyCode key;
const char *k;

Napi::String kstr(env, info[0].ToString());
k = kstr.Utf8Value().c_str();
//Get arguments from JavaScript.
std::string kstr = info[0].As<Napi::String>();

//Convert arguments to chars.
k = kstr.c_str();

switch (info.Length())
{
Expand Down

0 comments on commit 4b1e25e

Please sign in to comment.