Thanks very much for the detailed reply.
I did have K! in there, and reomoving that gets me a little closer. Unfortunately, no matter where the cursor is positioned when you type the ^, it puts the cent sign and cursor at the beginning of the string. The same is true for your code. Were you running it under VFP8? I only have the VFP9 beta on this machine, so I can't check.
>do you have anything in the textbox's format and/or inputmask properties? I ask, because the below code works fine but if I change the format to K then of course it does as you say yours does in testing:
>
>oform = NEWOBJECT('TESTFORM')
>oform.show
>read events
>
>DEFINE CLASS testform AS form
>
>
> Height = 113
> Width = 375
> DoCreate = .T.
> cvalue = "Hello"
> Name = "TestForm"
>
>
> ADD OBJECT text1 AS textbox WITH ;
> ControlSource = "thisform.cvalue", ;
> Height = 23, ;
> Left = 132, ;
> Top = 36, ;
> Width = 100, ;
> Name = "Text1"
>
>
> PROCEDURE Init
> ON KEY label ^ KEYBOARD "¢"
> DODEFAULT()
> ENDPROC
>
> PROCEDURE Unload
> CLEAR EVENTS
> DODEFAULT()
> ENDPROC
>
>ENDDEFINE
>
>
>>I have a need to remap the shift 6 key to type a cent sign.
>>
>>Seemed easy enough to solve with:
>>
>>ON KEY label ^ KEYBOARD "¢"
>>
>>Unfortunately whenever a user tries to use this key in a text box, it blows away everything else in the box, like the text was all selected when they typed it.
>>
>>This is in the VFP9 beta...but I suspect it behaves this way in vfp8 as well.
>>
>>Anybody know how I can make this work?
>>
>>TIA
>>
>>Russ