Closed CelticMinstrel closed 1 year ago
On OsX, you need to add Blades Exile, ... to the applications which can monitor the input see https://support.apple.com/en-ca/guide/mac-help/mchl4cedafb6/mac .
I don't think that's correct. I did notice that it was requesting that permission, but surely it shouldn't need that permission just to check if a modifier is pressed? That permission is about monitoring input when another app is active. It only needs to monitor input when the game is active.
This may be linked to https://en.sfml-dev.org/forums/index.php?topic=26849.0 . After yes, I also think it's a pity to have to add rights with the system preferences (especially since you have to do it again each time you recreate an executable :-~)
Based on that post, it sounds like any use of IsKeyPressed is broken, which sounds seriously incredible. It says you should exclusively use events to determine the key press, but there is no way to do that for modified mouse clicks (that I know of).
Normally, in swift/cocoa, a mouse event https://developer.apple.com/documentation/appkit/nsevent/1532495-mouseevent seems to contain some modifierFlag. In SFML, I'm not sure if we can retrieve them :-~
I guess IsKeyPressed calls a low-level routine to retrieve the keyboard state, so it is protected.
I noticed it at the startup screen – alt-clicking Start Scenario with no party should automatically create a default party, but it doesn't work currently. Might be other things affected too, like Alt+Click for Look.
I also have a feeling that this might be just my computer, or possibly something to do with the version of SFML or something.