Page 1 of 1
keyboardType() has trouble with certain characters
Posted: Sat Jul 31, 2010 2:37 am
by Sgraffite
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?
Re: keyboardType() has trouble with certain characters
Posted: Sat Jul 31, 2010 3:19 am
by Administrator
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
Re: keyboardType() has trouble with certain characters
Posted: Sat Jul 31, 2010 10:09 pm
by Sgraffite
Alrighty, thanks!
I was doing it with keyboardPress() before, but I wanted to use dynamic strings and just pass them into keyboardType() instead.