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. Could not open Selected VM debug port (8700). [error]

When I go to Window > Preferences > Android I get this issue:

[2009-11-01 19:48:56 - ddms]Could not open Selected VM debug port
(8700). Make sure you do not have another instance of DDMS or of the
eclipse plugin running. If it's being used by something else, choose a
new port number in the preferences.

And when I select my SDK I still get "No target available" in the
target list.

Because of this I am unable to create a new Android project.

Also, when I select Preferences > Android > DDMS I get an error:

"An error has occurred. See error log for more details."

I'm running Linux Mint 7 and Eclipse 3.2.2.


2. Problem with Ubuntu 9.10? Please read!

Hello everyone,

several people are reporting problems when using the SDK manager with
ubunto 9.10

We are looking into it, but some people found a workaround:
In your terminal run
    export GDK_NATIVE_WINDOWS=true

and then run your android tools.

For more information and links to some related bugs see

3. Very specific question about Foreground / Background tasks...

4. How to add View on a Map at specific Geopoint?

5. can't start application in the emulator

6. Get an array of colors from an image

7. Eclipse problem: "R cannot be resolved"