<p>In <a href="https://github.com/geany/geany/pull/376#discussion_r41696921">src/keybindings.h</a>:</p>
<pre style='color:#555'>>  /** Function pointer type used for keybinding callbacks. */
>  typedef void (*GeanyKeyCallback) (guint key_id);
>  
> +/** Function pointer type used for keybinding callbacks, with userdata for passing context
> + *
> + * You should return @c TRUE to indicate handling the callback. (Occasionally, if the keybinding
> + * cannot apply in the current situation, it is useful to return @c FALSE to allow a later keybinding
> + * with the same key combination to handle it).
> + *
> + * @since 1.26 (API 226) */
> +typedef gboolean (*GeanyKeyBindingFunc)(GeanyKeyBinding *key, guint key_id, gpointer pdata);
</pre>
<p>I was trying to port some plugins to use this API and realized <code>key_id</code> is kinda redundant here with <code>key->id</code>.  What about instead making <code>GeanyKeyBinding::id</code> public (add a doc comment) and dropping the <code>key_id</code> parameter here?<br>
Or do we think it's good because it's more consistent with the group callback?</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href="https://github.com/geany/geany/pull/376/files#r41696921">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABDrJwVWIJTizfqkG1JwNq82UxrRRep9ks5o6P2-gaJpZM4C4ztD.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/geany/geany/pull/376/files#r41696921"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>