Firstly, the area of currency handling is very much in that of inherited code from Delphi IBX, so I am having to understand it myself before giving advice.



My first observation is that the code should be generic to all locales. TIBBCDField inherits from TBCDField (in FPC DB Unit) and that uses system formatting routines to convert from a string to a currency value. That is, if you have set up the locale correctly then a value with ',' as the decimal separator should "work out of the box".



Looking at your post, it seems that you are trying to implement a ',' decimal separator by converting it yourself to a '.' separator, rather than setting the locale. Why? Setting the locale is surely the best way to do this.



As to the KeyPress handler. This is well outside of IBX. For a TDBGrid, the behaviour is inherited from TWinControl and I can see two reasons where why your handler is not being called:



1. The parent form also has a keypress handler and which takes precedence.

2. csNoStdEvents is not in the control style.



My guess is that you should check to see what the parent form is doing.



