Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@rgoulter
Copy link
Owner

@rgoulter rgoulter commented Apr 2, 2025

No description provided.

@rgoulter rgoulter changed the title Add Key: Capsword Add Key: Caps Word Apr 2, 2025
@rgoulter
Copy link
Owner Author

rgoulter commented Apr 2, 2025

Tried on the keyboard. Works.

@rgoulter rgoulter requested a review from Copilot April 2, 2025 13:23
Copy link

Copilot AI left a 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!()
Copy link

Copilot AI Apr 2, 2025

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.

Suggested change
panic!()
// TODO: Implement proper event handling for caps_word::Key
todo!()

Copilot uses AI. Check for mistakes.
@rgoulter rgoulter merged commit 4e5feb1 into master Apr 2, 2025
5 checks passed
@rgoulter rgoulter deleted the key-capsword branch April 2, 2025 13:25
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