fix: Throwing focus and hotkeys to QtCreator

This commit is contained in:
Petr Mironychev
2026-05-15 21:27:45 +02:00
parent cc2d42f6d7
commit b1ca6823b8
11 changed files with 129 additions and 26 deletions

View File

@@ -526,15 +526,6 @@ ChatRootView {
}
}
Shortcut {
id: sendMessageShortcut
sequences: ["Ctrl+Return", "Ctrl+Enter"]
context: Qt.WindowShortcut
enabled: messageInput.activeFocus && !Qt.inputMethod.visible && !fileMentionPopup.visible
onActivated: root.sendChatMessage()
}
function clearChat() {
root.clearMessages()
root.clearAttachmentFiles()
@@ -545,6 +536,10 @@ ChatRootView {
Qt.callLater(chatListView.positionViewAtEnd)
}
function focusInput() {
messageInput.forceActiveFocus()
}
function applyMentionSelection() {
var result = fileMentionPopup.applyCurrentSelection(
messageInput.text, messageInput.cursorPosition, root.useTools)
@@ -654,6 +649,6 @@ ChatRootView {
}
Component.onCompleted: {
messageInput.forceActiveFocus()
focusInput()
}
}