Skip to content

Conversation

@obra
Copy link
Member

@obra obra commented Mar 21, 2024

This is...nowhere near ready. The individual parts almost work for key definitions inside the core of Kaleidoscope, but don't handle plugins yet.

Right now, the way to run this tooling is:

 sh etc/generate-keylist/extract-keys.sh
 sh etc/generate-keylist/generate-macro-printer.sh                                                                                    
clang++ -DKALEIDOSCOPE_GENERATE_KEY_DEFINITIONS -I src/ -std=c++11 /tmp/list-macros.cpp

extract-keys.sh is going to need to be a lot smarter to handle plugins and the path of least resistance may involve refactoring some plugins to make their key macros easier to extract.

obra added 4 commits March 20, 2024 16:52
a file listing all possible keycodes

- Extracted key definition constants to `key_def_constants.h`
- Moved base key definitions to `key_defs/base.h`
- Moved legacy key definitions to `key_defs/legacy.h`
- Updated `key_defs.h` to include the new headers and remove now redundant definitions
- Ensured compatibility and organization of key definitions across the codebase
- Added `extract-keys.sh` to extract argument-taking and non-argument-taking macros from key definitions.
- Added `generate-macro-printer.sh` to generate a C++ program for printing macro values.
files ontaining only key definitions to make introspection and codegen
around lists of keys more straightforward
- Removed extra spaces for consistency in `key_defs/legacy.h`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants