| Age | Commit message (Collapse) | Author | 
|---|
|  |  | 
|  | * Commented code is no longer needed
* Commented reference constants have served their purpose | 
|  |  | 
|  | Get rid of the temporary name and give it a more permanent one. I had
actually written this test thinking it would be temporary and that I
would remove it later. Since it will actually launch iTunes by default
due to RCD, this test shouldn't be in the normal suite. However, it
seemed like it would be useful to keep it around in case, so leaving it
with an ignore skip. | 
|  | `dkess_press_key()` now takes a `CGEventFlags` instead of an int. | 
|  | Add this new key type to the enum and enable it to be `tap()`ped like
the others.
Made `NXKey` a type alias instead of a struct to allow us to refer to
any of the NX key constants using the `NXKey` type. This also meant
moving those NX constants outside of the `NXKey` impl and into the top
level. May end up wrapping them back up in some kind of namespace later.
Adjusted the public-ness of some functions to support this change. | 
|  |  | 
|  | These keys get pressed using the special media key simulator Objective-C
library. | 
|  |  | 
|  | Added a build of `libdome_key_event_source_simulator.a` to the root of
the project to test running the function from Rust. Works. Needs to be
built with custom `RUSTFLAGS` in order to build:
    $ RUSTFLAGS="-L ." cargo test dktest
We'll need to figure out how to add this to the Rust build script.
Now that we know it works, we can integrate the static library more
permanently into the project. | 
|  | Not fully worked out yet. The idea is to somehow wrap 'autopilot' keys
and special `ev_keymap.h` keys. | 
|  | Can't deal with segfaults any more. This code will be moved to
Objective-C. | 
|  | Segfaults on key_code.rs:184:
    error: process didn't exit successfully: `.../dome-key-map/target/debug/deps/dome_key_map-0efa5c8428fad354 send_media_key --nocapture` (signal: 11, SIGSEGV: invalid memory reference)
    shell returned 101
This is my attempt to use first the 'cocoa' and 'core-graphics' crates,
then the 'objc' crate (because I hoped that would get around the
segfault), to simulate a media key event.
Once I got the types right and the code compiling, I couldn't get past
segfaults. After struggling with this for over a day and not being able
to figure out what on earth is going on, I wrote the exact same thing in
Objective-C and it just worked. That's it, I'm done with this. This code
is going to be expunged and I'm going to take a C function pointer in
the function that runs map actions that will simulate media key presses
in real Cocoa/Carbon. Enough of this headache. | 
|  | Media keys (rewind, play/pause, fast forward on Mac function keys) are
different from normal keys. These use a different API, and sending
events to simulate those keys is different.
Here's a first stab at getting something working for posting simulated
media key events. This will be used for new special keys in mapping
actions. Haven't tested this at all yet, just happy that it finally
compiles.
Follow the two Stack Overflow answers referenced in the comments (from
Albert https://stackoverflow.com/users/133374/albert and Nick Sweeting
https://stackoverflow.com/users/2156113/nick-sweeting).
Add the `core-graphics` crate to give us access to `CGEvent`,
`CGKeyCode`, and related types.
Also include some commented `CGKeyCode` definitions for future use. |