qmk/qmk_firmware

Sequencer keycodes are not static

Open

#11,156 建立於 2020年12月8日

在 GitHub 查看
 (14 留言) (0 反應) (0 負責人)C (43,867 fork)batch import
bughelp wantedquestion

倉庫指標

Star
 (20,368 star)
PR 合併指標
 (平均合併 20天 9小時) (30 天內合併 27 個 PR)

描述

The recent addition of the step sequencer feature in https://github.com/qmk/qmk_firmware/pull/9703 has introduced a small roadblock in refactoring the Quantum keycode values to be static (ie. removing all the ifdefs in such a way as to not break VIA). The SQ_S(), SQ_R() and SQ_T() keycodes depend on the values of SEQUENCER_STEPS, SEQUENCER_RESOLUTIONS and SEQUENCER_TRACKS which can be configured by the user. As such, it is not possible to know exactly what value SEQUENCER_STEP_MAX will be, and thus impossible for VIA to support these keycodes. Worse, any new features which add keycodes will be unable to be supported by VIA either, as their values can also not be known.

As it turns out, VIA has already been broken by https://github.com/qmk/qmk_firmware/pull/9940 inserting a new MIDI velocity keycode - although MIDI is not supported by VIA, some of the keycodes are still counted in the enum even if the feature is disabled, and so everything after it is now offset by one. Maybe we should take this opportunity to at least get this ifdef removal done.

@rbelouin would it be possible to refactor the sequencer feature in some way to fix this?

貢獻者指南