There is no Fn modifier in TShiftStateEnum
TShiftStateEnum = (ssShift, ssAlt, ssCtrl,
ssLeft, ssRight, ssMiddle, ssDouble,
ssMeta, ssSuper, ssHyper, ssAltGr, ssCaps, ssNum,
ssScroll,ssTriple,ssQuad,ssExtra1,ssExtra2);
This has been discussed before
https://forum.lazarus.freepascal.org/index.php/topic,50245.msg366277.html#msg366277The reply there was that this is handled by the hardware, the BIOS or whatever, modifying the scancode. I doubt that this is true on MacOS, as NSEvent.inc defines
const
NSAlphaShiftKeyMask = 1 shl 16;
NSShiftKeyMask = 1 shl 17;
NSControlKeyMask = 1 shl 18;
NSAlternateKeyMask = 1 shl 19;
NSCommandKeyMask = 1 shl 20;
NSNumericPadKeyMask = 1 shl 21;
NSHelpKeyMask = 1 shl 22;
NSFunctionKeyMask = 1 shl 23;
NSDeviceIndependentModifierFlagsMask = $ffff0000;
So, there actually is a modifier NSFunctionKeyMask on MacOS. And the standard View menu item Enter/Exit Full Screen has a keyboard equivalent that is either Control-Command-F or Fn-F.
If it is Fn-F, it needs to be handled in the software. As a proof, here is the NSEvent when pressing Fn-F
(lldb) po event
NSEvent: type=KeyDown loc=(99.2148,494.188) time=10836.7 flags=0x800100 win=0x11e620bb0 winNum=602 ctxt=0x0 chars="f" unmodchars="f" repeat=0 keyCode=3
where flags does contain the NSFunctionKeyMask modifier.
Regards,
Adriaan van Os