From f03d5474cbe6cd9100e85878e1557f156dfb6d7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emmanuel=20Lepage=20Vall=C3=A9e?= Date: Wed, 24 Apr 2019 20:15:39 -0400 Subject: [PATCH] keygrabber: Fix the key sequence recording. (#2758) The origial implementation was broken and nobody noticed until now. Fix #2757 --- lib/awful/keygrabber.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/awful/keygrabber.lua b/lib/awful/keygrabber.lua index 277570342..928a6ecb3 100644 --- a/lib/awful/keygrabber.lua +++ b/lib/awful/keygrabber.lua @@ -224,8 +224,8 @@ local function runner(self, modifiers, key, event) local seq_len = glib.utf8_strlen(self.sequence, -1) -- Record the key sequence - if key == "BackSpace" and seq_len > 0 then - self.sequence = glib.utf8_substring(self.sequence, 0, seq_len - 2) + if key == "BackSpace" and seq_len > 0 and event == "release" then + self.sequence = glib.utf8_substring(self.sequence, 0, seq_len - 1) elseif glib.utf8_strlen(key, -1) == 1 and event == "release" then self.sequence = self.sequence..key end