User to enter characters with diacrical marks using Keyboard

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
lewis
Posts: 28
Joined: Mon Dec 14, 2009 7:39 am

User to enter characters with diacrical marks using Keyboard

Post by lewis » Thu Oct 27, 2016 2:06 am

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?

lewis
Posts: 28
Joined: Mon Dec 14, 2009 7:39 am

Re: User to enter characters with diacrical marks using Keyb

Post by lewis » Mon Dec 05, 2016 6:35 am

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?

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: User to enter characters with diacrical marks using Keyb

Post by jmburnod » Mon Dec 05, 2016 9:45 am

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
https://alternatic.ch

lewis
Posts: 28
Joined: Mon Dec 14, 2009 7:39 am

Re: User to enter characters with diacrical marks using Keyb

Post by lewis » Mon Dec 05, 2016 1:22 pm

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.

AxWald
Posts: 578
Joined: Thu Mar 06, 2014 2:57 pm

Re: User to enter characters with diacrical marks using Keyb

Post by AxWald » Mon Dec 05, 2016 1:54 pm

Hi,

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

Have fun!
All code published by me here was created with Community Editions of LC (thus is GPLv3).
If you use it in closed source projects, or for the Apple AppStore, or with XCode
you'll violate some license terms - read your relevant EULAs & Licenses!

SparkOut
Posts: 2943
Joined: Sun Sep 23, 2007 4:58 pm

Re: User to enter characters with diacrical marks using Keyb

Post by SparkOut » Mon Dec 05, 2016 3:28 pm

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.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10078
Joined: Fri Feb 19, 2010 10:17 am

Re: User to enter characters with diacrical marks using Keyb

Post by richmond62 » Mon Dec 05, 2016 7:22 pm

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.

lewis
Posts: 28
Joined: Mon Dec 14, 2009 7:39 am

Re: User to enter characters with diacrical marks using Keyb

Post by lewis » Tue Dec 06, 2016 1:30 pm

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.

SparkOut
Posts: 2943
Joined: Sun Sep 23, 2007 4:58 pm

Re: User to enter characters with diacrical marks using Keyb

Post by SparkOut » Tue Dec 06, 2016 4:25 pm

You can report it here http://quality.livecode.com/

(SparkOut is a he, btw)

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10078
Joined: Fri Feb 19, 2010 10:17 am

Re: User to enter characters with diacrical marks using Keyb

Post by richmond62 » Fri Dec 09, 2016 12:39 pm

Keezer.png
Keezer.livecode.zip
Here's the stack.
(22.2 KiB) Downloaded 235 times

Post Reply