Recent

Author Topic: Text Input with Accents and Umlauts  (Read 293 times)

Igor Kokarev

  • Sr. Member
  • ****
  • Posts: 272
Text Input with Accents and Umlauts
« on: August 28, 2020, 01:56:03 pm »
Hi,

How to correctly handle text input with accents and umlauts? We write a 3D app using Metal graphics and there is no standard text input box.

Should we manually process a modifier key (Option)? Or there is a ready solution to tell MTKView (NSView) that we input text?

Manlio

  • Full Member
  • ***
  • Posts: 104
  • Pascal dev
Re: Text Input with Accents and Umlauts
« Reply #1 on: September 06, 2020, 05:52:26 pm »
If you use a TForm as the basis of your app, there's an event called OnShortcut, which contains the key and character codes of the key presses. Combined with knowledge of the installed keyboard (which can be detected in ways I cannot remember right now, but it can), it should be straightforward to know exactly which characters the user wants to enter.
manlio mazzon gmail

 

TinyPortal © 2005-2018