On Wed, Oct 12, 2011 at 1:59 PM, patrick keshishian <[email protected]> wrote: > On Tue, Oct 11, 2011 at 2:09 PM, Philip Guenther <[email protected]> wrote: >> On Tue, Oct 11, 2011 at 12:34 PM, S V <[email protected]> wrote: >>> I have one pretty specific problem, i have two USB keyboards >>> attached to the samsung nc10 laptop. And then i want to >>> attach different layouts to each i >>> stumble into one problem. >>> >>> $ xinput -list >> ... >>> So i can't separate each keyboard from others by device ids... >>> Can anybody help me to find where source of this behavior >>> lie and how i can fix it? > > this is interesting to me, because I wondered about this a few days ago. > >> The multiplexing of the two keyboards to one input is done here, I >> believe, in the wscons layer. B If so, it should be possible to use >> wsconsctl to set the mappings of the two independently. B For example, >> on my laptop, when docked with a USB keyboard plugged in, wsconsctl >> shows entries for "keyboard.map" (the built-in keyboard) and >> "keyboard1.map" (the USB keyboard). > > I have a netbook where I have: > > $ grep keyboard /etc/wsconsctl.conf B | grep -v ^# > keyboard.encoding=us.swapctrlcaps > > Then I want to connect a Sun keyboard (with the Control key in its > proper location) via USB connection. > > $ sudo wsconsctl | grep keyboard | grep -e encoding -e type > wsconsctl: Use explicit arg to view keyboard.map. > wsconsctl: Use explicit arg to view keyboard1.map. > keyboard.type=pc-xt > keyboard.encoding=us.swapctrlcaps > keyboard1.type=usb > keyboard1.encoding=us > > In the virtual terminal (this is -current-ish amd64) each keyboard > acts independently with their respective encoding. On the netbook > keyboard, CapsLock acts as the Control key, while on the Sun keyboard, > Control acts as Control (as it should). Enabling caps-lock on the > netbook keyboard, does not affect the Sun keyboard and vice versa (as > expected). > > However, in X11, both keyboards act as if swapctrlcaps are enabled. > Pressing Control on the Sun keyboard turns on caps-lock on both > keyboards. > > I attempted to play with xorg.conf to see if I can define a separate > InputDevice section for the Sun keyboard, but gave up after a few > permutations. The X documentation (man-pages) pretty much suck. > > I wasn't going to post on this topic, but since it has been brought > up, might has well ask: Is what I want to do possible in Xorg? > > Cheers, > --patrick > >
X use /dev/wskbd (it is mux) on default. it is one keyboard for X. for separate settings need to define section "InputDevice" for every keyboards (/dev/wskbdX) as example xorg.conf:Section "ServerLayout"B B ...B B InputDevice "Kb1" "CoreKeyboard"B B InputDevice "Kb2" "SendCoreEvents"EndSection Section "ServerFlags"B B # This off auto configure, therefore need configure mouse manualyB B Option "AutoAddDevices" "False"EndSection Section "InputDevice"B B Identifer "Kb1"B B Driver "kbd"B B Option "Device" "/dev/wskbd0"B B Option "XkbLayout" "..."B B ...EndSection Section "InputDevice"B B Identifer "Kb2"B B Driver "kbd"B B Option "Device" "/dev/wskbd1"B B Option "XkbLayout" "..."B B ...EndSection -- Alexandr Shadchin

