aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2018-12-12Merge branch 'MPL-license'HEADmasterTeddy Wing
2018-12-12Relicense under the Mozilla Public License v. 2.0Teddy Wing
2018-11-21Add READMEv1.0Teddy Wing
2018-11-21Add licenseTeddy Wing
2018-11-04Makefile: Add `build-release` targetTeddy Wing
Build a release version of the library. To get these recipies, did what I did before for the debug ones. Ran $ xcodebuild -scheme dome_key_event_source_simulator -configuration Release and copy-pasted the result, with these changes: * Removed "sysroot"-related arguments (for Rust integration) * Changed absolute paths to use `${HOME}` * Replaced DerivedData directory path hash with `*`
2018-10-15Change Cocoa import to be more specificTeddy Wing
Instead of including Cocoa as a whole, include the specific frameworks that the library depends on. `NSEvent` is in `AppKit` and `CGEvent` etc. is in `CoreGraphics`.
2018-10-15Makefile: Move `xcodebuild` steps into MakeTeddy Wing
I needed to remove the `-isysroot` compiler flag in order to get the static library to build in my Rust project without the ld: framework not found ColorSync for architecture x86_64 linker error (which is apparently caused by the fact that I'm building against a 10.13 SDK on a machine running 10.12, since ColorSync exists only on 10.13). Not sure if there's a way to have Xcode not use the `-isysroot` flag and let us continue to build using `xcodebuild`. Just copy-pasted the build output including exported environment variables. I removed machine-specific things like absolute paths to my home directory and the hash after the DerivedData directory. Not very clean, but it seems to work.
2018-10-15Fix memory errorTeddy Wing
Thanks to Xcode's analyser, I was finally clued into the fact that this `CFRelease` was freeing a non-owned object, resulting in an extra free. Remove this to resolve our memory management problems.
2018-10-15Makefile: Add a `clean` targetTeddy Wing
2018-10-15Turn off ARCTeddy Wing
I'm getting a SIGTERM or segfault when running the library code from Rust, so let's turn off ARC just in case and handle memory management manually.
2018-10-15Change deployment target to OS X 10.6Teddy Wing
Allow this to work on earlier OSes.
2018-10-14Change the deployment target from Mac OS X 10.12 to 10.6Teddy Wing
No reason to restrict the platforms this can run on.
2018-10-14Use OS-independent `NSSystemDefined` & `NSScreenChangedEventType`Teddy Wing
Those variants are deprecated starting in Mac OS 10.12. Use the new ones for 10.12+ and the old ones otherwise.
2018-10-14Add modifier flag capabilityTeddy Wing
Test with Option-SoundDown, which opens the Sound System Preferences panel.
2018-10-14Get rid of unused Objective-C classTeddy Wing
2018-10-14Remove hard-coded play keyTeddy Wing
Allow any special key to be simulated.
2018-10-14Change whitespaceTeddy Wing
Change from Objective-C-style indentation to simple tabbing indentation. The `:`s weren't aligned with the first one since I added the assignment (which maybe was in a different repository). Just don't bother with colon alignment to keep the code under 80 columns.
2018-10-14Fix key down key up flagsTeddy Wing
When I consolidated the key down and key up code in 289639a636881d79b76d260b775b7a6cf0b51f7b the key simulation stopped working. Fix this by altering the type of the array used to store the flag values and putting them in a single array literal.
2018-10-14Makefile: Rebuild when Objective-C sources changeTeddy Wing
Makes the edit-compile cycle faster.
2018-10-14Add include guard to header fileTeddy Wing
2018-10-14Makefile: Use a more generic Mac OS SDKTeddy Wing
Instead of hard-coding the 10.13 SDK.
2018-10-14Add a C test file to test linking and the lib functionTeddy Wing
Once I got linking working, this confirms that the key simulator function actually works. Beef up the Makefile to enable us to properly link the Objective-C library.
2018-10-14Remove repetition in key down and key up eventsTeddy Wing
2018-10-14Test code to press the "play" media keyTeddy Wing
Based on code from Albert https://stackoverflow.com/users/133374/albert and Nick Sweeting https://stackoverflow.com/users/2156113/nick-sweeting on Stack Overflow: - https://stackoverflow.com/questions/11045814/emulate-media-key-press-on-mac/11048135#11048135 - https://stackoverflow.com/questions/10459085/cocoa-simulate-macbook-upper-keys-multimedia-keys/50574159#50574159 Simulates a key press of the "play" media key. Going to adapt this to a generic function.
2018-10-14Add MakefileTeddy Wing
Basic development build rule.
2018-10-14New Xcode Cocoa static library projectTeddy Wing
Initialised with Xcode version 9.2 (9C40b).