Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keyboard shortcut to answer/hangup? [feature-request] #882

Open
SummerSeaSun opened this issue Mar 7, 2025 · 0 comments
Open

Keyboard shortcut to answer/hangup? [feature-request] #882

SummerSeaSun opened this issue Mar 7, 2025 · 0 comments

Comments

@SummerSeaSun
Copy link

Dear Sirs,

I'm wondering if you ever considered the possibility to add a custom keyboard event i.e CTRL+R to answer instead of clicking on the green icon (and CTRL+R again while in call to hangup).

I'm trying to figure out how to add this but my knowledge is too limited, can you help to make this edits, I've cloned the repo and tried to add these lines ./linphone-desktop/Linphone/core/call/CallGui.cpp would it be the right place ?


void CallGui::handleAnswerShortcut() {
    if (mCore && mCore->isInCall()) {
        QMetaObject::invokeMethod(mCore.get(), "answerCall", Qt::QueuedConnection);
    }
}


void CallGui::keyPressEvent(QKeyEvent *event) {
    if (event->modifiers() == Qt::ControlModifier && event->key() == Qt::Key_R) {  // CTRL + R to answer
        handleAnswerShortcut();
    }
    else {
        QWidget::keyPressEvent(event);
    }
}


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant