Use of different keyboard layouts for keyboard and other usb hid devices

Post here if you are a new Porteus member and you're looking for some help.
rongten
Ronin
Ronin
Posts: 2
Joined: 13 Feb 2019, 13:32
Distribution: 4.8.0

Use of different keyboard layouts for keyboard and other usb hid devices

Post#1 by rongten » 13 Feb 2019, 14:24

Hello,

I have a special case where I need to have a porteus kiosk on a laptop where the keyboard needs to be in "fr" and 2 external usb hid devices (i.e. barcode scanner) in "us".

After some troubles, I have come to the solution of adding a file to the 003-settings.xzm in /etc/X11/xorg.con where I put

Code: Select all

Section "InputClass"
        Identifier "system-keyboard"
        MatchIsKeyboard "on"
        Option "XkbLayout" "fr"
        Option "XkbModel" "pc104"
EndSection


Section "InputClass"
        Identifier "NEWTOLOGIC NEWTOLOGIC"
        MatchUSBID "060e:16c1"
        MatchIsKeyboard "on"
        Option "XkbLayout" "us"
        Option "XkbVariant" ","
        Option "XkbOptions" ""
EndSection


Section "InputClass"
        Identifier "Sycreader RFID Technology Co., Ltd SYC ID&IC USB Reader"
        MatchUSBID "08ff:0009"
        MatchIsKeyboard "on"
        Option "XkbLayout" "us"
        Option "XkbVariant" ","
        Option "XkbOptions" ""
EndSection


However I need as well to modify etc/xdg/openbox/autostart, where I comment out a line:

Code: Select all

#setxkbmap -layout us,lay2 -variant ,var2 2>/dev/null
I am testing to see that it works correctly.

Of course, in this way there is some hardcoding, I do not know if there is a better way to handle this circumstance?

Regards

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5667
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Re: Use of different keyboard layouts for keyboard and other usb hid devices

Post#2 by fanthom » 13 Feb 2019, 15:28

Hi rongten,

If you find a way to use 'xinput' for these modifications then you could use it directly with the 'run_command=' parameter.
If this is not possible then ISO customization is the only way.
Please add [Solved] to your thread title if the solution was found.

rongten
Ronin
Ronin
Posts: 2
Joined: 13 Feb 2019, 13:32
Distribution: 4.8.0

Re: Use of different keyboard layouts for keyboard and other usb hid devices

Post#3 by rongten » 14 Feb 2019, 12:38

Ok, Thanks.

I will try your suggestion next time I need to create a new iso and report.

Cheers

Post Reply