[lazarus] CVS updates

Marc Weustink marc at dommelstein.net
Thu Oct 16 20:41:42 EDT 2003


Hi,

It has been quiet a while and for a reason. The GTK keyboard event handling 
code is merely rewritten.

* Every key has now a unique VK_keycode, no matter what CTRL SHFT ALT 
combination is used, no matter what input locale is used

* All extra keys on a Microsoft Internet keyboard (or alike) generate a 
corresponding VK_keycode, they are passed through the KeyUp and KeyDown events

* All single byte input locales now generate a Keypress event. So typing 
accented chars should work

* CTRL-@ through CTRL-Z now also generate a Keypress event with #0..#26 as char


Ok that were the good things, now the known issues

First a general remark on VK_keycodes. VK_keycodes are only exactly defined 
for the keys A-Z and 0-9.
On western keyboards, the A-key generates a VK_A, the B-key a VK_B etc.
On non western keyboards the VK_A etc. is still generated. Only now we have 
to map a character to a VK_Keycode. If a layout is conclusive, the 
generated VK_keycodes are constant.
In all other cases a VK_keycode is generated and it might differ, based on 
keyboard, (X)window server and platform


+ Dead keys:
Dead keys aren't completely supported. They will generate a keypress but 
won't always generate a KeyUp and KeyDown. Even worse on some keyboard 
layouts and/or on some X servers a dead char is mapped to a 'virtual' (IE, 
not on your keyboard) key or to an existing non dead key. In those cases a 
wrong VK_Keycode may be passed to Keyup and KeyDown

+ Cyrillic keyboards:

I've found 2 complete different layouts.
    VK_A on a russian layout generates a cyrillic_EF
    VK_A on a serbian layout generates a cyrillic_A

Since mapping cyrillic_A to VK_A is easier so that encoding is used.

+ UTF8:
UTF8 and other multibyte character encodings aren't supported (yet). The 
editor won't draw then anyway.

+ Added more X dependency, so the gtk-win32 is a bit broken now. I still 
have to implement the missing parts yet.

+ VK_IRREGULAR is gone (every key has an uniqe VK_ so it was obsolete)

This al is tested on the following layouts/languages:
US, Arabic, Czech, Russian, Greek, Thai (and some others)

As reference on layouts etc. I used 
http://www.microsoft.com/globaldev/reference/keyboards.aspx and the 
Microsoft Keyboard Layout Creator


Have fun, and please report me if there is something broken.

Marc






More information about the Lazarus mailing list