How do I make a shortkey to toggle Onion Skinning?

Surprised that Grease Pencil doesn’t come with a hotkey to turn on/off the onion skin on your current layer you’re drawing on. So I tried making one myself. I right-clicked on the onionskin icon on the right side of one of the layers, and chose “Assign Shortcut.” At first it seemed to work, but when I switched to another layer, the hotkey still toggled only the previous layer. I viewed my creation in the preferences, and it looked like this.

Instead of toggling the onion skin of the active layer, this shortcut is hard-wired to grab the exact layer I right-clicked on to assign the shortcut (or at least any layer with the same name). What the heck.

I’ve tried editing the “context attribute” to fix it, but I don’t know how this code system works. I tried replacing ["Scribbles"] with a keyword like [active] or [current] or [all], but they only returned error messages. I tried truncating the first part to object.data.layers w/o the bracketical, or just object.data. Didn’t work. I did a Google search and replaced the object with active_object. It returned nothing. What are the magic words to make use_onion_skinning target the active object’s active layer?

bpy.data.grease_pencils_v3["Stroke"].layers.active.use_onion_skinning gets you the active layer on that specific object, but it’s not clear if there’s a way to get the active grease pencil object in a oneliner

Add the Keymap to the “Grease Pencil” section, and use grease_pencil.layers.active.use_onion_skinning for the context path.

That should make the shortcut to be only present when the active object is a GP, and it should toggle the active layer only.