dobidi / logseq-bidi

A Logseq plugin for adding bidirectional text support, making knowledge management in both LTR and RTL languages possible
GNU Affero General Public License v3.0
27 stars 1 forks source link

Different behaviour in Mac between RTL and LTR, when using CMD + left/right and OPT + left/right #18

Open glicksman opened 1 month ago

glicksman commented 1 month ago

Hi,

The correct behaviour is when the block is LTR:

  1. CMD + left arrow = Home (move cursor to start of block)
  2. CMD + right arrow = End (move cursor to end of block)
  3. OPT + left arrow = move cursor one word backwards
  4. OPT + right arrow = move cursor one word forwards

However, when the block is in RTL mode, this doesn't work.

Ideally, this will be implemented similarly to the LTR behaviour, but with the arrows switched, i.e.:

  1. CMD + left arrow = End (move cursor to end of block)
  2. CMD + right arrow = Home (move cursor to start of block)
  3. OPT + left arrow = move cursor one word forwards
  4. OPT + right arrow = move cursor one word backwards

@ahangarha, I would be happy to tip money to have this implemented

ahangarha commented 1 month ago

Thanks for sharing the issue.

Let's clarify the issue. What is the current behavior?

  1. The key combination doesn't work at all (the cursor doesn't move on RTL text)
  2. The key combination works but is opposite to the expected direction.
glicksman commented 1 month ago

The current behaviour is what you described in option 1. The key combo doesn't work at all.

e.g. when I press CMD + right arrow, it goes just one char to the right (and not to the edge of the block), as if I only pressed on the right arrow.

On Wed, May 8 2024 at 1:01 PM, Mostafa Ahangarha @.***> wrote:

Thanks for sharing the issue.

Let's clarify the issue. What is the current behavior?

  1. The key combination doesn't work at all (the cursor doesn't move on RTL text)
  2. The key combination works but is opposite to the expected direction.

— Reply to this email directly, view it on GitHub https://github.com/dobidi/logseq-bidi/issues/18#issuecomment-2100216161, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYROFY3KQ7HODHKNE3QQA3DZBHZWFAVCNFSM6AAAAABHJ2BYPKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBQGIYTMMJWGE . You are receiving this because you authored the thread.Message ID: @.***>