Problem with keyboard layout modification

Hi all,

I’ve recently installed OpenSuse 11.2 with KDE 4.4.2
And I have a problem when I try to make changes in russian (ru phonetic) keyboard layout.

I have french AZERTY keyboard and I use two languages / keyboard layouts French & Russian.
I use standard “KDE Keyboard layout switcher”.
Here is “command line” from layout switcher :
setxkbmap -model pc105 -layout fr,ru -variant ,phonetic

Here is what i see when I type in console setxkbmap -print

                                                                                                    
xkb_keymap {                                                                    
        xkb_keycodes  { include "evdev+aliases(azerty)" };                                                                                     
        xkb_types     { include "complete"      };                                                                                             
        xkb_compat    { include "complete"      };                                                                                           
        xkb_symbols   { include "pc+fr+ru(phonetic):2+inet(evdev)+group(alt_shift_toggle)+capslock(capslock)"   };                           
        xkb_geometry  { include "pc(pc104)"     };                                                                                      
};       

For some reason when I log out, on the login window (password) my keyboard is switched to QWERTY layout, which is very annoying when need type correct password :frowning:

But the most important problem I have is that when I try change russian (RU) keyboard layout file from “/usr/share/X11/xkb/symbols/” directory, in order to switch some letters position (for better work-flow)
I do some modification, then save file (correctly saved) but when I log out or reboot PC keyboard layout still the same without my changes.

Here you can see few lines from modified file :

partial alphanumeric_keys
xkb_symbols "phonetic" {

    name[Group1]= "Russia - Phonetic";
    key	<AE01> {		   exclam,	     	1	]	};
    key	<AE02> {		       at,        	2	]	};
    key	<AE03> {	     Cyrillic_io,    		3, quotedbl 	]	};
    key	<AE04> {	     Cyrillic_IO,              4	]	};
    key	<AE05> {	     Cyrillic_hardsign,	5, parenleft   	]	};
    key	<AE06> {	     Cyrillic_HARDSIGN,	6 	]	};
    key	<AE07> {		ampersand,	 	7	]	};
    key	<AE08> {		asterisk,		8      	]	};
    key	<AE09> {		parenleft,		9 	]	};
    key	<AE10> { 	    plus,   0,       at		]	};
    key <AE11> {	    parenright,     degree		]	};

and here is same lines from original russian keyboard layout file:

partial alphanumeric_keys
xkb_symbols "phonetic" {

    name[Group1]= "Russia - Phonetic";

    key	<AE01> {			1,	    exclam 	]	};
    key	<AE02> {			2,        	at	]	};
    key	<AE03> {			3,     Cyrillic_io 	]	};
    key	<AE04> {			4,     Cyrillic_IO	]	};
    key	<AE05> {			5, Cyrillic_hardsign   	]	};
    key	<AE06> {			6, Cyrillic_HARDSIGN	]	};
    key	<AE07> {			7,	 ampersand	]	};
    key	<AE08> {			8,        asterisk	]	};
    key	<AE09> {			9,	 parenleft	]	};
    key	<AE10> {			0,	parenright	]	};

Here is my file from /etc/hal/fdi/policy/20thirdparty/11-keymap.fdi

<?xml version="1.0" encoding="ISO-8859-1"?> <!-- -*- SGML -*- -->
<deviceinfo version="0.2">
  <device>
    <match key="info.capabilities" contains="input.keymap">
      <append key="info.callouts.add" type="strlist">hal-setup-keymap</append>
    </match>

    <match key="info.capabilities" contains="input.keys">
      <merge key="input.xkb.rules" type="string">base</merge>
      <merge key="input.xkb.model" type="string">evdev</merge>
      <merge key="input.xkb.layout" type="string">fr,ru</merge>
      <merge key="input.xkb.variant" type="string",phonetic>
      <merge key="input.xkb.options" type="string">caps:capslock</merge>
    </match>
  </device>
</deviceinfo>

I have looked everywhere in Internet, but didn’t found any advice how fix this problem.
I also have Linux Mint (Gnome) on other 3 computers and did same modification of keyboard layout file and it works fine.

Thank you for the help.

Всем спасибо, проблема решена :slight_smile:

Похоже это был баг : https://bugzilla.novell.com/show_bug.cgi?id=518281
после обновления файла /etc/hal/fdi/policy/20thirdparty/11-keymap.fdi

<?xml version="1.0" encoding="ISO-8859-1"?> <!-- -*- SGML -*- -->
<deviceinfo version="0.2">
  <device>
    <match key="info.capabilities" contains="input.keymap">
      <append key="info.callouts.add" type="strlist">hal-setup-keymap</append>
    </match>

    <match key="info.capabilities" contains="input.keys">
      <merge key="input.xkb.rules" type="string">base</merge>

      <!-- If we're using Linux, we use evdev by default (falling back to
           keyboard otherwise). -->
      <merge key="input.xkb.model" type="string">keyboard</merge>
      <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name"
             string="Linux">
        <merge key="input.xkb.model" type="string">evdev</merge>
      </match>

      <merge key="input.xkb.layout" type="string">fr,ru</merge>
  <merge key="input.xkb.options" type="string">caps:capslock</merge>
    </match>
  </device>
</deviceinfo>

Кстати раскладка по умолчанию, стала вместо неправильной US QWERTY FR AZERY как надо.

Hi all,

Apparently cache files are were used and my changes didn’t work.

But finally problem with wrong default (US) layout, and absence of changes after custom layout modification, were fixed.

Here the steps to make it work, after keyboard layout file modification:

1.Delete all *.xkm files from /var/lib/xkb/compiled/
2.Delete fdi-cache file from /var/cache/hald/
3.Restart computer. (For some reason restart X didn’t helped)

That’s all.
Should work.

I’m trying to login to a system and it seems the keyboard layout is in Chinese so I can’t enter the password correctly. Are there toggle keys to press to switch the layout back to English? Thanks!

Two things:

  1. Please don’t resurrect 5! years old threads. Your problem is not related at all to the one discussed here anyway.
  2. Please don’t double-post. This only creates confusion, and causes people to write unnecessary/duplicated replies. I answered in your other thread: https://forums.opensuse.org/showthread.php/506115-Trouble-logging-in-due-to-keyboard-setting?p=2700421#post2700421

This thread will be CLOSED to avoid further confusion.