From a14e9eb18dec7e7e2c581f0900b8a95768c8429c Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Fri, 28 Aug 2009 15:26:41 +0200 Subject: [PATCH] awful.{button,key}: enhance documentation Signed-off-by: Julien Danjou --- lib/awful/button.lua.in | 13 +++++++++---- lib/awful/key.lua.in | 11 ++++++++--- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/lib/awful/button.lua.in b/lib/awful/button.lua.in index 33635336f..ba82bf000 100644 --- a/lib/awful/button.lua.in +++ b/lib/awful/button.lua.in @@ -10,10 +10,15 @@ local ipairs = ipairs local capi = { button = button } local util = require("awful.util") ---- Button helper for awful +--- Create easily new buttons objects ignoring certain modifiers. module("awful.button") ---- Modifiers to ignore +--- Modifiers to ignore. +-- By default this is initialized as { "Lock", "Mod2" } +-- so the Caps Lock or Num Lock modifier are not taking into account by awesome +-- when pressing keys. +-- @name ignore_modifiers +-- @class table ignore_modifiers = { "Lock", "Mod2" } --- Create a new button to use as binding. @@ -21,10 +26,10 @@ ignore_modifiers = { "Lock", "Mod2" } -- the ignore_modifier variable to create more button with or without the ignored -- modifiers activated. -- For example if you want to ignore CapsLock in your buttonbinding (which is --- ignored by default by this function), creatina button binding with this function +-- ignored by default by this function), creating button binding with this function -- will return 2 button objects: one with CapsLock on, and the other one with -- CapsLock off. --- @see capi.button +-- @see button -- @return A table with one or several button objects. function new(mod, button, press, release) local ret = {} diff --git a/lib/awful/key.lua.in b/lib/awful/key.lua.in index 251433de7..ea5ce691e 100644 --- a/lib/awful/key.lua.in +++ b/lib/awful/key.lua.in @@ -10,10 +10,15 @@ local ipairs = ipairs local capi = { key = key } local util = require("awful.util") ---- Key helper for awful +--- Create easily new key objects ignoring certain modifiers. module("awful.key") ---- Modifiers to ignore +--- Modifiers to ignore. +-- By default this is initialized as { "Lock", "Mod2" } +-- so the Caps Lock or Num Lock modifier are not taking into account by awesome +-- when pressing keys. +-- @name ignore_modifiers +-- @class table ignore_modifiers = { "Lock", "Mod2" } --- Create a new key to use as binding. @@ -21,7 +26,7 @@ ignore_modifiers = { "Lock", "Mod2" } -- the ignore_modifier variable to create more key with or without the ignored -- modifiers activated. -- For example if you want to ignore CapsLock in your keybinding (which is --- ignored by default by this function), creatina key binding with this function +-- ignored by default by this function), creating key binding with this function -- will return 2 key objects: one with CapsLock on, and the other one with -- CapsLock off. -- @see capi.key