Joined: 21 Jun 2004
|Posted: Tue Apr 06, 2010 6:28 pm Post subject: [Mini-Howto] creating a keyboard as SVG
|I just had the task to visualize shortcuts for an application, so what could be a better base than an image of the actual keyboard? After some googling and trial & error, this is what I got...
1. you need:
- media-gfx/pstoedit (USE=plotutils)
- something to edit the resulting file to your needs, I chose media-gfx/inkscape
2. the needed commands
|xkbcomp -m $map $in $out |
for example, to get the generic pc105, you need to issue the following, where pc105.xkm is a name of your choosing
|xkbcomp -m pc105 /usr/share/X11/xkb/geometry/pc pc105.xkm |
This creates an postscript-file (.ps) in the current directory, in this example it would be pc105.ps
|pstoedit -f plot-svg pc105.ps > pc105.svg |
This creates the actual SVG
I recommand reading each's command "-help" or manpage, they've got interesting features, f.e. using keycodes instead of symbols, rotation, language to use, etc.
Open up the created .svg in an editor of your choice, do fillings, add symbols or whatever you need.
Example output: http://omploader.org/vNDJtNA
Edit, credits to this thread -> http://aseigo.blogspot.com/2007/11/keyboardsvg.html