[android-developers] Re: Simple Key Event Questions

2010-09-07 Thread Tez
okay thanks Dianne. You have been great help!
One more question(sorry to keep troubling you): Is there any way to
have my OWN softkeyboard just for one application.

Eg: I have an EditText. I want a custom softkeyboard to show only when
I edit this text box only in my app. I dont want it to be used for any
other apps.
OR
is there is way to disable the popping up of the system IME when I
click an EditText?

Cheers,
Earlence

On Sep 7, 10:34 am, Dianne Hackborn hack...@android.com wrote:
 I've told you what there is.

 On Mon, Sep 6, 2010 at 9:25 PM, Tez earlencefe...@gmail.com wrote:
  I mean to say that is there any other measurable parameter the IM
  framework provides?

  On Sep 7, 9:08 am, Dianne Hackborn hack...@android.com wrote:
   I have been try to say -- no.  The information you are asking for doesn't
   even exist.  There are no key events.

   On Mon, Sep 6, 2010 at 8:52 PM, Tez earlencefe...@gmail.com wrote:
Thank you for the quick reply.
So now, coming back to my original problem, is there ANY way that you
can think of to receive the information I need
without writing a custom IME?

Cheers,
Earlence

On Sep 7, 8:42 am, Dianne Hackborn hack...@android.com wrote:
 KeyListener is (generally) only for physical keyboards.  It may not
  even
be
 used for those -- an IME has first crack at hard key events and may
  do
its
 own massaging of them and do calls on its InputConnection.  (Consider
  for
 example a Chinese IME that converts input on a hard keyboard to
  Chinese
 text.)

 As far as where data goes...  it depends on what you are talking
  about.
 The
 general flow for touch input is:

 - MotionEvent delivered to IME window.
 - IME makes calls on the target InputConnection based on the touch
  data.
 - The InputConnection calls appear in the target app, which for a
TextView
 performs the appropriate editing of its text.

 On Sun, Sep 5, 2010 at 9:42 PM, Tez earlencefe...@gmail.com wrote:
  and another thingin all these key interactions, (physical or
  IME), am I correct in assuming that all data must pass thru the
  Framework classes like WindowManagerService, KeyInputQueue etc?

  Cheers,
  Earlence

  On Sep 6, 12:02 am, Dianne Hackborn hack...@android.com wrote:
   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 earlencefe...@gmail.com
  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 hack...@android.com
  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 earlencefe...@gmail.com

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 hack...@android.com
wrote:
   On Fri, Sep 3, 2010 at 10:48 PM, Tez 
earlencefe...@gmail.com
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

[android-developers] Re: Simple Key Event Questions

2010-09-07 Thread Tez
I want to implement a biometric measure based on keystroke analysis.
(This is a known research topic).
I need to extract timing vectors that correspond to how a user types.
(This is done on other devices like Win Mob but not Android)

Suppose a user types EARLENCE (length of string = 8)

It should result in 8 values that represent the time for which each
key was held down, or each touch event.
and 7 values that represent the time elapse between consecutive keys.

Cheers,
Earlence

On Sep 4, 10:44 pm, Dianne Hackborn hack...@android.com 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 earlencefe...@gmail.com 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 hack...@android.com wrote:
   On Fri, Sep 3, 2010 at 10:48 PM, Tez earlencefe...@gmail.com 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
   hack...@android.com

   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 android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

 --
 Dianne Hackborn
 Android framework engineer
 hack...@android.com

 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: Simple Key Event Questions

2010-09-07 Thread Dianne Hackborn
You can use they keyboard class to implement your own IME inside of the app.
 You can't do this with the IME framework, since that is global.

On Sat, Sep 4, 2010 at 9:10 PM, Tez earlencefe...@gmail.com wrote:

 I want to implement a biometric measure based on keystroke analysis.
 (This is a known research topic).
 I need to extract timing vectors that correspond to how a user types.
 (This is done on other devices like Win Mob but not Android)

 Suppose a user types EARLENCE (length of string = 8)

 It should result in 8 values that represent the time for which each
 key was held down, or each touch event.
 and 7 values that represent the time elapse between consecutive keys.

 Cheers,
 Earlence

 On Sep 4, 10:44 pm, Dianne Hackborn hack...@android.com 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 earlencefe...@gmail.com 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 hack...@android.com wrote:
On Fri, Sep 3, 2010 at 10:48 PM, Tez earlencefe...@gmail.com
 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
hack...@android.com
 
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
 android-developers@googlegroups.com
   To unsubscribe from this group, send email to
   android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com
 
   For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en
 
  --
  Dianne Hackborn
  Android framework engineer
  hack...@android.com
 
  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 android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at

[android-developers] Re: Simple Key Event Questions

2010-09-07 Thread Tez
Thanks Dianne. I have implemented my own keyboard with the keyboard
view class.

Cheers,
Earlence

On Sep 5, 9:10 am, Tez earlencefe...@gmail.com wrote:
 I want to implement a biometric measure based on keystroke analysis.
 (This is a known research topic).
 I need to extract timing vectors that correspond to how a user types.
 (This is done on other devices like Win Mob but not Android)

 Suppose a user types EARLENCE (length of string = 8)

 It should result in 8 values that represent the time for which each
 key was held down, or each touch event.
 and 7 values that represent the time elapse between consecutive keys.

 Cheers,
 Earlence

 On Sep 4, 10:44 pm, Dianne Hackborn hack...@android.com 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 earlencefe...@gmail.com 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 hack...@android.com wrote:
On Fri, Sep 3, 2010 at 10:48 PM, Tez earlencefe...@gmail.com 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
hack...@android.com

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 android-developers@googlegroups.com
   To unsubscribe from this group, send email to
   android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
   For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en

  --
  Dianne Hackborn
  Android framework engineer
  hack...@android.com

  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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: Simple Key Event Questions

2010-09-06 Thread Mark Murphy
On Mon, Sep 6, 2010 at 12:37 AM, Tez earlencefe...@gmail.com wrote:
 So the KeyEvent Listener is only for physical keyboards?
 I see many devices that have only soft keyboards. This leads me to
 think What is the value of the Key Listener API then?

It predated the IME system. Hence, if nothing else, it is still there
to maintain binary compatibility.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android Consulting: http://commonsware.com/consulting

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Simple Key Event Questions

2010-09-06 Thread Tez
In all these key interactions, (physical or
IME), am I correct in assuming that all data must pass thru the
Framework classes like WindowManagerService, KeyInputQueue etc?

-E

On Sep 6, 2:18 pm, Mark Murphy mmur...@commonsware.com wrote:
 On Mon, Sep 6, 2010 at 12:37 AM, Tez earlencefe...@gmail.com wrote:
  So the KeyEvent Listener is only for physical keyboards?
  I see many devices that have only soft keyboards. This leads me to
  think What is the value of the Key Listener API then?

 It predated the IME system. Hence, if nothing else, it is still there
 to maintain binary compatibility.

 --
 Mark Murphy (a Commons 
 Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy

 Android Consulting:http://commonsware.com/consulting

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: Simple Key Event Questions

2010-09-06 Thread Dianne Hackborn
KeyListener is (generally) only for physical keyboards.  It may not even be
used for those -- an IME has first crack at hard key events and may do its
own massaging of them and do calls on its InputConnection.  (Consider for
example a Chinese IME that converts input on a hard keyboard to Chinese
text.)

As far as where data goes...  it depends on what you are talking about.  The
general flow for touch input is:

- MotionEvent delivered to IME window.
- IME makes calls on the target InputConnection based on the touch data.
- The InputConnection calls appear in the target app, which for a TextView
performs the appropriate editing of its text.

On Sun, Sep 5, 2010 at 9:42 PM, Tez earlencefe...@gmail.com wrote:

 and another thingin all these key interactions, (physical or
 IME), am I correct in assuming that all data must pass thru the
 Framework classes like WindowManagerService, KeyInputQueue etc?

 Cheers,
 Earlence

 On Sep 6, 12:02 am, Dianne Hackborn hack...@android.com wrote:
  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 earlencefe...@gmail.com 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 hack...@android.com 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 earlencefe...@gmail.com 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 hack...@android.com wrote:
  On Fri, Sep 3, 2010 at 10:48 PM, Tez earlencefe...@gmail.com
   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
  hack...@android.com
 
  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
   android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com
 
   android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com
 android-developers%252bunsubscr...@googlegroups.comandroid-developers%25252bunsubscr...@googlegroups.com
 
 
 For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
 
--
Dianne Hackborn
Android framework engineer
hack...@android.com
 
Note: please don't send private questions to me, as I don't have time
 to
provide private support, and 

[android-developers] Re: Simple Key Event Questions

2010-09-06 Thread Tez
Thank you for the quick reply.
So now, coming back to my original problem, is there ANY way that you
can think of to receive the information I need
without writing a custom IME?

Cheers,
Earlence

On Sep 7, 8:42 am, Dianne Hackborn hack...@android.com wrote:
 KeyListener is (generally) only for physical keyboards.  It may not even be
 used for those -- an IME has first crack at hard key events and may do its
 own massaging of them and do calls on its InputConnection.  (Consider for
 example a Chinese IME that converts input on a hard keyboard to Chinese
 text.)

 As far as where data goes...  it depends on what you are talking about.  The
 general flow for touch input is:

 - MotionEvent delivered to IME window.
 - IME makes calls on the target InputConnection based on the touch data.
 - The InputConnection calls appear in the target app, which for a TextView
 performs the appropriate editing of its text.



 On Sun, Sep 5, 2010 at 9:42 PM, Tez earlencefe...@gmail.com wrote:
  and another thingin all these key interactions, (physical or
  IME), am I correct in assuming that all data must pass thru the
  Framework classes like WindowManagerService, KeyInputQueue etc?

  Cheers,
  Earlence

  On Sep 6, 12:02 am, Dianne Hackborn hack...@android.com wrote:
   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 earlencefe...@gmail.com 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 hack...@android.com 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 earlencefe...@gmail.com 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 hack...@android.com wrote:
   On Fri, Sep 3, 2010 at 10:48 PM, Tez earlencefe...@gmail.com
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
   hack...@android.com

   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
android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
  android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com

android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com
  

Re: [android-developers] Re: Simple Key Event Questions

2010-09-06 Thread Dianne Hackborn
I have been try to say -- no.  The information you are asking for doesn't
even exist.  There are no key events.

On Mon, Sep 6, 2010 at 8:52 PM, Tez earlencefe...@gmail.com wrote:

 Thank you for the quick reply.
 So now, coming back to my original problem, is there ANY way that you
 can think of to receive the information I need
 without writing a custom IME?

 Cheers,
 Earlence

 On Sep 7, 8:42 am, Dianne Hackborn hack...@android.com wrote:
  KeyListener is (generally) only for physical keyboards.  It may not even
 be
  used for those -- an IME has first crack at hard key events and may do
 its
  own massaging of them and do calls on its InputConnection.  (Consider for
  example a Chinese IME that converts input on a hard keyboard to Chinese
  text.)
 
  As far as where data goes...  it depends on what you are talking about.
  The
  general flow for touch input is:
 
  - MotionEvent delivered to IME window.
  - IME makes calls on the target InputConnection based on the touch data.
  - The InputConnection calls appear in the target app, which for a
 TextView
  performs the appropriate editing of its text.
 
 
 
  On Sun, Sep 5, 2010 at 9:42 PM, Tez earlencefe...@gmail.com wrote:
   and another thingin all these key interactions, (physical or
   IME), am I correct in assuming that all data must pass thru the
   Framework classes like WindowManagerService, KeyInputQueue etc?
 
   Cheers,
   Earlence
 
   On Sep 6, 12:02 am, Dianne Hackborn hack...@android.com wrote:
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 earlencefe...@gmail.com 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 hack...@android.com 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 earlencefe...@gmail.com
 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 hack...@android.com
 wrote:
On Fri, Sep 3, 2010 at 10:48 PM, Tez 
 earlencefe...@gmail.com
 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
hack...@android.com
 
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
 android-developers@googlegroups.com
   To unsubscribe from this group, send email to
   

[android-developers] Re: Simple Key Event Questions

2010-09-06 Thread Tez
No, what I mean is that is there any other *similar* measure that is
obtainable from the framework,
or what the framework provides?

-E

On Sep 7, 9:08 am, Dianne Hackborn hack...@android.com wrote:
 I have been try to say -- no.  The information you are asking for doesn't
 even exist.  There are no key events.



 On Mon, Sep 6, 2010 at 8:52 PM, Tez earlencefe...@gmail.com wrote:
  Thank you for the quick reply.
  So now, coming back to my original problem, is there ANY way that you
  can think of to receive the information I need
  without writing a custom IME?

  Cheers,
  Earlence

  On Sep 7, 8:42 am, Dianne Hackborn hack...@android.com wrote:
   KeyListener is (generally) only for physical keyboards.  It may not even
  be
   used for those -- an IME has first crack at hard key events and may do
  its
   own massaging of them and do calls on its InputConnection.  (Consider for
   example a Chinese IME that converts input on a hard keyboard to Chinese
   text.)

   As far as where data goes...  it depends on what you are talking about.
   The
   general flow for touch input is:

   - MotionEvent delivered to IME window.
   - IME makes calls on the target InputConnection based on the touch data.
   - The InputConnection calls appear in the target app, which for a
  TextView
   performs the appropriate editing of its text.

   On Sun, Sep 5, 2010 at 9:42 PM, Tez earlencefe...@gmail.com wrote:
and another thingin all these key interactions, (physical or
IME), am I correct in assuming that all data must pass thru the
Framework classes like WindowManagerService, KeyInputQueue etc?

Cheers,
Earlence

On Sep 6, 12:02 am, Dianne Hackborn hack...@android.com wrote:
 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 earlencefe...@gmail.com 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 hack...@android.com 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 earlencefe...@gmail.com
  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 hack...@android.com
  wrote:
 On Fri, Sep 3, 2010 at 10:48 PM, Tez 
  earlencefe...@gmail.com
  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
 hack...@android.com

 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
   

[android-developers] Re: Simple Key Event Questions

2010-09-06 Thread Tez
I mean to say that is there any other measurable parameter the IM
framework provides?

On Sep 7, 9:08 am, Dianne Hackborn hack...@android.com wrote:
 I have been try to say -- no.  The information you are asking for doesn't
 even exist.  There are no key events.



 On Mon, Sep 6, 2010 at 8:52 PM, Tez earlencefe...@gmail.com wrote:
  Thank you for the quick reply.
  So now, coming back to my original problem, is there ANY way that you
  can think of to receive the information I need
  without writing a custom IME?

  Cheers,
  Earlence

  On Sep 7, 8:42 am, Dianne Hackborn hack...@android.com wrote:
   KeyListener is (generally) only for physical keyboards.  It may not even
  be
   used for those -- an IME has first crack at hard key events and may do
  its
   own massaging of them and do calls on its InputConnection.  (Consider for
   example a Chinese IME that converts input on a hard keyboard to Chinese
   text.)

   As far as where data goes...  it depends on what you are talking about.
   The
   general flow for touch input is:

   - MotionEvent delivered to IME window.
   - IME makes calls on the target InputConnection based on the touch data.
   - The InputConnection calls appear in the target app, which for a
  TextView
   performs the appropriate editing of its text.

   On Sun, Sep 5, 2010 at 9:42 PM, Tez earlencefe...@gmail.com wrote:
and another thingin all these key interactions, (physical or
IME), am I correct in assuming that all data must pass thru the
Framework classes like WindowManagerService, KeyInputQueue etc?

Cheers,
Earlence

On Sep 6, 12:02 am, Dianne Hackborn hack...@android.com wrote:
 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 earlencefe...@gmail.com 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 hack...@android.com 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 earlencefe...@gmail.com
  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 hack...@android.com
  wrote:
 On Fri, Sep 3, 2010 at 10:48 PM, Tez 
  earlencefe...@gmail.com
  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
 hack...@android.com

 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 

Re: [android-developers] Re: Simple Key Event Questions

2010-09-06 Thread Dianne Hackborn
I've told you what there is.

On Mon, Sep 6, 2010 at 9:25 PM, Tez earlencefe...@gmail.com wrote:

 I mean to say that is there any other measurable parameter the IM
 framework provides?

 On Sep 7, 9:08 am, Dianne Hackborn hack...@android.com wrote:
  I have been try to say -- no.  The information you are asking for doesn't
  even exist.  There are no key events.
 
 
 
  On Mon, Sep 6, 2010 at 8:52 PM, Tez earlencefe...@gmail.com wrote:
   Thank you for the quick reply.
   So now, coming back to my original problem, is there ANY way that you
   can think of to receive the information I need
   without writing a custom IME?
 
   Cheers,
   Earlence
 
   On Sep 7, 8:42 am, Dianne Hackborn hack...@android.com wrote:
KeyListener is (generally) only for physical keyboards.  It may not
 even
   be
used for those -- an IME has first crack at hard key events and may
 do
   its
own massaging of them and do calls on its InputConnection.  (Consider
 for
example a Chinese IME that converts input on a hard keyboard to
 Chinese
text.)
 
As far as where data goes...  it depends on what you are talking
 about.
The
general flow for touch input is:
 
- MotionEvent delivered to IME window.
- IME makes calls on the target InputConnection based on the touch
 data.
- The InputConnection calls appear in the target app, which for a
   TextView
performs the appropriate editing of its text.
 
On Sun, Sep 5, 2010 at 9:42 PM, Tez earlencefe...@gmail.com wrote:
 and another thingin all these key interactions, (physical or
 IME), am I correct in assuming that all data must pass thru the
 Framework classes like WindowManagerService, KeyInputQueue etc?
 
 Cheers,
 Earlence
 
 On Sep 6, 12:02 am, Dianne Hackborn hack...@android.com wrote:
  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 earlencefe...@gmail.com
 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 hack...@android.com
 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 earlencefe...@gmail.com
 
   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 hack...@android.com
   wrote:
  On Fri, Sep 3, 2010 at 10:48 PM, Tez 
   earlencefe...@gmail.com
   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
  hack...@android.com
 
  Note: please don't send private questions to me, as I
 

[android-developers] Re: Simple Key Event Questions

2010-09-05 Thread Tez
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 hack...@android.com 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 earlencefe...@gmail.com 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 hack...@android.com wrote:
   On Fri, Sep 3, 2010 at 10:48 PM, Tez earlencefe...@gmail.com 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
   hack...@android.com

   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 android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

 --
 Dianne Hackborn
 Android framework engineer
 hack...@android.com

 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: Simple Key Event Questions

2010-09-05 Thread Dianne Hackborn
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 earlencefe...@gmail.com 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 hack...@android.com 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 earlencefe...@gmail.com 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 hack...@android.com wrote:
On Fri, Sep 3, 2010 at 10:48 PM, Tez earlencefe...@gmail.com
 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
hack...@android.com
 
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
 android-developers@googlegroups.com
   To unsubscribe from this group, send email to
   android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com
 
   For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en
 
  --
  Dianne Hackborn
  Android framework engineer
  hack...@android.com
 
  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 android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Simple Key Event Questions

2010-09-05 Thread Tez
So the KeyEvent Listener is only for physical keyboards?
I see many devices that have only soft keyboards. This leads me to
think What is the value of the Key Listener API then?

Cheers,
Earlence

On Sep 6, 12:02 am, Dianne Hackborn hack...@android.com wrote:
 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 earlencefe...@gmail.com 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 hack...@android.com 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 earlencefe...@gmail.com 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 hack...@android.com wrote:
 On Fri, Sep 3, 2010 at 10:48 PM, Tez earlencefe...@gmail.com
  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
 hack...@android.com

 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
  android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
  android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com

For more options, visit this group at
   http://groups.google.com/group/android-developers?hl=en

   --
   Dianne Hackborn
   Android framework engineer
   hack...@android.com

   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 android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

 --
 Dianne Hackborn
 Android framework engineer
 hack...@android.com

 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 android-developers@googlegroups.com
To unsubscribe from 

[android-developers] Re: Simple Key Event Questions

2010-09-05 Thread Tez
and another thingin all these key interactions, (physical or
IME), am I correct in assuming that all data must pass thru the
Framework classes like WindowManagerService, KeyInputQueue etc?

Cheers,
Earlence

On Sep 6, 12:02 am, Dianne Hackborn hack...@android.com wrote:
 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 earlencefe...@gmail.com 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 hack...@android.com 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 earlencefe...@gmail.com 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 hack...@android.com wrote:
 On Fri, Sep 3, 2010 at 10:48 PM, Tez earlencefe...@gmail.com
  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
 hack...@android.com

 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
  android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
  android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com

For more options, visit this group at
   http://groups.google.com/group/android-developers?hl=en

   --
   Dianne Hackborn
   Android framework engineer
   hack...@android.com

   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 android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

 --
 Dianne Hackborn
 Android framework engineer
 hack...@android.com

 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 android-developers@googlegroups.com
To 

[android-developers] Re: Simple Key Event Questions

2010-09-04 Thread Tez
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 hack...@android.com wrote:
 On Fri, Sep 3, 2010 at 10:48 PM, Tez earlencefe...@gmail.com 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
 hack...@android.com

 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: Simple Key Event Questions

2010-09-04 Thread Dianne Hackborn
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 earlencefe...@gmail.com 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 hack...@android.com wrote:
  On Fri, Sep 3, 2010 at 10:48 PM, Tez earlencefe...@gmail.com 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
  hack...@android.com
 
  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 android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en