e~;`SrSSKJrJrJrJr SSKJrJrJ r J r J r J r SSKJ r SSKJr SSKrSSKrSr\"\R(\R*-5r\"S5rS rS rS r\\-\-\-\-\-rS r"S S\5r"SS\5r\S:XaSSK J!r! \!"SSSS9 SSK"J#r# \#"\5 gg)z6 Dialog for building Tkinter accelerator key bindings )ToplevelListbox StringVarTclError)FrameButton CheckbuttonEntryLabel Scrollbar) messagebox) _setup_dialogN) F1F2F3F4F5F6F7F8F9F10F11F12z~!@#%^&*()_-+={}[]|;:,.<>/?)TabSpaceReturn) BackSpaceDeleteInsert)HomeEndPage Up Page Down Left Arrow Right ArrowUp Arrow Down Arrowc^0SS_SS_SS_SS_S S _S S _S S_SS_SS_SS_SS_SS_SS_SS_SS_SS _S!S"_0S#S$_S%S&_S'S(_S)S*_S+S,_S-S._S/S0_S1S2_S3S4_S5S6_S7S8_S9S:_S;S<_S=S>_S?S@_SASB_SCSD_ESESE0EnURX5nSFU;a$U[R;aUR5nSGU3$)Hz3Translate from keycap symbol to the Tkinter keysym.rspace~ asciitilde!exclam@at# numbersign%percent^ asciicircum& ampersand*asterisk( parenleft) parenright_ underscore-minus+plus=equal{ braceleft} braceright[ bracketleft] bracketright|bar; semicolon:colon,comma.period<less>greater/slash?questionr#Priorr$Nextr%Leftr&Rightr'Upr(DownrShiftzKey-)getstringascii_lowercaseupper)key modifiersmappings 8/opt/imh/python3.13/lib/python3.13/idlelib/config_key.py translate_keyrps @ww @   @!( @,/ @69, @   @} @.1+ @   @  @.1 @  @"' @,/v @8;7 @  @ ! @  @ #> @ 47u @   @! @+.g @8;8 @  @I @(+7 @58  @ g @ +6 @  @"/w @ t @*6 @49 @G ++c C)v'='= =iik #<cr^\rSrSrSrU4SjrSrSrSrSr SSjr S r S r S r S rS rSrSrU=r$) GetKeysFrame,zKey Sequence Errorc>[TU]U5 SUS'SUS'XlX lX0lSUl[ U5UlURRS5 UR5 /Ul URH:n[ U5nURS5 URRU5 M< SUl UR5 g)z parent - parent of this dialog action - the name of the virtual event these keys will be mapped to current_key_sequences - a list of all key sequence lists currently mapped to virtual events, for overlap checking  borderwidthsunkenreliefFN)super__init__parentactioncurrent_key_sequencesresultr key_stringsetset_modifiers_for_platform modifier_varsrmappendadvancedcreate_widgets)selfr}r~rmodifiervariable __class__s ror|GetKeysFrame.__init__1s  ]!X  %:" #D/ B '')H H LL     % %h /'  rqc0[R"U0UD6 gN)r showerror)rargskwargss rorGetKeysFrame.showerrorLsd-f-rqc [USS9UlURRSSSSSS9 [URSURS3S 9nUR S S 9 [URS UR S SS9nUR SSSS9 [U5UlURRSSSSS9 0UlSn[URUR5HfupEURRXD5n[URURUXTSS9nURSUSS S9 XpRU'US- nMh [URS SS9nURSSSSS S9 [!URSSSS9UlUR"R$"S/[&Q76 UR"R)S UR*5 UR"RSSSS!S"9 [-URS#UR"R.S$9n UR"R1U R2S%9 U RSSSS!S"9 [5URS&UR6S'9UlUR8RSSSS(9 [US)S9UlUR:RSSSSSS9 [UR:S S*URS+3S,-S9n U R S S 9 [=UR:UR S-9UlUR>R SS.9 [U5Ul UR@RSSSSS9 [UR@S S/S9n U RSSSS09 [5XRBS1S29Ul"URDRSSS3SSS49 URC5 g)5N keyseq_basic)namernsew)rowcolumnstickypadxpadyzNew keys for 'z' :textw)anchorleftgrooverv)justify textvariableryrwx)ipadxipadyfill)rrrrrz)commandrronvalueoffvalue)rrrrzSelect the desired modifier keys above, and the final key from the list on the right. Use upper case Symbols when using the Shift modifier. (Letters will be converted automatically.))rr)rr columnspanrr single)widthheight selectmodeendzns)rrrowspanrvertical)orientr)yscrollcommandz Clear Keys)rr)rrrkeyseq_advancedzEnter new binding(s) for 'z' : z2(These bindings will not be checked for validity!))r)raKey bindings are specified using Tkinter keysyms as in these samples: , , , , , . Upper case is used when the Shift modifier is present! 'Emacs style' multi-keystroke bindings are specified as follows: , where the first key is the 'do-nothing' keybinding. Multiple separate bindings for one action should be separated by a space, eg., .)rrr<< Basic Key Binding Entry)rrew)rrstickrr)#rframe_keyseq_basicgridr r~packrframe_controls_basicmodifier_checkbuttonsziprmrmodifier_labelrhr build_key_stringrlist_keys_finalinsertAVAILABLE_KEYSbindfinal_key_selectedr yviewconfigrr clear_key_seq button_clearframe_keyseq_advancedr advanced_keysframe_help_advanced toggle_level button_level) r basic_title basic_keysrrrlabelcheck help_basicscroll_keys_finaladvanced_title help_advanceds rorGetKeysFrame.create_widgetsPs"'>"B $$1V+,1 % 6D33#1$++c!BD $422F(,'(*  aqs3%*$K! !!&&1QvA&N&(""%dnnd6H6H"I H''++H?E 9 9(,(=(=E)1bRE JJ1V!CJ @38 & &x 0 aKF#J444f!<=  AaAAcJ 't'@'@.0X G ##E;N; !!"5t7N7NO !!a1T!J%d&?&?-7.2.B.B.H.HJ ##3D3H3H#I1Q$G"4#<#<(4+/+=+=? 1Q1=&+46G%H" ""''Aa./a ( 9t996&@ U$S%Y%Z[ 3'"4#=#=04A S)$);    %%!Af1%Md66@ B  q6:#41B1B'CE 1QdK rqcd[RS:Xa /SQUlO /SQUlSS0Ulg)a.Determine list of names of key modifiers for this platform. The names are used to build Tk bindings -- it doesn't matter if the keyboard has these keys; it matters if Tk understands them. The order is also important: key binding equality depends on it, so config-keys.def must use the same ordering. darwin)rgControlOptionCommand)rAltrgrCtrlN)sysplatformrmrrs ror'GetKeysFrame.set_modifiers_for_platforms+ <<8 #FDN8DN(&1rqc(URRS5RS5(aUR5 URR SS9 UR R 5 URR 5 URR5 SUl gUR5 URR SS9 URR 5 URR 5 SUl g) z'Toggle between basic and advanced keys.rAdvancedrrTzAdvanced Key Binding Entry >>FN) rcget startswithrrrliftrr focus_setrrrrs rorGetKeysFrame.toggle_levels    " "6 * 5 5j A A       $ $*F $ G  & & + + -  $ $ ) ) +    ( ( * DM       $ $*I $ J  # # ( ( *  % % * * ,!DMrqc$UR5 g)z3Handler for clicking on key in basic settings list.N)rrevents rorGetKeysFrame.final_key_selecteds rqcUR5=pURRS5nU(a[X25nUR U5 UR R SSRU5S35 g)z2Create formatted string of modifiers plus the key.rrYrAr[N) get_modifiersrrhrprrrjoin)rkeylistrm final_keys rorGetKeysFrame.build_key_stringsg"0022((,,X6 %i;I NN9 % a 12!45rqcURVs/sHoR5PM nnUVs/sH o3(dM UPM sn$s snfs snf)z9Return ordered list of modifiers that have been selected.)rrh)rrmod_listmods rorGetKeysFrame.get_modifierssB373E3EF3ExLLN3EF'/x3x//G/sA A A cURRSS5 URRSS5 URHnUR S5 M UR R S5 g)z#Clear modifiers and keys selection.rrmovetoz0.0rzN)r select_clearrrrr)rrs rorGetKeysFrame.clear_key_seqs\ ))!U3 ""8U3**H LL + Brqc.SUlURR5R5nU(dUR UR USS9 gUR (dURU5(aURU5(aXlg)NrzzNo key specified.titler}message) rrrhstriprkeyerror_titlerkeys_okbind_ok)rkeyss rookGetKeysFrame.okss ""$**, NN!4!4T#6  8  MMT\\$//T\\$5G5GKrqcURRS5nUR5nURnURVVs/sHnUHnUPM M nnnUR S5(dUR X@SS9 g U(d"U[[-;aUR X@SS9 g US/:Xa'U[[-S-;aS nUR X@US9 g X;aS nUR X@US9 g g s snnf) zValidity check on user's 'basic' keybinding selection. Doesn't check the string produced by the advanced dialog because 'modifiers' isn't set. rr[zMissing the final Key)r}rzNo modifier key(s) specified.rrg)rrzBThe shift modifier by itself may not be used with this key symbol.z'This key combination is already in use.TF) rrhrrrendswithr FUNCTION_KEYS MOVE_KEYS) rr rrmrrrl key_sequencesmsgs rorGetKeysFrame.keys_oks& ((,,X6 &&( ##,0,F,F1,F(/(/,F 1}}S!! NN5#:  <"=9#<< NN#B  DG9$#i/2BBC&C NNSN A   ";C NNSN A'1sC7cURUS5nURX5 g![a(nURURUSU3S9 SnAgSnAff=f)z:Return True if Tcl accepts the new keys else show message.cgrrrqro&GetKeysFrame.bind_ok..sdrqTz2The entered key sequence is not accepted. Error: rNF)runbindrrr)rr bindingerrs ror GetKeysFrame.bind_ok sj iil3G KK &  NN--d ''*e-  /  s' AAA)r~rrrrrrrrrrrrrrrmr}rr)__name__ __module__ __qualname____firstlineno__rr|rrrrrrrrr rr __static_attributes__ __classcell__rs@rorsrs,sM*N6.Wr 2"  60   >  rqrscz^\rSrSrSSS.U4Sjjr\S5r\RS5rS SjrS Sjr S r U=r $) GetKeysWindowiF)_htest_utestc >[T U]U5 UR5 SUS'URSSS9 UR 5 UR 5UR 5S-UR5S-- -nUR5U(d'UR5S-UR5S-- OS-nURSUSU35 URU5 [XU5=Uln URSUR 5 [#U5n [%U S S UR&S 9Ul[%U S S UR S 9UlUR(R-S S SSS9 UR*R-S SSSS9 U R/SSSS9 U R/SSS9 UR1U5 [3U5 UR55 U(d!UR75 UR95 gg)a parent - parent of this dialog title - string which is the title of the popup dialog action - string, the name of the virtual event these keys will be mapped to current_key_sequences - list, a list of all key sequence lists currently mapped to virtual events, for overlap checking _htest - bool, change box location when running htest _utest - bool, do not wait when running unittest rrwF)rrrvrCWM_DELETE_WINDOWOK)rrrCancelr)rrrrrtopTboth)sideexpandrbottomr)r0rN)r{r|withdraw resizableupdate_idletasks winfo_rootx winfo_widthwinfo_reqwidth winfo_rooty winfo_heightwinfo_reqheightgeometryrrsframeprotocolcancelrrr  button_ok button_cancelrr transientrgrab_set deiconify wait_window) rr}rr~rr&r'ryr= frame_buttonsrs ror|GetKeysWindow.__init__s   ] e51     !  "A%(;(;(=q(@@B    !""$a'$*>*>*@!*CC!$& !AaSk" 5)$8MNN U ($++6d  D&':#M)*DKKA !!!< Aaaa@ d 8s3 vd  NN     rqc.URR$rr=rrs rorGetKeysWindow.resultJszz   rqc$XRlgrrJ)rvalues rorrKNs ! rqcxURR5 UR5 UR5 gr)r=r  grab_releasedestroyrs ror GetKeysWindow.okRs$   rqcRSUlUR5 UR5 g)Nrz)rrOrPrs ror?GetKeysWindow.cancelWs   rq)rAr@r=rr) rrrr r|propertyrsetterr r?r!r"r#s@ror%r%sP!,,\!! ]]"" rqr%__main__)mainz!idlelib.idle_test.test_config_keyrvF) verbosityexit)run)$__doc__tkinterrrrr tkinter.ttkrrr r r r r tkinter.simpledialogrrirrtuplerjdigits ALPHANUM_KEYSPUNCTUATION_KEYSWHITESPACE_KEYS EDIT_KEYSrrrprsr%runittestrWidlelib.idle_test.htestrZrrqrorgs;:KK. 8 f,,v}}<= 67, -  6 "22]B!"$-.09:(k5k\@H@F z ,F+  rq