calref / cboe

Classic Blades of Exile
http://spiderwebforums.ipbhost.com/index.php?/forum/12-blades-of-exile/
Other
172 stars 41 forks source link

Arrow keys movement is unpredictable on Silicon macOS 14.5 #405

Closed NQNStudios closed 2 weeks ago

NQNStudios commented 4 weeks ago

Something truly bizarre is happening with BoE keyboard input on my newer Mac. I can't tell if it's affecting letter hotkeys (g for get works fine) but arrow key movement is definitely very broken.

Of interest is this console output:

0x10000088c: TCC deny IOHIDDeviceOpen 0x10000088c: TCC deny IOHIDDeviceOpen We got a keyboard without any keys.

I don't know if the first 2 lines are related to the 3rd one, but the 3rd one comes from sfml and I think it's because newer MacOS requires apps to ask for permission to listen to the keyboard: https://en.sfml-dev.org/forums/index.php?topic=27734.0

Maybe I accidentally didn't give BoE this keyboard permission the first time I launched it.

Anyway, the actual problem is that most of the arrow keys do nothing, and the ones that do something, will actually change which direction they control after repeated use.

NQNStudios commented 4 weeks ago

I went and found the permission thing, enabled it, and the arrow keys are still bonkers.

CelticMinstrel commented 4 weeks ago

I think I already hit the permission thing like last year and refactored arrow handling to not rely on it…

CelticMinstrel commented 4 weeks ago

Oh, I was thinking of #291, which is about modifier keys, not arrows… but the change does touch arrows, so I think my thought was correct.

NQNStudios commented 2 weeks ago

To recap conversation in the IRC: This bug is happening because SFML is not sending key release events for the arrow keys on MacOS. Wild bug, but this is an idea to work around it, which I am thinking will also improve diagonal movement via the arrow keys on the other OSes (#225):

image image