mirror of
https://github.com/Minidoracat/mcp-feedback-enhanced.git
synced 2025-07-27 10:42:25 +08:00
✨ 支援主鍵盤和數字鍵盤的 Ctrl+Enter 快捷鍵
This commit is contained in:
parent
0f56c7c5fb
commit
27e48a3a91
@ -1006,9 +1006,13 @@ class FeedbackWindow(QMainWindow):
|
|||||||
|
|
||||||
def _setup_shortcuts(self) -> None:
|
def _setup_shortcuts(self) -> None:
|
||||||
"""設置快捷鍵"""
|
"""設置快捷鍵"""
|
||||||
# Ctrl+Enter 提交回饋
|
# Ctrl+Enter 提交回饋 (支援主鍵盤和數字鍵盤)
|
||||||
submit_shortcut = QShortcut(QKeySequence("Ctrl+Return"), self)
|
submit_shortcut1 = QShortcut(QKeySequence("Ctrl+Return"), self)
|
||||||
submit_shortcut.activated.connect(self._submit_feedback)
|
submit_shortcut1.activated.connect(self._submit_feedback)
|
||||||
|
|
||||||
|
# 數字鍵盤的 Enter 鍵 (Qt.Key_Enter)
|
||||||
|
submit_shortcut2 = QShortcut(QKeySequence("Ctrl+Enter"), self)
|
||||||
|
submit_shortcut2.activated.connect(self._submit_feedback)
|
||||||
|
|
||||||
# Escape 取消
|
# Escape 取消
|
||||||
cancel_shortcut = QShortcut(QKeySequence("Esc"), self)
|
cancel_shortcut = QShortcut(QKeySequence("Esc"), self)
|
||||||
|
@ -19,8 +19,8 @@
|
|||||||
},
|
},
|
||||||
"feedback": {
|
"feedback": {
|
||||||
"title": "Your Feedback",
|
"title": "Your Feedback",
|
||||||
"description": "Please describe your thoughts, suggestions, or changes needed for the AI work results.",
|
"description": "Please describe your thoughts, suggestions, or modifications needed for the AI's work.",
|
||||||
"placeholder": "Please enter your feedback, suggestions, or questions here...\n\n💡 Tips:\n• Press Ctrl+Enter to submit quickly\n• Press Ctrl+V to paste images from clipboard"
|
"placeholder": "Please enter your feedback, suggestions, or questions here...\n\n💡 Tips:\n• Press Ctrl+Enter (numpad supported) to submit quickly\n• Press Ctrl+V to paste images from clipboard"
|
||||||
},
|
},
|
||||||
"command": {
|
"command": {
|
||||||
"title": "Command Execution",
|
"title": "Command Execution",
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
"feedback": {
|
"feedback": {
|
||||||
"title": "您的反馈",
|
"title": "您的反馈",
|
||||||
"description": "请描述您对 AI 工作结果的想法、建议或需要修改的地方。",
|
"description": "请描述您对 AI 工作结果的想法、建议或需要修改的地方。",
|
||||||
"placeholder": "请在这里输入您的反馈、建议或问题...\n\n💡 小提示:\n• 按 Ctrl+Enter 可快速提交反馈\n• 按 Ctrl+V 可直接贴上剪贴板图片"
|
"placeholder": "请在这里输入您的反馈、建议或问题...\n\n💡 小提示:\n• 按 Ctrl+Enter(支持数字键盘)可快速提交反馈\n• 按 Ctrl+V 可直接粘贴剪贴板图片"
|
||||||
},
|
},
|
||||||
"command": {
|
"command": {
|
||||||
"title": "命令执行",
|
"title": "命令执行",
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
"feedback": {
|
"feedback": {
|
||||||
"title": "您的回饋",
|
"title": "您的回饋",
|
||||||
"description": "請描述您對 AI 工作結果的想法、建議或需要修改的地方。",
|
"description": "請描述您對 AI 工作結果的想法、建議或需要修改的地方。",
|
||||||
"placeholder": "請在這裡輸入您的回饋、建議或問題...\n\n💡 小提示:\n• 按 Ctrl+Enter 可快速提交回饋\n• 按 Ctrl+V 可直接貼上剪貼簿圖片"
|
"placeholder": "請在這裡輸入您的回饋、建議或問題...\n\n💡 小提示:\n• 按 Ctrl+Enter(支援數字鍵盤)可快速提交回饋\n• 按 Ctrl+V 可直接貼上剪貼簿圖片"
|
||||||
},
|
},
|
||||||
"command": {
|
"command": {
|
||||||
"title": "命令執行",
|
"title": "命令執行",
|
||||||
|
@ -890,7 +890,8 @@
|
|||||||
|
|
||||||
// 快捷鍵支援
|
// 快捷鍵支援
|
||||||
document.addEventListener('keydown', (e) => {
|
document.addEventListener('keydown', (e) => {
|
||||||
if (e.ctrlKey && e.key === 'Enter') {
|
// 支援主鍵盤和數字鍵盤的 Ctrl+Enter
|
||||||
|
if (e.ctrlKey && (e.key === 'Enter' || e.code === 'NumpadEnter')) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
submitFeedback();
|
submitFeedback();
|
||||||
}
|
}
|
||||||
@ -1045,9 +1046,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function setupKeyboardShortcuts() {
|
function setupKeyboardShortcuts() {
|
||||||
// Ctrl+Enter 快速提交
|
// Ctrl+Enter 快速提交 (支援主鍵盤和數字鍵盤)
|
||||||
document.addEventListener('keydown', function (e) {
|
document.addEventListener('keydown', function (e) {
|
||||||
if (e.ctrlKey && e.key === 'Enter') {
|
if (e.ctrlKey && (e.key === 'Enter' || e.code === 'NumpadEnter')) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
submitFeedback();
|
submitFeedback();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user