You can't get that from the IME. What you get is edit operations via calls on InputConnection.
You will need to implement your own keyboard in your app if you want to monitor individual interactions with it. On Sun, Sep 5, 2010 at 4:18 AM, Tez <[email protected]> wrote: > Biometric Measure with neural nets: Key stroke patterns. > For that I need data about how something was typed in: > > Eg: EARLENCE > > 1. time for which each key was pressed. > 2. interval between consecutive key presses. > > Cheers, > Earlence > > On Sep 4, 10:44 pm, Dianne Hackborn <[email protected]> wrote: > > You can override EditText to return your own InputConnection. > > > > But... if you want KeyEvents, you won't get KeyEvents. Period. There > are > > no KeyEvent objects involved in this ANYWHERE. At all. The user is > > touching on the screen (that is a touch event). The IME turns that into > an > > edit operation on the TextView (that is a call to InputConnection). No > > KeyEvent. > > > > What you are claiming to want to do simply doesn't make sense. Let's > back > > up here and see what you are actually trying to accomplish? Not timing > > between two key events. What is the goal you are trying to achieve? > > > > > > > > On Sat, Sep 4, 2010 at 6:55 AM, Tez <[email protected]> wrote: > > > How do I intercept the InputConnection Calls? Would I have to modify > > > the IME or use a custom one? > > > Having text change listeners would not be of use as I need key timing > > > information. This I can only get thru KeyEvents. > > > > > Cheers, > > > Earlence > > > > > On Sep 4, 12:39 pm, Dianne Hackborn <[email protected]> wrote: > > > > On Fri, Sep 3, 2010 at 10:48 PM, Tez <[email protected]> > wrote: > > > > > 1. I have registered a KeyListener on an EditText. When I use the > soft > > > > > keyboard to input text, my listener is not called. How Do I > intercept > > > > > these events? > > > > > > InputConnection is how edit operations are delivered through an IME. > > > These > > > > will appear as direct edits of the text in the EditText, so to watch > that > > > > you either need to intercept the InputConnection calls or have > listeners > > > for > > > > text changes. > > > > > > > 2. How do I measure time interval between KeyEvents. The methods > are > > > > > confusing and documentation is not good. Plz put pseudo-code here. > > > > > > Er... there is nothing really to document here. > > > SystemClock.uptimeMillis() > > > > returns the current time in what are probably appropriate units for > you. > > > > Call it at the points you are interested in. Compare the values. > > > > > > (Didn't we just have a thread on this?) > > > > > > -- > > > > 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. > > > > > -- > > > You received this message because you are subscribed to the Google > > > Groups "Android Developers" group. > > > To post to this group, send email to > [email protected] > > > To unsubscribe from this group, send email to > > > [email protected]<android-developers%[email protected]> > <android-developers%[email protected]<android-developers%[email protected]> > > > > > For more options, visit this group at > > >http://groups.google.com/group/android-developers?hl=en > > > > -- > > 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. > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected]<android-developers%[email protected]> > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- 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. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

