From f9f2bcef587d846a08ec230a4deeb44171da3c32 Mon Sep 17 00:00:00 2001 From: Ilya Zhuravlev Date: Sun, 3 Jan 2021 08:54:12 -0500 Subject: [PATCH] keyboard_comm: instead of restoring non-empty macro, only restore macro if different --- src/main/python/keyboard_comm.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/python/keyboard_comm.py b/src/main/python/keyboard_comm.py index b951578..f70da72 100644 --- a/src/main/python/keyboard_comm.py +++ b/src/main/python/keyboard_comm.py @@ -284,9 +284,9 @@ class Keyboard: self.set_layout_options(data["layout_options"]) # we need to unlock the keyboard before we can restore the macros, lock it afterwards - # only do that if the user actually has macros defined + # only do that if it's different from current macros macro = base64.b64decode(data["macro"]) - if macro: + if macro != self.macro: Unlocker.get().perform_unlock(self) self.set_macro(macro) self.lock()