[ltp] Gnome 2.6 and those Next Window keys

Loic Minier linux-thinkpad@linux-thinkpad.org
Fri, 4 Jun 2004 14:54:48 +0200


ben <bwpearre@alumni.princeton.edu> - Sat, May 29, 2004:

> On the Thinkpad, there are those wonderful little keys over the arrow
> keys, marked for switching between windows.  I had been using xmodmap
> to assign them fairly arbitrary values:
> keycode 233 = Next_Virtual_Screen
> keycode 234 = Prev_Virtual_Screen
>  ...and then using the Sawfish keybinding mapper to bind that to "Next
> Workspace" etc...

 I've done some reading, especially
 <http://www.xfree86.org/4.3.0/XKB-Config.html> which is a good lecture
 for understanding the /etc/X11/xkb tree and
 <http://www.charvolant.org/~doug/xkb/> which is a good guide.

 This was my old XF86Config-4 Keyboard Section:
    Section "InputDevice"
            Identifier      "Generic Keyboard"
            Driver          "keyboard"
            Option          "CoreKeyboard"
            Option          "XkbRules"      "xfree86"
            Option          "XkbModel"      "pc102"
            Option          "XkbLayout"     "fr"
    EndSection

 Running Gnome, setxkbmap -print resulted in:
    xkb_keymap {
        xkb_keycodes  { include "xfree86+aliases(azerty)"       };
        xkb_types     { include "complete"      };
        xkb_compat    { include "complete"      };
        xkb_symbols   { include "pc/pc(pc102)+pc/fr+pc/fr-latin9:2"     };
        xkb_geometry  { include "pc(pc102)"     };
    };

 One sees that Gnome already overwrites the XF86Config-4 definitions: it
 adds at least the pc/fr-latin9 symbols.

 Setting my .xinitrc to a simple xterm to avoid starting Gnome showed
 the following setxkbmap -print:
    xkb_keymap {
        xkb_keycodes  { include "xfree86+aliases(azerty)"       };
        xkb_types     { include "complete"      };
        xkb_compat    { include "complete"      };
        xkb_symbols   { include "pc/pc(pc102)+pc/fr"    };
        xkb_geometry  { include "pc(pc102)"     };
    };

 I figured that I first needed to add keycodes definitions for the next
 page / previous page keys since xev printed "NoSymbol" when I pressed
 them.  The xfree86+aliases(azerty) seemed a good thing to hack first so
 I added a thinkpad file to my /etc/X11/xkb/keycodes tree and updated
 keycodes.dir accordingly.  Then I changed my XF86Config-4:
    Section "InputDevice"
           Identifier      "New Keyboard"
           Driver          "keyboard"
           Option          "CoreKeyboard"
           Option  "XkbKeycodes"   "xfree86+aliases(azerty)"
           Option  "XkbTypes"      "complete"
           Option  "XkbCompat"     "complete"
           Option  "XkbSymbols"    "pc/pc(pc102)+pc/fr"
           Option  "XkbGeometry"   "pc(pc102)"
    EndSection

 My objective was to set these lowlevel values first to reflect my old
 xf86config, then update to handle previous/newt page, and finally to
 deal with Gnome.

 Unfortunately, this new XF86Config did not work, it resulted in an
 us-ascii keyboard with a pc105 geometry.

 I am calling for help, since I don't know how to continue!

   Bye,

-- 
Loïc Minier <lool@dooz.org>