浏览代码

Helptext for hotkeys

Christoph Trappe 3 年之前
父节点
当前提交
2c07a28da1
共有 1 个文件被更改,包括 5 次插入4 次删除
  1. 5 4
      nicegui/elements/hotkey.py

+ 5 - 4
nicegui/elements/hotkey.py

@@ -17,11 +17,12 @@ class HotkeyView(CustomView):
 class Hotkey(Element):
 class Hotkey(Element):
 
 
     def __init__(self, handle_keys: Callable = None):
     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))
         super().__init__(HotkeyView(handle_keys=handle_keys))