0

I have created a Love application but the game requires an on screen keyboard that has arrow keys, is it possible to create buttons on screen like a game pad that simulate keyboard input of keys like the arrow keys or letters?

Micheal Johnson
  • 45
  • 1
  • 1
  • 6

1 Answers1

0

tl;dr: Use a more common touch input pattern like four touch-input quadrants of the screen.

It is possible but you would need to write an app to somehow pass the key-presses along with the android native keyboard which is a completely different question that is the beyond the scope of this answer.

Refer to the Android Input method documentation for help with that if you decide to go that route.

You could use something like:

if love.system.getOS() == "Android" then
    doVirtualKeyboadThings()
end

To detect that your game is running on android, Assuming that you want it to be multi-arch and then use something like Thranduil (Gui Libary) to create your own virtual keyboard.

However I can't encourage such a complicated workaround for something that could be accomplished with love.mouse (which uses touch events on android) and simple buttons or screen sections.

Example Image

Fyrn
  • 116
  • 1
  • 8
  • The .love file was originally created for PC and was not made by me so im not sure what to do, also i was able to change the keys but i am still unable to walk but the other keys work and i am able to use the walking buttons to change selection – Micheal Johnson Jun 13 '15 at 01:36