Ubuntu 8.10 – evdev
gurus.knugum at gmail.com
Sun Dec 21 11:12:49 UTC 2008
I need to understand how the evdev thing works.
A while ago, I think I had Ubuntu 7.10 or 8.04, I made my own keyboard
layout. The point with it is that I easily can reach all my favourite
character directly from the keyboard by using the AltGr key (I guess that's
the same as the right Alt key on those keyboards with no AltGr key…). So now
every key (almost) has four different characters, and I even can type with
the Enter key and the arrow keys, and they still work as the Enter and arrow
keys respectively, for example AltGr+Enter=↵, AltGr+Shift+Right arrow=⇨ and
so on. Another point is that I don't have the same characters on more than
one key (well, I have, but when I find yet another character I need, it will
end up on one of those doublets), so I have no longer 0-9 above the qwerty
row; they are all on the numerical key pad only.
This all worked perfectly before upgrading to 8.10 and one of the
differences compared to 8.04 is that 8.10 seems to use evdev, whatever that
is. The difference that I can see, is that I now need to manipulate files
that are called *evdev.lst* and *evdev.xml* instead of the old *base.lst*and
*base.xml*. The old files are still there, but Ubuntu 8.10 doesn't seem to
*How I made my own layout*
First I considered my own layout as another language, which I thought would
make things easier when adding new characters, so I made a file called "*
se-Johnny*" with all the info needed, and I put a link to i in *
/usr/share/X11/xkb/symbols/*. Then I needed to add some lines in *
/usr/share/X11/xkb/rules/base.xml* and one line in *
/usr/share/X11/xkb/rules/base.lst*. That was it and it worked perfectly.
After upgrade to 8.10 it didn't work anymore, and I studied all the files
and finally found how to change them to make it work, among other thins I
needed to use the evdev files rather than the base files, but it still had
some disadvantages, so I changed the concept. Now I include my own layout as
a variant of the Swedish layout, simply called "*Sweden – Johnny Rosenberg*".
I put it at the end of */usr/share/X11/xkb/symbols/se* and I changed *
/usr/share/X11/xkb/rules/evdev.lst* (a few rows) and *
I can now select my layout and it works perfectly. All the characters are
available where I expect them. The problem is that every now and then,
sometimes after several hours and sometimes after a few seconds, the system
switch back to the standard Swedish layout. I can see when this happens,
because right before it happens (often when I type something), the system
doesn't seem to react to one of the key strokes. I then hit the same key
again and it seems to work, but when I try to use my own characters, they
are not there anymore.
Then I open the layout dialogue (in *gnome-keyboard-properties → layouts*)
and add a new layout, doesn't matter which, then I select my own (Sweden
Johnny Rosenberg) in the list. Then I remove the layout I just added,
whichever that was. Now it works again, until the same thing happens again
after a while. Can be a couple of hours or maybe only a couple of seconds.
I have looked in /var/logs/ but I am not sure what to look for, and I found
nothing so far.
What I need now, I think, is to understand how evdev works. It seems like
some error happens and that the system switch back to something "safe", just
in case. I don't know if my layout is the problem or if the problem is
located somewhere else. Sometimes when strange things happens the problem is
Compiz-Fusion. Maybe in my case too, I don't know. I use it when I switch
desktop and applications, but hardly ever for anything else.
I just need to understand better how evdev works, which files the system use
and things like that. How to proceed with debugging etc.
I was also thinking of an ugly solution: When I type *xprop -root | grep -i
xkb*, I get the following information:
*_XKB_RULES_NAMES_BACKUP(STRING) = "evdev", "pc105", "se", "", ""
_XKB_RULES_NAMES(STRING) = "evdev", "pc105", "se", "johnny",
Is there a way that I can make the *_XKB_RULES_NAMES_BACKUP(STRING)* the
same as *_XKB_RULES_NAMES(STRING)*? Because it seems to me that what happens
is that when some kind of fault occurs, the keyboard layout is switched to
whatever *_XKB_RULES_NAMES_BACKUP(STRING)* says. So if I could setboth of
them to *"evdev", "pc105", "se", "johnny",
could just ignore what ever happened… Or maybe that's the dangerous way…?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the ubuntu-users