+
     i.  c                   s    ^ RI t ^ RIt^ RIt^ RIHt ^ RIHtHt ^ RIH	t	 ^ RI
Ht ^ RIHtHt ^ RIHtHt ^ RIHt  ! R	 R
]4      tR# )i    N)EV_REL)InputCombinationInputConfig)Mapping)GlobalUInputs)MappingHandlerInputEventHandler)
InputEventEventActions)loggerc                   s   a a ] tR t^%t oRtV3R lV 3R lltR tR t]R 4       t	V3R lR lt
RV3R	 lR
 lltV3R lR ltV3R ltRtVtV ;t# )RelToBtnHandlerz}Handler which transforms an EV_REL to a button event
and sends that to a sub_handler

adheres to the MappingHandler protocol
c                s0   < V ^8  d   QhRS[ RS[RS[RR/# )   combinationmappingglobal_uinputsreturnN)r   r   r   Zformat__classdict__   "`/usr/lib/python3.14/site-packages/inputremapper/injection/mapping_handlers/rel_to_btn_handler.py__annotate__RelToBtnHandler.__annotate__1   s3     % %%% % &	% 
%    c                s   < \         SV `  WV4       R V n        V^ ,          V n        \        P                  ! 4       V n        R V n        V P                  P                  ^ 8w  g   Q h\        V4      ^8X  g   Q hR# )FN)	Zsuper__init___active_input_configtime_last_activation_abort_releaseanalog_thresholdZlen)selfr   r   r   Z_	__class__s   &&&&,r   r   ZRelToBtnHandler.__init__1   sj     	~>(^ $		#!!22a777;1$$$r   c                s"    R V P                    R2# )zRelToBtnHandler for "Z")r   r      &r   __str__ZRelToBtnHandler.__str__A   s    &t'9'9&:!<<r   c                sJ    R \        V 4       R\        \        V 4      4       R2# )Z<z at Z>)ZstrZhexZidr    r!   r   __repr__ZRelToBtnHandler.__repr__D   s#    3t9+T#bh-22r   c                s    V P                   # )N)_sub_handlerr    r!   r   childZRelToBtnHandler.childG   s       r   c                s&   < V ^8  d   QhRS[ RS[/# )r   sourcesuppress)r   boolr   r   r   r   r   K   s       r   c           	     sF  "   \         P                   ! 4       V P                  V P                  P                  ,           8  d<   \        P
                  ! ^V P                  P                  ,          4      G Rj  xL
  Kz  V P                  '       d
   RV n        R# \        ^ ^ .V P                  P                  O5R^ R\        P                  3RV P                  P                  / p\        P                  ! RV4       V P                   P#                  W1V4       RV n        R#  L5i)i   NFvalueactionsorigin_hashSending %s to sub_handler)r   r   r   Zrelease_timeoutasyncioZsleepZrel_rater   r   r   Ztype_and_coder   as_keyr+   r	   debugr$   notifyr   )r   r&   r'   events   &&& r   _stage_releaseZRelToBtnHandler._stage_releaseK   s     
 iikD11DLL4P4PPP--DLL$9$9 9:::"'D
 --
 	

 "((*
 **66
 	0%8  9! ;s   A4D!6D7D!BD!c                sF   < V ^8  d   QhRS[ RS[P                  RS[RS[/# )r   r1   r&   r'   r   )r   evdevZInputDevicer(   r   r   r   r   r   c   s?     'Q 'Q'Q !!'Q 	'Q
 
'Qr   c                s   VP                   \        8X  g   Q hVP                  V P                  P                  8w  d   R # V P                  P                  ;p'       g   Q hVP
                  pYTu;8  d   ^ 8  g   M YTu;8  d   ^ 8  dw   M MsV P                  '       d`   V P                  P                  '       d   R# VP                  ^ \        P                  3R7      p\        P                  ! RV4       RV n        MR # V P                  '       g&   \        P                   ! V P#                  W#4      4       YTu;8  d   ^ 8  d   M M\        P$                  pM\        P&                  p\(        P(                  ! 4       V n        VP                  ^\        P                  V3R7      p\-        VP
                  4      V n        V P.                  P1                  WVR7      # )FT)r)   r*   r,   )r&   r'   )Ztyper    Zinput_match_hashr   r   r)   r   r   Zforce_release_timeoutZmodifyr   r.   r	   r/   r   r-   Zensure_futurer2   Zpositive_triggerZnegative_triggerr   r   r(   r$   r0   )r   r1   r&   r'   Z	thresholdr)   Z	directions   &&&&   r   r0   ZRelToBtnHandler.notifyc   s_    zzV###!!T%7%7%H%HH!//@@@	@A@!!u'<1'<||| <<5551|7J7J6LM8%@&*#  <<<%%d&9&9&&KL%A%(99	(99	$(IIKD!LLq<3F3F	2RLSEEKK(  ''x'PPr   c                s   < V ^8  d   QhRR/# )r   r   N r   r   r   r   r      s     " "t "r   c                sz    V P                   '       d   R V n        RV n         V P                  P                  4        R# )TFN)r   r   r$   resetr    r!   r   r5   ZRelToBtnHandler.reset   s,    <<<"&D!r   c                sJ   < V ^8  d   Qh/ S[ ;R&   S[;R&   S[;R&   S[;R&   # )r   r   r   r   r$   )r(   r   Zfloatr   r   r   r   r   r   %   s8      M      $# r   )r   r   r   r   )F)Z__name__Z
__module__Z__qualname__Z__firstlineno__Z__doc__r   r"   r#   Zpropertyr%   r2   r0   r5   Z__annotate_func__Z__static_attributes__Z__classdictcell__Z__classcell__)r   r   s   @@r   r
   r
   %   s[     % % =3 ! ! 0'Q 'QR" "O  r   r
   )r-   r   r3   Zevdev.ecodesr    Z"inputremapper.configs.input_configr   r   Zinputremapper.configs.mappingr   Z&inputremapper.injection.global_uinputsr   Z8inputremapper.injection.mapping_handlers.mapping_handlerr   r   Zinputremapper.input_eventr   r   Zinputremapper.logging.loggerr	   r
   r4   r   r   <module>r6      s7   (     L 1 @ ? /l"n l"r   