ramfree17 Posted October 21, 2006 Report Share Posted October 21, 2006 background: i bought my laptop while I was in Helsinki thus it has a finnish keyboard layout. since i find the keyset less than appealing and i do a few rounds of gaming here and there i bought a compact usb keyboard here in Manila. the usb keyboard is recognized and usable but the keys are set for US international and to save space the non-alphabet keys are placed in different area. is there an app or utility in X that will allow me to change the keyboard layout dynamically without requiring a restart of the X server? something with shortcuts would be excellent since i need something that will allow me or my wife to configure the input depending if we are using the usb kb or the built-in one. thanks. ciao! Quote Link to comment Share on other sites More sharing options...
neddie Posted October 21, 2006 Report Share Posted October 21, 2006 Of course! If you're using KDE, go to Start -> System -> Configuration -> KDE -> Regional & Accessibility -> Keyboard layout and select the layouts you want to add to the list. You can also choose the switching options if you want. By default you can switch layouts with Ctrl-Alt-k or by clicking on the taskbar icon with the flag,. If you're using gnome, dunno :D Quote Link to comment Share on other sites More sharing options...
ramfree17 Posted October 21, 2006 Author Report Share Posted October 21, 2006 neither. im using fluxbox. :lol: i would rather stick to using fluxbox so cli apps that i can invoke in a terminal would be optimal. if not then i would consider going back to kde and lose my quick login options... :) thanks neddie. ciao! Quote Link to comment Share on other sites More sharing options...
Gowator Posted October 21, 2006 Report Share Posted October 21, 2006 You can leave both keyboards plugged in and just set the keymap in the relevant stanza for xorg.conf Option "XkbLayout" "<code>" but you then need to identify the keyboards cat /dev/input/event0 should show the first keyboard see something like ls /dev/input/ by-path event0 event1 event2 mice mouse0 ts0 so now you need 2x keyboard stanza's using the correct /dev/input for each Section "InputDevice" Identifier "Keyboard0" Driver "keyboard" # this is for supporting deadkeys Option "XkbRules" "xfree86" Option "XkbModel" "aa" Option "XkbLayout" "aa" EndSection Section "InputDevice" Identifier "Keyboard1" Driver "keyboard" Option "Protocol" "usbev" Option "Device" "/dev/input/event0" Option "XkbModel" "xx" Option "XkbLayout" "xx" EndSection Quote Link to comment Share on other sites More sharing options...
ramfree17 Posted October 22, 2006 Author Report Share Posted October 22, 2006 thanks gowator. ill try that once i am done with this work documentation that i need to do in MS. too much formatting styles that does not fare well in OOo. ciao! Quote Link to comment Share on other sites More sharing options...
ramfree17 Posted October 25, 2006 Author Report Share Posted October 25, 2006 bummer, gowator's xorg.conf did not work (or i am not doing it properly). i added these lines Section "InputDevice" Identifier "Keyboard2" Driver "kbd" Option "Protocol" "usbev" Option "Device" "/dev/input/event3" Option "XkbModel" "pc105" Option "XkbLayout" "us" Option "XkbOptions" "compose:rwin" EndSection Section "ServerLayout" Identifier "layout1" InputDevice "Keyboard1" "CoreKeyboard" InputDevice "Keyboard2" "CoreKeyboard" # <-- Added line InputDevice "Mouse1" "CorePointer" InputDevice "Mouse2" "SendCoreEvents" InputDevice "SynapticsMouse1" "AlwaysCore" Screen "screen1" EndSection and restarted the X server but nothing happened. i took a peek at neddie's suggestion and got an insight on how to use setxkbmap properly (meaning the correct values for the -model and -layout options) so i am good with fluxbox. i just created aliases for the two kb layouts. the two separate kb would be sweet though. ciao! Quote Link to comment Share on other sites More sharing options...
Gowator Posted October 25, 2006 Report Share Posted October 25, 2006 You can have 1 and only one core keyboard... btw Most of what I wrote was based on doing the opposite, ie having several heads and a keyb/mouse on each ... Google seems to have lots of info on this.way.. but using more than one keyboard is done everyday by laptop owners with external keyb's... obviously a WM that takes control of the keyb is going to mess stuff up so with KDE you would have to remove the KDE keyboard tool thingy..... but overall everything seems to be there to do this and I intend to try myself... Quote Link to comment Share on other sites More sharing options...
ramfree17 Posted October 26, 2006 Author Report Share Posted October 26, 2006 (edited) hmmn. ok, ill try to look around. thanks! ciao! [edit] this one sounds familiar but is not a complete solution. ill try this when i get home... Edited October 26, 2006 by ramfree17 Quote Link to comment Share on other sites More sharing options...
Gowator Posted October 26, 2006 Report Share Posted October 26, 2006 Sounds good As I said I think you will need to have recognizably different keyboard models. All of them being PC105 would start having those issues. You would need to buy something like a 102, 104, and a 105. It has to be recognized as a fully seperate model upon being recognized for what I am suggesting to work(I think.) That may only be the way I understand current X to work, but I have a friend who has that working with 2 keyboards, but they are recognizably different(to the OS), and that may be the key. Is I guess where Option "Device" "/dev/input/event0" comes in.... However having one PS2 and one USB should help identify them .... It might need some poking about in the modules, perhaps adding an alias so they are always loaded as the same thing? In theory it looks good ... but probably takes a fair bit of experimentation.. Quote Link to comment Share on other sites More sharing options...
ramfree17 Posted October 26, 2006 Author Report Share Posted October 26, 2006 this is driving me nuts. replaced the ServerLayout option for Keyboard2 to "SendCoreEvents" i tried disabling the usbev line and the usbkeyboard works fine but the builtin is now using the us layout so no dice. then i tried specifying Option "Device" "/dev/input/event0" on the built-in keyboard and returned the usbev protocol line on the USB kb, restarted X and all hell broke lose whenever i type anything. removed the device option on Keyboard1 and X started fine but both kb resumed to having the finnish layout. :huh: ciao! Quote Link to comment Share on other sites More sharing options...
Gowator Posted October 26, 2006 Report Share Posted October 26, 2006 did you try playing about just using tail -f on /dev/input/eventX to see which keyb is which? Quote Link to comment Share on other sites More sharing options...
ramfree17 Posted October 26, 2006 Author Report Share Posted October 26, 2006 yeah, this is the weird thing since the other day event1 was the built-in while event3 was the usb kb. last night the numbers were decreased by 1 which is why the event numbers is different on my first config post. and i used cat instead of tail. :) ciao! Quote Link to comment Share on other sites More sharing options...
Gowator Posted October 27, 2006 Report Share Posted October 27, 2006 yeah, this is the weird thing since the other day event1 was the built-in while event3 was the usb kb. last night the numbers were decreased by 1 which is why the event numbers is different on my first config post. and i used cat instead of tail. :) ciao! Ouch.. sounds like the catis chasing its tail :D I guess we need to figure out how the events are allocated in bootup.... and then they can be aliased to always be the same...probably just in the modules.conf Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.