Android problem with the back key

I recently added some option in my game that if you hold the back button you can rotate the camera by sliding your finger on the screen. All works fine, except that after a few seconds it stops working. Here is the relevant code:

	case SDL_KEYUP:
	if(event->key.keysym.sym==SDLK_AC_BACK)
	back_on=0;

	break;

	case SDL_KEYDOWN:
	case SDL_TEXTINPUT:

		if(key == SDLK_AC_BACK)
			{
				close_last_window();
				back_on=1;
				break;
			}

Of course, there is other code there, but those are the only two places in my code where the back key is checked. Any ideas why it happens?

P.S. I am using a slightly older SLD version, 2.0.4

After testing on more devices, it seems that this only happens on the devices with a hardware back button. If it’s an onscreen nav button it doesn’t happen. I guess it’s an OS thing that can’t get bypassed?