qmk_firmware/assets/ChangeLog_20230226.md.Cg0AYxIn.js

16 lines
55 KiB
JavaScript
Raw Normal View History

import { _ as _export_sfc, c as createElementBlock, o as openBlock, a8 as createStaticVNode } from "./chunks/framework.DyMmIvSC.js";
const __pageData = JSON.parse('{"title":"QMK Breaking Changes - 2023 February 26 Changelog","description":"","frontmatter":{},"headers":[],"relativePath":"ChangeLog/20230226.md","filePath":"ChangeLog/20230226.md"}');
const _sfc_main = { name: "ChangeLog/20230226.md" };
const _hoisted_1 = /* @__PURE__ */ createStaticVNode('<h1 id="qmk-breaking-changes-2023-february-26-changelog" tabindex="-1">QMK Breaking Changes - 2023 February 26 Changelog <a class="header-anchor" href="#qmk-breaking-changes-2023-february-26-changelog" aria-label="Permalink to &quot;QMK Breaking Changes - 2023 February 26 Changelog&quot;"></a></h1><h2 id="changes-requiring-user-action" tabindex="-1">Changes Requiring User Action <a class="header-anchor" href="#changes-requiring-user-action" aria-label="Permalink to &quot;Changes Requiring User Action {#changes-requiring-user-action}&quot;"></a></h2><h3 id="i-m-t-i" tabindex="-1"><code>IGNORE_MOD_TAP_INTERRUPT</code> behaviour changes (<a href="https://github.com/qmk/qmk_firmware/pull/15741" target="_blank" rel="noreferrer">#15741</a>) <a class="header-anchor" href="#i-m-t-i" aria-label="Permalink to &quot;`IGNORE_MOD_TAP_INTERRUPT` behaviour changes ([#15741](https://github.com/qmk/qmk_firmware/pull/15741)) {#i-m-t-i}&quot;"></a></h3><p><code>IGNORE_MOD_TAP_INTERRUPT_PER_KEY</code> has been removed and <code>IGNORE_MOD_TAP_INTERRUPT</code> deprecated as a stepping stone towards making <code>IGNORE_MOD_TAP_INTERRUPT</code> the new default behavior for mod-taps in the future.</p><p>In place of the now removed <code>IGNORE_MOD_TAP_INTERRUPT_PER_KEY</code>, one must use the pre-existing <code>HOLD_ON_OTHER_KEY_PRESS</code> option.</p><p>In most cases, updating <code>get_ignore_mod_tap_interrupt</code> to <code>get_hold_on_other_key_press</code> is simply a matter of renaming the function and swapping every <code>true</code> by <code>false</code> and vice versa. The one subtlety you may need to look out for is that the <code>get_ignore_mod_tap_interrupt</code> was only ever called with mod-taps passed in as the <code>keycode</code> argument, while the <code>keycode</code> argument of <code>get_hold_on_other_key_press</code> can be any dual-role key. This includes not only mod-taps, but also layer-taps, one shot keys, <code>TT(layer)</code> and more. This has an impact on the effect of the <code>default</code> case in a typical per-key configuration making use of a <code>switch(keycode)</code> statement.</p><p>To illustrate, let&#39;s take the example of a configuration where we&#39;d want all mod-taps to activate the modifier if another key is pressed while held with the exception of <code>LCTL_T(KC_A)</code>, which should ignore keys pressed while it is held and activate the modifier only if it has been held for longer than the tapping term. In addition, we would like to keep the default &quot;ignore-interrupt&quot; behavior of layer taps.</p><p>An old way to do this would be via the following code:</p><div class="language-c vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">c</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">bool</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> get_ignore_mod_tap_interrupt</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">uint16_t</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> keycode</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">keyrecord_t</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> *</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">record</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) {</span></span>\n<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> switch</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(keycode) {</span></span>\n<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> case</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> LCTL_T</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(KC_A):</span></span>\n<span class="line"
const _hoisted_48 = [
_hoisted_1
];
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return openBlock(), createElementBlock("div", null, _hoisted_48);
}
const _20230226 = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
export {
__pageData,
_20230226 as default
};