Re: Why does lyx use it's own keyboard instead of the systems?
Micha Feigin wrote: On Tue, 10 Mar 2009 11:44:46 +0200 Ronen Abravanel wrote: Before you rush into this change - Consider the following usecase: Switching to math - When I'm in math-mode, I always want my keyboard layout to be English. While In windows, The current keyboard layout override the global one (If you put the cursor in an Hebrew context, the language will switch to Hebrew, If you put your cursor in English context - you'll write in English). When I'm writing document, I want the Ctrl+m will be the only thing I need to do in order to start typing math. "Ctrl-m Alt-Shift" Is match to expensive.. good point, but you also have two input senarios in math. 1. Entering parameters (regular typing). AFAIK it should always be in english because I don't think that latex can handle anything else 2. in text mode inside math mode, where you want to be able to type both (although at the moment it requires explicitly entering the \R{} macro to get hebrew in there Does everyone agree on the first point and are you willing to manually change in the second case or do you want some other behviour? So - If LyX will use the native-system-keyboard-layout - It will have to be able to change it depending the current context (Math\Regular) - And in every OS. On Tue, Mar 10, 2009 at 9:59 AM, Abdelrazak Younes wrote: Micha Feigin wrote: Sorry, sent off list by mistake On Mon, 9 Mar 2009 22:05:51 +0100 Jean-Marc Lasgouttes wrote: There are two issues. For running the dictionary you need to know the language. For hebrew and arabic it's another issue, you need to know the system language so that you know directionality. Hebrew is right to left. For hebrew characters it may be easy to decide, for what about spaces and numbers? For these we need to know the system keyboard language and not guess it from the character. Under windows I know it's possible since for example word does it. Question is whether this is possible to know under linux (I guess so since there are panel applets that show the language). Which again comes down to the question whether there is a technical issue why to work this way or not. So you want to change language when the keyboard layout is changed at system level, right? I never thought of these layouts as indicators of the actual language. If Qt gives us this information, we should be able to do it. JMarc For every other program the system language is used for input (alt-shift in my case). So for example when writing mail or using oowriter I change the system language to change input. Lyx is the only exeption where I __have__ to keep the system language for english and bind (f12 in this case) to language hebrew. It makes things incosistent and non-intuitive, esspecially for new users. I agree. For RTL languages, it makes a lot of sense to change the current language together with the system. Advanced users wishing to change the language independently should be able to disable this feature though. Now, you have to find someone willing to implement this feature ;-) FYI, a year or two ago I advocated that the text direction should be based uniquely on the encoding, independently of the language settings, like Qt does. But I failed to convince other developers. Dov, are you reading this? ;-) Abdel. A little late, but yes, I am still lurking on the mailing lists... ;) I think the main reason (to answer the title question) is that we don't know how to get/set the system-wide keyboard language in a cross-platform way. If it's possible to do that, then I think it should be fairly simple to implement a solution along the following lines: Ideally, if it *were* possible to detect the system-wide keyboard language setting, then LyX should (optionally! for users that *want* this feature) set it's internal language to the system-wide setting, plain and simple. The only thing to make sure, though, is that in the same manner, whenever LyX chooses to change it's internal language, it should also *set* the system-wide keyboard setting to that language. I think that that would solve the issue raised by Ronen: when entering a math inset, LyX would set the internal, as well as the system-wide, language to english (or latex, technically? I forget the exact details), which would mean that the math text would be set correctly; and when exiting that inset, LyX automatically sets the language back to whatever it was before entering the inset. Similarly, when moving the cursor over existing text, LyX changes the language to match the underlying text. I'm almost certain that LyX already does all of this language setting --- except that not at the system-wide level, that's what would have to be added. Note, however, that even if this is implemented, I think I would *still* choose to use LyX's keymaps, for reasons that I've explained elsewhere (last time around was at http://article.gmane.org/gmane.editors.lyx.general/48426). And while some of the reasons menti
Re: Why does lyx use it's own keyboard instead of the systems?
On Tue, 10 Mar 2009 11:44:46 +0200 Ronen Abravanel wrote: > Before you rush into this change - Consider the following usecase: > Switching to math - When I'm in math-mode, I always want my keyboard layout > to be English. While In windows, The current keyboard layout override the > global one (If you put the cursor in an Hebrew context, the language will > switch to Hebrew, If you put your cursor in English context - you'll write > in English). > When I'm writing document, I want the Ctrl+m will be the only thing I need > to do in order to start typing math. "Ctrl-m Alt-Shift" Is match to > expensive.. > good point, but you also have two input senarios in math. 1. Entering parameters (regular typing). AFAIK it should always be in english because I don't think that latex can handle anything else 2. in text mode inside math mode, where you want to be able to type both (although at the moment it requires explicitly entering the \R{} macro to get hebrew in there Does everyone agree on the first point and are you willing to manually change in the second case or do you want some other behviour? > So - If LyX will use the native-system-keyboard-layout - It will have to be > able to change it depending the current context (Math\Regular) - And in > every OS. > > On Tue, Mar 10, 2009 at 9:59 AM, Abdelrazak Younes wrote: > > > Micha Feigin wrote: > > > >> Sorry, sent off list by mistake > >> > >> On Mon, 9 Mar 2009 22:05:51 +0100 > >> Jean-Marc Lasgouttes wrote: > >> > >> There are two issues. For running the dictionary you need to know the > language. > For hebrew and arabic it's another issue, you need to know the system > language > so that you know directionality. Hebrew is right to left. For hebrew > characters > it may be easy to decide, for what about spaces and numbers? For these > we need > to know the system keyboard language and not guess it from the > character. > > Under windows I know it's possible since for example word does it. > Question is > whether this is possible to know under linux (I guess so since there > are panel > applets that show the language). Which again comes down to the question > whether > there is a technical issue why to work this way or not. > > >>> So you want to change language when the keyboard layout is changed at > >>> system level, right? > >>> I never thought of these layouts as indicators of the actual language. > >>> If Qt gives us > >>> this information, we should be able to do it. > >>> > >>> JMarc > >>> > >>> > >> For every other program the system language is used for input (alt-shift > >> in my > >> case). So for example when writing mail or using oowriter I change the > >> system > >> language to change input. Lyx is the only exeption where I __have__ to > >> keep the > >> system language for english and bind (f12 in this case) to language > >> hebrew. It > >> makes things incosistent and non-intuitive, esspecially for new users. > >> > > > > I agree. For RTL languages, it makes a lot of sense to change the current > > language together with the system. Advanced users wishing to change the > > language independently should be able to disable this feature though. > > > > Now, you have to find someone willing to implement this feature ;-) > > > > FYI, a year or two ago I advocated that the text direction should be based > > uniquely on the encoding, independently of the language settings, like Qt > > does. But I failed to convince other developers. > > > > Dov, are you reading this? ;-) > > > > Abdel. > > > >
Re: Why does lyx use it's own keyboard instead of the systems?
Micha Feigin wrote: > system language for english and bind (f12 in this case) to language hebrew. It > makes things incosistent and non-intuitive, esspecially for new users. iirc one reason for the current way was to have crossplatform consistent behaviour. pavel
Re: Why does lyx use it's own keyboard instead of the systems?
Before you rush into this change - Consider the following usecase: Switching to math - When I'm in math-mode, I always want my keyboard layout to be English. While In windows, The current keyboard layout override the global one (If you put the cursor in an Hebrew context, the language will switch to Hebrew, If you put your cursor in English context - you'll write in English). When I'm writing document, I want the Ctrl+m will be the only thing I need to do in order to start typing math. "Ctrl-m Alt-Shift" Is match to expensive.. So - If LyX will use the native-system-keyboard-layout - It will have to be able to change it depending the current context (Math\Regular) - And in every OS. On Tue, Mar 10, 2009 at 9:59 AM, Abdelrazak Younes wrote: > Micha Feigin wrote: > >> Sorry, sent off list by mistake >> >> On Mon, 9 Mar 2009 22:05:51 +0100 >> Jean-Marc Lasgouttes wrote: >> >> There are two issues. For running the dictionary you need to know the language. For hebrew and arabic it's another issue, you need to know the system language so that you know directionality. Hebrew is right to left. For hebrew characters it may be easy to decide, for what about spaces and numbers? For these we need to know the system keyboard language and not guess it from the character. Under windows I know it's possible since for example word does it. Question is whether this is possible to know under linux (I guess so since there are panel applets that show the language). Which again comes down to the question whether there is a technical issue why to work this way or not. >>> So you want to change language when the keyboard layout is changed at >>> system level, right? >>> I never thought of these layouts as indicators of the actual language. >>> If Qt gives us >>> this information, we should be able to do it. >>> >>> JMarc >>> >>> >> For every other program the system language is used for input (alt-shift >> in my >> case). So for example when writing mail or using oowriter I change the >> system >> language to change input. Lyx is the only exeption where I __have__ to >> keep the >> system language for english and bind (f12 in this case) to language >> hebrew. It >> makes things incosistent and non-intuitive, esspecially for new users. >> > > I agree. For RTL languages, it makes a lot of sense to change the current > language together with the system. Advanced users wishing to change the > language independently should be able to disable this feature though. > > Now, you have to find someone willing to implement this feature ;-) > > FYI, a year or two ago I advocated that the text direction should be based > uniquely on the encoding, independently of the language settings, like Qt > does. But I failed to convince other developers. > > Dov, are you reading this? ;-) > > Abdel. > >
Re: Why does lyx use it's own keyboard instead of the systems?
Micha Feigin wrote: Sorry, sent off list by mistake On Mon, 9 Mar 2009 22:05:51 +0100 Jean-Marc Lasgouttes wrote: There are two issues. For running the dictionary you need to know the language. For hebrew and arabic it's another issue, you need to know the system language so that you know directionality. Hebrew is right to left. For hebrew characters it may be easy to decide, for what about spaces and numbers? For these we need to know the system keyboard language and not guess it from the character. Under windows I know it's possible since for example word does it. Question is whether this is possible to know under linux (I guess so since there are panel applets that show the language). Which again comes down to the question whether there is a technical issue why to work this way or not. So you want to change language when the keyboard layout is changed at system level, right? I never thought of these layouts as indicators of the actual language. If Qt gives us this information, we should be able to do it. JMarc For every other program the system language is used for input (alt-shift in my case). So for example when writing mail or using oowriter I change the system language to change input. Lyx is the only exeption where I __have__ to keep the system language for english and bind (f12 in this case) to language hebrew. It makes things incosistent and non-intuitive, esspecially for new users. I agree. For RTL languages, it makes a lot of sense to change the current language together with the system. Advanced users wishing to change the language independently should be able to disable this feature though. Now, you have to find someone willing to implement this feature ;-) FYI, a year or two ago I advocated that the text direction should be based uniquely on the encoding, independently of the language settings, like Qt does. But I failed to convince other developers. Dov, are you reading this? ;-) Abdel.
Re: Why does lyx use it's own keyboard instead of the systems?
Sorry, sent off list by mistake On Mon, 9 Mar 2009 22:05:51 +0100 Jean-Marc Lasgouttes wrote: > > There are two issues. For running the dictionary you need to know > > the language. > > For hebrew and arabic it's another issue, you need to know the > > system language > > so that you know directionality. Hebrew is right to left. For > > hebrew characters > > it may be easy to decide, for what about spaces and numbers? For > > these we need > > to know the system keyboard language and not guess it from the > > character. > > > > Under windows I know it's possible since for example word does it. > > Question is > > whether this is possible to know under linux (I guess so since > > there are panel > > applets that show the language). Which again comes down to the > > question whether > > there is a technical issue why to work this way or not. > > So you want to change language when the keyboard layout is changed at > system level, right? > I never thought of these layouts as indicators of the actual > language. If Qt gives us > this information, we should be able to do it. > > JMarc > For every other program the system language is used for input (alt-shift in my case). So for example when writing mail or using oowriter I change the system language to change input. Lyx is the only exeption where I __have__ to keep the system language for english and bind (f12 in this case) to language hebrew. It makes things incosistent and non-intuitive, esspecially for new users.
Re: Why does lyx use it's own keyboard instead of the systems?
There are two issues. For running the dictionary you need to know the language. For hebrew and arabic it's another issue, you need to know the system language so that you know directionality. Hebrew is right to left. For hebrew characters it may be easy to decide, for what about spaces and numbers? For these we need to know the system keyboard language and not guess it from the character. Under windows I know it's possible since for example word does it. Question is whether this is possible to know under linux (I guess so since there are panel applets that show the language). Which again comes down to the question whether there is a technical issue why to work this way or not. So you want to change language when the keyboard layout is changed at system level, right? I never thought of these layouts as indicators of the actual language. If Qt gives us this information, we should be able to do it. JMarc
Re: Why does lyx use it's own keyboard instead of the systems?
On 2009-03-09, Micha Feigin wrote: > On Mon, 9 Mar 2009 07:53:12 + (UTC) > Guenter Milde wrote: >> On 2009-03-07, Micha Feigin wrote: ... > it's a question of changing the writing language inside the paragraph > or between paragraphs. > There are two issues. For running the dictionary you need to know the > language. you need to know the language also for * hyphenation (not hebrew, but most other languages), * auto-inserted text (like "chapter", "table of contents", "figure", ...), * for selecting the font encoding (e.g. LGR for Greek letters vs. T1 for Latin letters). > For hebrew and arabic it's another issue, you need to know > the system language so that you know directionality. LyX saves a RTL flag for every configured language in LYXDIR/languages. Now, it should compare this to the directionality of the "system language" (where this refers to the currently used keyboard setting, not the locale) and only switch direction if this is not already done by the system (QT?). > Under windows I know it's possible since for example word does it. > Question is whether this is possible to know under linux (I guess so > since there are panel applets that show the language). Which again > comes down to the question whether there is a technical issue why to > work this way or not. Browsing the lyx wiki, I found one more tip: It is possible to switch the directionality of the text in the LyX editor window by (de)activating the option "right-to-left language support" in the Tools>Preferences>Language menu. If this does not help, try to describe concise and precisely what you do, what you expect and what you get and file this as a bug report on bugzilla. Günter
Re: Why does lyx use it's own keyboard instead of the systems?
On Mon, 9 Mar 2009 07:53:12 + (UTC) Guenter Milde wrote: > On 2009-03-07, Micha Feigin wrote: > > > ... I was wondering why lyx uses it's own keyboard switching, > > especially for hebrew. Is it a technological issue or just that no one > > had the time/interest to implement this yet? > > * LyX does not necessariyl use its own keyboard switching but provides > this as an alternative. > > * One LyX developer preferred to keep the rest of his system in English > when writing Hebrew in LyX. This is why he insisted on keeping the > parallel feature. > > > Is it even possible to know what language is chosen on all the systems > > lyx is implemented on > > LyX recognizes the "locale" setting and uses it to "speak to you" in > native tongue (if possible) -- my LyX speaks German. > I don't care what language it speaks, that is trivial, it's a question of changing the writing language inside the paragraph or between paragraphs. > It would also be possible to use this to set the document language for > new documents. However: > > > or does the language need to be guessed based on each character? > > it is not possible (in general) to determine the language from a > character: If LyX sees an 'ü', should this be German, Hungarian, or > Turkish. And how about "Häagen Dasz" or "TεX"? No language switch needed. > > (The case is somewhat simplified with Greek or Hebrew characters, but > even then you dont know whether it is Hebrew, New-Hebrew or Yiddish.) > There are two issues. For running the dictionary you need to know the language. For hebrew and arabic it's another issue, you need to know the system language so that you know directionality. Hebrew is right to left. For hebrew characters it may be easy to decide, for what about spaces and numbers? For these we need to know the system keyboard language and not guess it from the character. Under windows I know it's possible since for example word does it. Question is whether this is possible to know under linux (I guess so since there are panel applets that show the language). Which again comes down to the question whether there is a technical issue why to work this way or not. > But the problematic cases were ASCII chars in a Greek or Heberew > document: the choice of alternative language is just too big to give a > sensible guess. > there is another question here, what about the correct encoding ... > Günter > >
Re: Why does lyx use it's own keyboard instead of the systems?
On 2009-03-07, Micha Feigin wrote: > ... I was wondering why lyx uses it's own keyboard switching, > especially for hebrew. Is it a technological issue or just that no one > had the time/interest to implement this yet? * LyX does not necessariyl use its own keyboard switching but provides this as an alternative. * One LyX developer preferred to keep the rest of his system in English when writing Hebrew in LyX. This is why he insisted on keeping the parallel feature. > Is it even possible to know what language is chosen on all the systems > lyx is implemented on LyX recognizes the "locale" setting and uses it to "speak to you" in native tongue (if possible) -- my LyX speaks German. It would also be possible to use this to set the document language for new documents. However: > or does the language need to be guessed based on each character? it is not possible (in general) to determine the language from a character: If LyX sees an 'ü', should this be German, Hungarian, or Turkish. And how about "Häagen Dasz" or "TεX"? No language switch needed. (The case is somewhat simplified with Greek or Hebrew characters, but even then you dont know whether it is Hebrew, New-Hebrew or Yiddish.) But the problematic cases were ASCII chars in a Greek or Heberew document: the choice of alternative language is just too big to give a sensible guess. Günter
Why does lyx use it's own keyboard instead of the systems?
I recall some talk about this a long time ago and couldn't find it. As there was some talk about this on another mailing list I was wondering why lyx uses it's own keyboard switching, esspecially for hebrew. Is it a technological issue or just that no one had the time/interest to implement this yet? Is it even possible to know what language is chosen on all the systems lyx is implemented on or does the language need to be guessed based on each character? Thanks