Android: OnKeyListener camera button?
<p>I'm currently making a game for Android in which I'd like to be able to shoot using the camera button (Or a different hardware button I don't mind, just tapping the screen would be rubbish).</p>

<p>In my view I have:</p>

<pre><code>public class GameFrame extends SurfaceView implements SurfaceHolder.Callback, OnKeyListener{
    public GameFrame(Context context){
        ...
        setOnKeyListener(this);
        ...
    }

    @Override
    public boolean onKey(View v, int keyCode, KeyEvent event) {
        if(event.getAction() == KeyEvent.ACTION_DOWN)
        {
            shoot();
            return true;
        }
        return false;
    }
}
</code></pre>

<p>This however doesn't do anything, shoot() is never called even when I'm furiously hitting all the keys on my phone!
Is there something obvious I've missed out, or have I done it completely wrong?</p>

<p>Cheers</p>
