It seems if I change the IME to anything but the ASUS Keyboard one
then everything is fine.  Consistently though if I change to the IME
type of the ASUS Transformer dock this problem occurs.  Breaks games
that rely on key down and up event coming in properly.


On Jul 25, 11:48 pm, Halsafar <[email protected]> wrote:
> I am finding whenever I press a key down on a keyboard it immediately
> fires both the down and up events.  It seems with the virtual keyboard
> or a real keyboard in the case of the EEE Transformer Pad this is
> true.  Is this the expected behavior or am I doing something wrong?  I
> have tried with both the dispatch and separate onKeyDown/onKeyUp
> events.  Both give same results.
>
> Note this is not true for special keys.  CTRL for example fires
> properly and its repeat count properly goes up as you hold it.  Where
> if you hold a regular key like "A" it fires up/down events
> simultaneously and the repeat count stays at -1.
>
>      public boolean dispatchKeyEvent(KeyEvent event)
>      {
>
>           if (event.getAction() == KeyEvent.ACTION_DOWN)
>           {
>                  Log.d(LOG_TAG, "onKeyDown(" + event.getKeyCode() + ", " +
> event + ")");
>
>              return true;
>           }
>           else if (event.getAction() == KeyEvent.ACTION_UP)
>           {
>                   Log.d(LOG_TAG, "onKeyUp(" + event.getKeyCode() + ", " +
> event + ")");
>
>               return true;
>           }
>
>           return super.dispatchKeyEvent(event);
>      }

-- 
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

Reply via email to