Original very detailed report:
https://github.com/Alexey-T/CudaText/issues/5002In the topic, user even has shown the keyboard layout (Portuguese, ABNTII).
My Lazarus test program, with the source, is attached there too.
It shows that app cannot see accented letters in TForm.OnUTF8KeyPress.
Can you help, Zeljko?
unit Unit1;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls, LCLType;
type
{ TForm1 }
TForm1 = class(TForm)
ListBox1: TListBox;
procedure FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
procedure FormUTF8KeyPress(Sender: TObject; var UTF8Key: TUTF8Char);
private
public
end;
var
Form1: TForm1;
implementation
{$R *.lfm}
{ TForm1 }
function _hexstr(const c: TUTF8Char): string;
var
i: integer;
begin
result:= '';
for i:= 1 to length(c) do
result+= HexStr(Ord(c[i]), 2)+' ';
end;
procedure TForm1.FormUTF8KeyPress(Sender: TObject; var UTF8Key: TUTF8Char);
begin
Listbox1.Items.Add('keypress: '+UTF8Key+', hex: '+_hexstr(UTF8Key));
Listbox1.ItemIndex:= Listbox1.Items.Count-1;
end;
procedure TForm1.FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
begin
Listbox1.Items.Add('keydown: '+IntTostr(key));
Listbox1.ItemIndex:= Listbox1.Items.Count-1;
end;
end.