+
    i  c                   s    R t ^ RIHt ^RIHtHtHtHtHtH	t	H
t
HtHt  ! R R4      t ! R R4      t ! R R4      t ! R	 R
4      t ! R R4      t]]]]]]]]/tRtR# )aY  
This module provides the :class:`InputEvent` class, which closely
resembles the ``input_event`` struct defined in ``linux/input.h``:

.. code-block:: c

    struct input_event {
        struct timeval time;
        __u16 type;
        __u16 code;
        __s32 value;
    };

This module also defines several :class:`InputEvent` sub-classes that
know more about the different types of events (key, abs, rel etc). The
:data:`event_factory` dictionary maps event types to these classes.

Assuming you use the :func:`evdev.util.categorize()` function to
categorize events according to their type, adding or replacing a class
for a specific event type becomes a matter of modifying
:data:`event_factory`.

All classes in this module have reasonable ``str()`` and ``repr()``
methods::

    >>> print(event)
    event at 1337197425.477827, code 04, type 04, val 458792
    >>> print(repr(event))
    InputEvent(1337197425L, 477827L, 4, 4, 458792L)

    >>> print(key_event)
    key event at 1337197425.477835, 28 (KEY_ENTER), up
    >>> print(repr(key_event))
    KeyEvent(InputEvent(1337197425L, 477835L, 1, 28, 0L))
)Final)	ABSEV_ABSEV_KEYEV_RELEV_SYNKEYRELSYNkeysc                   sL   a  ] tR t^-t o RtR	tR tV 3R lR ltR tR t	Rt
V tR# )

InputEventzA generic input event.c                sB    Wn         W n        W0n        W@n        WPn        R # Nsecusectypecodevalue)selfr   r   r   r   r   s   &&&&&&3/usr/lib64/python3.14/site-packages/evdev/events.py__init__ZInputEvent.__init__2   s#     	 	 	  
    c                    < V ^8  d   QhRS[ /# )   Zreturn)Zfloatformat__classdict__   "r   __annotate__ZInputEvent.__annotate__B   s     2 25 2r   c                sJ    V P                   V P                  R,          ,           # )z"Return event timestamp as a float.g    .A)r   r   r      &r   	timestampZInputEvent.timestampB   s    xx499y011r   c                s    R pVP                  V P                  4       V P                  V P                  V P                  4      # )z3event at {:f}, code {:02d}, type {:02d}, val {:02d})r   r   r   r   r   r   msg   & r   __str__ZInputEvent.__str__F   s/    Czz$..*DIItyy$**MMr   c                s    R pVP                  V P                  P                  V P                  V P                  V P
                  V P                  V P                  4      # )z {}({!r}, {!r}, {!r}, {!r}, {!r}))r   	__class____name__r   r   r   r   r   r    r"   r   __repr__ZInputEvent.__repr__J   sD    0zz$..11488TYY		SWS\S\^b^h^hiir   )r   r   r   r   r   Nr   )r%   
__module____qualname____firstlineno____doc__	__slots__r   r   r#   r&   __static_attributes____classdictcell__r      @r   r
   r
   -   s.      6I  2 2Nj jr   r
   c                   sb   a  ] tR t^Ot o Rt^ t^t^tR	tR
V 3R lR llt	R t
R tV 3R ltRtV tR# )KeyEventzCAn event generated by a keyboard, button or other key-like devices.c                s&   < V ^8  d   QhRS[ RS[/# )r   eventallow_unknown)r
   Zboolr   r   r   r   KeyEvent.__annotate__X   s     ' 'j ' 'r   c                s   VP                   V n        VP                  ^ 8X  d   \        P                  V n        MMVP                  ^8X  d   \        P                  V n        M&VP                  ^8X  d   \        P                  V n         \        VP                   ,          V n	        Yn        R#   \         d-    T'       d#   RP                  TP                   4      T n	         L=h i ; i)z
The ``allow_unknown`` argument determines what to do in the event of an event code
for which a key code cannot be found. If ``False`` a ``KeyError`` will be raised.
If ``True`` the keycode will be set to the hex value of the event code.
z0x{:02X}N)r   scancoder   r0   key_upkeystatekey_holdkey_downr	   keycodeZKeyErrorr   r1   )r   r1   r2   s   &&&r   r   ZKeyEvent.__init__X   s     #ZZ;;!$OODM[[A$--DM[[A$--DM	

+DL "'
  	)00<		s   B+ +C"> C" C"c                s     RV P                   ,          pRpVP                  V P                  P	                  4       V P
                  V P                  V4      #   \         d    Rp LQi ; i)upZunknownzkey event at {:f}, {} ({}), {})r:   ZdownZhold)r6   Z
IndexErrorr   r1   r   r4   r9   )r   Zksr!   s   &  r   r#   ZKeyEvent.__str__s   s\    	'6B /zz$**..0$--rRR	  	B	s   A A'&A'c                b    R P                  V P                  P                  V P                  4      # z{}({!r})r   r$   r%   r1   r   r   r   r&   ZKeyEvent.__repr__|   #      !8!8$**EEr   c                sn   < V ^8  d   Qh/ S[ S[,          ;R&   S[ S[,          ;R&   S[ S[,          ;R&   # )r   r5   r8   r7   )r    Zintr   r   r   r   r3   O   s8      #J  Cj	 
 Cj r   )r1   r9   r6   r4   N)r4   r9   r6   r1   )F)r%   r'   r(   r)   r*   r5   r8   r7   r+   r   r#   r&   Z__annotate_func__r,   r-   r.   r/   r   r0   r0   O   s:     MFHH:I' '6SF[  r   r0   c                   sF   a  ] tR t^t o RtRtV 3R lR ltR tR tRt	V t
R# )	RelEventzAA relative axis event (e.g moving the mouse 5 units to the left).r1   c                r   r   r1   r
   r   r   r   r   ZRelEvent.__annotate__        ' 'j 'r   c                    Wn         R # r   r1   r   r1      &&r   r   ZRelEvent.__init__       !&
r   c                    R pVP                  V P                  P                  4       \        V P                  P                  ,          4      # )zrelative axis event at {:f}, {})r   r1   r   r   r   r    r"   r   r#   ZRelEvent.__str__   2    /zz$**..0#djjoo2FGGr   c                r;   r<   r=   r   r   r   r&   ZRelEvent.__repr__   r>   r   rD   Nr%   r'   r(   r)   r*   r+   r   r#   r&   r,   r-   r.   r/   r   r?   r?      s)     KI' 'HF Fr   r?   c                   sF   a  ] tR t^t o RtRtV 3R lR ltR tR tRt	V t
R# )	AbsEventzGAn absolute axis event (e.g the coordinates of a tap on a touchscreen).r1   c                r   r@   rA   r   r   r   r   ZAbsEvent.__annotate__   rB   r   c                rC   r   rD   rE   rF   r   r   ZAbsEvent.__init__   rG   r   c                rH   )zabsolute axis event at {:f}, {})r   r1   r   r   r   r    r"   r   r#   ZAbsEvent.__str__   rI   r   c                r;   r<   r=   r   r   r   r&   ZAbsEvent.__repr__   r>   r   rD   NrJ   r.   r/   r   rK   rK      s)     QI' 'HF Fr   rK   c                   sF   a  ] tR t^t o RtRtV 3R lR ltR tR tRt	V t
R# )	SynEventz
A synchronization event. Used as markers to separate events. Events may be
separated in time or in space, such as with the multitouch protocol.
r1   c                r   r@   rA   r   r   r   r   ZSynEvent.__annotate__   rB   r   c                rC   r   rD   rE   rF   r   r   ZSynEvent.__init__   rG   r   c                rH   )z!synchronization event at {:f}, {})r   r1   r   r   r   r    r"   r   r#   ZSynEvent.__str__   s2    1zz$**..0#djjoo2FGGr   c                r;   r<   r=   r   r   r   r&   ZSynEvent.__repr__   r>   r   rD   NrJ   r.   r/   r   rL   rL      s-     
 I' 'HF Fr   rL   N)r
   r0   r?   rL   rK   event_factory)r*   Ztypingr    Zecodesr   r   r   r   r   r   r   r   r	   r
   r0   r?   rK   rL   rM   Z__all__) r   r   <module>rN      s|   "P  L L Lj jD.F .FbF F"F F"F F. H
H
H
H	 Zr   