diff --git a/src/widget/form/chatform.cpp b/src/widget/form/chatform.cpp index fa7a3b5fe..cf82f8d08 100644 --- a/src/widget/form/chatform.cpp +++ b/src/widget/form/chatform.cpp @@ -58,6 +58,7 @@ #include #include #include +#include #include @@ -221,6 +222,9 @@ ChatForm::ChatForm(Profile& profile_, Friend* chatFriend, IChatLog& chatLog_, setAcceptDrops(true); retranslateUi(); Translator::registerHandler(std::bind(&ChatForm::retranslateUi, this), this); + + // shortcut for mute (SHIFT+ `), (SHIFT + grave accent, gives tilde) + new QShortcut(Qt::SHIFT | 0x60, this, SLOT(onMicMuteShortcutToggle())); } ChatForm::~ChatForm() @@ -458,6 +462,15 @@ void ChatForm::onMicMuteToggle() updateMuteMicButton(); } +void ChatForm::onMicMuteShortcutToggle() +{ + CoreAV* av = core.getAv(); + if (av->isCallActive(f)) + { + onMicMuteToggle(); + } +} + void ChatForm::onVolMuteToggle() { CoreAV* av = core.getAv(); diff --git a/src/widget/form/chatform.h b/src/widget/form/chatform.h index fce66b044..fbd796786 100644 --- a/src/widget/form/chatform.h +++ b/src/widget/form/chatform.h @@ -102,6 +102,7 @@ private slots: void onAnswerCallTriggered(bool video); void onRejectCallTriggered(); void onMicMuteToggle(); + void onMicMuteShortcutToggle(); void onVolMuteToggle(); void onFriendStatusChanged(const ToxPk& friendPk, Status::Status status);