Skip to content

Commit

Permalink
Show grave and tilde keysyms on QK_GESC
Browse files Browse the repository at this point in the history
  • Loading branch information
precondition committed Aug 12, 2022
1 parent b661542 commit 5b36bf9
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 10 deletions.
27 changes: 19 additions & 8 deletions src/i18n/keymap_extras/convert_keymap_extras_header.js
Original file line number Diff line number Diff line change
Expand Up @@ -301,14 +301,25 @@ fs.readFile(process.argv.at(-1), 'utf8', function (err, data) {
for (const spaceCadetKc of spaceCadetKeycodes) {
console.log(generateSpaceCadetKcInfo(spaceCadetKc, kcInfo));
}
console.log(
stringify('QK_GESC', {
name: `Esc / ${kcInfo.get('KC_GRV').keysym}`,
title: `Esc normally, but ${
kcInfo.get('KC_GRV').keysym
} when Shift or GUI is active`
})
);
const grvKeysym = kcInfo.get('KC_GRV').keysym;
const tildeKeysym = kcInfo.has('S(KC_GRV)')
? kcInfo.get('S(KC_GRV)').keysym
: grvKeysym;
if (tildeKeysym !== grvKeysym) {
console.log(
stringify('QK_GESC', {
name: `${grvKeysym} / ${tildeKeysym}\nEsc`,
title: `Esc normally, but ${grvKeysym} when GUI is active or ${tildeKeysym} when Shift is active`
})
);
} else {
console.log(
stringify('QK_GESC', {
name: `${grvKeysym}\nEsc`,
title: `Esc normally, but ${grvKeysym} when Shift or GUI is active`
})
);
}
console.log('}');
}
});
4 changes: 2 additions & 2 deletions src/store/modules/keycodes/quantum.js
Original file line number Diff line number Diff line change
Expand Up @@ -392,9 +392,9 @@ export default [
{ label: 'Special action keys', width: 'label' },

{
name: 'Esc / ~',
name: '` / ~\nEsc',
code: 'QK_GESC',
title: 'Esc normally, but ~ when Shift or GUI is pressed'
title: 'Esc normally, but ` when GUI is active or ~ when Shift is active'
},
{
name: 'LS / (',
Expand Down

0 comments on commit 5b36bf9

Please sign in to comment.