WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Setting keyboard layout for Xorg  (Read 8536 times)

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Setting keyboard layout for Xorg
« on: January 22, 2013, 07:05:41 AM »
If you want to change keyboard layout for Xorg in piCore, create xorg.conf file in /usr/local/share/X11 (or edit if already exists) and add a section like this:

Code: [Select]
Section "InputDevice"
    Identifier "Keyboard0"
    Driver "kbd"
    Option "XkbLayout" "hu"
    Option "XkbModel" "pc105"
EndSection

It is setting a Hungarian layout for a pc105 keyboard. Replace it with your own settings and add xorg.conf to backup to make it persistent.

You can put a small config file, for example mykbd.conf with the same content to /usr/local/share/X11/xorg.conf.d alternatively.

It is fixing the layout issue, but special keys and key combinations still doesn't work. It is the next step.
« Last Edit: January 22, 2013, 07:54:40 AM by bmarkus »
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11047
Re: Setting keyboard layout for Xorg
« Reply #1 on: January 22, 2013, 09:20:39 AM »
Huh, why not the standard /etc/X11 dir?
The only barriers that can stop you are the ones you create yourself.

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Setting keyboard layout for Xorg
« Reply #2 on: January 22, 2013, 09:25:47 AM »
Huh, why not the standard /etc/X11 dir?

Is it matter if doesn't worK :)

Just joking. It was picked up by configure as default at compile time. Anyhow, I have to rebuild it soon.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline Laskody

  • Newbie
  • *
  • Posts: 30
Re: Setting keyboard layout for Xorg
« Reply #3 on: February 11, 2022, 06:37:41 PM »
Hi! I am asking you for help. I have TC 13 with Xorg. I want to set the keyboard to Hungarian. I created the file: xorg.conf as described and added to backup. But it doesn't work, the keyboard stays in English. is it different with tc13?
location:

/usr/local/share/X11/xorg.conf

and the content is the same as bmarkus wrote.

Thanks!



Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14823
Re: Setting keyboard layout for Xorg
« Reply #4 on: February 12, 2022, 12:24:09 AM »
You need to put your config inside the directory /usr/local/share/X11/xorg.conf.d/

Offline Laskody

  • Newbie
  • *
  • Posts: 30
Re: Setting keyboard layout for Xorg
« Reply #5 on: February 12, 2022, 04:12:13 AM »
Thank you!
I made and add to backup, but after reboot it is still in english.

is the filename xorg.conf a problem in the xorg.conf.d directory?

kmap is installed and the command was added to bootlocal.sh
loadkmap < /usr/share/kmap/qwerty/hu101.kmap

Offline Laskody

  • Newbie
  • *
  • Posts: 30
Re: Setting keyboard layout for Xorg
« Reply #6 on: February 12, 2022, 04:43:09 AM »
I renamed it to 20-keyboard.conf but nothings happens  :-\

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11641
Re: Setting keyboard layout for Xorg
« Reply #7 on: February 12, 2022, 08:54:35 AM »
Hi Laskody
The  loadkmap < /usr/share/kmap/qwerty/hu101.kmap   command belongs in bootsync.sh, not bootlocal.sh.

On the subject of kmaps:
kmaps only affects the console and Xvesa, not Xorg.

I renamed it to 20-keyboard.conf but nothings happens  :-\
What does this command return:
Code: [Select]
grep "\.conf" /var/log/Xorg.0.log

Offline Laskody

  • Newbie
  • *
  • Posts: 30
Re: Setting keyboard layout for Xorg
« Reply #8 on: February 12, 2022, 03:53:04 PM »
Using system config directory: "usr/local/share/X11/xorg.conf.d"

Offline Laskody

  • Newbie
  • *
  • Posts: 30
Re: Setting keyboard layout for Xorg
« Reply #9 on: February 13, 2022, 05:35:08 AM »
When I run the command in the terminal:
Code: [Select]
setxkbmap -layout "hu"

Switches the language to Hungarian and its works.

how could i automate it at boot?

Offline Laskody

  • Newbie
  • *
  • Posts: 30
Re: Setting keyboard layout for Xorg
« Reply #10 on: February 13, 2022, 05:46:41 AM »
Solved! I renamed the file:
00-keyboard.conf in the xorg.conf.d directory and editet as:

Code: [Select]
Section "InputClass"
        Identifier "system-keyboard"
        MatchIsKeyboard "on"
        Option "XkbLayout" "hu"
        Option "XkbModel" "pc104"
        Option "XkbVariant" ",dvorak"
        Option "XkbOptions" "grp:win_space_toggle"
EndSection