Re: keyboard question

2008-06-27 Thread Daniel Clément
Hi Hellmut,

On Friday 27 June 2008 00:05 +0200, Hellmut Weber wrote:

[...]

 Under Linux there is a nice little program 'xev' which gives you the key 
 code for all keys.

Interesting. I didn't know this, I'll check this out.

 You could try to define your personal bind file in '$HOME/.lyx/bind/...'
 You'll find info on global and local bind files somewhere in the (more 
 advanced ;-) LyX documentation.
[...]

That's just what I have done, I read the docs too :-)
But as I said in my previous reply to Günter, I doubt that the bind file
can take care of a dead key (the acute accent in my case).

At least, I was  unable to get any \bind 'c sequence working.
Following Günter, I used the Meta key to get a workaround.

Regards, 
-- 

Daniel Clément



Re: keyboard question

2008-06-27 Thread Daniel Clément
On Friday 27 June 2008 17:29 +0200, Pavel Sanda wrote:
  PS Here is what I tried: in american.kmap I put
  
  \kmod ' acute aeiouAEIOU
  
  # \kmod , cedilla native
  
  \kxmod ' c ç
 
 just a wild guess, what happen with this:
 
 \kxmod acute c ç
 
 pavel

This still gives me an accented c... 

However, it does have a strange side effect. In order to test this, I
choose remap keyboard in LyX, then point to the american.kmap edited
as above.

Then, my dead keys seem to be doubly dead (undead?) in the following
sense: I must type _two_ spaces after a dead key so as to get the
corresponding character (normally, one is enough).

Furthermore, I don't get a single quote this way, but an isolated acute
accent. In other words, with such a keyboard remap, it's impossible to
get a single quote in LyX.

And at last, only the accents (acute, grave, circonflex...) exhibit this
behavior. The double quote retains its normal dead key behavior.

All this seems stranger and stranger... Why doesn't LyX react as most other 
apps?...

-- 

Daniel Clément



Re: keyboard question

2008-06-27 Thread Daniel Clément
Hi Hellmut,

On Friday 27 June 2008 00:05 +0200, Hellmut Weber wrote:

[...]

 Under Linux there is a nice little program 'xev' which gives you the key 
 code for all keys.

Interesting. I didn't know this, I'll check this out.

 You could try to define your personal bind file in '$HOME/.lyx/bind/...'
 You'll find info on global and local bind files somewhere in the (more 
 advanced ;-) LyX documentation.
[...]

That's just what I have done, I read the docs too :-)
But as I said in my previous reply to Günter, I doubt that the bind file
can take care of a dead key (the acute accent in my case).

At least, I was  unable to get any \bind 'c sequence working.
Following Günter, I used the Meta key to get a workaround.

Regards, 
-- 

Daniel Clément



Re: keyboard question

2008-06-27 Thread Daniel Clément
On Friday 27 June 2008 17:29 +0200, Pavel Sanda wrote:
  PS Here is what I tried: in american.kmap I put
  
  \kmod ' acute aeiouAEIOU
  
  # \kmod , cedilla native
  
  \kxmod ' c ç
 
 just a wild guess, what happen with this:
 
 \kxmod acute c ç
 
 pavel

This still gives me an accented c... 

However, it does have a strange side effect. In order to test this, I
choose remap keyboard in LyX, then point to the american.kmap edited
as above.

Then, my dead keys seem to be doubly dead (undead?) in the following
sense: I must type _two_ spaces after a dead key so as to get the
corresponding character (normally, one is enough).

Furthermore, I don't get a single quote this way, but an isolated acute
accent. In other words, with such a keyboard remap, it's impossible to
get a single quote in LyX.

And at last, only the accents (acute, grave, circonflex...) exhibit this
behavior. The double quote retains its normal dead key behavior.

All this seems stranger and stranger... Why doesn't LyX react as most other 
apps?...

-- 

Daniel Clément



Re: keyboard question

2008-06-27 Thread Daniel Clément
Hi Hellmut,

On Friday 27 June 2008 00:05 +0200, Hellmut Weber wrote:

[...]

> Under Linux there is a nice little program 'xev' which gives you the key 
> code for all keys.

Interesting. I didn't know this, I'll check this out.

> You could try to define your personal bind file in '$HOME/.lyx/bind/...'
> You'll find info on global and local bind files somewhere in the (more 
> advanced ;-) LyX documentation.
[...]

That's just what I have done, I read the docs too :-)
But as I said in my previous reply to Günter, I doubt that the bind file
can take care of a dead key (the acute accent in my case).

At least, I was  unable to get any \bind "'c" sequence working.
Following Günter, I used the Meta key to get a workaround.

Regards, 
-- 

Daniel Clément



Re: keyboard question

2008-06-27 Thread Daniel Clément
On Friday 27 June 2008 17:29 +0200, Pavel Sanda wrote:
> > PS Here is what I tried: in american.kmap I put
> > 
> > \kmod ' acute aeiouAEIOU
> > 
> > # \kmod "," cedilla native
> > 
> > \kxmod ' c ç
> 
> just a wild guess, what happen with this:
> 
> \kxmod acute c ç
> 
> pavel

This still gives me an accented c... 

However, it does have a strange side effect. In order to test this, I
choose "remap keyboard" in LyX, then point to the american.kmap edited
as above.

Then, my dead keys seem to be "doubly dead" (undead?) in the following
sense: I must type _two_ spaces after a dead key so as to get the
corresponding character (normally, one is enough).

Furthermore, I don't get a single quote this way, but an isolated acute
accent. In other words, with such a keyboard remap, it's impossible to
get a single quote in LyX.

And at last, only the accents (acute, grave, circonflex...) exhibit this
behavior. The double quote retains its normal dead key behavior.

All this seems stranger and stranger... Why doesn't LyX react as most other 
apps?...

-- 

Daniel Clément



Re: keyboard question

2008-06-26 Thread Daniel Clément
Günter,

The more I try, the less I understand... Nothing seems to work as it
should! See the reports of my attempts below

On Wednesday 25 June 2008 à 17:56 +0200, G. Milde wrote:
 On 25.06.08, Daniel Clément wrote:
  On Wednesday 25 june 2008 à 12:19 +0200, G. Milde wrote:
 
   Could you find out whether the character inserted via dead-´ + c is
   *one* character (c with accent) or 
   *two* characters (c + combining acute acctent)
 
  Not quite sure how to check this but I'd bet on single character...
 
 OK. Just let's assume this.
 
Maybe it was not the case after all
[...]
 
   Maybe LyX does not map it to ç because it does not see the defined char.
 
  Do you mean: in the kmap file, or the bind file? If the latter, it has
  to be something like that, because I do have some personal keybindings
  that work.
 
 The bind file. It uses a special naming for non-ASCII input. Looking at the
 bind files that ship with LyX helps: 
 
 $LYXDIR/bind/latinkeys.bind contains the definition:
 
 \bind cacuteself-insert
 
 which you should change to unicode-insert ... (as proposed earlier in this
 thread). 

I tried this in my /home/daniel/.lyx/bind/swpperso.bind file. (It's the
modified sciword.bind file that I use; it contains the same shortcuts as
in my former SciWord.)

It did not work.

Then I noticed that this file eventually calls latinkeys.bind. So I
tried to edit it directly, replacing the suggested line with

\bind cacute  unicode-insert 0x00e7

This, to my great disappointment, did not work either (always
acute-accented c).
 
 Hope this helps.
 
 
 BTW: Alternatives that work here are 
 
   1. Combining-Key + Komma followed by c. (in my setup, X11 translates
  this to ç, Combining-Key is the Windows Key)
 
   2. \bind Meta ,   accent-cedilla

I assume \bind M-,? --tried them both however.

  and then Alt-, c.

I tried this too, and it did not act as I wanted: M-, enters math
mode!... There mus be a conflict with another binding, but I was unable
to locate it.

  
 Günter  

I think all this is becoming unreasonably complicated. I wonder if I had
not better wait for LyX 1.6. Possibly the shortcut editor will help me
fix this...
-- 

Daniel Clément



Re: keyboard question

2008-06-26 Thread Daniel Clément
At least something that works!

On Tuesday 26 June 2008 à 09:36 +0200, G. Milde wrote:

[...]
 
 Dear LyX gurus: why does LyX ignore:
 
   \bind cacute  unicode-insert 0x00e7
 
 while e.g. 
 
   \bind M-C-comma unicode-insert 0x00e7  # insert a ç (c with cedilla)
 
 works?

YES it does! Thanks!

[...]

 You can override a keybinding if you give a new definition after the 
 input of a standard file. (Only exception are Shift-independent
 bindings with ~S where the first definition wins over other ~S
 definitions but is overwritten by either S or non-shifted defs.)

Interesting, but that does not account for my previous failed attempts.

  (It's the modified sciword.bind file that I use; it contains the same
  shortcuts as in my former SciWord.)
 
 I recommend loading the default sciword.bind in the custom bind file,

I could have done this, but I had to actually modify some definitions in
sciword.bind. (It appears to match a rather old version o SciWord...)

I have more or less concluded that: once a key is dead in the keyboard
setup (in the OS I mean), it cannot be used effectively in a \bind
sequence.

IMHO the kmap file would have been the most appropriate place to deal
with this, but I was unable to get it working.

However, I'm quite pleased with the workaround that you gave me. Thanks
again.

-- 

Daniel Clément



Re: keyboard question

2008-06-26 Thread Daniel Clément
Günter,

The more I try, the less I understand... Nothing seems to work as it
should! See the reports of my attempts below

On Wednesday 25 June 2008 à 17:56 +0200, G. Milde wrote:
 On 25.06.08, Daniel Clément wrote:
  On Wednesday 25 june 2008 à 12:19 +0200, G. Milde wrote:
 
   Could you find out whether the character inserted via dead-´ + c is
   *one* character (c with accent) or 
   *two* characters (c + combining acute acctent)
 
  Not quite sure how to check this but I'd bet on single character...
 
 OK. Just let's assume this.
 
Maybe it was not the case after all
[...]
 
   Maybe LyX does not map it to ç because it does not see the defined char.
 
  Do you mean: in the kmap file, or the bind file? If the latter, it has
  to be something like that, because I do have some personal keybindings
  that work.
 
 The bind file. It uses a special naming for non-ASCII input. Looking at the
 bind files that ship with LyX helps: 
 
 $LYXDIR/bind/latinkeys.bind contains the definition:
 
 \bind cacuteself-insert
 
 which you should change to unicode-insert ... (as proposed earlier in this
 thread). 

I tried this in my /home/daniel/.lyx/bind/swpperso.bind file. (It's the
modified sciword.bind file that I use; it contains the same shortcuts as
in my former SciWord.)

It did not work.

Then I noticed that this file eventually calls latinkeys.bind. So I
tried to edit it directly, replacing the suggested line with

\bind cacute  unicode-insert 0x00e7

This, to my great disappointment, did not work either (always
acute-accented c).
 
 Hope this helps.
 
 
 BTW: Alternatives that work here are 
 
   1. Combining-Key + Komma followed by c. (in my setup, X11 translates
  this to ç, Combining-Key is the Windows Key)
 
   2. \bind Meta ,   accent-cedilla

I assume \bind M-,? --tried them both however.

  and then Alt-, c.

I tried this too, and it did not act as I wanted: M-, enters math
mode!... There mus be a conflict with another binding, but I was unable
to locate it.

  
 Günter  

I think all this is becoming unreasonably complicated. I wonder if I had
not better wait for LyX 1.6. Possibly the shortcut editor will help me
fix this...
-- 

Daniel Clément



Re: keyboard question

2008-06-26 Thread Daniel Clément
At least something that works!

On Tuesday 26 June 2008 à 09:36 +0200, G. Milde wrote:

[...]
 
 Dear LyX gurus: why does LyX ignore:
 
   \bind cacute  unicode-insert 0x00e7
 
 while e.g. 
 
   \bind M-C-comma unicode-insert 0x00e7  # insert a ç (c with cedilla)
 
 works?

YES it does! Thanks!

[...]

 You can override a keybinding if you give a new definition after the 
 input of a standard file. (Only exception are Shift-independent
 bindings with ~S where the first definition wins over other ~S
 definitions but is overwritten by either S or non-shifted defs.)

Interesting, but that does not account for my previous failed attempts.

  (It's the modified sciword.bind file that I use; it contains the same
  shortcuts as in my former SciWord.)
 
 I recommend loading the default sciword.bind in the custom bind file,

I could have done this, but I had to actually modify some definitions in
sciword.bind. (It appears to match a rather old version o SciWord...)

I have more or less concluded that: once a key is dead in the keyboard
setup (in the OS I mean), it cannot be used effectively in a \bind
sequence.

IMHO the kmap file would have been the most appropriate place to deal
with this, but I was unable to get it working.

However, I'm quite pleased with the workaround that you gave me. Thanks
again.

-- 

Daniel Clément



Re: keyboard question

2008-06-26 Thread Daniel Clément
Günter,

The more I try, the less I understand... Nothing seems to work as it
should! See the reports of my attempts below

On Wednesday 25 June 2008 à 17:56 +0200, G. Milde wrote:
> On 25.06.08, Daniel Clément wrote:
> > On Wednesday 25 june 2008 à 12:19 +0200, G. Milde wrote:
> 
> > > Could you find out whether the character inserted via dead-´ + c is
> > > *one* character (c with accent) or 
> > > *two* characters (c + combining acute acctent)
> 
> > Not quite sure how to check this but I'd bet on "single character"...
> 
> OK. Just let's assume this.
> 
Maybe it was not the case after all
[...]
> 
> > > Maybe LyX does not map it to ç because it does not "see" the defined char.
> 
> > Do you mean: in the kmap file, or the bind file? If the latter, it has
> > to be something like that, because I do have some personal keybindings
> > that work.
> 
> The bind file. It uses a special naming for non-ASCII input. Looking at the
> bind files that ship with LyX helps: 
> 
> $LYXDIR/bind/latinkeys.bind contains the definition:
> 
> \bind "cacute""self-insert"
> 
> which you should change to "unicode-insert ..." (as proposed earlier in this
> thread). 

I tried this in my /home/daniel/.lyx/bind/swpperso.bind file. (It's the
modified sciword.bind file that I use; it contains the same shortcuts as
in my former SciWord.)

It did not work.

Then I noticed that this file eventually calls latinkeys.bind. So I
tried to edit it directly, replacing the suggested line with

\bind "cacute"  "unicode-insert 0x00e7"

This, to my great disappointment, did not work either (always
acute-accented c).
> 
> Hope this helps.
> 
> 
> BTW: Alternatives that work here are 
> 
>   1. "Combining-Key + Komma" followed by c. (in my setup, X11 translates
>  this to ç, Combining-Key is the Windows Key)
> 
>   2. \bind "Meta ,"   "accent-cedilla"

I assume \bind "M-,"? --tried them both however.

>  and then Alt-, c.

I tried this too, and it did not act as I wanted: M-, enters math
mode!... There mus be a conflict with another binding, but I was unable
to locate it.

>  
> Günter  

I think all this is becoming unreasonably complicated. I wonder if I had
not better wait for LyX 1.6. Possibly the shortcut editor will help me
fix this...
-- 

Daniel Clément



Re: keyboard question

2008-06-26 Thread Daniel Clément
At least something that works!

On Tuesday 26 June 2008 à 09:36 +0200, G. Milde wrote:

[...]
> 
> Dear LyX gurus: why does LyX ignore:
> 
>   \bind "cacute"  "unicode-insert 0x00e7"
> 
> while e.g. 
> 
>   \bind "M-C-comma" "unicode-insert 0x00e7"  # insert a ç (c with cedilla)
> 
> works?

YES it does! Thanks!

[...]

> You can override a keybinding if you give a new definition after the 
> input of a "standard" file. (Only exception are Shift-independent
> bindings with ~S where the first definition "wins" over other ~S
> definitions but is overwritten by either S or non-shifted defs.)

Interesting, but that does not account for my previous failed attempts.

> > (It's the modified sciword.bind file that I use; it contains the same
> > shortcuts as in my former SciWord.)
> 
> I recommend loading the default sciword.bind in the custom bind file,

I could have done this, but I had to actually modify some definitions in
sciword.bind. (It appears to match a rather old version o SciWord...)

I have more or less concluded that: once a key is "dead" in the keyboard
setup (in the OS I mean), it cannot be used effectively in a \bind
sequence.

IMHO the kmap file would have been the most appropriate place to deal
with this, but I was unable to get it working.

However, I'm quite pleased with the workaround that you gave me. Thanks
again.

-- 

Daniel Clément



Re: keyboard question

2008-06-25 Thread Daniel Clément
[sorry if double post, previous one did not work]
On Tuesday 24 June 2008 18:31 +0200, Abdelrazak Younes wrote:

[...]
 Maybe try this:
 
 \bind 'c  unicode-insert 0x00e7
 
 Abdel.
 
It looked promising, but it did not work (still gives accented c).

I don't know why 

\kxmod ' c ç

in the kmap file does not work. Isn't exactly what sect. 4.4.1 of
Customization says? 

Also, I tried a normal US keyboard setting (without dead keys): it did
not change anything. So the dead keys are not the problem.

It looks like some other setting has precedence over the ones made in
bind or kmap files...
-- 

Daniel Clément




Re: keyboard question

2008-06-25 Thread Daniel Clément
Günter,

On Wednesday 25 june 2008 à 12:19 +0200, G. Milde wrote:

[...]

 Could you find out whether the character inserted via dead-´ + c is
 *one* character (c with accent) or 
 *two* characters (c + combining acute acctent)

Not quite sure how to check this but I'd bet on single character...
 
 Both look similar at screen but are different representations.
 Deleting a two character combination sometimes(?) leaves the accent or
 the letter. The M-x accent-* functions insert two character combinations.

... because this latter behavior you describe is what I get (erase
accented c, accent remains) when I specify american.kmap while trying
to tweak it. 
By default (i.e. no kmap file selected) I can erase the accented c at
once.
(BTW I couldn't paste the character in question from LyX into this
message.)

 
 Maybe LyX does not map it to ç because it does not see the defined char.

Do you mean: in the kmap file, or the bind file? If the latter, it has
to be something like that, because I do have some personal keybindings
that work.

 
 Günter

-- 

Daniel Clément



Re: keyboard question

2008-06-25 Thread Daniel Clément
[sorry if double post, previous one did not work]
On Tuesday 24 June 2008 18:31 +0200, Abdelrazak Younes wrote:

[...]
 Maybe try this:
 
 \bind 'c  unicode-insert 0x00e7
 
 Abdel.
 
It looked promising, but it did not work (still gives accented c).

I don't know why 

\kxmod ' c ç

in the kmap file does not work. Isn't exactly what sect. 4.4.1 of
Customization says? 

Also, I tried a normal US keyboard setting (without dead keys): it did
not change anything. So the dead keys are not the problem.

It looks like some other setting has precedence over the ones made in
bind or kmap files...
-- 

Daniel Clément




Re: keyboard question

2008-06-25 Thread Daniel Clément
Günter,

On Wednesday 25 june 2008 à 12:19 +0200, G. Milde wrote:

[...]

 Could you find out whether the character inserted via dead-´ + c is
 *one* character (c with accent) or 
 *two* characters (c + combining acute acctent)

Not quite sure how to check this but I'd bet on single character...
 
 Both look similar at screen but are different representations.
 Deleting a two character combination sometimes(?) leaves the accent or
 the letter. The M-x accent-* functions insert two character combinations.

... because this latter behavior you describe is what I get (erase
accented c, accent remains) when I specify american.kmap while trying
to tweak it. 
By default (i.e. no kmap file selected) I can erase the accented c at
once.
(BTW I couldn't paste the character in question from LyX into this
message.)

 
 Maybe LyX does not map it to ç because it does not see the defined char.

Do you mean: in the kmap file, or the bind file? If the latter, it has
to be something like that, because I do have some personal keybindings
that work.

 
 Günter

-- 

Daniel Clément



Re: keyboard question

2008-06-25 Thread Daniel Clément
[sorry if double post, previous one did not work]
On Tuesday 24 June 2008 18:31 +0200, Abdelrazak Younes wrote:

[...]
> Maybe try this:
> 
> \bind "'c"  "unicode-insert 0x00e7"
> 
> Abdel.
> 
It looked promising, but it did not work (still gives accented c).

I don't know why 

\kxmod ' c ç

in the kmap file does not work. Isn't exactly what sect. 4.4.1 of
"Customization" says? 

Also, I tried a "normal" US keyboard setting (without dead keys): it did
not change anything. So the dead keys are not the problem.

It looks like some other setting has precedence over the ones made in
bind or kmap files...
-- 

Daniel Clément




Re: keyboard question

2008-06-25 Thread Daniel Clément
Günter,

On Wednesday 25 june 2008 à 12:19 +0200, G. Milde wrote:

[...]

> Could you find out whether the character inserted via dead-´ + c is
> *one* character (c with accent) or 
> *two* characters (c + combining acute acctent)

Not quite sure how to check this but I'd bet on "single character"...
> 
> Both look similar at screen but are different representations.
> Deleting a two character combination sometimes(?) leaves the accent or
> the letter. The M-x accent-* functions insert two character combinations.

... because this latter behavior you describe is what I get (erase
accented c, accent remains) when I specify "american.kmap" while trying
to tweak it. 
By default (i.e. no kmap file selected) I can erase the accented c at
once.
(BTW I couldn't paste the character in question from LyX into this
message.)

> 
> Maybe LyX does not map it to ç because it does not "see" the defined char.

Do you mean: in the kmap file, or the bind file? If the latter, it has
to be something like that, because I do have some personal keybindings
that work.

> 
> Günter

-- 

Daniel Clément