de en es fr
Let the machine help
Light teasing, exhibition, BDSM, sissyfication, watersports... with sounds and pictures


Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Get key input in Groovy?
PostPosted: Sat Jul 09, 2016 1:04 pm 
Offline
Veteran
User avatar
I'm assuming the answer is "you can't", but was wondering if it is possible to "listen for" and/or get a user's keyboard input in SexScripts (or Groovy)?

Example:
"Press A five times to continue!"

Result:
User must press the "A" key five times to continue the script.

Obviously an input dialog could be used in the example above, but I was wanting something for "real time" input.

Example:
"You have ten seconds to press "A" as fast as you can!"

Result:
User must tap "A" repeatedly until the ten second timer runs out, and the script keeps track of how many times they pressed "A".

Possible?


Top
 Profile Send private message 
 
 Re: Get key input in Groovy?
PostPosted: Sat Jul 09, 2016 5:39 pm 
Offline
Site Admin
User avatar
I think it's possible, but hard.
You'll have to use some classes like java.awt.KeyEventDispatcher, so won't work in Android (anyway in Android with a virtual keyboard I don't think it'll be usable).
Possibly something like http://stackoverflow.com/a/7082258.


Top
 Profile Send private message 
 
 Re: Get key input in Groovy?
PostPosted: Sat Jul 09, 2016 5:46 pm 
Offline
Veteran
User avatar
doti wrote:
I think it's possible, but hard.
You'll have to use some classes like java.awt.KeyEventDispatcher, so won't work in Android (anyway in Android with a virtual keyboard I don't think it'll be usable).
Possibly something like http://stackoverflow.com/a/7082258.

Thanks for the reply, and I'm pleasantly surprised to see it could be *possible* (if difficult). I'll have to see if I (or maybe someone who's a better coder than me!) can get it working sometime, even if now just to prove it can work! :)

Since I don't use Android, thankfully that's not really a concern for me; none of my scripts are Android-tested anyway.


Top
 Profile Send private message 
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Maroon Fusion theme created by Oxydo
Software, theme modifications, phpBB modification by Doti 2010 - 2020
This website uses session cookies only.