Skip to content

Conversation

@Real-Septicake
Copy link
Collaborator

Description

This pull request adds cursor movement via the arrow keys, character deletion via the delete and backspace keys, highlighting by moving the cursor while holding shift. Using the arrow keys while highlighting also changes the behavior slightly, such as the deletion keys also deleting the highlighted characters, or the . There are also some fixes to test.py and vsnprintf in stdio.c and a non-breaking revamp to the test assertion macro to allow for the printing of values for the purpose of debugging.

Issue # (N/A, no issue was made for this)

Type of change

  • New feature (non-breaking change which adds functionality)
    ^ Added cursor movement and highlighting, as well as more powerful testing utilities
  • Bug fix (non-breaking change which fixes an issue)
    ^ Fixed vsnprintf's %s and %i format specifiers

Testing

Please describe tests that you ran to verify your changes. Provide instructions so that we can reproduce. Please also list any relevant details for your test configuration.

Test Configuration:

  • Hardware
    • I'm not sure what to say here besides that I clicked the arrow keys, checked that highlighting worked properly, checked that highlighted behavior changes work properly
  • OS
    • Wrote tests in test_keyboard.c with the help of @Alex105178, who made the initial framework for testing

Checklist:

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

Real-Septicake and others added 30 commits September 11, 2024 23:20
Copy link
Member

@Sploder12 Sploder12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should tests be added for the snprintf bugs you caught?

Copy link
Member

@Sploder12 Sploder12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome PR! No major changes needed, mostly formatting and code reuse. My biggest suggestion is using newlines to separate code a bit more since everything is a bit squished without them.

Copy link
Member

@Sploder12 Sploder12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good! Color seems to not work on Windows for tests though

Copy link
Member

@Sploder12 Sploder12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@Sploder12 Sploder12 merged commit 9618ca6 into makeopensource:main Jan 23, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants