You are not logged in.

#1 2020-06-12 08:02:59

DCx86
Member
From: Uppsala
Registered: 2018-02-20
Posts: 47

[SOLVED] Changing the keyboard to romanian layout doesn't work

I have a minimal setup, I'm running archlinux with dwm.
Changing my keyboard layout doesn't work. Instead of a romanian keyboard I get the regular english keyboard. It does work for other languages.
I tried setting the keyboard layout like this:

setxkbmap ro

Does anyone here has any idea what's going on here, am I missing some packages or something? Thanks!

Last edited by DCx86 (2020-06-15 17:07:07)

Offline

#2 2020-06-12 09:43:15

Awebb
Member
Registered: 2010-05-06
Posts: 6,688

Re: [SOLVED] Changing the keyboard to romanian layout doesn't work

I'm not sure if it's relevant, but locale.gen is configured and locale-gen has done its job?

Offline

#3 2020-06-12 12:40:05

DCx86
Member
From: Uppsala
Registered: 2018-02-20
Posts: 47

Re: [SOLVED] Changing the keyboard to romanian layout doesn't work

Yes, I double checked it now. All looks good there. Seems like it works for every other language except ro.

Offline

#4 2020-06-12 13:37:01

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,790

Re: [SOLVED] Changing the keyboard to romanian layout doesn't work

stat /usr/share/X11/xkb/symbols/ro
xkbcomp -I /usr/share/X11/xkb/symbols/ro
setxkbmap -print -query
setxkbmap ro
setxkbmap -print -query

Offline

#5 2020-06-15 08:15:29

DCx86
Member
From: Uppsala
Registered: 2018-02-20
Posts: 47

Re: [SOLVED] Changing the keyboard to romanian layout doesn't work

Thank you seth for your help. I followed the steps but have the same result. Here is a snippet with the output.

[I] ➜ stat /usr/share/X11/xkb/symbols/ro
  File: /usr/share/X11/xkb/symbols/ro
  Size: 11261           Blocks: 24         IO Block: 4096   regular file
Device: fe02h/65026d    Inode: 3152473     Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2020-06-12 09:43:18.043730822 +0200
Modify: 2020-06-03 10:56:26.000000000 +0200
Change: 2020-06-04 11:42:15.978362671 +0200
 Birth: 2020-06-04 11:42:15.978362671 +0200

~
[I] ➜ xkbcomp -I /usr/share/X11/xkb/symbols/ro

~
[I] ➜ setxkbmap -print -query
xkb_keymap {
        xkb_keycodes  { include "evdev+aliases(qwerty)" };
        xkb_types     { include "complete"      };
        xkb_compat    { include "complete"      };
        xkb_symbols   { include "pc+us+inet(evdev)"     };
        xkb_geometry  { include "pc(pc105)"     };
};
rules:      evdev
model:      pc105
layout:     us

~
[I] ➜ setxkbmap ro

~
[I] ➜ setxkbmap -print -query
xkb_keymap {
        xkb_keycodes  { include "evdev+aliases(qwertz)" };
        xkb_types     { include "complete"      };
        xkb_compat    { include "complete"      };
        xkb_symbols   { include "pc+ro+inet(evdev)"     };
        xkb_geometry  { include "pc(pc105)"     };
};
rules:      evdev
model:      pc105
layout:     ro

~
[I] ➜ ;;;;p[[[yyyyyyyyyyyyyyyy

Offline

#6 2020-06-15 10:16:47

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,790

Re: [SOLVED] Changing the keyboard to romanian layout doesn't work

There's no error in the layout and you can set it w/ setxkbmap.
Looking at https://en.wikipedia.org/wiki/Romanian_keyboard_layout - which one do you expect? (it seems largely QWERTZ or QWERTY w/ some accented chars and the QWERTZ variant as some AltGr deviations.

Here're the variants

grep -A5 xkb_symbols /usr/share/X11/xkb/symbols/ro

Offline

#7 2020-06-15 17:06:42

DCx86
Member
From: Uppsala
Registered: 2018-02-20
Posts: 47

Re: [SOLVED] Changing the keyboard to romanian layout doesn't work

Thank you so much seth! that grep helped! it was ro std that I needed.

 setxkbmap ro std 

Offline

#8 2020-06-15 17:13:29

DCx86
Member
From: Uppsala
Registered: 2018-02-20
Posts: 47

Re: [SOLVED] Changing the keyboard to romanian layout doesn't work

 setxkbmap -layout us,se,'ro std' -option grp:alt_shift_toggle 

Now it seems that I can't set 'ro std' in this command. Having a space is ignored. I also tried, quotes, underscore, dash, parenthesis....

Offline

#9 2020-06-15 17:22:55

Ropid
Member
Registered: 2015-03-09
Posts: 1,069

Re: [SOLVED] Changing the keyboard to romanian layout doesn't work

From what I understand looking at "man setxkbmap", you need to do it like this:

setxkbmap -layout us,se,ro -variant ,,std -option grp:alt_shift_toggle

That's supposed to be two empty variant entries for "us" and "se", and then the "std" variant for "ro".

Something else: there's a tool "localectl" that comes with systemd. It can help you write a config file for Xorg for the keyboard layout. You then don't need to run setxkbmap in your login scripts. An Xorg config file also helps with things like standby/resume problems. The keyboard will disconnect and reconnect on standby/resume and you then lose the setxkbmap settings.

Using localectl looks like this, I think:

localectl set-x11-keymap us,se,ro "" ,,std grp:alt_shift_toggle

The tool will write a file /etc/X11/xorg.conf.d/00-keyboard.conf.

Offline

#10 2020-06-16 06:43:58

DCx86
Member
From: Uppsala
Registered: 2018-02-20
Posts: 47

Re: [SOLVED] Changing the keyboard to romanian layout doesn't work

Thank you very much Ropid, I was about to setxkmap in my login scripts, it's really good too know that there is a better way to do it!

Offline

Board footer

Powered by FluxBB