{"title":"Keychron K8 Microphone Button to Microsoft Teams Mute","rules":[{"description":"Focus Microsoft Teams Meeting Manager Window","manipulators":[{"from":{"modifiers":{"mandatory":["fn"]},"key_code":"spacebar"},"conditions":[{"type":"frontmost_application_unless","bundle_identifiers":["com.microsoft.teams"]}],"to":[{"shell_command":"if [ $(ps aux | grep -v grep | grep -ci \"Microsoft Teams.app/Contents/Frameworks/Microsoft Teams Helper.app\") -gt 0 ]; then osascript -e 'activate application id \"com.microsoft.teams\"' -e 'tell application \"System Events\" to keystroke \"m\" using {command down, shift down}'; fi","lazy":true,"repeat":true}],"type":"basic"}]},{"description":"Change Fn + Spacebar to Shift + Cmd + A","manipulators":[{"type":"basic","from":{"modifiers":{"mandatory":["fn"]},"key_code":"spacebar"},"conditions":[{"type":"frontmost_application_if","bundle_identifiers":["^com\\.microsoft\\.teams$"]}],"to":[{"key_code":"m","modifiers":["left_shift","left_gui"]}]}]}]}