Extending KeyEvent (or another way of adding new KeyCodes)

by Dianne Hackborn » Fri, 26 Mar 2010 10:32:28 GMT

Sponsored Links
 Sorry I forgot to review this.  Could you rebase and upload a new patch, and
I will submit it?  Thanks.

> website: 

Extending KeyEvent (or another way of adding new KeyCodes)

by Ashwin Bihari » Fri, 26 Mar 2010 20:11:25 GMT


I know how to add new KEYCODE's to the KeyEvent, but I want to avoid
that. The 4 buttons are essentially defined as S1, S2, S3 and S4 and
their functionality will change based on what the application wants
them to be. In some instances they'll function as volume up/down and
channel up/down buttons, in other instances something else, either way
they application dependent.

I also do not want to submit these KEYCODEs to be included in the
standard SDK as they don't have a specific defined purpose AND (and
that's a VERY big and) the user would have to be using the device that
we are building which isn't for commercial use..

So I would really appreciate any pointers on adding KEYCODES
separately from the SDK's KeyEvent system but still using the
onKeyUp/onKeyDown system to send my KEYCODES..

-- Ashwin


To unsubscribe from this group, send email to 
android-porting+unsubscribegooglegroups.com or reply to this email with the 
words "REMOVE ME" as the subject.

Sponsored Links

Other Threads

1. Creating complex queries for SQLite

Hi! I'm using the Android's media library intensively, and I was
asking myself whether it is possible or not to query the database more
freely than using the ContentProvider class. Would it be possible to
query directly the database that is stored in the filesystem (/data/
data/com.android.providers.media/databases/internal.db)? For instance,
I may need to create queries with subqueries and using various sqlite
commands. Is this possible?


2. Eclipse never sees AVDs anymore

I recently upgraded to Helios and installed the latest and greatest
SDK, ADT, and everything else I could think of.  Eclipse no longer
sees the AVDs when launching (debugging) the app.  I tried deleting
all my old AVDs and making new ones, but it's just hopeless, nothing
fixes the problem.  It simply can't see the AVDs.

I've set my run configuration target to manual (instead of
automatic).  When I attempt to run or debug my app, I get the dialog
with two sections, one on top of devices and one below for AVDs.  The
top section shows my phone plugged in my USB and I can run on the
phone just fine, but the lower section (Launch a new Android Virtual
Device) doesn't list anything.  I can easily verify that the AVDs
exist by going WindowMenu->AndroidSDKAndAVDManager.  It shows my AVDs
with green checkmarks.  If I launch an AVD from that dialog, I can
then run on it, but it appears in the top section of the launch
dialog, with the "devices" (with my phone), the lower portion for AVDs
remains empty.

It's frustrating to have to manually launch the AVD now.  I certainly
did not have to do this before.  I'm running Eclipse Helios, with ADT

Any ideas?


3. Android : Why NUMBER_KEY return the number in reverse order

4. Gingerbread vs Froyo

5. How to handle the GPS properly through multiple activities ?

6. Problem with AnimationDrawable

7. mms video streaming