I would like to know how the keyboard pops up on long press of the hardware menu button. I've read that key listeners aren't available in services. So, how exactly does the menu button trigger the keyboard to show up?

**EDIT**

Since my question seems a bit incoherent, here's what I mean.

When I'm in the app drawer and press the menu button for long, the keyboard pops up. Or if I'm using an app and long press the menu button again, the keyboard still pops up.

So, I'm assuming that it's the keyboard service, but services don't have key listeners.

How is this possible then?