Jelajahi Sumber

Helptext for hotkeys

Christoph Trappe 3 tahun lalu
induk
melakukan
2c07a28da1
1 mengubah file dengan 5 tambahan dan 4 penghapusan
  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))