From c101859897c308a8b1c832c8f68f6f4aab200eaa Mon Sep 17 00:00:00 2001 From: Grumph Date: Mon, 14 Feb 2022 23:36:39 +0100 Subject: [PATCH] Simplify code key.key is always defined --- lib/awful/keygrabber.lua | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/awful/keygrabber.lua b/lib/awful/keygrabber.lua index 35e12ec43..df597e4c0 100644 --- a/lib/awful/keygrabber.lua +++ b/lib/awful/keygrabber.lua @@ -523,12 +523,10 @@ function keygrabber:add_keybinding(key, _keycode, _callback, _description) description = _description, on_press = _callback } - else - _keycode = key.key end self._private.keybindings[key.key] = self._private.keybindings[key.key] or {} - table.insert(self._private.keybindings[_keycode], key) + table.insert(self._private.keybindings[key.key], key) if self.export_keybindings then add_root_keybindings(self, {key})