using the sdk keycodes is the best way. just i'm pointing the mistake he was
doing in his code.

On Mon, Mar 22, 2010 at 10:00 AM, wahib haq <[email protected]> wrote:

> why do you have to use Keycodes like 29 ? cant you use the keycodes
> provided by the sdk
>
> On 3/21/10, murali raju <[email protected]> wrote:
> > what you did is correct, but the keycodes of android are different. for A
> it
> > is 29 not 97.
> > see this,
> >
> > http://developer.android.com/reference/android/view/KeyEvent.html
> >
> >
> >
> > On Sun, Mar 21, 2010 at 10:13 AM, Mauricio <[email protected]> wrote:
> >
> >> I understand onKeyDown should give me the key that was pressed, but
> >> how to do that? I mean, if I do something like
> >>
> >>
> >>   public boolean onKeyDown(int keyCode, KeyEvent event)
> >>    {
> >>        switch (keyCode)
> >>        {
> >>        case 97 : // Letter A
> >>                DoSomething();
> >>                break;
> >>        default :
> >>                // Do nothing
> >>                break;
> >>        }
> >>        // Indicate you took care of this event
> >>        return true;
> >>
> >>    }
> >>
> >> Would it detect when I press the letter A on the keyboard?
> >>
> >> --
> >> You received this message because you are subscribed to the Google
> >> Groups "Android Beginners" group.
> >>
> >> NEW! Try asking and tagging your question on Stack Overflow at
> >> http://stackoverflow.com/questions/tagged/android
> >>
> >> To unsubscribe from this group, send email to
> >> [email protected]<android-beginners%[email protected]>
> <android-beginners%[email protected]<android-beginners%[email protected]>
> >
> >> For more options, visit this group at
> >> http://groups.google.com/group/android-beginners?hl=en
> >>
> >> To unsubscribe from this group, send email to android-beginners+
> >> unsubscribegooglegroups.com or reply to this email with the words
> "REMOVE
> >> ME" as the subject.
> >>
> >
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Beginners" group.
> >
> > NEW! Try asking and tagging your question on Stack Overflow at
> > http://stackoverflow.com/questions/tagged/android
> >
> > To unsubscribe from this group, send email to
> > [email protected]<android-beginners%[email protected]>
> > For more options, visit this group at
> > http://groups.google.com/group/android-beginners?hl=en
> >
> > To unsubscribe from this group, send email to
> > android-beginners+unsubscribegooglegroups.com or reply to this email
> with
> > the words "REMOVE ME" as the subject.
> >
>
>
> --
> Wahib-ul-haq
>
> 3rd year Communications Engineering Student,
> NUST, Pakistan.
> Microsoft Student Partner
> follow me on twitter @wahibhaq
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Beginners" group.
>
> NEW! Try asking and tagging your question on Stack Overflow at
> http://stackoverflow.com/questions/tagged/android
>
> To unsubscribe from this group, send email to
> [email protected]<android-beginners%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/android-beginners?hl=en
>
> To unsubscribe from this group, send email to android-beginners+
> unsubscribegooglegroups.com or reply to this email with the words "REMOVE
> ME" as the subject.
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

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

Reply via email to