Skip to content

add weak attribute to send_char - #26355

Draft
NapOli1084 wants to merge 1 commit into
qmk:developfrom
NapOli1084:weak-send_char
Draft

add weak attribute to send_char#26355
NapOli1084 wants to merge 1 commit into
qmk:developfrom
NapOli1084:weak-send_char

Conversation

@NapOli1084

Copy link
Copy Markdown
Contributor

Description

Adds __attribute__((weak)) to send_char().
Allows users to override it in order to use a custom delay based on some state of the keyboard.

Types of Changes

  • Core
  • Bugfix
  • New feature
  • Enhancement/optimization
  • Keyboard (addition or update)
  • Keymap/layout (addition or update)
  • Documentation

Issues Fixed or Closed by This PR

Checklist

  • My code follows the code style of this project: C, Python
  • I have read the PR Checklist document and have made the appropriate changes.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • I have tested the changes and verified that they work and don't break anything (as well as I can manage).

@github-actions github-actions Bot added the core label Jul 22, 2026
@drashna

drashna commented Jul 23, 2026

Copy link
Copy Markdown
Member

Given the issue that this is trying to solve, a better solution would be to use send_char_with_delay in the unicode functions, rather than making send_char weak.

This way, you can use a different/custom delay with the unicode code, rather than making issues with a bunch of other code paths that depend on send_char

@NapOli1084

Copy link
Copy Markdown
Contributor Author

That's pretty much what my first idea was. I'll mark this PR as draft for now and attempt one with such a delay. If we can come up with a solution you're fine with, I'll drop this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants