From 5faa23d54ca1e3ab83097f2a07922f48800616e6 Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Mon, 15 May 2023 22:27:37 +1000 Subject: Keymap introspection for combos. (#19670) --- keyboards/eu_isolation/keymaps/bigspace/config.h | 27 ++++++++++++------------ keyboards/eu_isolation/keymaps/bigspace/keymap.c | 26 +++++++++++------------ keyboards/eu_isolation/keymaps/default/config.h | 21 +++++++++--------- keyboards/eu_isolation/keymaps/default/keymap.c | 22 +++++++++---------- keyboards/eu_isolation/keymaps/mit/config.h | 21 +++++++++--------- keyboards/eu_isolation/keymaps/mit/keymap.c | 22 +++++++++---------- 6 files changed, 68 insertions(+), 71 deletions(-) (limited to 'keyboards/eu_isolation/keymaps') diff --git a/keyboards/eu_isolation/keymaps/bigspace/config.h b/keyboards/eu_isolation/keymaps/bigspace/config.h index 96783a4c87..ad4389af3e 100644 --- a/keyboards/eu_isolation/keymaps/bigspace/config.h +++ b/keyboards/eu_isolation/keymaps/bigspace/config.h @@ -1,19 +1,18 @@ /* Copyright 2020 Austin "TuckTuckFloof" Ashmore -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 2 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . -*/ +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 2 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +*/ #pragma once -#define COMBO_COUNT 5 #define COMBO_TERM 175 diff --git a/keyboards/eu_isolation/keymaps/bigspace/keymap.c b/keyboards/eu_isolation/keymaps/bigspace/keymap.c index 8970e217fb..7568659de0 100644 --- a/keyboards/eu_isolation/keymaps/bigspace/keymap.c +++ b/keyboards/eu_isolation/keymaps/bigspace/keymap.c @@ -1,16 +1,16 @@ /* Copyright 2020 Austin "TuckTuckFloof" Ashmore -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 2 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 2 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . */ #include QMK_KEYBOARD_H @@ -31,7 +31,7 @@ enum WOMBO_COMBOS { const uint16_t PROGMEM VOLUME_UP_COMBO[] = { KC_F1, KC_F2, COMBO_END }; const uint16_t PROGMEM VOLUME_DN_COMBO[] = { KC_F3, KC_F4, COMBO_END }; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { [VOLUME_UP] = COMBO(VOLUME_UP_COMBO, KC_VOLU), [VOLUME_DOWN] = COMBO(VOLUME_DN_COMBO, KC_VOLD) }; diff --git a/keyboards/eu_isolation/keymaps/default/config.h b/keyboards/eu_isolation/keymaps/default/config.h index cb82301892..ad4389af3e 100644 --- a/keyboards/eu_isolation/keymaps/default/config.h +++ b/keyboards/eu_isolation/keymaps/default/config.h @@ -1,19 +1,18 @@ /* Copyright 2020 Austin "TuckTuckFloof" Ashmore * -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 2 of the License, or -* (at your option) any later version. +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 2 of the License, or +* (at your option) any later version. * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . */ #pragma once -#define COMBO_COUNT 5 #define COMBO_TERM 175 diff --git a/keyboards/eu_isolation/keymaps/default/keymap.c b/keyboards/eu_isolation/keymaps/default/keymap.c index fc433815ff..65dc381974 100644 --- a/keyboards/eu_isolation/keymaps/default/keymap.c +++ b/keyboards/eu_isolation/keymaps/default/keymap.c @@ -1,16 +1,16 @@ /* Copyright 2020 Austin "TuckTuckFloof" Ashmore * -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 2 of the License, or -* (at your option) any later version. +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 2 of the License, or +* (at your option) any later version. * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . */ #include QMK_KEYBOARD_H @@ -31,7 +31,7 @@ enum WOMBO_COMBOS { const uint16_t PROGMEM VOLUME_UP_COMBO[] = { KC_F1, KC_F2, COMBO_END }; const uint16_t PROGMEM VOLUME_DN_COMBO[] = { KC_F3, KC_F4, COMBO_END }; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { [VOLUME_UP] = COMBO(VOLUME_UP_COMBO, KC_VOLU), [VOLUME_DOWN] = COMBO(VOLUME_DN_COMBO, KC_VOLD) }; diff --git a/keyboards/eu_isolation/keymaps/mit/config.h b/keyboards/eu_isolation/keymaps/mit/config.h index cb82301892..ad4389af3e 100644 --- a/keyboards/eu_isolation/keymaps/mit/config.h +++ b/keyboards/eu_isolation/keymaps/mit/config.h @@ -1,19 +1,18 @@ /* Copyright 2020 Austin "TuckTuckFloof" Ashmore * -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 2 of the License, or -* (at your option) any later version. +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 2 of the License, or +* (at your option) any later version. * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . */ #pragma once -#define COMBO_COUNT 5 #define COMBO_TERM 175 diff --git a/keyboards/eu_isolation/keymaps/mit/keymap.c b/keyboards/eu_isolation/keymaps/mit/keymap.c index 208e61b3e1..68cdaa750a 100644 --- a/keyboards/eu_isolation/keymaps/mit/keymap.c +++ b/keyboards/eu_isolation/keymaps/mit/keymap.c @@ -1,16 +1,16 @@ /* Copyright 2020 Austin "TuckTuckFloof" Ashmore * -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 2 of the License, or -* (at your option) any later version. +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 2 of the License, or +* (at your option) any later version. * -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . */ #include QMK_KEYBOARD_H @@ -31,7 +31,7 @@ enum WOMBO_COMBOS { const uint16_t PROGMEM VOLUME_UP_COMBO[] = { KC_F1, KC_F2, COMBO_END }; const uint16_t PROGMEM VOLUME_DN_COMBO[] = { KC_F3, KC_F4, COMBO_END }; -combo_t key_combos[COMBO_COUNT] = { +combo_t key_combos[] = { [VOLUME_UP] = COMBO(VOLUME_UP_COMBO, KC_VOLU), [VOLUME_DOWN] = COMBO(VOLUME_DN_COMBO, KC_VOLD) }; -- cgit v1.2.3