I am pretty sure the SoftKeyboard sample code shows how to handle this.

On Tue, May 12, 2009 at 10:18 PM, e21u...@gmail.com <e21u...@gmail.com>wrote:

>
> hi,
>
> when hardware keyboard goes into CAPSLOCK mode - for example when in
> emulator
> Shift key is pressed twice i can see cursor in view changed and
> pressing key A gives 'A')
>
> is there any way that application or IME can detect it?
>
> by looking on KeyEvent sent they look the same for capslock or no
> shift ...
> for example a
> onKeyDown keyCode=29 event=KeyEvent{action=0 code=29 repeat=0 meta=0
> scancode=30 mFlags=8}
> onKeyUp keyCode=29 event=KeyEvent{action=1 code=29 repeat=0 meta=0
> scancode=30 mFlags=8}
> and A
> onKeyDown keyCode=29 event=KeyEvent{action=0 code=29 repeat=0 meta=0
> scancode=30 mFlags=8}
> onKeyUp keyCode=29 event=KeyEvent{action=1 code=29 repeat=0 meta=0
> scancode=30 mFlags=8}
>
> is there some other listener or flag that can be checked?!
>
> i can see also left Shift key events but no state ...
> onKeyDown keyCode=59 event=KeyEvent{action=0 code=59 repeat=0 meta=65
> scancode=42 mFlags=8}
> onKeyUp  keyCode=59 event=KeyEvent{action=1 code=59 repeat=0 meta=0
> scancode=42 mFlags=8}
>
> my observations so far are that state of shift in IME and hardware
> keyboard are not connected
> and hardware keyboard does not notify IME about its state changes?
> that is a bit confusing ...
>
> is that correct? i
>
>
>
> >
>


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

Reply via email to