qmk_firmware icon indicating copy to clipboard operation
qmk_firmware copied to clipboard

Align Code to QMK Coding Guidelines for keyboard_post_init_user()

Open heumann-a opened this issue 1 year ago • 3 comments

As mentioned in the QMK Guidelines all _user() functions should optimally (in best case never) used by the keyboards to be available for the keymap / user to implement own stuff.

Description

In your Macropad and Numpad keyboard you used keyboard_post_init_user() which should be used on keymap instead of keyboard level. For this i moved the functions to their respective default keymap, where they should be. The same or even more is important for layers which are specific for each keymap and should definitely only defined inside the respective keymaps (user-wide keymaps are an exception but since this is a keyboard folder, it is not applicable)

This Default keymap also serves as template to create an own keymap layout, so the code is still visible for everyone who wants to create or fork from it.

Types of Changes

  • [x] Core
  • [X] Bugfix
  • [x] Enhancement/optimization

Issues Fixed or Closed by This PR

  • Compiler Error about multiple definitions of keyboard_post_init_user()
  • Move layout to keymap
  • EDIT: added funtionality to avoid triggering an event-drive layer-function permanently due syncing of numlock

Checklist

  • [x] I have tested the changes and verified that they work and don't break anything (as well as I can manage).

PS: If approved and considered correct, pls ping me and i would like to fix the other _user() functions too, that i found. Want to avoid doing multiple PRs for nothing if you guys think otherwise and remodel it differently.

heumann-a avatar Jul 06 '24 21:07 heumann-a

Thank you for your contribution! This pull request has been automatically marked as stale because it has not had activity in the last 45 days. It will be closed in 30 days if no further activity occurs. Please feel free to give a status update now, or re-open when it's ready. For maintainers: Please label with bug, awaiting review, breaking_change, in progress, or on hold to prevent the issue from being re-flagged.

github-actions[bot] avatar Aug 21 '24 01:08 github-actions[bot]

Not stale. still waiting for review

heumann-a avatar Aug 21 '24 17:08 heumann-a

Thank you for your contribution! This pull request has been automatically marked as stale because it has not had activity in the last 45 days. It will be closed in 30 days if no further activity occurs. Please feel free to give a status update now, or re-open when it's ready. For maintainers: Please label with bug, awaiting review, breaking_change, in progress, or on hold to prevent the issue from being re-flagged.

github-actions[bot] avatar Oct 09 '24 02:10 github-actions[bot]

not stale

benedikt-bartscher avatar Oct 18 '24 19:10 benedikt-bartscher

Thank you for your contribution! This pull request has been automatically marked as stale because it has not had activity in the last 45 days. It will be closed in 30 days if no further activity occurs. Please feel free to give a status update now, or re-open when it's ready. For maintainers: Please label with bug, awaiting review, breaking_change, in progress, or on hold to prevent the issue from being re-flagged.

github-actions[bot] avatar Dec 03 '24 02:12 github-actions[bot]

not stale, still waiting for review...!

heumann-a avatar Dec 23 '24 16:12 heumann-a

Thank you for your contribution! This pull request has been automatically marked as stale because it has not had activity in the last 45 days. It will be closed in 30 days if no further activity occurs. Please feel free to give a status update now, or re-open when it's ready. For maintainers: Please label with bug, awaiting review, breaking_change, in progress, or on hold to prevent the issue from being re-flagged.

github-actions[bot] avatar Feb 08 '25 01:02 github-actions[bot]

Thank you for your contribution! This pull request has been automatically closed because it has not had activity in the last 30 days. Please feel free to give a status update now, ping for review, or re-open when it's ready. // [stale-action-closed]

github-actions[bot] avatar Mar 11 '25 02:03 github-actions[bot]