Arabic text - Left/Right Arrow keys

General TRichView support forum. Please post your questions here
Post Reply
Graham
Posts: 64
Joined: Sun Jan 27, 2013 7:51 pm
Location: Berkshire U.K.

Arabic text - Left/Right Arrow keys

Post by Graham »

Left/Right Arrow keys seem to work in the wrong direction when on Arabic text.
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Left and right keys direction are reversed only in paragraphs having BiDiMode=rvbdRightToLeft
Graham
Posts: 64
Joined: Sun Jan 27, 2013 7:51 pm
Location: Berkshire U.K.

Post by Graham »

You have done it the same as WordPad, however Microsoft Word does it correctly and is more logical.
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

How do you want these keys to work? Can you describe?
Graham
Posts: 64
Joined: Sun Jan 27, 2013 7:51 pm
Location: Berkshire U.K.

Post by Graham »

Just updated to RichView V14.3 so at least we are all on the same page.

There are two issues:

1: Right Justified Text:

Type some Arabic followed by some English all on the same line.
Go back to the start of the line, caret is now on the right hand side of the screen. The Left Arrow key should now make the caret move to the left along the reading order of the text. When you get to the English text, the caret should hop the start of this text run and then move to the right again following the reading order of the text. You just have the Left/Right Arrow keys swapped for Right Justified text.

2: Left Justified Text:

English text followed by Arabic on the same line works correctly regarding the caret movement and the Left/Right Arrow keys.
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

So, do you suggest following the order the text is displayed, ignoring the order the characters are entered (typed)?
Too complicated, and not necessary a good option...
Graham
Posts: 64
Joined: Sun Jan 27, 2013 7:51 pm
Location: Berkshire U.K.

Post by Graham »

If the text is right justified the "left" arrow key should move the caret in reading direction of the text. Use Word 2010 as the reference. I think all you need to do is swap the left and right arrow keys when the text is right justified.

Also there is a minor issue when typing space characters on lines of mixed text. The space character hops back to the start of the line until another character is typed. This is probably down to the use of GetCharacterPlacement which should get resolved when Uniscribe is implemented. A lot of editors suffer from this.
Post Reply