computer keys on Android

The code says I should type arrowright to move the avatar in the fruit hunt project but since I am using android I don’t know what I should do at this point so will it be possible to move the avatar with another cpde

Ahhh. Yeah, there really aren’t arrow keys on most mobile keyboards.

The easiest thing to do would be to connect a bluetooth keyboard to the android device. Any chance that’s possible?

The next easiest thing to do would be to do what you suggest – switch to another code. The following should work:

  • Instead of ArrowLeft, use KeyA.
  • Instead of ArrowRight, use KeyD.
  • Instead of ArrowUp, use KeyW.
  • Instead of ArrowDown, use KeyS.

With that, you should be able to move the avatar left and right with the A and D keys. Back and forward should work with S and W.

Let me know if that helps. If you run into any problems trying that out, share your code and I’ll do my best to help out.

-Chris

But when I press hide code how will I type it

Ah, gotcha. For that, I think you’d have to use a different keyboard. The Hacker’s Keyboard can be placed in the notification bar at the top of the screen (using “permanent notification” in the settings). Any time you need to enter a key, you can activate the keyboard from the notification bar. The Hacker’s Keyboard even has arrow keys.

BUT… there’s a problem with the settings on Android 9. If you’ve already upgraded to that version, this won’t work :frowning:

If that doesn’t work, the only other option is to switch from keyboard events to touch events. I’m working on a version of this for a mobile version of some of the projects, but it’s not quite ready. If the Hacker’s Keyboard doesn’t work for you, then maybe you’d be OK being a guinea pig for the mobile code?

-Chris