r_j
r_j

Reputation: 1368

Simmulate 'Insert'-key on mac with delphi firemonkey.

I have created win32 program that uses the shortcut 'Insert' a lot. Now I am converting the program to Mac. I find that there is no default 'Ins' key on the keyboard. But on further investigation I find that u can use the combination of fn+return.

Now Delphi does not catch the combination of these keys. But only the key events of the 'Return', the 'fn' is lost. But i have read that the 'fn' key changes the key send from the keyboard instead of sending a combination.

Is there a possibility to catch it when a user presses 'fn + return'.

Upvotes: 0

Views: 359

Answers (1)

Sebastian Z
Sebastian Z

Reputation: 4730

Fn+Enter will return KEY_PADENTER, but that will be translated by FMX to a simple return. You'd have to use RegisterKeyMapping / UnregisterKeyMapping in order to reassign that. But I hope you've already learnt from the comments that Fn+Enter is probably not a good idea for the Mac. So don't annoy your users with Windows shortcuts. Instead of telling them that they have to press Fn+Enter you could just as well tell them to use another shortcut.

Another trick is that the MacBook keyboard doesn't have a Delete key, so most Mac applications often use Backspace instead of Delete for the hotkeys. It is just faster than pressing the replacement Fn+Backspace. Also Mac users expect the Cmd key instead of Ctrl for most shortcuts.

Upvotes: 3

Related Questions