Dianne, Is there really value in adding keycodes that only have any bearing/use for certain devices? if that is the case, it might be better for Google to define a dozen or so USER buttons, that can be used by any application.
Either way, can you suggest a method of adding keycodes that doesn't require changing the base SDK and the KeyEvent.java file? Thanks -- Ashwin On Thu, Mar 25, 2010 at 10:30 PM, Dianne Hackborn <[email protected]> wrote: > We request that you contribute a patch for any new keycodes you would like, > so that we can maintain a single, consistent list of keycodes for the > platform. > > On Thu, Mar 25, 2010 at 12:06 PM, Ashwin Bihari <[email protected]> wrote: >> >> I've got a device that has 4 buttons that are indeed by an application >> that will run on this device. Initially I went the route of modifying >> the KeyEvent.java file and adding new KEYCODE entries for these >> buttons. That approach worked but required recompiling a custom SDK >> that included these defines and the customer would like to avoid >> having to do that. >> >> So now I'm thinking I can create a new SDK Add On that defines these 4 >> keys and use that. However, I'm at a complete loss at where to start >> to do what I need. I was initially thinking perhaps of extending >> KeyEvent and defining my 4 KEYCODE's, but then how do I trigger the >> onKeyDown and onKeyUp events with my KEYCODES passed in along with the >> default KEYCODES? >> >> I've been looking at the SoftKeyboard sample code which talks about >> how to intercept keys to do special handling, but it assumes that the >> keys are already known values and not new KEYCODES that you want to >> pass along to an application above.. >> >> Any thoughts? >> >> Regards >> -- Ashwin >> >> -- >> unsubscribe: [email protected] >> website: http://groups.google.com/group/android-porting >> >> 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. > > > > -- > Dianne Hackborn > Android framework engineer > [email protected] > > Note: please don't send private questions to me, as I don't have time to > provide private support, and so won't reply to such e-mails. All such > questions should be posted on public forums, where I and others can see and > answer them. > > -- unsubscribe: [email protected] website: http://groups.google.com/group/android-porting 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.
