Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
朱子楚\zhuzi committed Dec 4, 2023
1 parent 46148b3 commit bc0c367
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 34 deletions.
35 changes: 18 additions & 17 deletions src/Qt5/imports/FluentUI/Controls/FluShortcutPicker.qml
Original file line number Diff line number Diff line change
Expand Up @@ -189,24 +189,25 @@ FluIconButton {
forceActiveFocus()
}
Keys.enabled: true
Keys.onPressed: {
var keyNames = []
if (event.modifiers & Qt.AltModifier) {
keyNames.push("Alt")
}
if (event.modifiers & Qt.ControlModifier) {
keyNames.push("Ctrl")
}
if (event.modifiers & Qt.ShiftModifier) {
keyNames.push("Shift")
}
var keyName = d.keyToString(event.key,false)
if(keyName!==""){
keyNames.push(keyName)
content_dialog.keysModel = keyNames
Keys.onPressed:
(event)=>{
var keyNames = []
if (event.modifiers & Qt.AltModifier) {
keyNames.push("Alt")
}
if (event.modifiers & Qt.ControlModifier) {
keyNames.push("Ctrl")
}
if (event.modifiers & Qt.ShiftModifier) {
keyNames.push("Shift")
}
var keyName = d.keyToString(event.key,false)
if(keyName!==""){
keyNames.push(keyName)
content_dialog.keysModel = keyNames
}
event.accepted = true
}
event.accepted = true
}
Keys.onTabPressed:
(event)=>{
event.accepted = true
Expand Down
35 changes: 18 additions & 17 deletions src/Qt6/imports/FluentUI/Controls/FluShortcutPicker.qml
Original file line number Diff line number Diff line change
Expand Up @@ -189,24 +189,25 @@ FluIconButton {
forceActiveFocus()
}
Keys.enabled: true
Keys.onPressed: {
var keyNames = []
if (event.modifiers & Qt.AltModifier) {
keyNames.push("Alt")
}
if (event.modifiers & Qt.ControlModifier) {
keyNames.push("Ctrl")
}
if (event.modifiers & Qt.ShiftModifier) {
keyNames.push("Shift")
}
var keyName = d.keyToString(event.key,false)
if(keyName!==""){
keyNames.push(keyName)
content_dialog.keysModel = keyNames
Keys.onPressed:
(event)=>{
var keyNames = []
if (event.modifiers & Qt.AltModifier) {
keyNames.push("Alt")
}
if (event.modifiers & Qt.ControlModifier) {
keyNames.push("Ctrl")
}
if (event.modifiers & Qt.ShiftModifier) {
keyNames.push("Shift")
}
var keyName = d.keyToString(event.key,false)
if(keyName!==""){
keyNames.push(keyName)
content_dialog.keysModel = keyNames
}
event.accepted = true
}
event.accepted = true
}
Keys.onTabPressed:
(event)=>{
event.accepted = true
Expand Down

0 comments on commit bc0c367

Please sign in to comment.