Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,810,055 Members 48,311 Now Online
XDA Developers Android and Mobile Development Forum

[Q] Remap keyboard function keys to launch apps/activities?

Tip us?
 
thenookieforlife3
Old
#1  
thenookieforlife3's Avatar
Senior Member - OP
Thanks Meter 76
Posts: 324
Join Date: Aug 2014
Location: Washington D.C.

 
DONATE TO ME
Question [Q] Remap keyboard function keys to launch apps/activities?

Hey nookies!

After getting my USB Keyboard working, I've been working hard at remapping all my keys the way I want them in qwerty.kl - except for one thing, I can't figure out how to launch apps (or, even better, activities) from a keystroke. Can anyone help me out here?

Thanks,

ThirdNookie
Sent from my rooted Nook Simple Touch with GlowLight using Opera Mini



Did you remember to back up your Nook?

My works:

[NST/NSTG] Cool status bar modification!
[NST/NSTG] Framework Fixer!
Nook Glow Multitouch/USBHost Files

The best way to show someone on XDA that you're grateful for their post is to click/tap the button.

 
Renate NST
Old
#2  
Renate NST's Avatar
Recognized Contributor / Recognized Developer
Thanks Meter 804
Posts: 1,993
Join Date: Feb 2012
Location: Boston
Hmm, I looked into this once.

The easiest way is to take some standard keycode for Android that is not being used, like KEYCODE_CAMERA.
That will generate an intent for the camera.
You can just patch the AndroidManifest.xml in your app to handle the camera intent.
The other way, of course, is to patch the Android system itself.

The Following User Says Thank You to Renate NST For This Useful Post: [ Click to Expand ]
 
thenookieforlife3
Old
#3  
thenookieforlife3's Avatar
Senior Member - OP
Thanks Meter 76
Posts: 324
Join Date: Aug 2014
Location: Washington D.C.

 
DONATE TO ME
Quote:
Originally Posted by Renate NST View Post
Hmm, I looked into this once.

The easiest way is to take some standard keycode for Android that is not being used, like KEYCODE_CAMERA.
That will generate an intent for the camera.
You can just patch the AndroidManifest.xml in your app to handle the camera intent.
The other way, of course, is to patch the Android system itself.
Well, what I want to do (at least) is make the Windows and/or Home keys on my keyboard launch the stock B&N home app.

Do you think you could patch Home.apk to respond to that, or is it not doable?
Sent from my rooted Nook Simple Touch with GlowLight using Opera Mini



Did you remember to back up your Nook?

My works:

[NST/NSTG] Cool status bar modification!
[NST/NSTG] Framework Fixer!
Nook Glow Multitouch/USBHost Files

The best way to show someone on XDA that you're grateful for their post is to click/tap the button.

Thread Tools
Display Modes