diff --git a/MTMR/Info.plist b/MTMR/Info.plist
index dccd38a..a27c2b9 100644
--- a/MTMR/Info.plist
+++ b/MTMR/Info.plist
@@ -17,9 +17,13 @@
CFBundlePackageType
APPL
CFBundleShortVersionString
- 0.20.3
+ 0.20.1
CFBundleVersion
+<<<<<<< HEAD
250
+=======
+ 185
+>>>>>>> origin/master
LSApplicationCategoryType
public.app-category.utilities
LSMinimumSystemVersion
diff --git a/MTMR/ItemsParsing.swift b/MTMR/ItemsParsing.swift
index 0adf2a5..9179a56 100644
--- a/MTMR/ItemsParsing.swift
+++ b/MTMR/ItemsParsing.swift
@@ -51,7 +51,7 @@ class SupportedTypesHolder {
private var supportedTypes: [String: ParametersDecoder] = [
"escape": { _ in (
item: .staticButton(title: "esc"),
- action: .keyPressSession(keycode: 53),
+ action: .keyPress(keycode: 53),
longAction: .none,
parameters: [.align: .align(.left)]
) },
@@ -452,7 +452,7 @@ enum ItemType: Decodable {
let workTime = try container.decodeIfPresent(Double.self, forKey: .workTime) ?? 1500.0
let restTime = try container.decodeIfPresent(Double.self, forKey: .restTime) ?? 600.0
self = .pomodoro(workTime: workTime, restTime: restTime)
-
+
case .network:
let flip = try container.decodeIfPresent(Bool.self, forKey: .flip) ?? false
self = .network(flip: flip)
@@ -464,7 +464,6 @@ enum ActionType: Decodable {
case none
case hidKey(keycode: Int32)
case keyPress(keycode: Int)
- case keyPressSession(keycode: Int)
case appleScript(source: SourceProtocol)
case shellScript(executable: String, parameters: [String])
case custom(closure: () -> Void)
diff --git a/MTMR/KeyPress.swift b/MTMR/KeyPress.swift
index c88b49f..1f68768 100644
--- a/MTMR/KeyPress.swift
+++ b/MTMR/KeyPress.swift
@@ -27,16 +27,6 @@ extension KeyPress {
keyDown?.post(tap: loc)
keyUp?.post(tap: loc)
}
-
- func sendSession() {
- let src = CGEventSource(stateID: .hidSystemState)
- let keyDown = CGEvent(keyboardEventSource: src, virtualKey: keyCode, keyDown: true)
- let keyUp = CGEvent(keyboardEventSource: src, virtualKey: keyCode, keyDown: false)
-
- let loc: CGEventTapLocation = .cgAnnotatedSessionEventTap
- keyDown?.post(tap: loc)
- keyUp?.post(tap: loc)
- }
}
func HIDPostAuxKey(_ key: Int32) {
diff --git a/MTMR/TouchBarController.swift b/MTMR/TouchBarController.swift
index 1384a81..c771b24 100644
--- a/MTMR/TouchBarController.swift
+++ b/MTMR/TouchBarController.swift
@@ -319,8 +319,6 @@ class TouchBarController: NSObject, NSTouchBarDelegate {
return { HIDPostAuxKey(keycode) }
case let .keyPress(keycode: keycode):
return { GenericKeyPress(keyCode: CGKeyCode(keycode)).send() }
- case let .keyPressSession(keycode: keycode):
- return { GenericKeyPress(keyCode: CGKeyCode(keycode)).sendSession() }
case let .appleScript(source: source):
guard let appleScript = source.appleScript else {
print("cannot create apple script for item \(item)")
diff --git a/MTMRTests/ParseConfigTests.swift b/MTMRTests/ParseConfigTests.swift
index ebea8a5..a3321cc 100644
--- a/MTMRTests/ParseConfigTests.swift
+++ b/MTMRTests/ParseConfigTests.swift
@@ -40,7 +40,7 @@ class ParseConfig: XCTestCase {
XCTFail()
return
}
- guard case .keyPressSession(keycode: 53)? = result?.first?.action else {
+ guard case .keyPress(keycode: 53)? = result?.first?.action else {
XCTFail()
return
}
@@ -55,7 +55,7 @@ class ParseConfig: XCTestCase {
XCTFail()
return
}
- guard case .keyPressSession(keycode: 53)? = result?.first?.action else {
+ guard case .keyPress(keycode: 53)? = result?.first?.action else {
XCTFail()
return
}