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. mediaplayer Discussion

hello guys i need to get the Files present in SDCard and i have to
filter the Particular Mp3 Files from it to select and play the file
from the list which i get from SDCard
can any body help for me regarding this .........
actually i tried some of the code but i m not getting the list .......


2. problem refreshing ArrayAdapter used for an auto completion.

        I have some problems refreshing the ArrayAdapter's list of
data used for an AutoCompleteTextView. The ArrayAdapter loads its
initial data present in the ArrayList, but if the ArrayList changes,
and the notifyDataSetChanged is called, the Adapter doesn't refresh
its elements...
Here is a simple example, with an AutoCompleteTetxView and a Button;
pressing the Button you can add a new string to the ArrayList, then
notify the dataset changed, but the Adapter doesn't include the new
String, just the initial values ITEM1 e ITEM2.
Where am I wrong?

Best Regards,

                mylist = new ArrayList<String>();

                myEditTextAdapter = new ArrayAdapter<String>(this,

                myEditText = (AutoCompleteTextView) findViewById

                myButton = (ImageButton) findViewById(R.id.ImageButton01);

                myButton.setOnClickListener(new OnClickListener() {
                        public void onClick(View v) {



3. Audio Manager/Flinger

4. Droidin.com - A community for all things Android

5. String comparison with Text in EditText with online data.

6. How can I test the video recording functionality in the new emulator

7. Question about ExpandableList