8

In my distribution (Slackware 13.37), the console keyboard layout is chosen among some of those available in /usr/share/kbd/keymaps ' sub directories, coming from the kbd package.

Under X instead the keyboard layout is chosen in a "layout" list included in the file /etc/X11/xkb/rules/evdev.lst.

Does anybody knows a way to, given some console keyboard layout, map it to an X keyboard layout, in order to set up accordingly the "XkbLayout" option in an X configuration file?

I am specially interested in knowing the way other distributions than Slackware deal with this for initial configuration.

2

Well, how I understand it, in Debian, in /etc/default/keyboard you set the variables XKB{MODEL,LAYOUT,VARIANT,OPTIONS} with values you would use for XKB.

Then, at bootup, setupcon(1) reads those variables and calls ckbcomp(1), which, as its manpage says, “compile[s] a XKB keyboard description to a keymap suitable for loadkeys or kbdcontrol“.

Finally, loadkeys(1) is called on the compiled file.

HTH.

(Or maybe you meant the opposite. I'm not really sure now...)

  • Slackware 13.37 doesnt have /etc/default/keyboard – LnxSlck Sep 9 '12 at 17:42
0

There is no magic, the distributions just have to maintain an array of triplets: "keyboard layout text description", "console keyboard layout options", "X11 keyboard layout options", and provide a tool to select and configure the layouts.

If the distribution doesn't do that, then it is up to the user to manually configure console and X11 keyboard, and thus up to the user to make them coherent together.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.