Skip to content
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

Keymap introspection for Dip Switches #22543

Merged
merged 2 commits into from
Dec 11, 2023
Merged

Keymap introspection for Dip Switches #22543

merged 2 commits into from
Dec 11, 2023

Conversation

zvecr
Copy link
Member

@zvecr zvecr commented Nov 25, 2023

Description

With the eventual aim to support configuration of dip switches over XAP, this first pass enables similar keymap functionality as encoder map.

keymap.c

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
    [0] = LAYOUT_ortho_1x1(KC_A),
    [1] = LAYOUT_ortho_1x1(KC_B),
};

const uint16_t PROGMEM dip_switch_map[NUM_DIP_SWITCHES][NUM_DIP_STATES] = {
    DIP_SWITCH_OFF_ON(DF(0), DF(1))
};

Notes

  • No layer support
    • generally used to toggle global state
      • implementing layers would be somewhat pointless
      • could still use custom keycodes

Types of Changes

  • Core
  • Bugfix
  • New feature
  • Enhancement/optimization
  • Keyboard (addition or update)
  • Keymap/layout/userspace (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).

@zvecr zvecr added core feature no-ci Signals to the CI runners not to build. labels Nov 25, 2023
@github-actions github-actions bot added python cli qmk cli command dd Data Driven Changes labels Dec 8, 2023
@github-actions github-actions bot removed python cli qmk cli command dd Data Driven Changes labels Dec 8, 2023
@zvecr zvecr removed the no-ci Signals to the CI runners not to build. label Dec 8, 2023
@zvecr zvecr marked this pull request as ready for review December 8, 2023 19:04
@zvecr zvecr requested a review from a team December 8, 2023 19:04
Copy link
Member

@tzarc tzarc left a comment

Choose a reason for hiding this comment

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

LGTM.

@zvecr zvecr merged commit 4682226 into qmk:develop Dec 11, 2023
4 of 5 checks passed
@zvecr zvecr deleted the dip_switch_map branch December 11, 2023 23:06
itsjonny96 pushed a commit to itsjonny96/qmk_firmware that referenced this pull request Jan 7, 2024
mechlovin pushed a commit to mechlovin/qmk_firmware that referenced this pull request Jan 17, 2024
mechlovin pushed a commit to mechlovin/qmk_firmware that referenced this pull request Jan 19, 2024
nuess0r pushed a commit to nuess0r/qmk_firmware that referenced this pull request Sep 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants