<div dir="ltr"><div>Hi all </div><div>The behavior of arrow key (left and right) is incorrect when typing left to right vertical text (Mongolian). </div><div>If press left key the caret will move to right line, and if press right key the caret will move to left line.</div><div>I have reported this bug already at here</div><div><span class="" style="white-space:pre">      </span><a href="https://www.libreoffice.org/bugzilla/show_bug.cgi?id=82795">https://www.libreoffice.org/bugzilla/show_bug.cgi?id=82795</a></div><div><br></div><div>I found that the source code contrlling the behavior of arrow keys is in this file</div><div><span class="" style="white-space:pre">        </span><font face="monospace" size="4">sw\source\core\uibase\docvw\edtwin.cxx</font></div><div>the function is</div><div><span class="" style="white-space:pre">        </span><font face="monospace" size="4">void SwEditWin::KeyInput(const KeyEvent &rKEvt)</font></div><div><br></div><div>For fix this issue, I think the code should be change to below</div><div><br></div><div><span class="" style="white-space:pre">  </span>    <font face="verdana, sans-serif">if( ( bVertText && ( !bTblCrsr || bVertTable ) ) ||</font></div><div><font face="verdana, sans-serif"><span class="" style="white-space:pre">   </span>        ( bTblCrsr && bVertTable ) )</font></div><div><font face="verdana, sans-serif"><span class="" style="white-space:pre">     </span>    {</font></div><div><font face="verdana, sans-serif"><span class="" style="white-space:pre">              </span>bool <b>bIsTblr</b>;//how to detect text direction??</font></div><div><font face="verdana, sans-serif"><span class="" style="white-space:pre">     </span>        // Attempt to integrate cursor travelling for mongolian layout does not work.</font></div><div><font face="verdana, sans-serif"><span class="" style="white-space:pre">    </span>        // Thus, back to previous mapping of cursor keys to direction keys.</font></div><div><font face="verdana, sans-serif"><span class="" style="white-space:pre">      </span>        if( KEY_UP == nKey ) nKey = KEY_LEFT;</font></div><div><font face="verdana, sans-serif"><span class="" style="white-space:pre">    </span>        else if( KEY_DOWN == nKey ) nKey = KEY_RIGHT;</font></div><div><span class="" style="white-space:pre"><font face="verdana, sans-serif">                    </font></span></div><div><font face="verdana, sans-serif"><span class="" style="white-space:pre">                     </span>//----</font></div><div><font face="verdana, sans-serif"><span class="" style="white-space:pre">       </span>        else if( KEY_LEFT == nKey ) </font></div><div><font face="verdana, sans-serif"><span class="" style="white-space:pre">                            </span>nKey = <b>bIsTblr </b>? KEY_UP : KEY_DOWN;</font></div><div><font face="verdana, sans-serif"><span class="" style="white-space:pre">       </span>        else if( KEY_RIGHT == nKey )</font></div><div><font face="verdana, sans-serif"><span class="" style="white-space:pre">                             </span>nKey = <b>bIsTblr </b>? KEY_DOWN : KEY_UP;</font></div><div><font face="verdana, sans-serif"><span class="" style="white-space:pre">                       </span>//----</font></div><div><font face="verdana, sans-serif"><span class="" style="white-space:pre">       </span>    }</font></div><div><br></div><div>But I don't know how to detect the text direction (<b style="font-family:verdana,sans-serif">bIsTblr </b>) at here. Can anybody help me?</div><div>Best regards</div></div>