Back button on Android?

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
georgeprosser
Citizen
Posts: 68
Joined: Fri Mar 28, 2014 5:55 pm

Back button on Android?

Post by georgeprosser »

Hi. How can I respond to a press of the back button on Android? Couldn't find anything in the docs.
User avatar
Tjakka5
Party member
Posts: 243
Joined: Thu Dec 26, 2013 12:17 pm

Re: Back button on Android?

Post by Tjakka5 »

They are simply buttons that trigger love.keypressed(), and can be used with love.keyboard.isDown()
User avatar
zorg
Party member
Posts: 3465
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: Back button on Android?

Post by zorg »

You can check the list of [wiki]KeyConstant[/wiki]s, or the list of [wiki]Scancode[/wiki]s for your options, but either may be different on different types of handhelds, when pressing the back (or any other handheld-specific) button.
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
User avatar
georgeprosser
Citizen
Posts: 68
Joined: Fri Mar 28, 2014 5:55 pm

Re: Back button on Android?

Post by georgeprosser »

Thanks guys. Back maps to the escape key, for my phone at least.
User avatar
Positive07
Party member
Posts: 1014
Joined: Sun Aug 12, 2012 4:34 pm
Location: Argentina

Re: Back button on Android?

Post by Positive07 »

For all phones back maps to escape and home to home, its weird if thats not the case
for i, person in ipairs(everybody) do
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests