--=-I9GmaSLZiDg+q4YNwf0t
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

Hi All,

After much tweaking, I have an almost perfect solution for this annoying
problem. I was able to get all the accelerators keys to work anywhere in
KDE, OOo, Mozilla and the console window. Since the solution is
implemented at the X level, I guess it could work for any X-based
application.

The following accelerators will work: <CTRL>, <ALT>, <CTRL>+<SHIFT>,
<ALT>+<SHIFT>, <CTRL>+<ALT>.

One minor problem remains though. Pressing <CTRL>+<KEY> will produce the
character <KEY> if <CTRL>+<KEY> is not bound to an accelerator. For
example, if <CTRL>+B is pressed in a console window, the character 'b'
is printed. In OOo, where <CTRL>+B serves as an accelerator key (bold
font) this works as expected.

This works for me in Fedora Core 2, w/KDE. 
My KDE configuration includes keyboard layers for English and Hebrew.

My /etc/X11/xorg.conf:

  ...
  Section "InputDevice"
        Identifier  "Keyboard0"
        Driver      "keyboard"
        Option      "XkbLayout"  "us"
        Option      "XkbModel"   "pc104"
        Option      "XkbOptions" "srvrkeys:none"
  EndSection

I've added the following to /etc/X11/xkb/types/pc. This type tells xkb
to pick the 1st character if no accelerator is used, pick the 2nd
character if Shift is used or pick the 3rd character if any other
accelerator is used.

  ...
  type "IGNOREACCEL" {
        modifiers          = Control+Shift+Alt;
        map[none]          = Level1;
        map[Shift]         = Level2;
        map[Control]       = Level3;
        map[Control+Shift] = Level3;
        map[Alt]           = Level3;
        map[Alt+Shift]     = Level3;
        level_name[Level1] = "Base";
        level_name[Level2] = "Shift";
        level_name[Level3] = "IgnoredAccelerator";
  };


Within /etc/X11/xkb/symbols/pc/il, I've mapped the required 3 characters
for each key. For example Pressing Shift+hebrew_resh will produce
Shift+the 2nd character (R) for the key. Pressing Alt+hebrew_resh will
produce Alt+the 3rd character (r) for the key.

  ...
  key <AD02> { type="IGNOREACCEL", [ apostrophe,   W, w ] };
  key <AD03> { type="IGNOREACCEL", [ hebrew_qoph,  E, e ] };
  key <AD04> { type="IGNOREACCEL", [ hebrew_resh,  R, r ] };
  key <AD05> { type="IGNOREACCEL", [ hebrew_aleph, T, t ] };
  ...

Cheers,
-S.


--=-I9GmaSLZiDg+q4YNwf0t
Content-Disposition: attachment; filename=tweaked-keyboard-layout.zip
Content-Type: application/zip; name=tweaked-keyboard-layout.zip
Content-Transfer-Encoding: base64

UEsDBBQAAAAIAG4cEjEYf43C0QEAAMUEAAACABUAcGNVVAkAA1CkIkEcPCJBVXgEAPQB9AGlkttu
m0AQhq/LU4xQ7lwZH1I1ddqqNrWqKFaamly0iiJrDYO9yrJLl7UVWvXdOywYiA+5yQohNPPt8M/M
73lw9lPp1QjS8O0W+t0hDHq9nte78Prvof9h9O58dH4BYfp7KSKYPqVw5ngeOE7KtOFMQIQx2wgD
T4/LhclTzMCtQi78dRygQ3ygEoQybdbMANMIEkPMMqbzHRQrDQzijRDAk1RggtIww5UEFe8YBrc+
hCpJKbEUCI+YLxXTUdcCW67NholFoiIec9QZjIW5LFUUfwf31l9M5tPxdSHuTYN9Al9Jo5W4pChL
72+UxAeKznCLol8FK6SODyguio+FZAnel2yRdScsQ/dIdmCzVR0CCl3/9vUFv4L5jwN9tpHT2ij9
al1U46gm/24+64xnd6dm1mm0tSKvH5PRttCeJjIBjMMQBWpmFOkovMRlhCnSSxoyC3mscQYIlqOu
r05yCNZMk6m+shWT8FELLjd/vqzJoVx0yVqf271ffbv5Tn7x/emsaB+q00yhPs04gjWPTTmUmqfZ
SLu3Fr9bYBuydx/2ocFzqDbiM2h4FOpUFY9Ddk8Hmg6hTkvXIfTidk9B5ZJt3ReooaWuVlJpjFpr
b0xBz39QSwMEFAAAAAgAaBwSMVQWc8ZDAwAAYwsAAAIAFQBpbFVUCQADRKQiQVqkIkFVeAQA9AH0
AY2WW2/bOBBGn+tf8cEo0BcikpO0TdMLGsduNttsb2l3u1sUASWNLa4pUSGpOk7R/15KshwkdCwT
hmUTnqPh8HioXhAg4oYSqBwcM1pEiusEGS8w0SoDz/HoahYFZpFFSppAyEeYCEm9IHAvPPz6RhMd
PDnEVRwUWk01z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YwsAAAIADQAAAAAAAQABACSBBgIAAGlsVVQFAANEpCJBVXgAAFBLBQYAAAAAAgAC
AHoAAAB+BQAAAAA=

--=-I9GmaSLZiDg+q4YNwf0t--


=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to