Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified Release/Plugin
Binary file not shown.
Binary file added Release/images/accept.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Release/images/decline.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Release/images/hand.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Release/images/hand_raised.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
42 changes: 41 additions & 1 deletion Release/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,47 @@
],
"Tooltip": "Leave the current call",
"UUID": "com.doten.teams.end"
}
},
{
"Icon": "images/decline",
"Name": "Decline Call",
"States": [
{
"Image": "images/decline",
"Name": "decline"
}
],
"Tooltip": "Decline incoming call",
"UUID": "com.doten.teams.decline"
},
{
"Icon": "images/accept",
"Name": "Accept Call",
"States": [
{
"Image": "images/accept",
"Name": "accept"
}
],
"Tooltip": "Accept incoming call",
"UUID": "com.doten.teams.accept"
},
{
"Icon": "images/hand",
"Name": "Toggle Raise Hand",
"States": [
{
"Image": "images/hand_raised",
"Name": "Raised"
},
{
"Image": "images/hand",
"Name": "Not raised"
}
],
"Tooltip": "Toggle Raise Hand",
"UUID": "com.doten.teams.raisehand"
}
],
"SDKVersion": 2,
"Author": "Mark Doten",
Expand Down
19 changes: 16 additions & 3 deletions Sources/Plugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,23 @@ public class Plugin: NSObject, ESDEventsProtocol {
keystroke = #"keystroke "e" using {shift down, command down}"#
break;
case "com.doten.teams.end":
keystroke = #"keystroke "b" using {shift down, command down}"#
keystroke = #"keystroke "h" using {shift down, command down}"#
break;
case "com.doten.teams.accept":
keystroke = #"keystroke "s" using {shift down, command down}"#
break;
case "com.doten.teams.decline":
keystroke = #"keystroke "d" using {shift down, command down}"#
break;
case "com.doten.teams.raisehand":
keystroke = #"keystroke "k" using {shift down, command down}"#
break;
default:
NSLog("unkown action: \(action)");
break;
}

executeAppleScript(source: """
let script = """
set appName to "\(appName)"

if application appName is running
Expand All @@ -62,7 +73,9 @@ public class Plugin: NSObject, ESDEventsProtocol {
activate
end tell
end if
""")
"""
// NSLog("Script: \(script)")
executeAppleScript(source: script)
}

public func keyUp(forAction action: String, withContext context: Any, withPayload payload: [AnyHashable : Any], forDevice deviceID: String) {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Sources/com.doten.teams.sdPlugin/images/hand.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
42 changes: 41 additions & 1 deletion Sources/com.doten.teams.sdPlugin/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,47 @@
],
"Tooltip": "Leave the current call",
"UUID": "com.doten.teams.end"
}
},
{
"Icon": "images/decline",
"Name": "Decline Call",
"States": [
{
"Image": "images/decline",
"Name": "decline"
}
],
"Tooltip": "Decline incoming call",
"UUID": "com.doten.teams.decline"
},
{
"Icon": "images/accept",
"Name": "Accept Call",
"States": [
{
"Image": "images/accept",
"Name": "accept"
}
],
"Tooltip": "Accept incoming call",
"UUID": "com.doten.teams.accept"
},
{
"Icon": "images/hand",
"Name": "Toggle Raise Hand",
"States": [
{
"Image": "images/hand_raised",
"Name": "Raised"
},
{
"Image": "images/hand",
"Name": "Not raised"
}
],
"Tooltip": "Toggle Raise Hand",
"UUID": "com.doten.teams.raisehand"
}
],
"SDKVersion": 2,
"Author": "Mark Doten",
Expand Down