Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to listen for laptop's keyboard input or tilt virtual phone (for debugging purposes)?

Eric Sweeten
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am making a game that I need to be able to tilt left to move the character (a spaceship) left and tilt right to move the character right. Is there a way I can tilt the virtual phone in Android Studio? If not, is there a way I can implement a KeyboardListener that will listen to the actual keyboard and not input through the virtual phone's keyboard (where you have to point and click or tap on screen)?

There's got to be a way. Or else how do you debug such things? Thanks.
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!