Re: Text Editor

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



"Giovanni Dicanio" <giovanniDOTdicanio@xxxxxxxxxxxxxxxxx> wrote in message
news:u5ChPoWXJHA.5980@xxxxxxxxxxxxxxxxxxxxxxx
Alex Blekhman wrote:

Wow! I have just looked at Italian layout here:

http://www.microsoft.com/globaldev/reference/keyboards.mspx

I must say that you have quite loaded keyboard layout.

I've just spent the last couple weeks dealing with EU keyboards and their
input. And I discovered, btw, that similar to the old ALT-NUMKEYPAD for
producing characters from the old OEM-ANSI character set (incidentally
CP-437 : terminal, same as a US/English cmd.exe 's code page), you can
generate any character from Windows Code Page-1252 (Western European) by
simply preceeding the NUMPAD digits with a zero. So, if you wanted character
232 from CP-1252 you hold down the alt key and press 0232 then release the
alt key, as I will now demonstrate: --> è <-- see!. That might sound like
no-great-shakes but CP-1252 happens to contain pretty-much every important
EU character if you look below:

http://en.wikipedia.org/wiki/Windows-1252

Best of all, notice that from 00 -> 0x7F cp1252 it's in 1-1 correspondence
with UNICODE, then from 0x80->0x9F it's mixed up a bit with some special
punctuation and things like O etc..., but after that it resumes it's 1-1
matching with UNICODE. So that includes everything from À -> Ý, then lower
case à -> ý as well as some of those german chars like ß etc. Also for
spanish you have Ñ and ñ (the "ny" sound). So you can type pretty much
everything EU with ALT-0NUM with NUM [0->255].

So I just always assume this code page when dealing with EU keyboards and
characters. There's a simple sequence of calls to convert scan-code +
keyboard layout to UNICODE from the extended key data (on WM_KEYDOWN) which
I then map back to cp-1252 to see what the hell that character is supposed
to look like (this is not windows controls, no fonts or anything, it's just
straight image drawing with Direct3D). So... thankfully, at present I don't
have to resort to converting everything to UNICODE to cover most EU
languages. Just a small portion of it, namely cp1252, does the trick!

- Alan Carre


.



Relevant Pages

  • Re: keyboard accents problem
    ... portuguese brazilian and keyboard layout: ... keyboard legends), then you can use US International without dead keys, ... and use the compose key to start writing the special ones. ... press and release a symbol key representative of the accented character ...
    (Fedora)
  • Re: Cannot unlock W2K computer if user password contains french character
    ... English keyboard layout. ... it used the user's default French keyboard layout. ... >>I have a user who has a french character in their ... >>saver locks the computer or if they manually lock it from ...
    (microsoft.public.win2000.security)
  • Re: "quotation mark" issue in XP
    ... When I hit the key, no character appears until I hit ... > for a device driver at Microsoft.com but this is the one ... Intl keyboard layout that lets you add accented characters. ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: IE event and keyCode/charCode
    ... charCodeAt returns the correct number, but event.keyCode returns a wrong number, when using one of the keys that are different on a Danish keyboard layout. ... Etc. (The input-field in the sample code below displays the right character). ... Hold down the shift key, and you get 85 for both, which is the code for an upper case U character and the U key. ... charCode takes into account the whether modifier keys are pressed, keyCode doesn't. ...
    (comp.lang.javascript)
  • Keyboard Layout for WinCE 4.2 or 5.0
    ... Not have the character 'Ł'. ... I check source codes for keyboard layout. ... The unicode for 'Ł'is correct in source codes. ...
    (microsoft.public.windowsce.platbuilder)