CClayer onkeybackClicked not working as expected

I am able to get callback for back key press event in android phone??
I have cclayer gamescene class overrided onBackKeyPress event of CClayer and setkeypadenabled to true in gamescene constructor.but still i am not getting call back ?? Any help will be appreciated.

In my code it as does not work (js binding) :frowning:

var AbstractLayer = cc.Layer.extend({

    init: function () {
        var bRet = false;
        if (this._super()) {

            this.setKeypadEnabled(true);
            ...
    },
    onKeyBackClicked: function () {
        cc.log("back key pressed");
    },

any results in log. Cocos2d-x version 2.1.3 Help me please!

the name of the function in the C++ version is virtual void keyBackClicked()
is that what the binding is attached to? (i searched the docs for “onKeyBackClicked” and couldn’t find it)

Hi Justin!

I have found the “onKeyBackClicked” solution yesterday in this post http://www.cocos2d-x.org/boards/20/topics/22657
But yesterday I where that was mistaken at compilation.
Now this is working great :slight_smile:

Thanks!

PS: may be i forgoted clean my android project before compile it