cursive
cursive copied to clipboard
API does not allow custom keybindings in menu
The current API does not allow to create custom keybindings in the menu. The current API only allows to create a custom menubar subtree. Keybindings are hardcoded in the menubar view.
Ah indeed! The menubar is clearly not the most flexible part so far. I'd love to make it more modular and customizable. I haven't thought much about it, so I don't have a clear design yet - if you have any idea of what it would be like, I'm open to suggestions!
I think things could be improved if the menubar was treated more like a regular view that you could wrap in an OnEventView
, so it'd be easier to add custom bindings. Maybe start with a default menubar, but let the user define his own replacement view?...
Or expose enough features to let users re-implement the entire menubar system as regular layers.
I'm not that familiar with the Cursive API yet. I was indeed expecting that I could wrap the existing menubar and intercept on_event
. I like the idea that the menubar is special View
. Cursive could provide a basic implementation that can be extended by the user (or completely re-implemented).
I was not aware that a lot of helper functionality (like OnEventView
) already exists, Nice :-)
This would be good. I would like to implement things like "Alt-F" to open the file menu, with the "File" title tagged as "&File" to say what hotkey opens it. I can't add this functionality without forking Cursive today.