[SM-Discuss] awesome window manager in stable grimoire

Arjan Bouter abouter at sourcemage.org
Tue Nov 3 08:23:07 EST 2009


Op Mon, 02 Nov 2009 19:51:47 +0100
Arwed von Merkatz <v.merkatz at gmx.net> schreef:

> Hi,
> 
> just thought I'd write the list about this issue, as it took quite a
> while to figure out for me.
> If you're using awesome wm in stable grimoire, you might run into the
> issue that modifier keys are not working, making the whole wm awkward
> to use. For me, downgrading xcb-util to version 0.3.3 fixed the issue.
> 
> 

I've searched in the awesome ML a bit and found the info below. It
seems both azerty and dvorak keyboards are affected.

If you're using a querty kb, you can safely ignore this mail ;)

Arjan Bouter

+=======
GPG: 79D4B14E
Source Mage GNU/Linux developer,
Linux so advanced, it may as well be magic.
http://www.sourcemage.org
+===

Cc: awesome at naquadah.org
Onderwerp: Re: [informatique] azerty keyboards and Mod4 + 1-9 problems


Bruno Vernay wrote:
> Awesome uses combo like:
>  Mod4 + 1-9 :   Switch to tag 1-9.
>  Mod4 + Shift + 1-9 :    Tag client with tag.
>  Mod4 + Control + 1-9 : Toggle tag view.
>  Mod4 + Shift + Control + 1-9 : Toggle tag on client.
> 
> It wasn't working on my config. I found out on IRC (thanks tyk) that I
> needed a special config in my rc.lua because I have an azerty
> keyboard.
> 
> In fact, on an azerty keyboard, 1-9  needs the Shift key.  I tryied
> with the special keypad on the laptop keyboard, but it didn't work and
> it seems that the normal keypad isn't working either.
> So since the numbers needs the Shift key, it seems that:
> - combo using numbers could be banned (replaced by F1-F9 ?)
> - an include could be provided for each kind of keyboard map and the
> documentation would make it obvious.
> - it should be possible to find in the configuration which kind of
> keyboard is used and automatically use the right map.
> 
>From http://en.wikipedia.org/wiki/Keyboard_layout  it seems that only
> France and Belgium have the privilege of an azerty layout !? As per
> the article, all the other have the numbers without Shift ?!  If so,
> it makes the "only french speaking  people need to tweak their config"
> case more realist.
> I admit, I though that all European countries (Italian, spanish,
> german ...) used some kind of azerty layout.
> 
> Bruno
> 
	Note that the following should work for both azerty and qwerty 
keyboards:

=============================8<-----------------------------
-- Bind keyboard digits
-- Compute the maximum number of digit we need, limited to 9
keynumber = 0
for s = 1, screen.count() do
    keynumber = math.min(9, math.max(#tags[s], keynumber));
end

for i = 1, keynumber do
     globalkeys = awful.util.table.join(globalkeys,
         awful.key({ modkey }, '#1' .. i-1,
                   function ()
                         local screen = mouse.screen
                         if tags[screen][i] then
                             awful.tag.viewonly(tags[screen][i])
                         end
                   end),
         awful.key({ modkey, "Control" }, '#1' .. i-1,
                   function ()
                       local screen = mouse.screen
                       if tags[screen][i] then
                           tags[screen][i].selected = not 
tags[screen][i].selected
                       end
                   end),
         awful.key({ modkey, "Shift" }, '#1' .. i-1,
                   function ()
                       if client.focus and 
tags[client.focus.screen][i] then
 
awful.client.movetotag(tags[client.focus.screen][i])
                       end
                   end),
         awful.key({ modkey, "Control", "Shift" }, '#1' .. i-1,
                   function ()
                       if client.focus and 
tags[client.focus.screen][i] then
 
awful.client.toggletag(tags[client.focus.screen][i])
                       end
                   end),
         awful.key({ modkey, "Shift" }, "F" .. i,
                   function ()
                       local screen = mouse.screen
                       if tags[screen][i] then
                           for k, c in 
pairs(awful.client.getmarked()) do
 
awful.client.movetotag(tags[screen][i], c)
                           end
                       end
                    end))
end
----------------------------->8=============================

		Jérôme






More information about the SM-Discuss mailing list