6

I'm using

setxkbmap -query layout us,in -variant ,tam

to be able to enter tamil characters. I've not used it before, so I can't find the keys on the keyboard very easily. I've used

xkbcomp /usr/share/X11/xkb/geometry/microsoft - | xkbprint -color -o - - | ps2pdf - > out.pdf

to view a map of the geometry of the keyboard. But I'd like to be able to view the actual unicode symbols on the keys. I see things like <AE00> on the pdf.

4 Answers 4

3

I've been playing with xkbprint recently for viewing modified XKB geometries.

  1. Generate a keymap file with setxkbmap -print. Add whatever layout/variant/options you're interested in -- for your case you might use -model microsoft -layout in -variant tam. The -print option shows what would be loaded with the given options but won't change your current settings. You'll probably get nicer output generating one layout at a time rather than using -layout us,in.

  2. Compile that keymap with xkbcomp.

  3. Convert that to a ps/pdf: xkbprint -label symbols foo.xkm - | ps2pdf - > foo.pdf.

All together:

setxkbmap -model microsoft -layout in -variant tam -print | 
  xkbcomp - - | 
  xkbprint -label symbols -color - - | 
  ps2pdf - > foo.pdf 
2

In the xkbprint man page, it shows..

-label type Specifies the labels to be printed on keys; legal types are: none, name,code,symbols.

I therefore assume that this should do the trick for you:

xkbcomp /usr/share/X11/xkb/geometry/microsoft - | xkbprint -label symbols -color -o - - | ps2pdf - > out.pdf
2
  • It gives the following error: Error: XKM file "stdin" doesn't have symbols. Cannot label keys as requested. Exiting
    – user128063
    Commented Feb 28, 2017 at 23:47
  • that xkbcomp command only compiles a geometry file, hence the missing symbols.
    – quixotic
    Commented Apr 2, 2017 at 11:06
0

From anwser from @quixotic , I would add step 0:

$ setxkbmap -print
xkb_keymap {
        xkb_keycodes  { include "evdev+aliases(qwerty)" };
        xkb_types     { include "complete"      };
        xkb_compat    { include "complete"      };
        xkb_symbols   { include "pc+latam+inet(evdev)"  };
        xkb_geometry  { include "pc(pc105)"     };

Then use instead (pay attention to single quotes) :

$ setxkbmap -model pc -layout latam -geometry 'pc(pc105)' -print ...

Again, pay attention to single quotes, otherwise result in "Error: XKM file "stdin" doesn't have symbols"

2
0

If the keyboard layout you want to visualize can be found/loaded by GNOME (LibXklavier), you can use the gkbd-keyboard-display application from libgnomekbd:

bash% gkbd-keyboard-display --layout us

Variants of a layout must be separated with a tab character:

bash% gkbd-keyboard-display --layout $'us\tdvorak'

gkbd-keyboard-display visualizing the US (Dvorak) keyboard layout

bash% gkbd-keyboard-display --layout $'in\ttam'

gkbd-keyboard-display visualizing the Indian Tamil (InScript, with Arabic numerals) keyboard layout

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .