Bench: edits timed at the drawn tile; per-cycle document counts; posted chords
This commit is contained in:
7 files changed
+93
-30
No files matched your search
@@ -0,0 +1,14 @@
|
||||
// Posts Command plus a key to one process, flag included.
|
||||
import CoreGraphics
|
||||
import Foundation
|
||||
|
||||
// chord <pid> <virtual key code>
|
||||
let pid = pid_t(CommandLine.arguments[1])!
|
||||
let code = CGKeyCode(CommandLine.arguments[2])!
|
||||
let source = CGEventSource(stateID: .privateState)
|
||||
for down in [true, false] {
|
||||
let event = CGEvent(keyboardEventSource: source, virtualKey: code, keyDown: down)!
|
||||
event.flags = .maskCommand
|
||||
event.postToPid(pid)
|
||||
usleep(30_000)
|
||||
}
|
||||
Reference in new issue
Block a user