#accelerator #mnemonic #gui #keyboard #alt

bin+lib accelhints

Accelhints is a library for inserting keyboard Alt-key accelerators (i.e., '&'s) in a slice of items (e.g., menu items or dialog labels)

4 stable releases

1.1.0 Jan 29, 2023
1.0.2 Sep 13, 2022
1.0.0 Mar 24, 2022

#228 in GUI

GPL-3.0-or-later

17KB
332 lines

Accelhints

Accelhints is a library for inserting keyboard Alt-key accelerators (i.e., '&'s) in a slice of items (e.g., menu items or dialog labels).

There is also an executable: accelhints infile.txt > outfile.txt.

There is also a Go library accelhint.

crates.iodocs

Example

Here the user has predefined one accelerator (Cu&t) in the input:

Undo
Redo
Copy
Cu&t
Paste
Find
Find Again

Here is accelhints' output:

&Undo
&Redo
&Copy
Cu&t
&Paste
&Find
Find &Again

Without help from the user the output would be:

&Undo
&Redo
C&opy
&Cut
&Paste
&Find
Find &Again

This is why it is probably best to use the tool on the command line with a text file of all the menus and dialog labels. But at a pinch the library can be used to dynamically create acceptable if not perfect keyboard accelerators.

License

GPL-3.0.

Other Free Software

www.qtrac.eu.

Dependencies

~1.5–2.1MB
~45K SLoC