After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 398722 - gnome partly ignores keyboardlayout modified (costumised) by xmodmap (opensuse10.2, gnome2.16.1)
gnome partly ignores keyboardlayout modified (costumised) by xmodmap (opensus...
Status: RESOLVED DUPLICATE of bug 413017
Product: gnome-control-center
Classification: Core
Component: Keyboard
unspecified
Other All
: Normal normal
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-01-20 14:36 UTC by Werner Meyer
Modified: 2007-02-28 14:52 UTC
See Also:
GNOME target: ---
GNOME version: 2.15/2.16



Description Werner Meyer 2007-01-20 14:36:14 UTC
Please describe the problem:
english text see below

Gnome (oder überhaupt X ?) ignoriert teilweise Einträge in einer mit 
xmodmap ~/Xmodmap.customized 
geladenen angepassten Tastaturlayoutdatei, z.B.

.Xmodmap.customized
! keycode  20 = ssharp question backslash questiondown backslash 
questiondown
keycode  20 = 0x010000df question backslash questiondown
! keycode  34 = udiaeresis Udiaeresis periodcentered multiply 
periodcentered multiply
keycode  34 = 0x010000fc 0x010000dc periodcentered multiply 
! keycode  47 = odiaeresis Odiaeresis oe OE oe OE
keycode  47 = 0x010000f6 0x010000d6 oe OE 
! keycode  48 = adiaeresis Adiaeresis ae AE ae AE
keycode  48 = 0x010000e4 0x010000c4 ae AE 
! keycode 113 = ISO_Level3_Shift
keycode 113 = Mode_switch
! keycode 116 = Super_R Multi_key
keycode 116 = ISO_Level3_Shift
keycode  26 = e E 
keycode xxx = 0x0100030c 
keycode yyy = 0x010000ad

gnome (gedit, gnome-terminal) nimmt die unicode-Nummern für die fertigen deutschen Umlaute sowie Eszett *gar* nicht an! (Wenn man hingegen die Wort-Namen angibt, geht‘s.)
Mozilla (thunderbird und firefox) und xterm zeigen dasselbe idiotische Verhalten. 
Openoffice zeigt statt der Umlaute bzw. Eszett nur leere Kästchen an.
Kate, Kmail zeigen die gewünschten Zeichen.



Die rechte Fenstertaste wirkt weiterhin als Fenstertaste, statt als ISO_Level3_Shift! (Das ist extrem ärgerlich.)
Scheint ein gnome2.16-bug zu sein. Im Gnome‑Kontrollzentrum fehlt unter Hardware ‣ Tastatur ‣ Belegungseinstellungen eine Checkbox bei einem ebenso fehlenden Punkt „read from xmodmap-file“ (was standard sein sollte! Das ganze Menü Belegungseinstellungen ist etwas fragwürdig - insbesondere weil es so eingeschränkt ist.).

Mit dem soft-hyphen (unicode-(Hex)Nummer AD) kommt anscheinend überhaupt kein Programm mehr klar. Das ging in SuSE10.0 noch gut in OpenOffice.


Außerdem schreiben gnome (gedit, gnome-terminal) und mozilla-thunderbird (1.5.0.9) die diakritischen Zeichen nicht mehr über den vorangegangenen Buchstaben sondern dahinter. (z.B. Taste 26 gefolgt von Taste xxx e gefolgt von Häkchen statt e mit Häkchen) Geht man dann mit dem cursor 
rückwärts oder löscht rückwärts (backspace) geschehen seltsame Dinge mit der Anzeige.
Mozilla-firefox (2.0.0.1) Openoffice (2.1) und xterm funktionieren hingegen in dieser Hinsicht.
kate und kmail funktionieren auch.

{
Ich nutze für europäische Sprachen wie Rumänisch, Tschechisch, Deutsch, Französisch etc. kombinierende diakritische Zeichen aus dem unicode-Zeichenvorrat (Nr. 300 bis 36f) (Akzente, cedilla, diaresis etc.).
}
{
SuSE9.0 hatte ja noch grundsätzliche Probleme mit unicode.
SuSE 10.0 machte mich dann (mit gnome) ganz glücklich. Da machten nur kde-Programme (kate, kmail, quanta, ...) Probleme [anscheinend immer dann, wenn Schriftarten bestimmte Zeichen nicht enthielten]. gedit, gnome-terminal, mozilla und openoffice kamen damit klar.
(In SuSE10.0 konnte man allerdings in einer Xmodmap-Datei für j und n (keycode 44 und 57) nur die ersten beiden Spalten belegen. Dieser bug ist in openSuSE behoben.)
Und nun dieser Mist in openSUSE10.2...
}


Steps to reproduce:
1.load a .Xmodmap.customized-file by
xmodmap ~/Xmodmap.customized 
 
2.The file .Xmodmap.customized contains lines:
! keycode  20 = ssharp question backslash questiondown backslash 
questiondown
keycode  20 = 0x010000df question backslash questiondown
! keycode  34 = udiaeresis Udiaeresis periodcentered multiply 
periodcentered multiply
keycode  34 = 0x010000fc 0x010000dc periodcentered multiply 
! keycode  47 = odiaeresis Odiaeresis oe OE oe OE
keycode  47 = 0x010000f6 0x010000d6 oe OE 
! keycode  48 = adiaeresis Adiaeresis ae AE ae AE
keycode  48 = 0x010000e4 0x010000c4 ae AE 
! keycode 113 = ISO_Level3_Shift
keycode 113 = Mode_switch
! keycode 116 = Super_R Multi_key
keycode 116 = ISO_Level3_Shift
keycode  26 = e E 
keycode xxx = 0x0100030c 
keycode yyy = 0x010000ad

3.
a) right windows-key still works as main-menu-key (big shit)

b) gnome (gedit, gnome-terminal) ignores the keys with the unicode-numbers of the german Umlaute (äüöÄÜÖ) and sharpS (ß)
c) Mozilla (thunderbird and firefox) and xterm do the same shit.
d) Openoffice shows instead of the Umlauts blank fields.
e) Kate, Kmail show the expected characters!

f) The soft-hyphen (unicode-hex-number ad) isn't known by any application. (in Suse10.0 it worked well!)

g) gnome and mozilla-thunderbird (1.5.0.9) place combining diacritics behind characters instead of placing them over characters. deleting them has strange effects. concerning this, mozilla-firefox, openoffice, kate and kmail work fine.

h) Gnome-controll-center - hardware - keyboard - Belegungseinstellungen (allocation/assignment/layout) is only a little choice of possibilities. the most important is missing: checkbox for „use xmodmap-file“

Actual results:


Expected results:
gnome should respect my xmodmap!
Please please change gnome and gnome-control-center for that.

Does this happen every time?
yes

Other information:
in suse 9.0 there were prolems with unicode.
in suse10.0 unicode worked fine with gnome!! (only kde-apps had problems, mainly when there were missing charackers in a font). (but for the keys n and j it was impossible to give them other characters in mode_switch-level)
in opensuse10.2 gnome makes problems with unicode an kde works...
Comment 1 Werner Meyer 2007-01-24 10:38:44 UTC
keycode  65 = space 0x010000a0 0x010000a0 0x0100200b 

also whitespace (unicode x a0) isn't known by gnome. OO brings only a mark. kate does the right thing...

Das geschütze Leerzeichen (unicode x a0) wird von gnome auch nicht erfasst. OO bringt ein Kästchen, kate kann damit umgehen!
Comment 2 Carlos Garnacho 2007-02-12 00:30:53 UTC
Moving to correct product/component
Comment 3 Sergey V. Udaltsov 2007-02-12 13:31:22 UTC
Gnome respect user's xmodmap files. As long as their names are in the gconf list
/desktop/gnome/peripherals/keyboard/general/update_handlers
Comment 4 Werner Meyer 2007-02-13 12:49:47 UTC
http://bugzilla.gnome.org/show_bug.cgi?id=398722

I think, gnome should respect xmodmap always! 

Espezially strange is, that it respects some changes but others not!

So it is still a bug for me, because as user i can run xmodmap but as user i have no write-access to /etc/opt/gnome/gconf/gconf.xml.schemas/schemas/desktop/gnome/peripherals/keyboard/general/%gconf.xml

So how the names of my xmodmap-files could come to this gconf list?

Or is it possible to put a gconf in the users home? (How?)

Btw - please give an example, how it should be done (having write access), for files ~/xmodmap.example1 ~/xmodmap.example2 - in my /etc/opt/gnome/gconf/gconf.xml.schemas/schemas/desktop/gnome/peripherals/keyboard/general/%gconf.xml
I find only this part:

        <entry name="update_handlers" mtime="1168114624" type="schema" stype="list" owner="gnome" list_type="string">
                <local_schema locale="pt" short_desc="Manipuladores de Actualização do Teclado">
                        <longdesc>Uma colecção de scripts a executar sempre que o estado do teclado é relido. Útil para reaplicar ajustamentos baseados no xmodmap</longdesc>
                </local_schema>

[...snip...]

        </entry>
Comment 5 Sergey V. Udaltsov 2007-02-13 18:16:22 UTC
Werner, as user you should not modify gconf files directly. Please use gconftool or gconf-editor. And I cannot give you example in terms of xml - please use the tools provided by gconf - and most probably you'll find you do not have to modify anything in /etc.

Will it work for you?

gnome respects xmodmap - it just has no idea which files to use in the user directory.
Comment 6 Werner Meyer 2007-02-14 12:49:06 UTC
> Will it work for you?

I'll try as soon as possible. Thanks for the hint.

[
But why doesn't work just 
# xmodmap ~/.Xmodmap.modified
?

(Why gnome doesn't use X's xmodmap?)

Especially I wonder about the fact, that some modifications work and some don't.
]
Comment 7 Sergey V. Udaltsov 2007-02-14 13:39:16 UTC
How GNOME is supposed to find that the name of your file is .Xmodmap.modified? We do not want to hardcode anything like that - so we added the list into gconf where you can mention any of these files. And then gnome will do "xmodmap (whatever your filename is)"
Comment 8 Werner Meyer 2007-02-15 11:08:52 UTC
1.
> How GNOME is supposed to find that the name of your file is .Xmodmap.modified?

Why it should - I do the 
xmodmap ~/.Xmodmap.bla 
command.
But gnome ignores it (partly).

2.
And I checked the gconf and my xmodmap-files are listed there. 
But all the problems described above occure. (and didn't occure in suse10.0)
So gnome seems really to ignore (partly) my xmodmap and that is bad and I think it's really a bug and should be solved.
I don't want to open the main-menu with the right window-key and all the other problems.
Comment 9 Sergey V. Udaltsov 2007-02-15 18:19:43 UTC
1. Gnome has its own keyboard management code. It initialized keyboard configuration _from_ the_scratch_ - so whatever you do before the gnome session starts is ignored. The only way for you to ask gnome use your xmodmap file - but it in the gconf key mentioned above.

2. Gnome has no way to ignore _parts_ of your xmodmap file. It just executes xmodmap passing the filename as parameter.
Comment 10 Werner Meyer 2007-02-16 12:50:26 UTC
(In reply to comment #9)
> 1. Gnome has its own keyboard management code. It initialized keyboard
> configuration _from_ the_scratch_ - so whatever you do before the gnome session
> starts is ignored. 

I did the command 
xmodmap ~/.Xmodmap.bla 
in the gnome-terminal and I can switch xmodmaps that way. Only all the problems I described above occur.

> The only way for you to ask gnome use your xmodmap file -
> but it in the gconf key mentioned above.

I did this, but the line
keycode 116 = ISO_Level3_Shift
is still ignored - the right windows-key still opens the main menu.

What if not gnome can be responsible for that?

The other problems maybe concern not the gnome-keyboard-section but gedit and other apps.

> 2. Gnome has no way to ignore _parts_ of your xmodmap file. It just executes
> xmodmap passing the filename as parameter.

So gnome does the same thing as I do.

But why can I change the behaviour of key "menu-key" (in the right of the right "window-key") but not of key 116 (right "window-key")?
Comment 11 Werner Meyer 2007-02-27 13:37:39 UTC
So how to put *any* function/letter/command on the right window-key (keycode 116) instead of "open 'main-menu'"?

Who can help?
Comment 12 Jens Granseuer 2007-02-27 18:47:48 UTC
Is that related to this bug?

In any case, the key should only open the main menu if that is configured in the keybindings capplet. If you don't want it, just disable it there.
Comment 13 Sergey V. Udaltsov 2007-02-27 23:54:22 UTC
> I did this, but the line
> keycode 116 = ISO_Level3_Shift
> is still ignored - the right windows-key still opens the main menu.
> 
> What if not gnome can be responsible for that?
I do not know. GNOME really cannot be responsible for that - it does not even check whether the file is there (I do not talk about opening it). GNOME (namely g-s-d) just composes the command line for xmodmap - and launches it. As simple as that. You can check it by replacing xmodmap with your own script and looking at parameters (for example, use command line

echo "$@" > /tmp/xmodmap.params

> But why can I change the behaviour of key "menu-key" (in the right of the right
> "window-key") but not of key 116 (right "window-key")?
Ask xmodmap maintainers, of course. Also, ask people handling gnome keybindings. I think you should open separate bug about it (but first check whether this bug is already reported). Let's not mix several issues together, ok?

Comment 14 Werner Meyer 2007-02-28 14:52:17 UTC

*** This bug has been marked as a duplicate of 413017 ***