I’m trying to apply the best method for starting and undo process but have some doubts regarding the different ways Mac and Windows handle keys.
Code, in keydown event is:
#if TargetMacOS
if Keyboard.CommandKey and ( asc(key) = 122 or asc(key) = 90 ) then
MyUndo
Return True
end if
#elseif TargetWin32
if Keyboard.ControlKey and asc(key) = 26 then
MyUndo
Return True
end if
#endif
It seems there is no difference between Z and z in Windows but there is a difference in Mac. Is this correct ?
The other question is, “then why is there a control key on the mac”
Personally I set up most of my apps with similar code, so that it a WIn user on a Mac or a Mac user on a Win machine doesn’t have to remember which modifier key (is that contray to the reccomendations of Apple and Microsoft? yes… )