Python - how do i access keymap entries from the new tool system

Hello friends,

I can read keymap items from the windows manager. This code retreives the keys in the 3D View, Object Mode section for example:

    wm = context.window_manager # Blender window manager
    keymaps_3DV = wm.keyconfigs.active.keymaps['Object Mode'] 

But this reads just the entries from the old tool system. The new tool system for the tool shelf are not to retrieve this way. They are not in the tuple.

What is the way to access this new builtin keys? Is this even possible?

Kind regards
Arunderan

Example script to test. Open the hello world panel to write the tuple content into the console:

import bpy


class PT_PT_PT_HelloWorldPanel(bpy.types.Panel):
    """Creates a Panel in the Object properties window"""
    bl_label = "Hello World Panel"
    bl_space_type = 'VIEW_3D'
    bl_region_type = 'UI'
    bl_category = "View"

    def draw(self, context):
        layout = self.layout

        row = layout.row()
        row.label(text="Hello world!", icon='WORLD')


        wm = context.window_manager # Blender window manager
        keymaps_3DV = wm.keyconfigs.active.keymaps['Object Mode']

        print(tuple(keymaps_3DV.keymap_items.keys()))



def register():
    bpy.utils.register_class(PT_PT_PT_HelloWorldPanel)


def unregister():
    bpy.utils.unregister_class(PT_PT_PT_HelloWorldPanel)


if __name__ == "__main__":
    register()

It turned out that this is a limit in custom keymaps. I haven’t thought of that i use a custom keymap here.

When you run this code here at the default Blender keymap, then it lists all tools.:

import bpy

keymap_tuple = bpy.context.window_manager.keyconfigs.active.keymaps.keys()

print(keymap_tuple)

But when you use it at a new created custom keymap, then the result is completely empty.

Question remains, how do i access these key items then when the tuple doesn’t list them?