[Geany-Devel] Order of plugin signal connections

Austin Green austin.green at xxxxx
Sat May 16 01:56:05 UTC 2020

Hi Matthew,

> > No, I was wrong with my first guess about the order mattering; it turns that it's just the fact that anything else (Geany or plugin) binds to a key makes that key unavailable to 'keyrecord'.
> That doesn't sound right. Anything that connects to say 
> `ScintillaObject::key-press-event` has the opportunity to propagate that 
> signal to other handlers by returning `FALSE` from the handler function. 
> Any plugins which swallow GTK+ events, preventing them to be handled by 
> other plugins or core itself, should be highly suspect, as far I can see.

I agree; nevertheless, taking 'key-release-event' as an example, both geanymacro and geanynumberedbookmarks plugins return TRUE when they have handled the event.  I have tried to use 'key-release-event' in 'keyrecord', and, with 'geanymacro' loaded, I saw no events.

Perhaps those plugins should be regarded as buggy?

Geany itself, in its handler for 'key-press-event', after calling a key-binding callback for a matching key, then returns TRUE.  Presumably the thinking is that only one plugin may bind to any given key, so no further action needed.  However, that action does stop other plugins from merely looking at the key-press event; that may be intentional too, otherwise plugins could effectively usurp keys that had been bound elsewhere.


More information about the Devel mailing list