Re: xkb Layout does not work altGr key
On Sun, Nov 20, 2005 at 08:33:33AM +0100, Jose Salavert wrote:
> I have made this dvorak layout , but AltGr does not work.
> I am mad trying to understand or see what I forgot.
> Another question is what to do to use a left menu key or similar as AltGr
> too, or shift control or something, is for fast writing in the right keys
> that need alt.
>
> Is an effort to work in french, spanish italian and catalan, with
> aphostrophe, cedilla and eñe. if any idea.
>
> I will look into:
> http://www.nothingisreal.com/dvorak/dvorak_intl-1.0.txt
>
> that was another effor and make a complete tutorial, but now I am focused in
> AltGr key that does not work.
>
> if (anyone can help me) thanks;
> else I become mad;
Hopefully, we'll save you from going mad -- not sure though, if the
following suggestions will suffice... ;)
Anyway, you could try to configure your AltGr key to generate the
"Mode_switch" symbol. On most keyboards I've seen, the key labeled
"AltGr" corresponds to "Right Alt", i.e. its physical scancode (an
integer) is mapped to the symbolic name <RALT> (this is normally done
via configs in xkb/keycodes/, e.g. <RALT> = 113; ). Accordingly,
in the xkb/symbols/* files, you'll typically find something like
key <RALT> { [ Mode_switch, Multi_key ] };
for keyboard setups allowing more than two characters per key.[1]
For the Mode_switch to have any effect, the following "action"
definition must also have been included from somewhere
interpret Mode_switch {
useModMapMods= level1;
virtualModifier= AltGr;
action= SetGroup(group=+1);
};
This increments the "symbol group" by one, so for definitions like
key <AE01> { [ 1, EuroSign, ]
[ bar, cent ] };
the second one (i.e. [ bar, cent]) will be used.
Normally, that Mode_switch action is defined in xkb/compat/basic, so,
unless you've severely messed up your config, that should be fine.
You'll probably also want to define
modifier_map Mod3 { Mode_switch };
to give programs relying on the standard X11 modifier "Mod3" some way
to figure out what's going on (not strictly required for the symbol
groups switch to take effect, though).
Other than that, I can only point you to
http://www.charvolant.org/~doug/xkb/html/xkb.html
For me, his attempts to shed some light on the issue have more than
once proven to be a valuable resource when I felt like messing with my
keyboard. Take the time to read it from the beginning to get a thorough
understanding of the concepts and terms. Xkb is an extremely flexible
(and complex) beast, so some additional experimentation of your own
might be required... There's a multitude of different ways to achieve
the same effects. That not being enough, I guess you're aware that
xmodmap(1) could in principle be used to redefine your initial xkb
setup beyond recognition. So, better make sure that's not the case...
If you're still stuck, the following info would help us to help you :)
* which X server (XFree86, Xorg), which debian flavor (sarge,...)?
* what settings do you have in your XF86Config-4/xorg.conf?
(the "InputDevice" section containing the Xkb* options is the
interesting part)
* what exactly have you modified so far in your attempts to get this
working, etc.
* what does xev(1) show when you press your "AltGr" key?
* how does xkbprint(1) represent your current/effective xkb setup?
(this generates a PostScript diagram)
* are you using KDE or Gnome?
AFAIK, they add another level of obfusca^H^H^H^H^H^H^Hconfiguration
on top of the conventional methods of keyboard setup...
(meaning someone else would have to help you with this)
Cheers,
Almut
[1] In your dvorak-plus config I see that you've configured
key <MDSW> { [ Mode_switch ] };
so - if you know which key that is on your keyboard - holding that key
should actually have the desired "AltGr" effect... Have you tried
that, or, put differently, have you intentionally configured <MDSW>
instead of <RALT>?
Reply to: