Bug 453933

Summary: Navigation moves reversely in RTL mode using arrow keys
Product: [Applications] dolphin Reporter: cr3ins
Component: generalAssignee: Dolphin Bug Assignee <dolphin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: kfm-devel, mskf1383, sh.yaron
Priority: NOR Keywords: rtl
Version: 22.04.0   
Target Milestone: ---   
Platform: Manjaro   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description cr3ins 2022-05-17 12:00:57 UTC
SUMMARY
***
When you try to move the focus when navigating in files using arrow keys, it moves reversely. For example, when you press right arrow the focus moves to left, and also up and down keys, moves to right and left.
***


STEPS TO REPRODUCE
1. open dolphin in RTL mode.
2. try to navigate in folders or files by key arrows.

OBSERVED RESULT
When you press left key the focus will navigate to the files or folder in the right. 
When you press right key the focus will navigate to the files or folder in the left. 
When you press up the focus will navigate the file in the right.
When you press down the focus will navigate the file in the left.

EXPECTED RESULT
When you press left key the focus will navigate to the files or folder in the left. 
When you press right key the focus will navigate to the files or folder in the right. 
When you press up the focus will navigate the file in the up.
When you press down the focus will navigate the file in the down.

SOFTWARE/OS VERSIONS
Linux: 5.15.38-1-MANJARO 
(available in About System)
KDE Plasma Version: 5.24.5
KDE Frameworks Version: 5.93.0
Qt Version: 5.15.3

ADDITIONAL INFORMATION
locale 
LANG=ar_MA.UTF-8
LC_CTYPE="ar_MA.UTF-8"
LC_NUMERIC="ar_MA.UTF-8"
LC_TIME="ar_MA.UTF-8"
LC_COLLATE="ar_MA.UTF-8"
LC_MONETARY="ar_MA.UTF-8"
LC_MESSAGES="ar_MA.UTF-8"
LC_PAPER="ar_MA.UTF-8"
LC_NAME="ar_MA.UTF-8"
LC_ADDRESS="ar_MA.UTF-8"
LC_TELEPHONE="ar_MA.UTF-8"
LC_MEASUREMENT="ar_MA.UTF-8"
LC_IDENTIFICATION="ar_MA.UTF-8"
LC_ALL=
Comment 1 MohammadSaleh Kamyab 2022-06-17 07:28:41 UTC
I Confirm this.
Dolphin 22.04.1 on Debian testing
Comment 2 Bug Janitor Service 2024-01-12 15:05:33 UTC
A possibly relevant merge request was started @ https://invent.kde.org/system/dolphin/-/merge_requests/700
Comment 3 Felix Ernst 2024-01-30 16:17:13 UTC
Git commit 03de142a799815e2259aa75831cbbd3154a02942 by Felix Ernst, on behalf of Felix Ernst.
Committed on 30/01/2024 at 16:08.
Pushed by felixernst into branch 'master'.

Improve arrow key navigation for right-to-left languages

While using right-to-left languages most of Dolphin is mirrored.
However, the logic of what happens when the arrow keys are pressed to
move between items in the main view was never adapted to account for
that. Basically nothing works as expected because of this. It's more
like dealing with a psychopath who misinterprets every command you give:
Left is right, right is left, up is most of the time right but sometimes
not, down is most the time left but sometimes not.

This commit fixes and adapts the logic if a right-to-left layout is used.
This fully fixes icon view mode and improves compact view mode, though
compact view mode still has more issues which aren't addressed here.

This work for the benefit of the minority that use right-to-left
languages both in Europe and the world is sponsored by NLnet and the
European Commission which I think is beautfiul.

M  +28   -4    src/kitemviews/kitemlistcontroller.cpp

https://invent.kde.org/system/dolphin/-/commit/03de142a799815e2259aa75831cbbd3154a02942
Comment 4 Yaron Shahrabani 2024-01-30 19:05:00 UTC
Great! Can't wait to see it in action.