-
Notifications
You must be signed in to change notification settings - Fork 1
Add Key: Caps Word #259
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Key: Caps Word #259
Conversation
|
Tried on the keyboard. Works. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request introduces a new CapsWord key mode into the keymap system and updates related modules, tests, and documentation. Key changes include:
- Adding new modules and tests for CapsWord functionality (tests/rust/caps_word.rs)
- Updating composite modules and BaseKey to integrate CapsWord
- Extending context and event conversions to support CapsWord handling
Reviewed Changes
Copilot reviewed 8 out of 12 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/rust/keymap.rs | Added module import for caps_word in tests |
| tests/rust/caps_word.rs | Introduced tests to validate CapsWord key behavior |
| src/key/mod.rs | Declared the new caps_word module |
| src/key/doc_de_caps_word.md | Provided CapsWord JSON documentation example |
| src/key/composite/tap_hold.rs | Extended TapHoldNestable to include CapsWord keys |
| src/key/composite/base.rs | Integrated CapsWord into BaseKey and key trait implementations |
| src/key/composite.rs | Updated context and event conversions to include caps_word context |
| src/key/caps_word.rs | Added the implementation and state handling for the CapsWord key |
Files not reviewed (4)
- ncl/key-extensions.ncl: Language not supported
- ncl/keymap-codegen.ncl: Language not supported
- ncl/keymap-ncl-to-json.ncl: Language not supported
- ncl/keys.ncl: Language not supported
| _key_path: key::KeyPath, | ||
| _event: key::Event<Self::Event>, | ||
| ) -> (Option<Self::KeyState>, key::PressedKeyEvents<Self::Event>) { | ||
| panic!() |
Copilot
AI
Apr 2, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The handle_event implementation for caps_word::Key currently panics, which may lead to runtime crashes if an event is inadvertently passed to it. Consider implementing proper event handling or providing a clear explanation (e.g., using todo!() with a comment) to ensure production stability.
| panic!() | |
| // TODO: Implement proper event handling for caps_word::Key | |
| todo!() |
No description provided.