Forráskód Böngészése

Helptext for hotkeys

Christoph Trappe 3 éve
szülő
commit
2c07a28da1
1 módosított fájl, 5 hozzáadás és 4 törlés
  1. 5 4
      nicegui/elements/hotkey.py

+ 5 - 4
nicegui/elements/hotkey.py

@@ -17,11 +17,12 @@ class HotkeyView(CustomView):
 class Hotkey(Element):
 
     def __init__(self, handle_keys: Callable = None):
-        """Hotkeys
+        """
+        Hotkeys
 
-        Adds a hotkey action to an element.
+        Adds global keyboard event tracking.
 
-        :param keys: list of characters that the action should be associated with, e.g. ['f', 'g']
-        :param on_keydown: callback to be executed when the specified keys are pressed while the parent is hovered
+        :param handle_keys: callback to be executed when keyboard events occur.
         """
+
         super().__init__(HotkeyView(handle_keys=handle_keys))