Hello,

As maybe every french awesome user, I had to redefine the upper row key
bindings, as the french keymap does not have digits directly on it.

I found a way to use keycodes instead of keysyms to define these
bindings.  As keycodes are keymap-independant, this setting should be
convenient to any keymap, and avoid the need of redefining bindings. So
here is the configuration for awesome 3.2.1, if it can be useful.

Regards,

-- 
Tanguy Ortolo
--- /etc/xdg/awesome/rc.lua	2009-02-27 10:54:56.000000000 +0100
+++ rc.lua.default	2009-08-17 11:16:25.000000000 +0200
@@ -271,9 +271,12 @@
    keynumber = math.min(9, math.max(#tags[s], keynumber));
 end
 
+-- The keycodes of the upper row, independant of the keymap
+tagkeys = {'#10', '#11', '#12', '#13', '#14', '#15', '#16', '#17', '#18', '#19', '#20', '#21'}
+
 for i = 1, keynumber do
     table.insert(globalkeys,
-        key({ modkey }, i,
+        key({ modkey }, tagkeys[i],
             function ()
                 local screen = mouse.screen
                 if tags[screen][i] then
@@ -281,7 +284,7 @@
                 end
             end))
     table.insert(globalkeys,
-        key({ modkey, "Control" }, i,
+        key({ modkey, "Control" }, tagkeys[i],
             function ()
                 local screen = mouse.screen
                 if tags[screen][i] then
@@ -289,14 +292,14 @@
                 end
             end))
     table.insert(globalkeys,
-        key({ modkey, "Shift" }, i,
+        key({ modkey, "Shift" }, tagkeys[i],
             function ()
                 if client.focus and tags[client.focus.screen][i] then
                     awful.client.movetotag(tags[client.focus.screen][i])
                 end
             end))
     table.insert(globalkeys,
-        key({ modkey, "Control", "Shift" }, i,
+        key({ modkey, "Control", "Shift" }, tagkeys[i],
             function ()
                 if client.focus and tags[client.focus.screen][i] then
                     awful.client.toggletag(tags[client.focus.screen][i])

Reply via email to