[Lazarus] OnUTF8KeyPress on Mac OS X Carbon

paul at michellcomputing.co.uk paul at michellcomputing.co.uk
Mon Sep 14 09:55:09 CEST 2015


I have used ​OnUTF8KeyPress on Windows and Linux (GTK2 and QT) to enable keyboard entry of the

degree symbol in place of the reverse dash with the following code:

Procedure TCoordinatePanel.DoOnUTF8KeyPress(Sender: TObject; Var UTF8Key: TUTF8Char);

Begin

 { Substitute reverse dash for degree symbol. }

 If UTF8Key=` Then

 UTF8Key := #$C2#$B0; { UTF8 code for character. }

End;

However, on Mac this same code returns ?? in place of the degree symbol. This is my first attempt at using Lazarus on the Mac,

can somebody explain what is happening here? I am using the latest official Lazarus binary package 1.4.2 with the Carbon widgetset.

Thanks,

Paul Michell
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20150914/e6f100f1/attachment-0002.html>


More information about the Lazarus mailing list