lucassklp / Desktop.Robot

A library used to control your mouse and keyboard programmatically in .NET Core
MIT License
141 stars 24 forks source link

Key.Press not working in macos (ARM) #36

Closed AnnikaJoo closed 1 year ago

AnnikaJoo commented 1 year ago

Hello, In my program I use the command KeyDown(Key.Shift). Everything works fine under Windows. I have now switched to Macos (ARM) and the command throws an exception.

Error Message: System.DllNotFoundException: Unable to load shared library './osx.os' or one of its dependencies. In order to help diagnose loading problems, consider setting the DYLD_PRINT_LIBRARIES environment variable: dlopen(./osx.os, 0x0001): tried: './osx.os' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS./osx.os' (no such file), '/usr/lib/./osx.os' (no such file, not in dyld cache), './osx.os' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')),

Thank u for the help.

lucassklp commented 1 year ago

Thank you! Now I understood the problem, this is related to the architecture. I'll take a look and see how can I work with different architectures and provide one for this case

AnnikaJoo commented 1 year ago

Hi @lucassklp , is there any news or progress already? :)

lucassklp commented 1 year ago

Hello @AnnikaJoo . Unfortunately I cannot develop it, because I am unable to test things, since I don't have any MacOS with ARM architecture. I'd be glad if you could do this. Try to compile https://github.com/lucassklp/Desktop.Robot/blob/main/Desktop.Robot/Source/osx/main.mm in your local machine and tell me if it worked