The "n" button is a scancode 102 that normally gets mapped to keycode 3 with /system/usr/keylayout/gpio-keys.kl
Keycode 3 in intercepted by the interceptKeyTi method of PhoneWindowManager in /system/framework/android.policy.jar
Keycode 3 is handled directly without using any intents.
It's not easy to hack a key to give an intent. You have CALL_BUTTTON, CAMERA_BUTTON & MEDIA_BUTTON. I haven't managed to catch them. The easy one to hack is SEARCH_LONG_PRESS.
You can easily change gpio-keys.kl to key 102 SEARCH
A normal press will bring up the default Nook search. A long press will generate an intent. All you have to do is insert another intent filter in your favorite app.
<intent-filter> <action android:name="android.intent.action.SEARCH_LONG_PRESS" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter>
Personally, I prefer hacking to installing yet another app just to do one thing. I would like to come up with a solution for a dedicated action for the "n" key.