[LyX/master] Respect OS-level keyboard language

Scott Kostyshak skostysh at lyx.org
Tue Dec 7 02:58:19 UTC 2021


On Wed, Jul 17, 2019 at 11:14:04PM +0200, Jean-Marc Lasgouttes wrote:
> commit 049aed8e08ab0da498561e3382e009852cd1d83d
> Author: Jean-Marc Lasgouttes <lasgouttes at lyx.org>
> Date:   Wed Jul 17 01:01:49 2019 +0200
> 
>     Respect OS-level keyboard language
>     
>     This bug provides two features:
>     
>     1/ when a new document is created the language is set to the current
>       keyboard language.
>     
>     2/ when keyboard is switched at OS level, the input language of
>        current window is changed. The language is set preferably to one of
>        those of the document. Ex. if the keyboard changes to en_GB but one
>        is typing a document in US English and Hebrew, then US English will
>        be selected rather that adding UK English to the list.
>     
>     The implementation depends a lot on Qt. The platform status is :
>     
>     * working on Windows 10
>     
>     * not working with Linux (although 1/ works with Qt4); it seems that
>       Qt5 supports switching through ibus, but I do not know what this
>       means.
>     
>     * not yet tested on macOS.
>     
>     This addresses bugs #6450, #6247 and somehow #10514.
> ---

I think that this introduced the following change of behavior:

1. Go to lib/examples/Modules and run the command "cp 'Rnw_%28knitr%29.lyx' knitr2.lyx"

2. Then open 'Rnw_%28knitr%29.lyx' in one LyX session/process and open
   'knitr2.lyx' in a different LyX session/process.

3. Copy the chunk inset from one session to the other.

The result is that the text inside the chunk is underlined blue to
indicate that it is a different language. If you save and restart, the
blue line is gone.

The same does not happen if you open the two .lyx files in the same LyX
process (i.e., two buffers in one session).

Note that I cherry picked fad33788 when bisecting close to this commit.

Scott
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20211206/83f465bc/attachment.asc>


More information about the lyx-devel mailing list