Coder Social home page Coder Social logo

loupedeck-applescripts's Introduction

Overview

This repository contains various AppleScripts that add pseudo global hotkey / shortcut support for Microsoft Teams. I use these scripts with an Elgato Stream Deck to toggle mute, toggle video, and leave a meeting anywhere in MacOS.

If/when Microsoft adds global hotkey / shortcut support to Teams, these AppleScripts will be unnecessary.

There are three AppleScripts included here bringing the following functionality to Microsoft Teams:

  • Global mute toggle (Shift + ⌘ + M)
  • Global video toggle (Shift + ⌘ + O)
  • Global leave meeting (Shift + ⌘ + H)
  • Global toggle sharing (Shift + ⌘ + E)

I've commented each AppleScript thoroughly so it should easy to understand what each script is doing. Essentially, each script simply switches the focus to Microsoft Teams, sends the hotkey, and then switches back to the application that was in focus previously.

Usage

The .applescript files are the plaintext AppleScripts and there are corresponding compiled .scpt versions for each script. You can execute either version but executing the compiled .scpt version is technically more performant.

The way in which I use these AppleScripts are via an Loupedeck S+. Using the LoupeDeck, create a button with a Assign Custom action and select AppleScript. In the dialog box the 'App / File' field to the full path of the .scpt file. I've also included the icons I use for my buttons (see the icon-*.png files in this repository). Note that Loupedeck will need the Automation persmission under MacOS System Preferences > Security & Privacy > Automation. The first time you press the Loupedeck button MacOS should prompt you to grant this permission to Loupedeck.

Notes

Scott Hanselman wrote a blog post using a Stream Deck to issue Microsoft Teams hotkeys but it relies upon Teams being the active application. His blog post was the first I came across when I was searching for existing solutions.

Greg Sheridan wrote a similar blog post but it was specific to Windows whereas I was looking for a MacOS solution.

Jesse Riddle wrote a MacOS specific blog post on muting your microphone anywhere in MacOS and is what sent me down the path of AppleScript. However, Jesse's post uses the MacOS Automator and the latest privacy and security controls in MacOS make this Automater untenable for this specific use case. Namely, every single MacOS application would need the Automation permission (aka System Events). The method I ultimately landed on requires just Stream Deck to have this permission.

Contributions

I welcome any contributions via pull requests -- especially fixes for edge cases I have not accounted for.

License

Copyright 2021 Kevin Shekleton

Modifed code in this repository from orginal source

Copyright 2022 Justin McDowell

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

loupedeck-applescripts's People

Contributors

jfmcdowell avatar kpshek avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.