Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Mini-Howto] creating a keyboard as SVG
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
avx
Advocate
Advocate


Joined: 21 Jun 2004
Posts: 2070

PostPosted: Tue Apr 06, 2010 6:28 pm    Post subject: [Mini-Howto] creating a keyboard as SVG Reply with quote

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:
- x11-apps/xkbcomp
- x11-apps/xkbprint
- media-gfx/pstoedit (USE=plotutils)
- something to edit the resulting file to your needs, I chose media-gfx/inkscape

2. the needed commands
a)
Code:
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
Code:
xkbcomp -m pc105 /usr/share/X11/xkb/geometry/pc pc105.xkm


b)
Code:
xkbprint pc105.xkm

This creates an postscript-file (.ps) in the current directory, in this example it would be pc105.ps

c)
Code:
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.

3. (optional)
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

Enjoy :)

Edit, credits to this thread -> http://aseigo.blogspot.com/2007/11/keyboardsvg.html
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum