Automatically Generated Keyboard Accelerators (replacing kaccelgen.h)

Thiago Macieira thiago at kde.org
Wed Jun 11 14:20:42 BST 2008


On Wednesday 11 June 2008 13:28:42 Mark Summerfield wrote:
> I just have a standard US 101 key keyboard but you guys seem to be
> saying that Russian and other keyboards have a lot more keys that can be
> used with Alt. So on the face of it that sounds like n gets big and the
> time complexity worse... but if you have 200 characters to choose from
> and your menu has only 25 items (and not many are even that long), then
> it should be easier (i.e., faster) to find suitable accelerators because
> there are far more valid characters to choose from. So I'm not convinced
> this would be a problem in practice. (And you could always reduce the
> depth if it was.)

This isn't about the keyboard. No keyboard has 200 keys you can choose from, 
even with complex input methods like those in CJK.

This is about the alphabet that the accel gen accepts as legal accelerators. 
An application when shown in Russian will only have Cyrillic text 
(hopefully), which means only the Cyrillic letters will ever be selected. The 
rest of that alphabet -- that is, Greek, Latin, Hebrew, Arabic -- will go 
unused.

The point here is that we can't detect which keyboard layout is being used at 
runtime without making the interface seem random (i.e., accelerators you're 
used to depend on which layout you happened to be using when the app 
started). It's much more stable if the accelerators depend only on the text.

So, I now think this isn't a real alarm. The intersection of the legal 
alphabet with the number of different characters in the text will always be 
contained to 50 or less entries.

-- 
  Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20080611/bd514e2d/attachment.sig>


More information about the kde-core-devel mailing list