From 9e3efbd082c38088c76346b539e4c7dc5f2ff423 Mon Sep 17 00:00:00 2001 From: PySimpleGUI Date: Sat, 21 Nov 2020 16:55:18 -0500 Subject: [PATCH] Added key_dict property. --- PySimpleGUI.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/PySimpleGUI.py b/PySimpleGUI.py index ab35d8bd..e1326b03 100644 --- a/PySimpleGUI.py +++ b/PySimpleGUI.py @@ -8983,6 +8983,20 @@ class Window: self.multi_window_return_values_queue.put(item=(window, event, value)) + + + @property + def key_dict(self): + """ + Returns a dictionary with all keys and their corresponding elements + { key : Element } + :return: Dictionary of keys and elements + :rtype: Dict[Any:Element] + """ + return self.AllKeysDict + + + # def __enter__(self): # """ # WAS used with context managers which are no longer needed nor advised. It is here for legacy support and