Iam sorry that not given complate information from my side
earlier .
Iam using PalmOS V5.2 software.
My application is keyboard driver.
This application iam developing for Samsung I530 smart phone.
The driver receives the packet from the Serial port when the key is pressed.
In The packet Specific byte contains the Character to be displayed .
Iam retrieving the character and enqueing in the queue with
EvtEnqueueKey(keyCode,0,0) .
This is displaying the character well on the Memopad in lowercase.
when i select the CAPS key in order to display in Uppercase
iam setting the state with
GrfSetState(capsLock,numLock,tempShift)
capsLock = true
and then enqueing the Characters , but it is not displaying in the uppercase , it is displaying in lower case only.

Setting Graffiti flags will normally only affect the character that Graffiti generates when the user writes in the input area. Though most keyboard drivers read these flags to ensure they're responsive to apps that set these flags explicitly.


If i set the shift flag then it is displaying in uppercase , with
 SHIFT key selection it is displaying in uppercase well.
Iam handing CAPS key also same as like SHIFT key only , but it is
 not displaying in uppercase .
Where as if i run the application on Tungsten T2 PDA it is
  displaying well in the uppercases .
Samsung I530 & Tungsten T2 PDA are using the same OS version only .

With some apps such as Memo, a keydown event will be upper-cased if this event causes a new record to be created. I don't know if this is what you're seeing when you say that there's a difference between the Samsung and palmOne devices. Or maybe Samsung is playing some interesting games with these flags.


Could you pls help me how to rectify this problem so that i can
  display in Uppercase !
I need to display the data in device specific application only
  like Memopad or Notepad ...etc .
Is there any special flags to set ?

You need to upper-case the character yourself before you enqueue it. The right way to handle this would be something like:


        Char srcBuffer[maxCharBytes];
        Char dstBuffer[50];
        UInt16 offset = 0;
        UInt16 srcLength;
        UInt16 dstLength = sizeof(dstBuffer);
        Err result;

        srcLength = TxtSetNextChar(srcBuffer, 0, keyCode);
        result = TxtTransliterate(srcBuffer, srcLength,
                        dstBuffer, &dstLength,
                        translitOpUpperCase);
        ErrNonFatalDisplayIf(result != errNone, "Can't upper-case");

        offset = 0;
        while (offset < dstLength)
        {
                WChar curChar;
                offset += TxtGetNextChar(dstBuffer, offset, &curChar);
                EvtEnqueueKey(curChar, 0, 0);
        }

This works even if the result of upper-casing the text causes expansion, as would be the case (if this ever gets fixed) of upper-casing a letter such as � in Germany (becomes "SS").

-- Ken
--
Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200

--
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to