Automatically Generated Keyboard Accelerators (replacing kaccelgen.h)

Mark Summerfield mark at qtrac.eu
Tue Jun 10 07:09:39 BST 2008


On 2008-06-09, Albert Astals Cid wrote:
> A Dilluns 09 Juny 2008, Mark Summerfield va escriure:
[snip]
> While you are at it, what would totally rock if you could make the
> generator not assign acceletators to keys that can't be accelerators,
> for example with a spanish keyboard you can not type ó with a single
> keystroke (altough ó exists and is completely correct) so Alt + ó as
> accelerator won't work.
>
> But probably this involves fiddling with keymaps and stuff and is not
> easy.

My generate*() functions have two optional extra parameters compared
with the existing ones: alphabet which defaults to 0-9A-Z (and depth
which defaults to 6000 but may change today). Only characters in the
alphabet are considered valid for accelerators so by default ó would not
be considered. You can of course change the alphabet to any strings of
Unicode characters you like, the only constraint being that the
algorithm is case-insensitive so there's no point in using both 'a' and
'A'.

-- 
Mark Summerfield, Qtrac Ltd., www.qtrac.eu





More information about the kde-core-devel mailing list