This post explains a feature implemented in the TeamsShortcuts PowerTool: how to trigger Push To Talk via Mouse Click.
Implementation
Main code is implemented in the Teams.ahk Library in the function Teams_PushToTalk function.
Extract below:
Teams_PushToTalk(KeyName:="MButton"){
Cnt := 0
MinCnt := 2
while (GetKeyState(KeyName , "P"))
{
sleep, 100
Cnt += 1
If (Cnt=MinCnt) {
Teams_Mute(0,false)
ToolTip("Teams PushToTalk on...",2000)
Tray_Icon_On := "HBITMAP:*" . Create_Mic_On_ico()
;Tray_Icon_Off := "HBITMAP:*" . Create_Mic_Off_ico()
Menu, Tray, Icon, %Tray_Icon_On%
}
}
If (Cnt>MinCnt) {
Teams_Mute(1,false)
Tooltip("Teams PushToTalk off...",2000)
IcoFile := PathX(A_ScriptFullPath, "Ext:.ico").Full
If (FileExist(IcoFile))
Menu,Tray,Icon, %IcoFile%
} Else
Teams_Mute()
} ; eofun
Demo / Screencast
Teams Shortcuts PowerTool Usage
Middle mouse click on the Tray icon - Long press will trigger Push-To-Talk
Tray Icon is changed to a green mic when active.
The meeting window does not have to be active contrary to the built-in PTT functionality with Ctrl+Space.
No comments:
Post a Comment