keyboardType() has trouble with certain characters

Discuss, ask for help, share ideas, give suggestions, read tutorials, and tell us about bugs you have found with MicroMacro in here.

Do not post RoM-Bot stuff here. There is a subforum for that.
Forum rules
This is a sub-forum for things specific to MicroMacro.

This is not the place to ask questions about the RoM bot, which uses MicroMacro. There is a difference.
Post Reply
Message
Author
Sgraffite
Posts: 38
Joined: Wed Jul 09, 2008 12:03 pm

keyboardType() has trouble with certain characters

#1 Post by Sgraffite » Sat Jul 31, 2010 2:37 am

It seems keyboardType() can't type these characters, and possibly others:
/
.
"
Is there a way I can escape them or something so that keyboardType() is able to type all characters?

User avatar
Administrator
Site Admin
Posts: 5307
Joined: Sat Jan 05, 2008 4:21 pm

Re: keyboardType() has trouble with certain characters

#2 Post by Administrator » Sat Jul 31, 2010 3:19 am

No, it's just very difficult to write a single function that just works for all cases. In one application, those work, in others, they don't. And that's not even bringing keyboard differences and language settings into the issue.

For now, you can try typing them manually by doing something like this:

Code: Select all

keyboardHold(key.VK_SHIFT);
keyboardPress(key.VK_SLASH); -- hopefully, this generates a ?
keyboardRelease(key.VK_SHIFT);


-- or, try this:
keyboardPress(key.VK_SLASH, key.VK_SHIFT); -- same as above

Sgraffite
Posts: 38
Joined: Wed Jul 09, 2008 12:03 pm

Re: keyboardType() has trouble with certain characters

#3 Post by Sgraffite » Sat Jul 31, 2010 10:09 pm

Alrighty, thanks!

I was doing it with keyboardPress() before, but I wanted to use dynamic strings and just pass them into keyboardType() instead.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests