Task:
From the phone (iOS) send a signal to the computer (OSX) and simulate pressing a hot key there ...
Question:
- Is it possible to do this WITHOUT a signal receiving program? If so, how? (as far as I know, there is a fairly close interaction of the axes on the phone and the computer, so I admit that there is such a possibility). If there is no such possibility ...
- How do you advise to start? How to implement a signal transfer to a computer paired with a telephone (into a receiver program)? How to realize maximum energy conservation? (For example, using bluetooth or something else)
Purely for yourself (unimportant information, you can not read):
Simulate keystrokes in Swift 3:
let src = CGEventSource(stateID: CGEventSourceStateID.hidSystemState) let cmdd = CGEvent(keyboardEventSource: src, virtualKey: 0x38, keyDown: true) let cmdu = CGEvent(keyboardEventSource: src, virtualKey: 0x38, keyDown: false) let spcd = CGEvent(keyboardEventSource: src, virtualKey: 0x31, keyDown: true) let spcu = CGEvent(keyboardEventSource: src, virtualKey: 0x31, keyDown: false) spcd?.flags = CGEventFlags.maskCommand; let loc = CGEventTapLocation.cghidEventTap cmdd?.post(tap: loc) spcd?.post(tap: loc) spcu?.post(tap: loc) cmdu?.post(tap: loc) And on the link is a fairly large list of digit-key values.