mirror of
https://github.com/awesomeWM/awesome
synced 2024-11-17 07:47:41 +01:00
keygrabber: Fix the key sequence recording. (#2758)
The origial implementation was broken and nobody noticed until now. Fix #2757
This commit is contained in:
parent
755c44ca52
commit
f03d5474cb
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue