I tried on MacOS. It works
Some remarks: when pressing a key, the system sound for unhandled key is played. You can void this by setting Key to 0 in the event handlers. You may want to do something more subtle, like setting to 0 if the key is recognized. Otherwise shortcut to menus don't work anymore.
procedure TForm1.DoOnKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
begin
AddKeyEventToQueue(Key, True);
Key := 0;
end;
procedure TForm1.DoOnKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState);
begin
AddKeyEventToQueue(Key, False);
Key := 0;
end;
To get sound, I installed PortAudio using brew:
The screen size is not saved, and on my screen, the starting size is too small. I suggest either to set a bigger size on startup for MacOS or to save the size of the screen in the config.
I am glad you used my library BGRABitmap.