+
    Qie  c                  s   R t ^ RIHt RtRtRtRtRt^ RIH	t	 ^ RI
t
]
P                  ! R	R
4       ]
P                  ! RR4       ^ RIHt ^ RIHt ^RIHt ^RIHt ^RIHt ^RIHt ]	'       d	   ^RIHtHt / t^t^ t^]P6                  P8                  ,          t^]P6                  P<                  ,          t^],          t ^],          ^]P6                  P8                  ,          ,          t!^],          ^]P6                  P<                  ,          ,          t"^],          ^]P6                  P<                  ,          ,          ^]P6                  P8                  ,          ,          t#^],          ^]P6                  PH                  ,          ,          t%^],          ^]P6                  P8                  ,          ,          ^]P6                  PH                  ,          ,          t&^]P6                  PH                  ,          t'^]P6                  PH                  ,          ^]P6                  P8                  ,          ,          t(^]P6                  P<                  ,          ^]P6                  P8                  ,          ,          t)^]P6                  PH                  ,          ^]P6                  P<                  ,          ,          ^]P6                  P8                  ,          ,          t*^]P6                  P8                  ,          ^]P6                  P<                  ,          ,          ^]P6                  PV                  ,          ,          ^]P6                  PX                  ,          ,          t-^]P6                  PH                  ,          ^]P6                  P8                  ,          ,          ^]P6                  P<                  ,          ,          ^]P6                  PV                  ,          ,          ^]P6                  PX                  ,          ,          ^],          ,          t.].t/]P`                  ! 4       R 8  t1R R lt2R R lt3R R lt4R R lt5 ! R R4      t6 ! R R4      t7R# )!zLProvides support for defining keybindings and matching them to input events.)annotationsz$Id$z
$Revision$z$Date$z-Copyright (c) 2005-2008 Sun Microsystems Inc.ZLGPL)TYPE_CHECKINGNAtspiz2.0Gdkz3.0)r   )r   )debug)input_event_manager)settings_)KeyboardEventInputEventHandlerc                    V ^8  d   QhRRRR/# )   keysymstrreturnztuple[int, int] Zformat   "5/usr/lib/python3.14/site-packages/orca/keybindings.py__annotate__r   \   s     9" 9" 9" 9"    c                s   V '       g   R# V \         9  d   \        P                  P                  4       p\        P                  ! V 4      pV^ 8X  d   R# V^ 3\         V &   VP                  V4      w  r4V Fe  pVP                  ^ 8X  d#   W%P                  3\         V &    \         V ,          # \         V ,          R8X  g   KJ  W$^ ,          P                  3\         V &   Kg  	  \         V ,          # )a  Converts an XKeysym string (e.g., 'KP_Enter') to a keycode that
should match the event.hw_code for key events and to the corresponding
event.keysym for newer AT-SPI2.

This whole situation is caused by the fact that Solaris chooses
to give us different keycodes for the same key, and the keypad
is the primary place where this happens: if NumLock is not on,
there is no telling the difference between keypad keys and the
other navigation keys (e.g., arrows, page up/down, etc.).  One,
for example, would expect to get KP_End for the '1' key on the
keypad if NumLock were not on.  Instead, we get 'End' and the
keycode for it matches the keycode for the other 'End' key.  Odd.
If NumLock is on, we at least get KP_* keys.

So...when setting up keybindings, we say we're interested in
KeySyms, but those keysyms are carefully chosen so as to result
in a keycode that matches the actual key on the keyboard.  This
is why we use KP_1 instead of KP_End and so on in our keybindings.

Arguments:
- keysym: a string that is a valid representation of an XKeysym.

Returns an integer representing a key code that should match the
event.hw_code for key events.
)    r   )_keycode_cacher   ZKeymapZget_defaultZkeyval_from_nameZget_entries_for_keyvalZgroupkeycode)r   ZkeymapkeyvalZ_successZentriesZentrys   &     r   get_keycodesr   \   s    < ^#'') %%f-Q;M #)!v"99&AE{{a*0--)@v& &!! f%/*0!*2D2D)Ev&  &!!r   c               r   )r   modsintr   r   r   r   r   r   r   r      s     6 6S 6S 6r   c                s   RpV \         ,          '       dX   \        P                  \        P                  8X  d   V\	        R4      R,           ,          pMaV\	        R4      R,           ,          pMGV ^\
        P                  P                  ,          ,          '       d   V\	        R4      R,           ,          pV ^,          '       d   V\	        R4      R,           ,          pV ^\
        P                  P                  ,          ,          '       d   V\	        R4      R,           ,          pV ^\
        P                  P                  ,          ,          '       d   V\	        R4      R,           ,          pV \        ,          '       d   V\	        R4      R,           ,          pV \        ,          '       d   V\	        R	4      R,           ,          pV \        ,          '       d   V\	        R
4      R,           ,          pV# )zSReturns the modifier names of a numeric modifier mask as a human-consumable string. ZInsertZ+	Caps_LockZAlt_RZSuperZMeta2ZAltZCtrlZShift)ORCA_MODIFIER_MASKr   ZkeyboardLayoutZGENERAL_KEYBOARD_LAYOUT_DESKTOPr   r   ModifierTypeZ	SHIFTLOCKMETA3META2ALT_MODIFIER_MASKCTRL_MODIFIER_MASKSHIFT_MODIFIER_MASK)r   Ztext   & r   get_modifier_namesr'      sn   
 D   ""h&N&NN AhK#%%D AkNS((D	e((222	3	3 	+$$ czz 	'
S  qE&&,,,-- 	'
S  qE&&,,,-- 	'
S    	%3    	&	C!!! 	'
S  Kr   c               r   )r   countr   r   r   r   r   r   r   r   r      s      # # r   c                sN    V ^8X  d   \        R4      # V ^8X  d   \        R4      # R# )zDReturns a human-consumable string representing the number of clicks.zdouble clickztriple clickr   r   )r(      &r   get_click_count_stringr*      s/    
 z   z   r   c               (    V ^8  d   QhRRRRRRRR/# )r   r   r   r   	modifiersr   list[Atspi.KeyDefinition]r   r   r   r   r   r      s)      C   Ib r   c                s<   . pV\         ,          '       d   . pV\         ( ,          p\        P                  ! 4       p\        P                   F{  p\        V4      w  rV	^ 8X  d   VR8X  d   \        R4      w  r\        '       d   VP                  V4      p
MVP                  V	4      p
V
'       g   Kd  VP                  W,          4       K}  	  MV.pV FH  p
\        P                  ! 4       p\        '       d   Wn        MWn        Wn        VP                  V4       KJ  	  V# )zUReturns a list of Atspi key definitions for the given keycode, keyval, and modifiers.Z
Shift_Lockr   )r   r   get_managerr   ZorcaModifierKeysr   CAN_USE_KEYSYMSZmap_keysym_to_modifierZmap_keycode_to_modifierappendr   ZKeyDefinitionr   r   r,   )r   r   r,   retZmodifier_listZother_modifiersZmanagerkeyZ
mod_keyvalZmod_keycodeZmodZkds   &&&         r   create_key_definitionsr3      s     C%%%#'9&99%113,,C&23&7#JaC<$7*6{*C'
44Z@55kBs$$S%:; - #  "?I J

2  Jr   c                  s    ] tR t^tRtRR R lltR R ltR R ltR R	 ltR
 R lt	R R lt
R R ltR R ltR R ltR R ltR R ltR R ltR R ltRtR# )
KeyBindingzTA single key binding, consisting of a keycode, modifier mask, and InputEventHandler.c               s0    V ^8  d   QhRRRRRRRRRRR	R
/# )r   keysymstringr   modifier_maskr   r,   handlerr
   click_countenabledboolr   r   r   r   r   KeyBinding.__annotate__  s9     ' 'S ' ' '+':='LP'r   c                sx    Wn         W n        W0n        W@n        WPn        ^ V n        ^ V n        W`n        . V n        R# )a  Creates a new key binding.

Arguments:
- keysymstring: the keysymstring - this is typically a string
  from /usr/include/X11/keysymdef.h with the preceding 'XK_'
  removed (e.g., XK_KP_Enter becomes the string 'KP_Enter').
- modifier_mask: bit mask where a set bit tells us what modifiers
  we care about (see Atspi.ModifierType.*)
- modifiers: the state the modifiers we care about must be in for
  this key binding to match an input event (see also
  Atspi.ModifierType.*)
- handler: the InputEventHandler for this key binding
- enabled: Whether this binding can be bound and used, i.e. based
  on mode, the feature being enabled/active, etc.
N)	r5   r6   r,   r7   r8   r   r   _enabled	_grab_ids)selfr5   r6   r,   r7   r8   r9   s   &&&&&&&r   __init__ZKeyBinding.__init__  s:    $ "."/'*1 +%$&r   c                   V ^8  d   QhRR/# r   r   r   r   r   r   r   r   r;     s     

 

 

r   c           	     	s   V P                   '       g   R V P                   R2# V P                  '       d   RV P                   R2pMRV P                   R2pV RV P                    RV P                   RV P                   RV P
                   2	# )zUNBOUND BINDING for 'Z'zENABLED BINDING for 'zDISABLED BINDING for ': z mods=z clicks=z
 grab ids=)r5   r7   r<   r,   r8   r=   )r>   stringr&   r   __str__ZKeyBinding.__str__  s       *4<<.::===,T\\N!<F-dll^1=Fhb**+6$..1A$JZJZI[ \')	
r   c               r+   )r   r   r   r   r,   r   r:   r   r   r   r   r   r;   *  s(      c C C D r   c                s    V P                   '       g#   \        V P                  4      w  V n        V n         V P                   V8X  g   V P                  V8X  d!   W0P                  ,          pW@P
                  8H  # R# )zNReturns true if this key binding matches the given keycode and modifier state.F)r   r   r5   r   r6   r,   )r>   r   r   r,   results   &&&& r   matchesZKeyBinding.matches*  s[     |||(4T5F5F(G%DK<<7"dkkV&;!3!33F^^++r   c               r@   r   r   r:   r   r   r   r   r   r;   :  s     ' '$ 'r   c                ,    \        V P                  4      # )z1Returns True if this KeyBinding is bound to a key)r:   r5   r>   r)   r   is_boundZKeyBinding.is_bound:  s     D%%&&r   c               r@   rG   r   r   r   r   r   r;   ?  s      D r   c                    V P                   # )z+Returns True if this KeyBinding is enabled.r<   rI   r)   r   
is_enabledZKeyBinding.is_enabled?  s     }}r   c               r@   r   r   Noner   r   r   r   r   r;   D  s        d  r   c                s    Wn         R# )z$Set this KeyBinding's enabled state.NrL   )r>   r9   s   &&r   set_enabledZKeyBinding.set_enabledD  s	      r   c               r@   rA   r   r   r   r   r   r;   I  s     ( (S (r   c                s     V P                   f   Q h V P                   P
                  #   \         d-    Rp\        P                  ! \        P                  TR4        R# i ; i)z8Returns the description of this binding's functionality.zERROR: Handler is NoneTr   )r7   ZAssertionErrorr   print_message
LEVEL_INFOdescription)r>   msgr&   r   rS   ZKeyBinding.descriptionI  sZ    	<<+++ ||'''  	*C 0 0#t<		s   ) 3A A c               r@   rA   r   r   r   r   r   r;   V  s      3 r   c                s    \        V P                  4      p\        V P                  4      pV P                  pV V RV 2pVP                  4       # )zAReturns a more human-consumable string representing this binding. )r'   r,   r*   r8   r5   Zstrip)r>   r   r8   r   rC   s   &    r   	as_stringZKeyBinding.as_stringV  sM     "$..1,T-=-=>""6&;-0||~r   c               r@   )r   r   r-   r   r   r   r   r   r;   _  s      !: r   c                s   . pV P                   '       g#   \        V P                  4      w  V n        V n         VP	                  \        V P                   V P                  V P                  4      4       \        '       d}   V P                  \        ,          '       d`   \        P                  ! V P                  4      ;q P                  8w  d0   VP	                  \        V P                   W P                  4      4       V# )z=return a list of Atspi key definitions for the given binding.)r   r   r5   r   Zextendr3   r,   r/   r%   r   Zkeyval_to_upper)r>   r1   Zupper_keyvals   &  r   key_definitionsZKeyBinding.key_definitions_  s     |||(4T5F5F(G%DK

)$,,T^^TU ?t~~0CCC # 3 3DKK @@[[P

1$,,nn]^
r   c               r@   )r   r   z	list[int]r   r   r   r   r   r;   m  s      i r   c                rK   )z)Returns the grab IDs for this KeyBinding.)r=   rI   r)   r   get_grab_idsZKeyBinding.get_grab_idsm  s     ~~r   c               r@   rG   r   r   r   r   r   r;   r  s     $ $4 $r   c                rH   )zIReturns True if there are existing grabs associated with this KeyBinding.)r:   r=   rI   r)   r   	has_grabsZKeyBinding.has_grabsr  s     DNN##r   c               r@   rN   r   r   r   r   r   r;   w  s     Z Z4 Zr   c                sX    \         P                  ! 4       P                  V 4      V n        R# )z#Adds key grabs for this KeyBinding.N)r   r.   Zadd_grabs_for_keybindingr=   rI   r)   r   	add_grabsZKeyBinding.add_grabsw  s      -88:SSTXYr   c               r@   rN   r   r   r   r   r   r;   |  s      d r   c                s\    \         P                  ! 4       P                  V 4       . V n        R# )z&Removes key grabs for this KeyBinding.N)r   r.   Zremove_grabs_for_keybindingr=   rI   r)   r   remove_grabsZKeyBinding.remove_grabs|  s"     	'')EEdKr   )	r<   r=   r8   r7   r   r5   r   r6   r,   N)i   T)__name__
__module____qualname____firstlineno____doc__r?   rD   rF   rJ   rM   rP   rS   rV   rW   rX   rY   rZ   r[   __static_attributes__r   r   r   r4   r4      sL    ^':

 '

 
(
$
Z
 r   r4   c                  s    ] tR tRtRtR tR R ltR R ltR"R R	 lltR"R
 R llt	R R lt
R#R R lltR#R R lltR R ltR R ltR$R R lltR R ltR R ltR R ltR R ltR tR!# )%KeyBindingsi  z7Structure that maintains a set of KeyBinding instances.c                	s    . V n         R # Nkey_bindingsrI   r)   r   r?   ZKeyBindings.__init__  s
    r   c               r@   rA   r   r   r   r   r   KeyBindings.__annotate__  s     6 6 6r   c                	sT    R P                  \        \        V P                  4      4      # )Z
)joinmapr   re   rI   r)   r   rD   ZKeyBindings.__str__  s    yyS$"3"3455r   c               r@   r   r   list[KeyBinding]r   r   r   r   r   rf     s     Q Q7G Qr   c                sr    V P                    Uu. uF  qP                  4       '       g   K  VNK  	  up# u upi )zMReturns a list of key bindings that have active grabs for debugging purposes.)re   rY   )r>   bindingr&   r   %get_bindings_with_grabs_for_debuggingZ1KeyBindings.get_bindings_with_grabs_for_debugging  s/     (,'8'8P'8G<M<M<O'8PPPs   44c               $    V ^8  d   QhRRRRRR/# r   key_bindingr4   include_grabsr:   r   rO   r   r   r   r   r   rf     s!     $ $z $$ $4 $r   c                sZ   VP                   '       dd   V P                  VR4      '       dL   RVP                  4        RVP                  4        R2p\        P
                  ! \        P                  VR4       V P                  P                  V4       V'       d   VP                  4        R# R# )zOAdds KeyBinding instance to this set of keybindings, optionally updating grabs.
keysNoMaskKEYBINDINGS: '' (z) already in keybindingsTN)
r5   has_key_bindingrV   rS   r   rQ   rR   re   r0   rZ   )r>   ro   rp   rT      &&& r   addZKeyBindings.add  s     ###(<(<[,(W(W 5 5 78 9**,--EG   0 0#t<  -!!# r   c               rm   rn   r   r   r   r   r   rf     s!     . .* .T .d .r   c                s   WP                   9  d   V P                  VP                  4      pV'       g   R# RVRV.p\        P                  ! \        P
                  VR4       V P                  VP                  4       F  pV P                  WR4       K  	  R# VP                  4       '       dE   V'       d   VP                  4        M+RVR.p\        P                  ! \        P
                  VR4       V P                   P                  V4       R# )zKRemoves KeyBinding from this set of keybindings, optionally updating grabs.Nz5KEYBINDINGS: Warning: No binding in set to remove forzAlternates:TzKEYBINDINGS: Warning:zwill be removed but has grabs.)	re   get_bindings_for_handlerr7   r   print_tokensZLEVEL_WARNINGremoverY   r[   )r>   ro   rp   
candidatestokens	candidates   &&&   r   ry   ZKeyBindings.remove  s     ///66{7J7JKJ
  N{#Z1Fu22FDA!::;;N;NO	I5 P  ""((* 2;@`a""5#6#6E  -r   c               r@   rG   r   r   r   r   r   rf     s     % %$ %r   c                s$    V P                   '       * # )zAReturns True if there are no bindings in this set of keybindings.rd   rI   r)   r   is_emptyZKeyBindings.is_empty  s     $$$$r   c               r   r   reasonr   r   rO   r   r   r   r   r   rf     s     E EC E Er   c                s   RpV'       d   VRV 2,          p\         P                  ! \         P                  VRV'       * 4       ^ pV P                   FL  pVP	                  4       '       g   K  VP                  4       '       d   K3  V^,          pVP                  4        KN  	  RV R\        V P                  4       R2p\         P                  ! \         P                  VRV'       * 4       R# )z?Adds grabs for all enabled bindings in this set of keybindings.zKEYBINDINGS: Adding key grabsrB   TKEYBINDINGS: z" key grabs added (total bindings: ).N)r   rQ   rR   re   rM   rY   rZ   lenr>   r   rT   r(   rk      &&   r   add_key_grabsZKeyBindings.add_key_grabs  s     .Rx= CE,,c4VD((G!!##G,=,=,?,?
!!# )
 eW$Fs4K\K\G]F^^`aE,,c4VDr   c               r   r~   r   r   r   r   r   rf     s     E Es ED Er   c                s   RpV'       d   VRV 2,          p\         P                  ! \         P                  VRV'       * 4       ^ pV P                   F4  pVP	                  4       '       g   K  V^,          pVP                  4        K6  	  RV R\        V P                  4       R2p\         P                  ! \         P                  VRV'       * 4       R# )z.Removes all grabs for this set of keybindings.zKEYBINDINGS: Removing key grabsrB   Tr   z$ key grabs removed (total bindings: r   N)r   rQ   rR   re   rY   r[   r   r   r   r   remove_key_grabsZKeyBindings.remove_key_grabs  s     0Rx= CE,,c4VD((G  ""
$$& )
 eW$HTM^M^I_H``bcE,,c4VDr   c               r   r   r7   'InputEventHandler'r   r:   r   r   r   r   r   rf     s      #6 4 r   c                sT    V P                    F  pVP                  V8X  g   K   R# 	  R# )z@Returns True if the handler is found in this set of keybindings.TFre   r7   r>   r7   rk      && r   has_handlerZKeyBindings.has_handler  s(     ((G') ) r   c               r   r   r   r   r   r   r   rf     s      +> 4 r   c                s    V P                    F9  pVP                  V8X  g   K  VP                  P                  4       '       g   K8   R# 	  R# )zOReturns True if the handler is found in this set of keybindings and is enabled.TF)re   r7   rM   r   r   r   has_enabled_handlerZKeyBindings.has_enabled_handler  s:     ((G')goo.H.H.J.J ) r   c               rm   )r   ro   r4   type_of_searchr   r   r:   r   r   r   r   r   rf     s"     $ $: $s $Z^ $r   c                sv   V P                    EF'  pVR8X  d   VP                  '       d   VP                  '       d   VP                  P                  VP                  P                  8X  dx   VP                  VP                  8X  d[   VP                  VP                  8X  d>   VP
                  VP
                  8X  d!   VP                  VP                  8X  d    R# K  K  K  K  K  K  K  VR8X  d`   VP                  '       dK   VP                  '       d6   VP                  P                  VP                  P                  8X  d    R# EK;  EK>  EKA  VR8X  d|   VP                  VP                  8X  d^   VP                  VP                  8X  d@   VP
                  VP
                  8X  d"   VP                  VP                  8X  d    R# EK  EK  EK  EK  VR8X  g   EK  VP                  VP                  8X  g   EK  VP
                  VP
                  8X  g   EK	  VP                  VP                  8X  g   EK'   R# 	  R# )aQ  Return True if binding is already in self.key_bindings.

The type_of_search can be:
   "strict":      matches description, modifiers, key, and click count
   "description": matches only description
   "keys":        matches the modifiers, key, modifier mask, and click count
   "keysNoMask":  matches the modifiers, key, and click count
strictTrS   Zkeysrq   F)re   r7   rS   r5   r6   r,   r8   )r>   ro   r   rk   ru   r   rt   ZKeyBindings.has_key_binding  s    ((G)???{':':':22k6I6I6U6UU++{/G/GG,,0I0II((K,A,AA**k.E.EE F B J H V (;?  =0???{':':':22k6I6I6U6UU V (;?  6)'';+C+CC,,0I0II((K,A,AA**k.E.EE F B J D
  </'';+C+CC((K,A,AA**k.E.EE/ )2 r   c               r@   ri   r   r   r   r   r   rf     s      $4 r   c                sh   V P                    Uu. uF  qP                  '       g   K  VNK  	  pp/ pV Fv  pVP                  4       pVP                  V4      pVe=   RVRVP	                  4       RV.p\
        P                  ! \
        P                  VR4       VP	                  4       W4&   Kx  	  V# u upi )z@Returns the KeyBinding instances which are bound to a keystroke.z
WARNING: 'rs   z) also matches:T)re   r5   rV   ZgetrS   r   rx   rR   )r>   kbZboundZbindingsrC   Zmatchr{   s   &      r   get_bound_bindingsZKeyBindings.get_bound_bindings  s     #//C/??/C#%B\\^FLL(E &r~~7GIZ\ab""5#3#3VTB!~~/H   Ds
   B/B/c               r   )r   r7   r   r   rj   r   r   r   r   r   rf   +  s      I I0C IHX Ir   c                sh    V P                    Uu. uF  q"P                  V8X  g   K  VNK  	  up# u upi )z9Returns the KeyBinding instances associated with handler.r   )r>   r7   r   r   r   rw   Z$KeyBindings.get_bindings_for_handler+  s/     "..H.r**2G.HHHs   //c               rm   )r   keyboard_eventz'KeyboardEvent'rE   rj   r   rO   r   r   r   r   r   rf   0  s$     9 9-97G9	9r   c           	     	s   \         P                  \         P                  8  d   R # \        V4      ^8:  d   R # \        \	        \        R V4      4      4      \        V4      8X  d   R # R R lpRVP                  4        RRP                  \        W24      4       2p\         P                  ! \         P                  VR4       R # )Nc                rK   rc   r8   xr)   r   <lambda>Z6KeyBindings._check_matching_bindings.<locals>.<lambda>;  s    r   c               r   )r   r   r4   r   r   r   r   r   r   r   Z:KeyBindings._check_matching_bindings.<locals>.__annotate__>  s     	5 	5 	5 	5r   c                s:    V P                    R V P                   R2# )z (zx))r7   r8   r   r)   r   	to_stringZ7KeyBindings._check_matching_bindings.<locals>.to_string>  s    ii[1==/44r   rr   z' matches multiple handlers: z, T)	r   Z
debugLevelrR   r   Zsetrh   as_single_line_stringrg   rQ   )r>   r   rE   r   rT   s   &&&  r   _check_matching_bindingsZ$KeyBindings._check_matching_bindings0  s     e... v;! s3.789S[H	5 ^AACD E**.))C	4J*K)LN 	 	E,,c48r   c               r   )r   eventr	   r   zInputEventHandler | Noner   r   r   r   r   rf   G  s     * *} *9Q *r   c                s$   . p. pVP                  4       pV P                   F  pVP                  VP                  VP                  VP
                  4      '       g   K<  VP                  VP
                  8X  d#   VP                  V8X  d   VP                  V4       VP                  '       g   K  VP                  V4       K  	  RVP                  4        R2V.p\        P                  ! \        P                  VR4       V P                  W4       V'       d   V^ ,          P                  # VP!                  4       '       d   R# RVP                  4        R\#        V4       2R.pVP%                  4       '       g   VP                  V4       MVP                  R4       \        P                  ! \        P                  VR4       VP'                  R RR	7       V P                  W4       V F"  pVP                  V8:  g   K  VP                  u # 	  R# )
z1Returns the input handler matching keyboardEvent)r   z matchesTNrU   zfallback candidate(s):z
(obscured)c                rK   rc   r   r   r)   r   r   Z/KeyBindings.get_input_handler.<locals>.<lambda>k  s    ammr   )r2   Zreverse)Zget_click_countre   rF   ZidZhw_coder,   r6   r8   r0   r5   r   r   rx   rR   r   r7   Zis_keypad_key_with_numlock_onr   Zshould_obscureZsort)r>   r   rF   rz   r8   rk   r{   r|   s   &&      r   get_input_handlerZKeyBindings.get_input_handlerG  s    %'')
++-((GuxxHH ((EOO;@S@SWb@bNN7+'''%%g. ) "%"="="?!@I7S5++VT:%%e51:%%%..00!%"="="?!@#j/ARS*,##%%MM*%MM,'5++VT: 	3TB%%e8#I$$3 ((( $ r   rd   N)F)r   )r   )r\   r]   r^   r_   r`   r?   rD   rl   rv   ry   r}   r   r   r   r   rt   r   rw   r   r   ra   r   r   r   rb   rb     sZ    A6Q
$.>%
E"E"$LI
9.* *r   rb   )r   i7   r   )8r`   Z
__future__r    Z__id__Z__version__Z__date__Z__copyright__Z__license__Ztypingr   ZgiZrequire_versionZgi.repositoryr   r   r   r   r   r   Z	orca_i18nr   Zinput_eventr	   r
   r   ZMODIFIER_ORCAZNO_MODIFIER_MASKr    ZALTr#   ZCONTROLr$   r   ZORCA_ALT_MODIFIER_MASKZORCA_CTRL_MODIFIER_MASKZORCA_CTRL_ALT_MODIFIER_MASKZSHIFTZORCA_SHIFT_MODIFIER_MASKZORCA_ALT_SHIFT_MODIFIER_MASKr%   ZSHIFT_ALT_MODIFIER_MASKZCTRL_ALT_MODIFIER_MASKZSHIFT_ALT_CTRL_MODIFIER_MASKr"   r!   ZCOMMAND_MODIFIER_MASKZNON_LOCKING_MODIFIER_MASKZDEFAULT_MODIFIER_MASKZget_versionr/   r   r'   r*   r3   r4   rb   r   r   r   <module>r      s  0 S #?   	   7E "   5%      !  =!" !"e&8&8&<&<!< !"e&8&8&@&@!@ !"m!3 !"m!3!"e&8&8&<&<!<"= !"m!3!"e&8&8&@&@!@"A !"m!3!"e&8&8&@&@!@"A!"e&8&8&<&<!<"=  "#m!3!"e&8&8&>&>!>"? !"m!3!"e&8&8&<&<!<"=!"e&8&8&>&>!>"?  "#e&8&8&>&>!> !"e&8&8&>&>!>!"e&8&8&<&<!<"= !"e&8&8&@&@!@!"e&8&8&<&<!<"= !"e&8&8&>&>!>!"e&8&8&@&@!@"A!"e&8&8&<&<!<"=  "#e&8&8&<&<!<!"e&8&8&@&@!@"A!"e&8&8&>&>!>"? "#e&8&8&>&>!>"?  "#e&8&8&>&>!>!"e&8&8&<&<!<"=!"e&8&8&@&@!@"A "#e&8&8&>&>!>"? "#e&8&8&>&>!>	"?
 "#m!3"4  2 ##%39"v6p <C CJo or   