LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
Search this Thread
Old 02-10-2007, 12:14 PM   #1
mikerobinson
LQ Newbie
 
Registered: Feb 2007
Location: Costa Rica
Distribution: Kubuntu 6.10
Posts: 7

Rep: Reputation: 0
Cannot change keyboard layout


I'm using kubuntu 6.10 with KDE 5.5.5. When I go to Regional & Accessibility > Keyboard Layout, everything appears blank. There are no keyboard layouts or keyboard variants to select. I also noticed my /usr/share/keymaps/ directory was empty. The keyboard section of my xorg.conf file is
Quote:
Section "InputDevice"
Identifier "Generic Keyboard"
Driver "keyboard"
Option "CoreKeyboard"
Option "XkbRules" "xorg"
Option "XkbModel" "pc105"
Option "XkbLayout" "en,es,sp,us"
Option "XkbOptions" "grp:alt_shift_toggle,grp_led:scroll"
EndSection
Anyone have any ideas how I can set up my keyboard so I can switch between english and spanish keyboards?
 
Old 02-12-2007, 03:30 AM   #2
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian sid + kde 3.5 & 4.4
Posts: 6,823

Rep: Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947
At a guess, you don't have the keymaps installed. On Debian the main package containing keymaps is called console-data. I'm not sure if it's still the same on *buntu, but I'll bet it is.
 
Old 02-13-2007, 12:24 AM   #3
mikerobinson
LQ Newbie
 
Registered: Feb 2007
Location: Costa Rica
Distribution: Kubuntu 6.10
Posts: 7

Original Poster
Rep: Reputation: 0
You're right, I didn't have console-data installed, however after installation, it didn't add layouts to the keyboard configuration utility. I also realized that I can get multiple keyboard layouts in Gnome, just not in KDE.
 
Old 02-13-2007, 12:33 AM   #4
mikerobinson
LQ Newbie
 
Registered: Feb 2007
Location: Costa Rica
Distribution: Kubuntu 6.10
Posts: 7

Original Poster
Rep: Reputation: 0
Oh, one more thing i just noticed. When I try to start the configuration tool from a console I get this error:

Quote:
mike@mike:~$ kcmshell keyboard_layout
kcmshell: ERROR: Cannot find rules file in /usr/share/X11/
QComboBox::changeItem: (comboModel) Index 0 out of range
Which rules file are they talking about?
 
Old 03-20-2007, 05:50 AM   #5
izi
LQ Newbie
 
Registered: Mar 2007
Posts: 2

Rep: Reputation: 0
Lightbulb Solution (?)

Hi there !

I think I've managed to find a solution that doesn't require global changes, scripts or installations (works in Kubuntu 6.10):

1. In the Regional & Language Add the needed layout, disable xkb options

2. Close any language / keyboard settings windows

3. Edit the file ~/.kde/share/config/kdeglobals
Look for the line:
Switch to Next Keyboard Layout=Alt+Ctrl+K
And change to:
Switch to Next Keyboard Layout=Alt+Shift_L;Alt+Shift_R
This will enable layout changes for both alt+shift (left and right) like in windows. You cal eliminte one if you'd like.

4. Open "Keyboard & Mouse", choose "Keyboard shortcuts", and make sure the correct shortcuts appear (they should).

5. Either restart KDE or just change some random keyboard shortcut (and change back) - Just as long as the "apply" button goes active.
6. Press "apply"

Cheers

NOTE: I've only discovered it today and haven't checked for long term effects / damage... I'd appreciate some feedback
 
Old 03-20-2007, 11:48 AM   #6
izi
LQ Newbie
 
Registered: Mar 2007
Posts: 2

Rep: Reputation: 0
Lightbulb A script

I suppose a possible script would be:

Code:
cp ~/.kde/share/config/kdeglobals ~/.kde/share/config/kdeglobals.old
sed -e 's/Alt+Ctrl+K/Alt+Shift_L;Alt+Shift_R/g' ~/.kde/share/config/kdeglobals.old > ~/.kde/share/config/kdeglobals
NOTE! If you've already changed the keyboard shortcut from ALT+Ctrl+K don't forget to change it in the script...

You may have to re-"apply" your keyboard shortcuts as I've writtem before: Change some random keyboard shortcut (and change back) - Just as long as the "apply" button goes active. Press "apply".

What you achieve is a GNOME-like functionality - ALT+Shift changes language (and the indicator)

Cheers

Last edited by izi; 03-20-2007 at 11:52 AM.
 
Old 03-21-2007, 01:35 AM   #7
mikerobinson
LQ Newbie
 
Registered: Feb 2007
Location: Costa Rica
Distribution: Kubuntu 6.10
Posts: 7

Original Poster
Rep: Reputation: 0
Thanks for the really detailed response, however perhaps you didn't understand my problem correctly. I cannot choose the keyboard layouts in the Regional & Accessibility > Keyboard Layout. It is empty. Here is a screenshot of what I mean.

However, if I ever get it working to switch keyboard layouts, I'll definitely refer to your posts for the switching methods.
 
Old 01-01-2008, 01:48 PM   #8
lcampagn
LQ Newbie
 
Registered: Jan 2008
Posts: 1

Rep: Reputation: 0
I had this exact problem. The rules files referred to are:
/usr/share/X11/xkb/rules/xorg
/usr/share/X11/xkb/rules/xfree86

I fixed this by running:
# apt-get install --reinstall xkb-data

I hope this works for you!
 
Old 05-13-2008, 02:32 AM   #9
melstrom
LQ Newbie
 
Registered: Dec 2003
Distribution: Slackware
Posts: 7

Rep: Reputation: 0
reply to Izi, from Mar 07

13 May 2008
00.30 Los Angeles

Izi's solution of editing the ~/.kde/share/config/kdeglobals does indeed work as described (apparently not for mikerobinson's original request). I've been trying in vain, until this solution, to get KDE to switch layouts just as I can with other desktop systems, via the xorg.conf file. Another frustrating example of KDE jiggering with so much that it no longer feels like *nix -- too many options that only KDE knows buried in too many KDE-only layers of stuff.
 
Old 05-13-2008, 12:33 PM   #10
mikerobinson
LQ Newbie
 
Registered: Feb 2007
Location: Costa Rica
Distribution: Kubuntu 6.10
Posts: 7

Original Poster
Rep: Reputation: 0
This problem was fixed a while ago with (I believe) the release of ubuntu 7.04, however if I remember correctly, I had to simlink the keyboard layout files to another directory.
 
Old 04-20-2009, 03:54 PM   #11
DBabo
Member
 
Registered: Feb 2003
Distribution: Scientific Linux 6
Posts: 384

Rep: Reputation: 33
Izi,
thank you that is the solution to my problem.


Quote:
Originally Posted by izi View Post
Hi there !

I think I've managed to find a solution that doesn't require global changes, scripts or installations (works in Kubuntu 6.10):

1. In the Regional & Language Add the needed layout, disable xkb options

2. Close any language / keyboard settings windows

3. Edit the file ~/.kde/share/config/kdeglobals
Look for the line:
Switch to Next Keyboard Layout=Alt+Ctrl+K
And change to:
Switch to Next Keyboard Layout=Alt+Shift_L;Alt+Shift_R
This will enable layout changes for both alt+shift (left and right) like in windows. You cal eliminte one if you'd like.

4. Open "Keyboard & Mouse", choose "Keyboard shortcuts", and make sure the correct shortcuts appear (they should).

5. Either restart KDE or just change some random keyboard shortcut (and change back) - Just as long as the "apply" button goes active.
6. Press "apply"

Cheers

NOTE: I've only discovered it today and haven't checked for long term effects / damage... I'd appreciate some feedback
 
  


Reply

Tags
kde, keyboard, layout


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
XFCE: how to change the keyboard layout? athanatos Slackware 18 09-17-2008 01:37 AM
Need to change keyboard layout anti.corp Solaris / OpenSolaris 4 04-02-2006 06:02 AM
Why I cannot change my keyboard layout? GregSP Mandriva 3 01-14-2006 05:48 PM
how can I change tty keyboard layout? fmardones Linux - Software 0 01-15-2005 08:09 PM
How do i change the keyboard layout? ArmedCoder Linux - Hardware 0 11-20-2003 06:25 PM


All times are GMT -5. The time now is 02:03 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration