Skip to content

Commit

Permalink
style: remove bad prints
Browse files Browse the repository at this point in the history
  • Loading branch information
Fritiof Rusck committed Jan 28, 2022
1 parent 44c28ce commit 00e1e76
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Tajpi/KeyboardInterception/KeyboardInterception.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ private var loopSource: CFRunLoopSource? = nil;
private var eventTap: CFMachPort? = nil;

func startKeyboardInterception() -> Bool {
print("START")

// This code is hard to understand, and that's because these low level api's are often very confusing
// What this function does is starting an "event listener" which listens for keypress events
// If it can't do that it'll start a DispatchQueue and try again 300 miliseconds later
Expand Down Expand Up @@ -51,7 +51,7 @@ func startKeyboardInterception() -> Bool {
}

func stopKeyboardInterception() {
print("STOP");

if let port = eventTap {
CGEvent.tapEnable(tap: port, enable: false)
}
Expand Down
4 changes: 2 additions & 2 deletions Tajpi/Privlige/requestPrivilege.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ func pollAccessibility() {

Timer.scheduledTimer(withTimeInterval: 0.3, repeats: true) { (t) in
let hasPrivilegeNew = AXIsProcessTrusted();
print(hasPrivilegeNew);


if hasPrivilegeNew && !hasPrivilege {
hasPrivilege = true;
let worked = startKeyboardInterception();
print(worked)

delegate.rerender();
}

Expand Down

0 comments on commit 00e1e76

Please sign in to comment.