ó
    Ãu„jž	  ã                  ób   • S SK Jr  S SKJr  S SKJr  S SKJr  S SKJ	r	  S SK
Jr  S SKJr  S
S jrg	)é    )Úannotations)ÚCallable)Úevents)Úinvoke)ÚDOMNode©ÚDuplicateKeyHandlers)ÚMessagePumpc              ƒ  óˆ  #   • SS jnSnSnUR                   nU(       d  g        SS jn U R                  nUR                   Hb  nU" X5      =n	c  M  U(       a  U" XTR                  U	R                  5        Ub  UR
                  (       d    U$ [        X‘5      I Sh  v•N SLnU	nMd     U$ ! [         a    Sn N‚f = f N 7f)a¾  Dispatch a key event to method.

This function will call the method named 'key_<event.key>' on a node if it exists.
Some keys have aliases. The first alias found will be invoked if it exists.
If multiple handlers exist that match the key, an exception is raised.

Args:
    event: A key event.

Returns:
    True if key was handled, otherwise False.

Raises:
    DuplicateKeyHandlers: When there's more than 1 handler that could handle this key.
c                óP   • [        U SU 3S5      =(       d    [        U SU 3S5      $ )z@Look for the public and private handler methods by name on self.Úkey_NÚ_key_)Úgetattr)ÚpumpÚkeys     Ú£C:\Users\johnn\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.13_qbz5n2kfra8p0\LocalCache\local-packages\Python313\site-packages\textual/_dispatch_key.pyÚget_key_handlerÚ%dispatch_key.<locals>.get_key_handler   s,   € ä�t˜t C 5˜\¨4Ó0×V´G¸DÀEÈ#ÈÀ-ÐQUÓ4VÐVó    FNc           	     ó2   • [        SU < SU< SU< S35      e)znRaise exception for case where user presses a key and there are multiple candidate key handler methods for it.z Multiple handlers for key press z.
We found both z and zO, and didn't know which to call.
Consider combining them into a single handler.r   )Úkey_nameÚfirst_handlerÚsecond_handlers      r   Ú#_raise_duplicate_key_handlers_errorÚ9dispatch_key.<locals>._raise_duplicate_key_handlers_error'   s5   € ô #Ø.¨x©lð ;Ø*Ñ-¨U°>Ñ2Dð E=ð>ó
ð 	
r   )r   r
   r   ÚstrÚreturnzCallable | None)r   r   r   r   r   r   r   ÚNone)ÚnameÚscreenÚ	ExceptionÚname_aliasesÚ__name__Ú	is_activer   )
ÚnodeÚeventr   ÚhandledÚinvoked_methodr   r   r    Úkey_method_nameÚ
key_methods
             r   Údispatch_keyr+      sì   é € ô"Wð €GØ€NØ�z‰z€HÞØð	
Øð	
Ø&)ð	
Ø;>ð	
à	ô	
ðØ—‘ˆð !×-Ô-ˆÙ)¨$Ó@Ð@ˆJÓMÞÙ3Ø×5Ñ5°z×7JÑ7Jôð Ñ!¨&×*:×*:Øð €Nô $ JÓ6×6¸uÐDˆGØ'ŠNñ .ð €Nøô! ó ØŠðúñ 7ùs:   ‚+C®B. ºCÁA	CÂC Â CÂ.B=Â:CÂ<B=Â=CN)r%   r   r&   z
events.Keyr   Úbool)Ú
__future__r   Útypingr   Útextualr   Útextual._callbackr   Útextual.domr   Útextual.errorsr	   Útextual.message_pumpr
   r+   © r   r   Ú<module>r5      s   ðÝ "å å Ý $Ý Ý /Ý ,õ8r   