Page 1 of 1

User to enter characters with diacrical marks using Keyboard

Posted: Thu Oct 27, 2016 2:06 am
by lewis
Returned to LiveCode after several years. Cannot find how to enter special characters in fields.
I seem to recall that one used to be able to use Alt+nnnn - e.g. Alt+0233 for é as I have just done here.
But this is not working in LiveCode 8 fields. Is there a simple way to do this?

Re: User to enter characters with diacrical marks using Keyb

Posted: Mon Dec 05, 2016 6:35 am
by lewis
The ability to input special characters (e.g. those with diacritical symbols such as é) into fields in LiveCode seems no longer to exist. It has been suggested that this is a bug as it was possible prior to Version 7 and subsequent versions. Can anyone confirm this?

Re: User to enter characters with diacrical marks using Keyb

Posted: Mon Dec 05, 2016 9:45 am
by jmburnod
Hi Lewis,
I never met issues to enter a diacritical char in a field.
Do you can precise what is happens when you type a diacritical char ?
Best regards
Jean-Marc

Re: User to enter characters with diacrical marks using Keyb

Posted: Mon Dec 05, 2016 1:22 pm
by lewis
To enter, for example an e acute here in this message I can just type Alt+0233 with the result é as shown. However when I perform these exact same actions in a field in LiveCode there is no resultant input. I am running Windows 10 and in MSWord and in Notepad I can input e acute in exactly the same way as I have indicated in this message. But as I have said this does not work in a LiveCode field when I am running LiveCode 8.
I seem to remember that I could do this previously prior to LiveCode 7.

Re: User to enter characters with diacrical marks using Keyb

Posted: Mon Dec 05, 2016 1:54 pm
by AxWald
Hi,

can confirm that it works in 6.7.10. Hold Alt, type 0233, release ALT -> é

Have fun!

Re: User to enter characters with diacrical marks using Keyb

Posted: Mon Dec 05, 2016 3:28 pm
by SparkOut
That is the OP's point. Prior to version 7 it was working. I have just tested on Windows 10 with LC 9.0 dp3 and it doesn't.

Re: User to enter characters with diacrical marks using Keyb

Posted: Mon Dec 05, 2016 7:22 pm
by richmond62
If one wants to enter a letter with a diacritical mark on Macintosh or Linux one chooses
a (non-English) keyboard mapping and types the letter in:
French.png
I wonder why this should be any different in Windows.

Re: User to enter characters with diacrical marks using Keyb

Posted: Tue Dec 06, 2016 1:30 pm
by lewis
I really want to achieve these special characters from within Livecode rather than from whatever the operating system provides. I have written some code to achieve this which I think may prove more convenient than having to remember or look up the altChar codes.

I created two fields listing all the upper and lower case alternative characters that I could need from aA to zZ e.g. "a à á â ã ä å" and "A À Á Â Ã Ä Å"... "d ð đ ď ɗ ɖ" and "D Ð Ď Ɗ" ... "z ź ż ž" and "Z Ź Ż Ž" and use them as variables altchars-lower and altchars-upper.

By setting the insertion point in the input field after the relevant ordinary character and trapping the optionKeyDown message I then use the selectedChunk function to obtain that character and check whether it is upper or lower case and whether it is in the appropriate list altchars-lower or altchars-upper. If it is I get the lineOffset of the character and I can then cycle that character through that line of alternative characters with their diacritical marks. It works well for my purpose. (Which is for a personal library database where author names such as 'Per Wahlöö' and 'John le Carré' occur quite often.)

If anyone is interested I can post the code. It is fairly amateur and I don't know how important the choice of text font is with all these Unicode characters for the whole thing to work seamlessly. I just ensure my fields use Lucida Sans Unicode font.

However as Sparkout noted in his/her reply the use of the optionKey or altKey as it is in Windows with numeric codes still doesn't work.
Prior to version 7 it was working. I have just tested on Windows 10 with LC 9.0 dp3 and it doesn't.
This also makes it harder to insert symbols such as © and · . So is it a bug or not and if so does someone know how to raise the issue.

Re: User to enter characters with diacrical marks using Keyb

Posted: Tue Dec 06, 2016 4:25 pm
by SparkOut
You can report it here http://quality.livecode.com/

(SparkOut is a he, btw)

Re: User to enter characters with diacrical marks using Keyb

Posted: Fri Dec 09, 2016 12:39 pm
by richmond62
Keezer.png
Keezer.livecode.zip
Here's the stack.
(22.2 KiB) Downloaded 235 times