On Dec 29, 11:11 pm, lbendlin <[email protected]> wrote:
> you probably want to monitor the keyUp event rather than keyDown

Yes, I am doing the character processing in keyUp, I just showed
keyDown to show what kinds of events I am using. And now I have this
code in the native part:

  case AKind of
    ACTION_DOWN: CallbackKeyDown(lCurForm, lKey);
    ACTION_UP:
    begin
      CallbackKeyUp(lCurForm, lKey);
      if (lChar <> 0) and ((COMBINING_ACCENT and lChar) = 0) then
      begin
        if CDWidgetset.CombiningAccent <> 0 then
        begin
          // Todo .. combine accent
        end;
        AUTF8Text := UnicodeToUTF8(lChar);
        AUTF8Char := AUTF8Text;
        CallbackKeyChar(lCurForm, lKey, AUTF8Char);
        CDWidgetset.CombiningAccent := 0;
      end
      else if (lChar <> 0) and ((COMBINING_ACCENT and lChar) <> 0)
then
      begin
        CDWidgetset.CombiningAccent := lChar; // store the accent
      end;

But I still get CallbackKeyChar calls when I long click a virtual
keyboard key. Despite my check against COMBINING_ACCENT =( Which shows
it isn't enough to detect if the character should really be added to
my edit control

lChar comes from event.getUnicodeChar()

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