@@ -234,7 +234,7 @@ def set_terminology(self, terminology: str) -> None:
234234 "TOGGLE_TOPIC" : {
235235 "keys" : ["t" ],
236236 "help_text" : f"Toggle topics in a { self .terminology } " ,
237- "key_category" : f" { self . terminology } _list " ,
237+ "key_category" : "stream_list " ,
238238 },
239239 "ALL_MESSAGES" : {
240240 "keys" : ["a" , "esc" ],
@@ -305,7 +305,7 @@ def set_terminology(self, terminology: str) -> None:
305305 "TOGGLE_MUTE_STREAM" : {
306306 "keys" : ["m" ],
307307 "help_text" : f"Mute/unmute { self .terminology } s" ,
308- "key_category" : f" { self . terminology } _list " ,
308+ "key_category" : "stream_list " ,
309309 },
310310 "THUMBS_UP" : {
311311 "keys" : ["+" ],
@@ -342,19 +342,19 @@ def set_terminology(self, terminology: str) -> None:
342342 "STREAM_INFO" : {
343343 "keys" : ["i" ],
344344 "help_text" : f"Show/hide { self .terminology } information & modify settings" ,
345- "key_category" : f" { self . terminology } _list " ,
345+ "key_category" : "stream_list " ,
346346 },
347347 "STREAM_MEMBERS" : {
348348 "keys" : ["m" ],
349349 "help_text" : f"Show/hide { self .terminology } members" ,
350350 "excluded_from_random_tips" : True ,
351- "key_category" : f" { self . terminology } _info " ,
351+ "key_category" : "stream_info " ,
352352 },
353353 "COPY_STREAM_EMAIL" : {
354354 "keys" : ["c" ],
355355 "help_text" : f"Copy { self .terminology } email to clipboard" ,
356356 "excluded_from_random_tips" : True ,
357- "key_category" : f" { self . terminology } _info " ,
357+ "key_category" : "stream_info " ,
358358 },
359359 "REDRAW" : {
360360 "keys" : ["ctrl l" ],
@@ -495,19 +495,19 @@ def set_terminology(self, terminology: str) -> None:
495495 "narrowing" : "Switching Messages View" ,
496496 "searching" : "Searching" ,
497497 "msg_actions" : "Message actions" ,
498- f" { self . terminology } _list " : f" { self . terminology } list actions" ,
498+ "stream_list " : "stream list actions" ,
499499 "user_list" : "User list actions" ,
500500 "open_compose" : "Begin composing a message" ,
501501 "compose_box" : "Writing a message" ,
502502 "editor_navigation" : "Editor: Navigation" ,
503503 "editor_text_manipulation" : "Editor: Text Manipulation" ,
504- f" { self . terminology } _info " : (
505- f"{ self . terminology } information (press { self .KEY_BINDINGS ['STREAM_INFO' ]['keys' ][0 ]} "
506- f " to view info of a { self . terminology } )"
504+ "strream_info " : (
505+ f"stream information (press { self .KEY_BINDINGS ['STREAM_INFO' ]['keys' ][0 ]} "
506+ " to view info of a stream )"
507507 ),
508508 "msg_info" : (
509509 f"Message information (press { self .KEY_BINDINGS ['MSG_INFO' ]['keys' ][0 ]} "
510- f " to view info of a message)"
510+ " to view info of a message)"
511511 ),
512512 }
513513
@@ -577,7 +577,8 @@ def commands_for_random_tips(self) -> List[KeyBinding]:
577577 for key_binding in self .KEY_BINDINGS .values ()
578578 if not key_binding .get ("excluded_from_random_tips" , False )
579579 ]
580- def keys_for_command (self ,command : str ) -> List [str ]:
580+
581+ def keys_for_command (self , command : str ) -> List [str ]:
581582 """
582583 Returns the actual keys for a given mapped command
583584 """
@@ -600,5 +601,6 @@ def initialize_command_map(key_config: KeyConfig) -> None:
600601 for key in key_config .keys_for_command (zt_cmd ):
601602 command_map [key ] = urwid_cmd
602603
604+
603605# Initialize the command map after the KeyConfig instance is fully initialized
604606initialize_command_map (key_config )
0 commit comments