From 7f97d2479f175eb8390bcbed82a54f4e4c7ad892 Mon Sep 17 00:00:00 2001 From: precondition <57645186+precondition@users.noreply.github.com> Date: Fri, 12 Aug 2022 11:53:45 +0200 Subject: [PATCH] Force the entire KC string to match shiftedKcRegExp This is useful to avoid false positives like "RCTL(S(KC_A))". --- src/i18n/keymap_extras/convert_keymap_extras_header.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/i18n/keymap_extras/convert_keymap_extras_header.js b/src/i18n/keymap_extras/convert_keymap_extras_header.js index 7820e8f458..2a4ade0803 100644 --- a/src/i18n/keymap_extras/convert_keymap_extras_header.js +++ b/src/i18n/keymap_extras/convert_keymap_extras_header.js @@ -172,7 +172,7 @@ function computeKcInfo(lines, intl2us) { keysym: readableKeysym, name: readableKeysym }); - const shiftedKcRegExp = /S\(\w+\)/; + const shiftedKcRegExp = /^S\(\w+\)$/; if (shiftedKcRegExp.test(macroExpansion)) { const basicKc = extractBasicKc(macroExpansion); const basicUSKc = translateToUS(basicKc, intl2us);