Skip to content

Commit aff4126

Browse files
dengzhongyuan365-devlzwind
authored andcommitted
fix: Standardize key shortcut for previous tab functionality
- Updated key shortcut from "Ctrl+Shift+Backtab" to "Ctrl+Shift+Tab" in settings.json and related files for consistency. - Adjusted utility function to replace "Backtab" with "Tab" for uniformity in key representation. This change enhances user experience by aligning key shortcuts across the application. bug: https://pms.uniontech.com/bug-view-345247.html
1 parent 2b0bcc8 commit aff4126

3 files changed

Lines changed: 12 additions & 8 deletions

File tree

src/common/utils.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -492,6 +492,10 @@ QString Utils::getKeyshortcut(QKeyEvent *keyEvent)
492492
qDebug() << "keys.value(i).contains(Return)";
493493
keys.replace(i, "Enter");
494494
}
495+
// 与 Return→Enter 同理:统一为常见写法,和配置/显示 "Ctrl+Shift+Tab" 一致
496+
if (keys.value(i) == "Backtab") {
497+
keys.replace(i, "Tab");
498+
}
495499
}
496500

497501
qDebug() << "Exit getKeyshortcut, keys:" << keys.join("+");

src/resources/settings.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@
123123
"key": "selectprevtab",
124124
"name": "Previous tab",
125125
"type": "keySequenceEdit",
126-
"default": "Ctrl+Shift+Backtab"
126+
"default": "Ctrl+Shift+Tab"
127127
},
128128
{
129129
"key": "closetab",
@@ -593,7 +593,7 @@
593593
"key": "selectprevtab",
594594
"hide" : true,
595595
"reset" : false,
596-
"default": "Ctrl+Shift+Backtab"
596+
"default": "Ctrl+Shift+Tab"
597597
},
598598
{
599599
"key": "closetab",
@@ -1087,7 +1087,7 @@
10871087
"key": "selectprevtab",
10881088
"hide" : true,
10891089
"reset" : false,
1090-
"default": "Ctrl+Shift+Backtab"
1090+
"default": "Ctrl+Shift+Tab"
10911091
},
10921092
{
10931093
"key": "closetab",
@@ -1581,7 +1581,7 @@
15811581
"key": "selectprevtab",
15821582
"hide" : true,
15831583
"reset" : false,
1584-
"default": "Ctrl+Shift+Backtab"
1584+
"default": "Ctrl+Shift+Tab"
15851585
},
15861586
{
15871587
"key": "closetab",

src/resources/settings.json.in

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@
123123
"key": "selectprevtab",
124124
"name": "Previous tab",
125125
"type": "keySequenceEdit",
126-
"default": "Ctrl+Shift+Backtab"
126+
"default": "Ctrl+Shift+Tab"
127127
},
128128
{
129129
"key": "closetab",
@@ -593,7 +593,7 @@
593593
"key": "selectprevtab",
594594
"hide" : true,
595595
"reset" : false,
596-
"default": "Ctrl+Shift+Backtab"
596+
"default": "Ctrl+Shift+Tab"
597597
},
598598
{
599599
"key": "closetab",
@@ -1087,7 +1087,7 @@
10871087
"key": "selectprevtab",
10881088
"hide" : true,
10891089
"reset" : false,
1090-
"default": "Ctrl+Shift+Backtab"
1090+
"default": "Ctrl+Shift+Tab"
10911091
},
10921092
{
10931093
"key": "closetab",
@@ -1581,7 +1581,7 @@
15811581
"key": "selectprevtab",
15821582
"hide" : true,
15831583
"reset" : false,
1584-
"default": "Ctrl+Shift+Backtab"
1584+
"default": "Ctrl+Shift+Tab"
15851585
},
15861586
{
15871587
"key": "closetab",

0 commit comments

Comments
 (0)