fix: arrow keys shortcuts for right-to-left languages
This commit is contained in:
1 parent
7e35d7c0e3
commit
33b7094d8f
2 files changed
+8
-2
No files matched your search
@@ -165,6 +165,8 @@ enum Direction {
|
||||
case neutral
|
||||
case left
|
||||
case right
|
||||
case leading
|
||||
case trailing
|
||||
case up
|
||||
case down
|
||||
|
||||
@@ -173,6 +175,10 @@ enum Direction {
|
||||
return -1
|
||||
} else if self == .right {
|
||||
return 1
|
||||
} else if self == .leading {
|
||||
return App.shared.userInterfaceLayoutDirection == .leftToRight ? 1 : -1
|
||||
} else if self == .trailing {
|
||||
return App.shared.userInterfaceLayoutDirection == .leftToRight ? -1 : 1
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
@@ -13,8 +13,8 @@ class GeneralTab: NSViewController, PreferencePane {
|
||||
"holdShortcut": { App.app.focusTarget() },
|
||||
"nextWindowShortcut": { App.app.showUiOrCycleSelection(.right) },
|
||||
"previousWindowShortcut": { App.app.showUiOrCycleSelection(.left) },
|
||||
"→": { App.app.cycleSelection(.right) },
|
||||
"←": { App.app.cycleSelection(.left) },
|
||||
"→": { App.app.cycleSelection(.leading) },
|
||||
"←": { App.app.cycleSelection(.trailing) },
|
||||
"↑": { App.app.cycleSelection(.up) },
|
||||
"↓": { App.app.cycleSelection(.down) },
|
||||
"cancelShortcut": { App.app.hideUi() },
|
||||
|
||||
Reference in new issue
Block a user