[Solved] How to detect unicode characters in KeyPress event? lazarus / 21-General ---------------------------------------------------------------------- loaded · 2022-01-06 12:11 Hi All, When I try to use the following code in the KeyPress event of the form; Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TForm1.FormKeyPress(Sender: TObject; var Key: char);begin  Caption:=Key; // ÇĞİŞÜÖ--> ?end; For unicode characters I get the character ?. In the KeyDown event, I get the numeric number of the key directly. Can I solve this without dealing with numeric numbers, that is, without entering the KeyDown event? ---------------------------------------------------------------------- PascalDragon · 2022-01-06 12:19 Char only supports single Byte characters, thus larger Unicode characters can never be handled with OnKeyPress. You need to handle OnUTF8KeyPress instead. ---------------------------------------------------------------------- loaded · 2022-01-06 12:28 Thank you very much PascalDragonfor your reply. Quote from: PascalDragon on January 06, 2022, 01:19:39 pmChar only supports single Byte characters, thus larger Unicode characters can never be handled with OnKeyPress. You need to handle OnUTF8KeyPress instead. It was very sad not to think about it.