Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
82 views
in Technique[技术] by (71.8m points)

Keyboard to analog

I have not found any resource that helps me in what I am trying to do. I want to make a simple program that, when running, will convert a key press to an analog input. For example, if I hold A with a game open, it will move my character slowly to the left. I don't need the analog to be dynamic, it can output at a constant amount. To add more clarity, this is so a friend without a controller can sneak in a Pokemon game on his emulator. I'd love it if someone had any ideas or could point me in the right direction. I'm familiar with programming, so I don't need much more than the method of how or where I can accomplish this. Thank you!

question from:https://stackoverflow.com/questions/65651376/keyboard-to-analog

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Do this, you can make a program having key event listener, in that listener check whether w, a,s,d is pressed if so then use API to press analog keys (like in java Robot API) and return true as a Response, run this program in the background. I don't know this will worth doing but give it a try.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...