+
    i  c                   s    R t ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^RIHtH	t	H
t
Ht R tR tR
R ltR tR tRR lt]R	8X  d    ]! 4       t]P,                  ! ]4       R# R#   ]]3 d    ^ t L#i ; i)a  
Usage: evtest [options] [<device>, ...]

Input device enumerator and event monitor.

Running evtest without any arguments will let you select
from a list of all readable input devices.

Options:
  -h, --help          Show this help message and exit.
  -c, --capabilities  List device capabilities and exit.
  -g, --grab          Other applications will not receive events from
                      the selected devices while evtest is running.

Examples:
  evtest /dev/input/event0 /dev/input/event1
N)AbsInfoInputDeviceecodeslist_devicesc                  s    \         P                  ! R R7      p V P                  RRRR7       V P                  RRRR7       V P                  RR	RR7       V P                  4       # )
F)Zadd_help_optionz-hz--helpZ
store_true)Zactionz-gz--grabz-cz--capabilities)optparseZOptionParserZ
add_optionZ
parse_args)Zparsers    3/usr/lib64/python3.14/site-packages/evdev/evtest.pyparseoptr      sa    ""59F
dH\:
dH\:
d,\B    c                  sN   \        4       w  rV P                  '       d    \        \        P	                  4       4       ^ # V'       g   \        4       pMV Uu. uF  p\        V4      NK  	  ppV P                  '       d   V F  p\        V4       K  	  ^ # V P                  '       d   V F  pVP                  4        K  	  \        P                  P                  4       '       dG   \        \        P                  RR7       \        P                  ! \        \        P                  RR7       \        R4       V Uu/ uF  qDP                   VbK  	  pp \"        P"                  ! V. . 4      w  rgpV F+  p	WY,          P%                  4        F  p
\'        V
4       K  	  K-  	  KO  u upi u upi )    F)enableTz/Listening for events (press ctrl-c to exit) ...)r   Zhelpprint__doc__Zstripselect_devicesr   capabilitiesprint_capabilitiesZgrabsysZstdinZisattytoggle_tty_echoatexitZregisterfdselectZreadprint_event)ZoptsdevicespathdevicedevZfd_to_deviceZrZwer   Zevents              r   mainr   %   s+   JMDyyygmmo "189;t$9Fv& yyyFKKM  yy		%04@	
;<+237CFFCK7L3
--b"5aB%)..0E" 1 + :" 4s   F7F"c           
     s   R p\        \        V 4      VR7      pV Uu. uF  p\        V4      NK  	  ppV'       g:   Rp\        W@,          \        P
                  R7       \        P                  ! ^4       Rp\        V4       UUu. uF  w  rgVP                  Wg4      NK  	  ppp\        RP                  RRR	R
4      4       \        R\        \        V\        R7      4      ,          4       \        RP                  V4      4       \        4        \        R\        V4      ^,
          ,          4      p	 V	P                  4       p	V	 Uu. uF  qb\        V4      ,          NK  	  p	pV	'       g4   Rp\        V\        P
                  R7       \        P                  ! ^4       V	# u upi u uppi u upi   \         d    Rp	 L\i ; i)zE
Select one or more devices from a list of accessible input devices.
c                 sp    \         P                  ! R V 4      pV Uu. uF  p\        V4      NK  	  up# u upi )z\d+$)reZfindallint)Zdevice_pathZdigitsis   &  r   	devicenumZ!select_devices.<locals>.devicenumM   s.    G[1 &'1A'''s   3)ZkeyzBerror: no input devices found (do you have rw permission on %s/*?))Zfilez9{0:<3} {1.path:<20} {1.name:<35} {1.phys:<35} {1.uniq:<4}zID  {:<20} {:<35} {:<35} {}ZDeviceZNameZPhysZUniqZ-Z
zSelect devices [0-%s]: NzKerror: invalid input - please enter one or more numbers separated by spaces)Zsortedr   r   r
   r   ZstderrexitZ	enumerateformatZlenZmaxjoinZinputZsplitr   Z
ValueError)
Z
device_dirr   r   r   msgZ
dev_formatZnumr   Z	dev_linesZchoicess
   &         r   r   r   H   s`   
( \*-9=G-45WT{4 WG5RcSZZ0LJ=Fw=OP=O""3,=OIP	
'
.
.x
PQ	#C	s+,
,-	$))I
	G-Y!1CDEG--/0783s8$$8 [c

#N7 6 Q 9 s/   FF$2F/ F* F/ *F/ /F?>F?c           	      s   V P                  R R7      pV P                  R R7      p\        RP                  V 4      4       \        RP                  V 4      4       \        RP                  V P                  4      4       R\
        P                  3V9   d:   RP                  R V P                  R 4       4       4      p\        RV,          4       RP                  R	 V P                  R 4       4       4      p\        R
V,          4       V'       d4   \        R4       V F  w  rV\        RV: RV: 24       K  	  \        4        \        R4       VP                  4        F  w  rW\        RP                  ! V!  4       V F  p\        V^,          \        4      '       dD   \        RP                  ! V^ ,          !  4       \        RP                  V^,          4      4       Kc  \        V^ ,          \        4      '       d   RP                  V^ ,          4      MV^ ,          p\        RP                  W^,          4      4       K  	  \        R4       K  	  R# )T)ZverbosezDevice name: {.name}zDevice info: {.info}zRepeat settings: {}
EV_LEDZ,c              3   2   "   T F  q^ ,          x  K  	  R# 5ir   N ).0r      & r   	<genexpr>%print_capabilities.<locals>.<genexpr>y   s     8&7!&7   zActive LEDs: %sc              3   r$   r%   r&   )r'   Zkr(   r   r)   r*   |   s     B)AAQ44)Ar+   zActive keys: %s
zInput properties:z  Z zDevice capabilities:z  Type {} {}:z    Code {:<4} {}:z      {}z, z    Code {:<4} {} N)r   input_propsr
   r    Zrepeatr   r#   r!   ledsactive_keysZitemsZ
isinstancer    Zlist)	r   r   r-   r.   r/   typecodeZcodesZss	   &        r   r   r   p   s   &&t&4L$$T$2K	
 
'
'
/0	
 
'
'
/0	
!
(
(
78&-- L0xx8fkk$&788$&'((B););D)ABBK	

+,!"%JDtT*+ &	
 !#))+o$$d+,D$q'7++*1147;<j''Q01 +5T!Wd*C*CDIId1g&a)00G<=  	b	 ,r   c           
      s   V P                   \        P                  8X  d   V P                  \        P                  8X  d   R pM$V P                  \        P
                  8X  d   RpMRp\        VP                  V P                  4       \        P                  V P                  ,          4      4       R# V P                   \        P                  9   d4   \        P                  V P                   ,          V P                  ,          pMRpRp\        VP                  V P                  4       V P                   \        P                  V P                   ,          V P                  W P                  4      4       R# )z*time {:<17} +++++++++++++ {} +++++++++++++z*time {:<17} !!!!!!!!!!!!! {} !!!!!!!!!!!!!z*time {:<17} ------------- {} -------------Z?z3time {:<17} type {} ({}), code {:<4} ({}), value {}N)r0   r   ZEV_SYNr1   ZSYN_MT_REPORTZSYN_DROPPEDr
   r    Z	timestampZSYNZbytypeZEVZvalue)r   r"   ZcodenameZevfmts   &   r   r   r      s    vv66V)))>CVVv)))>C>Ccjj

166(:;<66V]]"}}QVV,QVV4HHEell1;;=!&&&))AFF2CQVVXW^W^_`r   c                 sV   \         P                  ! V P                  4       4      pV'       d%   V^;;,          \         P                  ,          uu&   M$V^;;,          \         P                  ( ,          uu&   \         P                  ! V P                  4       \         P
                  V4       R# )i   N)termiosZ	tcgetattrZfilenoZECHOZ	tcsetattrZTCSANOW)Zfhr	   Zflagss   && r   r   r      s]    biik*EaGLL aW\\M!biik7??E:r   Z__main__)z
/dev/input)T)r   r   r   r   r   r   r2   r,   r    r   r   r   r   r   r   r   r   r   Z__name__ZretZKeyboardInterruptZEOFErrorr   r&   r   r   <module>r3      s   $   	  
  8 8 #F%P!Ha&; zf HHSM  x( s   A" "A0/A0