From 25a65cc2f35e12a38fd02cf3ef8ca784d72cf667 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Wed, 18 Jun 2008 20:39:35 +0200 Subject: [PATCH] awful: add support for Home and End keys Signed-off-by: Julien Danjou --- awful.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/awful.lua b/awful.lua index be15306e..4fe8aa8b 100644 --- a/awful.lua +++ b/awful.lua @@ -610,7 +610,11 @@ local function menu(args, textbox, exe_callback, completion_callback) end -- Typin cases - if key == "BackSpace" then + if key == "Home" then + cur_pos = 1 + elseif key == "End" then + cur_pos = #command + 1 + elseif key == "BackSpace" then if cur_pos > 1 then command = command:sub(1, cur_pos - 2) .. command:sub(cur_pos) cur_pos = cur_pos - 1