A free and open source framework for building powerful, fast, and elegant 2D and 3D apps that run on macOS, Windows, Linux, iOS, Android, and the Web with a single pure Go codebase, allowing you to Code Once, Run Everywhere.
code keymap extends corekeymap.Functions with new key functions. It merges its add-on maps with the default core keymaps, which obviously can only know about the original Functions enum type. Therefore, to be able to properly view etc these updated keymaps, we need to be able to extend the original Functions enum string values from a different package.
given that enum data is not exported, this would require some kind of hook that the new package calls, to merge its values into the original data structures.
@kkoreilly also said he wants to think about more generics-based enum logic, which might help with this.
This is a very general issue with any app extending keymap.Functions, and may be relevant to icons, and is a generally useful feature to support for any enum type.
Describe the feature
code
keymap extendscore
keymap.Functions
with new key functions. It merges its add-on maps with the default core keymaps, which obviously can only know about the original Functions enum type. Therefore, to be able to properly view etc these updated keymaps, we need to be able to extend the original Functions enum string values from a different package.given that enum data is not exported, this would require some kind of hook that the new package calls, to merge its values into the original data structures.
@kkoreilly also said he wants to think about more generics-based enum logic, which might help with this.
This is a very general issue with any app extending keymap.Functions, and may be relevant to icons, and is a generally useful feature to support for any enum type.
Relevant code
No response