typing tilde doesn't always work

35 views
Skip to first unread message

daniel

unread,
Feb 10, 2012, 3:10:15 PM2/10/12
to leo-editor
Hello all,

I have just started using Leo after a couple of weeks. I got to it
after reading "Quotes from Leo’s Users" and it is a great software.
Congratulations on such a beautiful work of art. :)

Now the issue:
I am from Brazil and we have lots of words that end in the '-ção'
combination of letters - (a cedilla followed by a tilde-over-a
followed by another vowel). There are variations of this too.

The issue is this: I can type the said combination without any problem
in the body pane, but several times when I am typing 'fast' (i.e.
normal typing speed) the tilde doesn't get typed and I end up with '-
çao' instead of '-ção'.

These are the tests I have done so far (me and a friend, who is also
trying Leo and felt the same problem):

1) there are other accent marks (^ ´ ` ¨) in Portuguese, but we have
so far only noticed this problem with the tilde.
2) If we slow down the typing then tilde gets typed okay. Typing at
normal speed (which I refer to as 'fast' typing) we get lots of
missing tildes.
3) Typing at this 'fast' speed does work in other software (e.g.
notepad++,notepad,office, emacs, etc.), so we believe it is not a
computer or keyboard issue, but rather something to do with Leo
specifically.
4)
(a) Is it really so annoying having to slow down typing a lil and get
the tilde right?
(b) Can't you live with that?Well,...(a) yes (b) nop.
Just kidding. As mentioned above, we have lots of words with this
combination in Portuguese. We won't stop using Leo because of that,
but it would be great if we could take a look into it and see what
could be causing this strange behaviour. :o)

I know you all have very important issues to deal with, but if someone
ever gets some spare time to give this issue some thoughts and perhaps
point some source code area we could look at, we truly appreciate the
help here in Brazil.

Cheers!

daniel

Edward K. Ream

unread,
Feb 10, 2012, 4:50:30 PM2/10/12
to leo-e...@googlegroups.com
On Fri, Feb 10, 2012 at 2:10 PM, daniel <dan...@lpds.ufsc.br> wrote:

> I am from Brazil and we have lots of words that end in the '-ção'
> combination of letters - (a cedilla followed by a tilde-over-a
> followed by another vowel). There are variations of this too.

Thanks for this report. I strongly suspect that this is indeed a Leo problem.

What keystrokes exactly do you type to get "ção"? Am I correct in
assuming that you type "c", followed by tilde, and then "a", followed
by tilde?

Edward

daniel

unread,
Feb 13, 2012, 12:28:23 PM2/13/12
to leo-editor
Hello,
I don't know if it makes a big difference, but I forgot to inform the
build and system. Sorry for that. Here it goes:

Leo 4.9 Build 4411, June 21 2011
OS Windows 7 Professional 32 bits
Python 3.2.2

We use a Brazilian keyboard (known as ABTN2) which has got a cedilla
key so we don't have to type tilde before the 'c'.
I type 'ç' (one keystroke), then tilde (before the target letter) and
lastly the 'a'. The actual last one is the 'o', but I reckon it is not
directly involved in the accented part.

I am not aware of how it works internally when I type the 'ç' key. It
could be that it is split into a tilde+c. I am not sure.
Right now the only tilde that I must explicitly type is the one before
the 'a'. (we type the accent mark 'before' typing the letter)

After some more fiddling around we found out that there are other
sluggish combination of accented letters: "-osá", "-apé", "-ári","-
dão","-tão"... so maybe this is a thing with accented letters in
general. I believe that we missed that in the first place because
these other combinations are not so common as '-ção'. Our brain
probably needs more time to process them and we end up typing them
slower without realising it.

Thanks very much for the reply.

daniel
> assuming that you type "c", followed bytilde, and then "a", followed
> bytilde?
>
> Edward

Edward K. Ream

unread,
Mar 1, 2012, 6:54:51 AM3/1/12
to leo-e...@googlegroups.com
On Mon, Feb 13, 2012 at 11:28 AM, daniel <dan...@lpds.ufsc.br> wrote:
> Hello,
> I don't know if it makes a big difference, but I forgot to inform the
> build and system. Sorry for that. Here it goes:
>
> Leo 4.9 Build 4411, June 21 2011
> OS Windows 7 Professional 32 bits
> Python 3.2.2
>
> We use a Brazilian keyboard (known as ABTN2) which has got a cedilla
> key so we don't have to type tilde before the 'c'.
> I type 'ç' (one keystroke), then tilde (before the target letter) and
> lastly the 'a'. The actual last one is the 'o', but I reckon it is not
> directly involved in the accented part.

...

> Right now the only tilde that I must explicitly type is the one before
> the 'a'. (we type the accent mark 'before' typing the letter)

Thanks for the clarification.

> I am not aware of how it works internally when I type the 'ç' key. It
> could be that it is split into a tilde+c. I am not sure.

I would be surprised if 'ç' got turned into tilde+c.

My model for what is happening for tilde+whatever is that either Qt or
the OS (it probably doesn't much matter which) has some kind of timer
that will turn tilde+whatever into the accented character if Leo asks
for "whatever" within a certain period of time. Given how much work
does with keystrokes, this "time limit" might elapse.

Speeding up Leo's key-handling code doesn't seem immediately
practical, so the only alternative would seem to be code that catches
tilde and handle's it specially. Not sure how to do this cleanly, and
the new code would have to be enabled via a user option, in all
probability, so that this translation can be turned off.

> After some more fiddling around we found out that there are other
> sluggish combination of accented letters: "-osá", "-apé", "-ári","-
> dão","-tão"... so maybe this is a thing with accented letters in
> general. I believe that we missed that in the first place because
> these other combinations are not so common as '-ção'. Our brain
> probably needs more time to process them and we end up typing them

> slower without realizing it.

Interesting. I'll see what I can do in the next day or so. The first
thing to do will be to check the Qt docs, including google searches.

Edward

Edward K. Ream

unread,
Mar 1, 2012, 11:40:17 AM3/1/12
to leo-e...@googlegroups.com
On Thu, Mar 1, 2012 at 5:54 AM, Edward K. Ream <edre...@gmail.com> wrote:

>> We use a Brazilian keyboard (known as ABTN2) which has got a cedilla
>> key so we don't have to type tilde before the 'c'.
>> I type 'ç' (one keystroke), then tilde (before the target letter) and
>> lastly the 'a'. The actual last one is the 'o', but I reckon it is not
>> directly involved in the accented part.

Thanks for this clarification.

This morning I had what passes for a brilliant idea in my world:
modify Leo's abbreviation code so it can translate ~a into ã.

It turns out that this is a *major* improvement (and simplification!)
to Leo's abbreviation code, and it has all sorts of additional
benefits.

Details in a separate post.

Edward

Reply all
Reply to author
Forward
0 new messages