Page 1 of 1

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

Posted: 13 Feb 2019, 14:24
by rongten
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

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

Posted: 13 Feb 2019, 15:28
by fanthom
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.

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

Posted: 14 Feb 2019, 12:38
by rongten
Ok, Thanks.

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

Cheers