Index > Scribe > National characters keyboard input.
Author/Date National characters keyboard input.
01/04/2002 3:30am
I've already written about this to Matthew, but it was LONG ago, so maybe he doesn't remember.

Microsoft usually offers two keyboard layouts for national special characters.
One of them places those chars on punctuation chars (somewhere like ;'[]) and they're directly available.
The other one (called "programmer's layout") requires right-alt combinations (e.g to get "s with dash" press "r-alt-s").

In both cases the program doesn't have to process any special messages nor catch out those characters to find their substitutes or something. The system does it for it, and Scribe is behaving well (means: Scribe lets those chars through and outputs correctly, if an appropriate code-page selected)

BUT to allow the user freely use r-alt combinations the programmer should watch out when implementing services invoked by ctrl+ ot alt+ combinations.
BECAUSE: right-alt is actually ctrl+alt.
And here's the problem.
In Scribe ctrl-A is "select all". When the user tries to enter "a with hook" he strikes: r-alt+A wich evolves to ctrl+alt+A. Then Scribe processes the ctrl+A message selecting all input. Then it passes the control and lets Windows put "a with hook". What happenes next? All input has been overwritten with "a with hook".

SOLUTION: when processing ctrl+ messages check out if alt flag is on. Do not process ctrl+ or alt+ messages when both ctrl and alt are pressed.

There. I hope you're not bored to death yet.
01/04/2002 7:08am
I still need help reproducing this on my machine... obviously I need to use this "programmers keyboard", but I don't know how to set it up.

Can you help me?
01/04/2002 10:38am
Keyboard layout is associated with language settings. To add another keyboard layout or switch between different layouts you need to use internat.exe. It is installed by default on non-English Windows and displays its icon on the task-bar. Another way to get there is by Control Panel -> Local Settings or try running internat.exe from the "Run:" window (the app should be in System directory).

On WinXP this feature is working smoothly.
On Win98 it's there, but dunno about it's functionality.

Actually, I think that you could easily modify the code of message processing for ctrl+ combinations without having to reproduce the situation.

Instead of:

//same code for ctrl+ combos
01/04/2002 6:28pm
I did as you suggest:

if (k.Ctrl() AND NOT k.Alt())

If you can test it for me I've put an exe here.

Install over v1.62 only, it won't be compatible with earlier versions of Lgi.dll and LgiNet.dll.
02/04/2002 8:05am
it works!
...both special r-alt combos and standard ctrl+ combinations.

One thing is strange thou'. When I select ISO-8859-2, I get all the chars right except "a-with-hook" under r-alt+A where I get Slovak soft "s".

That's strange because under ASCII code-page the character is just as it should be, that is "superscript 1" that is 0xB9.

OK. Now I've checked it - it's a problem with CP1252, which matches ISO-8859-2, but not with "a-with-hook". It is 0xB1 in ISO and 0xB9 in Windows.

I don't think you should consider it a bug. ISO is the standard so... never mind.

Thanks for the update.
02/04/2002 6:24pm
Thats great news. For the moment you can use the exe I gave you, and the next release will incorperate the fix for everyone else.

As for the A hook character, my codepage display is accurate for 0xB1 and 0xB9 according to this. However that may be wrong. My aim is to display ISO 8859-2 text exactly as per the ISO standard, as far as I can within the limitations of the windows font's.

So what hex character is being inputed when you hit right ctrl-a? and what is it supposed to look like?
03/04/2002 9:38am
When using programmer's layout, I get 0xB9 under r-alt+a. This is "small s with caron" according to ISO and it's what I can see.

In CP1252 0xB9 is "LATIN SMALL LETTER A WITH OGONEK" (a with hook), which is 0xB1 in ISO.

So.. Scribe implements the ISO code-page correctly. As for the Programmer's Keyboard Layout, there are ISO Layouts available.

Thanks again for the improvement.