Plugin inferastructure work/fixes

This commit is contained in:
2023-10-10 22:33:28 -05:00
parent 7c46e5eb4b
commit 43d0881a36
5 changed files with 61 additions and 14 deletions

View File

@@ -42,6 +42,17 @@ class Keybindings(Singleton):
self.keymap = Gdk.Keymap.get_default()
self.configure({})
def print_keys(self):
print(self.keys)
def append_bindings(self, combos):
""" Accept new binding(s) and reload """
for item in combos:
method, keys = item.split(":")
self.keys[method] = keys
self.reload()
def configure(self, bindings):
""" Accept new bindings and reconfigure with them """
self.keys = bindings