You are not logged in.

#1 2018-11-18 02:02:54

duyinthee
Member
Registered: 2015-06-14
Posts: 222
Website

[SOLVED] Chromebook keyboard layout in KDE

I installed Arch + plasma on Asus C300s chromebook.
Everything works great. Screen backlight and volume keys are handled by plasma desktop and work out of box.
But Alt_R+Search for CapLocks and Alt+Backspace for Delete are not working even if I installed xkeyboard-config and have this:

[msh@mshAsusC300s ~]$ localectl
   System Locale: LANG=en_US.UTF-8
       VC Keymap: us
      X11 Layout: us
       X11 Model: chromebook

I check Keyboard Model in System Settings > Input Devices > Keyboard and Hardware tab for chromebook, but I don't find it. It set as default to Generic | Generic 101-key PC.

I also have this:

partial alphanumeric_keys
xkb_symbols "chromebook" {
        include "level3(ralt_switch)"
        key <FK01> {    [ XF86Back ] };
        key <FK02> {    [ XF86Forward ] };
        key <FK03> {    [ XF86Reload ] };
        key <FK04> {    [ F11 ] };
//        key <FK05> {    [ F5, F5, F5, F5 ] }; // Overview key
        key <FK06> {    [ XF86MonBrightnessDown ] };
        key <FK07> {    [ XF86MonBrightnessUp ] };
        key <FK08> {    [ XF86AudioMute ] };
        key <FK09> {    [ XF86AudioLowerVolume ] };
        key <FK10> {    [ XF86AudioRaiseVolume ] };
        key <BKSP> {    [ BackSpace, BackSpace, Delete ] };
        key <UP>   {    [ Up, Up, Prior, Up ] };
        key <DOWN> {    [ Down, Down, Next, Down ] };
        key <LEFT> {    [ Left, Left, Home, Left ] };
        key <RGHT> {    [ Right, Right, End, Right ] };
        key <LWIN> {    [ Super_L, Super_L, Caps_Lock, Super_L ] };
};

in /usr/share/X11/xkb/symbols/inet file.

Please, any help is appreciated.

Last edited by duyinthee (2018-11-19 02:11:10)

Offline

#2 2018-11-18 07:55:11

seth
Member
Registered: 2012-09-03
Posts: 52,625

Re: [SOLVED] Chromebook keyboard layout in KDE

setxkbmap -print -query

?

Offline

#3 2018-11-18 08:56:25

duyinthee
Member
Registered: 2015-06-14
Posts: 222
Website

Re: [SOLVED] Chromebook keyboard layout in KDE

thanks.
Ahhh... here:

[msh@mshAsusC300s ~]$ setxkbmap -print -query
xkb_keymap {
        xkb_keycodes  { include "evdev+aliases(qwerty)" };
        xkb_types     { include "complete"      };
        xkb_compat    { include "complete"      };
        xkb_symbols   { include "pc+us+mm:2+inet(evdev)"        };
        xkb_geometry  { include "pc(pc101)"     };
};
rules:      evdev
model:      pc101
layout:     us,mm

thank you. the problem is there:

model:      pc101

I did

$ setxkbmap -model chromebook

then it works. All hotkeys, delete and caplocks are working but as you know it doesn't persist after reboot.

I wonder KDE's keyboard setting overrides XKB options /etc/X11/xorg.conf.d/00-keyboard.conf file which is generated by running localectl
see here in notes block: https://wiki.archlinux.org/index.php/Xo … figuration

And there is no option for "chromebook" in KDE's System Settings > Input Devices > Keyboard > Hardware tab > Keyboard Model

So, what is the right way to set my Keyboard Model to chromebook.
Should I autostart

$ setxkbmap -model chromebook

I feels it's ugly.

Last edited by duyinthee (2018-11-18 11:58:57)

Offline

#4 2018-11-18 13:10:04

seth
Member
Registered: 2012-09-03
Posts: 52,625

Re: [SOLVED] Chromebook keyboard layout in KDE

Maybe. What does 00-keyboard.conf look like and especially how do you add the burmese layout?

Offline

#5 2018-11-19 02:05:47

duyinthee
Member
Registered: 2015-06-14
Posts: 222
Website

Re: [SOLVED] Chromebook keyboard layout in KDE

Yes, my 00-keyboard.conf is like this:

# Written by systemd-localed(8), read by systemd-localed and Xorg. It's
# probably wise not to edit this file manually. Use localectl(1) to
# instruct systemd-localed to update it.
Section "InputClass"
        Identifier "system-keyboard"
        MatchIsKeyboard "on"
        Option "XkbLayout" "us"
        Option "XkbModel" "chromebook"
EndSection

I added Burmese layout in System Settings > Input Devices > Keyboard > Layouts.

If I set my layouts in 00-keyboard.conf using localectl, does KDE stop overriding xkb options? I don't think so, but I will test it.

At the moment, my quick solution is writing child script like below and autostart it.

#! /bin/bash

ckmodel=$(setxkbmap -print -query | awk '/model:/ {print $2}')

if [[ $ckmodel == "chromebook" ]]; then
        exit 0
else
        sleep 1s
        setxkbmap -model chromebook
fi

Last edited by duyinthee (2018-11-19 02:10:09)

Offline

#6 2018-11-19 03:26:14

damjan
Member
Registered: 2006-05-30
Posts: 453

Re: [SOLVED] Chromebook keyboard layout in KDE

why don't you just use KDE to configure XKB?

or try setting he model in
~/.config/kxkbrc

Offline

#7 2018-11-19 06:19:33

duyinthee
Member
Registered: 2015-06-14
Posts: 222
Website

Re: [SOLVED] Chromebook keyboard layout in KDE

damjan wrote:

why don't you just use KDE to configure XKB?

or try setting he model in
~/.config/kxkbrc

Thanks, it exactly works.

I set my model:

Model=chromebook

in
~/.config/kxkbrc.

It works perfect.

Thanks. I have learned new things.

Offline

#8 2021-12-20 17:49:30

paulmcauley
Member
Registered: 2021-12-20
Posts: 1

Re: [SOLVED] Chromebook keyboard layout in KDE

duyinthee wrote:
damjan wrote:

why don't you just use KDE to configure XKB?

or try setting he model in
~/.config/kxkbrc

Thanks, it exactly works.

I set my model:

Model=chromebook

in
~/.config/kxkbrc.

It works perfect.

Thanks. I have learned new things.

Just some more information to get this working. In the ~/.config/kxkbrc file the added line needs to be in the [Layout] section i.e.:

[Layout]
Model=chromebook

Offline

Board footer

Powered by FluxBB