phone-api: main keys: back,menu,home,search

A project to port LÖVE to Android handhelds
Locked
User avatar
ghoulsblade
Party member
Posts: 111
Joined: Sun Oct 31, 2010 6:11 pm

phone-api: main keys: back,menu,home,search

Post by ghoulsblade »

you can now get notifications for the back,menu,home,search keys,

user-defined callback :
function love.phone.main_key_event (sEventName) .... end
-- with sEventName being one of back,menu,search,home,leavehint

all except home can also be blocked to stop their usual actions :
love.phone.setBlockMainKey_Back(bBlocked)
love.phone.setBlockMainKey_Menu(bBlocked)
love.phone.setBlockMainKey_Search(bBlocked)

example :
http://ghoulsblade.schattenkind.net/lov ... rtest.love
press "1" to block them
press "2" to re-enable them

bug: back notification doesn't work currently
love-android - gamejams
jimm1909
Prole
Posts: 1
Joined: Fri Apr 06, 2012 9:31 pm

Re: phone-api: main keys: back,menu,home,search

Post by jimm1909 »

ghoulsblade wrote:you can now get notifications for the back,menu,home,search keys,

user-defined callback :
function love.phone.main_key_event (sEventName) .... end
-- with sEventName being one of back,menu,search,home,leavehint

all except home can also be blocked to stop their usual actions :
love.phone.setBlockMainKey_Back(bBlocked)
love.phone.setBlockMainKey_Menu(bBlocked)
love.phone.setBlockMainKey_Search(bBlocked)

example :
http://ghoulsblade.schattenkind.net/lov ... rtest.love
press "1" to block them
press "2" to re-enable them

bug: back notification doesn't work currently
Is back notification working yet? Let me know.

Thanks in advance,

-Jim
Last edited by jimm1909 on Thu May 07, 2015 1:13 am, edited 1 time in total.
steveosiris
Prole
Posts: 1
Joined: Sun Jun 03, 2012 7:56 pm

Re: phone-api: main keys: back,menu,home,search

Post by steveosiris »

Hi Jim, I just checked, and it looks like back notification is now working. :)
jimm1909 wrote:
ghoulsblade wrote:you can now get notifications for the back,menu,home,search keys,

user-defined callback :
function love.phone.main_key_event (sEventName) .... end
-- with sEventName being one of back,menu,search,home,leavehint

all except home can also be blocked to stop their usual actions :
love.phone.setBlockMainKey_Back(bBlocked)
love.phone.setBlockMainKey_Menu(bBlocked)
love.phone.setBlockMainKey_Search(bBlocked)

example :
http://ghoulsblade.schattenkind.net/lov ... rtest.love
press "1" to block them
press "2" to re-enable them

bug: back notification doesn't work currently
Is back notification working yet? Let me know.

Thanks in advance,

-Jim
Last edited by steveosiris on Thu May 07, 2015 1:14 am, edited 1 time in total.
roversburn
Prole
Posts: 1
Joined: Fri Jun 22, 2012 9:28 am

Re: phone-api: main keys: back,menu,home,search

Post by roversburn »

jimm1909 wrote: Is back notification working yet? Let me know.

Thanks in advance,

-Jim
Yes, it works all right.
alprome
Prole
Posts: 1
Joined: Wed Jan 16, 2013 6:32 am

Re: phone-api: main keys: back,menu,home,search

Post by alprome »

I tried all the steps mentioned above to get notifications for the back, menu, home, search keys but it didn’t work for me the first time but when I tried it after some time all the notification worked perfectly. Thank you for the help!
JDavis820
Prole
Posts: 1
Joined: Sat Jul 06, 2013 3:37 am
Location: Bocas Del Toro, Panama
Contact:

Re: phone-api: main keys: back,menu,home,search

Post by JDavis820 »

alprome wrote:I tried all the steps mentioned above to get notifications for the back, menu, home, search keys but it didn’t work for me the first time but when I tried it after some time all the notification worked perfectly. Thank you for the help!

I encountered same here, and still not getting it...aww! :brows:
Locked

Who is online

Users browsing this forum: No registered users and 5 guests