diff options
author | Joel Challis <git@zvecr.com> | 2023-03-03 11:26:53 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-03 11:26:53 +0000 |
commit | c3c40dfda89d3d10bef90e08bf0600d1f4b1cd0e (patch) | |
tree | af56ac135031e01b1e657dbd35dc0dbf59d72bab | |
parent | 6676cc194228421a63b4d5922785b086bce8a46b (diff) |
Remove some use of keymap.h (#19980)
69 files changed, 75 insertions, 69 deletions
diff --git a/lib/python/qmk/cli/generate/keycodes.py b/lib/python/qmk/cli/generate/keycodes.py index 17503bac63..3b69b17ed1 100644 --- a/lib/python/qmk/cli/generate/keycodes.py +++ b/lib/python/qmk/cli/generate/keycodes.py @@ -143,7 +143,7 @@ def generate_keycode_extras(cli): """ # Build the header file. - keycodes_h_lines = [GPL2_HEADER_C_LIKE, GENERATED_HEADER_C_LIKE, '#pragma once', '#include "keymap.h"', '// clang-format off'] + keycodes_h_lines = [GPL2_HEADER_C_LIKE, GENERATED_HEADER_C_LIKE, '#pragma once', '#include "keycodes.h"', '// clang-format off'] keycodes = load_spec(cli.args.version, cli.args.lang) diff --git a/quantum/keymap.h b/quantum/keymap.h index 0225f53362..1263ef188b 100644 --- a/quantum/keymap.h +++ b/quantum/keymap.h @@ -30,8 +30,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "quantum_keycodes.h" -// translates key to keycode -uint16_t keymap_key_to_keycode(uint8_t layer, keypos_t key); +#include "keymap_common.h" #ifdef ENCODER_MAP_ENABLE // Ensure we have a forward declaration for the encoder map diff --git a/quantum/keymap_common.h b/quantum/keymap_common.h new file mode 100644 index 0000000000..24fe9af6fe --- /dev/null +++ b/quantum/keymap_common.h @@ -0,0 +1,7 @@ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +// translates key to keycode +uint16_t keymap_key_to_keycode(uint8_t layer, keypos_t key); diff --git a/quantum/keymap_extras/keymap_belgian.h b/quantum/keymap_extras/keymap_belgian.h index 1bf9549c5a..6851c6b4e8 100644 --- a/quantum/keymap_extras/keymap_belgian.h +++ b/quantum/keymap_extras/keymap_belgian.h @@ -24,7 +24,7 @@ *******************************************************************************/ #pragma once -#include "keymap.h" +#include "keycodes.h" // clang-format off // Aliases diff --git a/quantum/keymap_extras/keymap_bepo.h b/quantum/keymap_extras/keymap_bepo.h index 12026ce649..448727dece 100644 --- a/quantum/keymap_extras/keymap_bepo.h +++ b/quantum/keymap_extras/keymap_bepo.h @@ -24,7 +24,7 @@ *******************************************************************************/ #pragma once -#include "keymap.h" +#include "keycodes.h" // clang-format off // Aliases diff --git a/quantum/keymap_extras/keymap_brazilian_abnt2.h b/quantum/keymap_extras/keymap_brazilian_abnt2.h index 70a09a52be..8fac7666c2 100644 --- a/quantum/keymap_extras/keymap_brazilian_abnt2.h +++ b/quantum/keymap_extras/keymap_brazilian_abnt2.h @@ -24,7 +24,7 @@ *******************************************************************************/ #pragma once -#include "keymap.h" +#include "keycodes.h" // clang-format off // Aliases diff --git a/quantum/keymap_extras/keymap_canadian_multilingual.h b/quantum/keymap_extras/keymap_canadian_multilingual.h index 44009f3aa2..5b9b03babb 100644 --- a/quantum/keymap_extras/keymap_canadian_multilingual.h +++ b/quantum/keymap_extras/keymap_canadian_multilingual.h @@ -24,7 +24,7 @@ *******************************************************************************/ #pragma once -#include "keymap.h" +#include "keycodes.h" // clang-format off // Aliases diff --git a/quantum/keymap_extras/keymap_colemak.h b/quantum/keymap_extras/keymap_colemak.h index 5cb86bf441..d63309f010 100644 --- a/quantum/keymap_extras/keymap_colemak.h +++ b/quantum/keymap_extras/keymap_colemak.h @@ -24,7 +24,7 @@ *******************************************************************************/ #pragma once -#include "keymap.h" +#include "keycodes.h" // clang-format off // Aliases diff --git a/quantum/keymap_extras/keymap_croatian.h b/quantum/keymap_extras/keymap_croatian.h index 1115592e17..3e7c681ced 100644 --- a/quantum/keymap_extras/keymap_croatian.h +++ b/quantum/keymap_extras/keymap_croatian.h @@ -24,7 +24,7 @@ *******************************************************************************/ #pragma once -#include "keymap.h" +#include "keycodes.h" // clang-format off // Aliases diff --git a/quantum/keymap_extras/keymap_czech.h b/quantum/keymap_extras/keymap_czech.h index 02692002e3..351c51ad41 100644 --- a/quantum/keymap_extras/keymap_czech.h +++ b/quantum/keymap_extras/keymap_czech.h @@ -24,7 +24,7 @@ *******************************************************************************/ #pragma once -#include "keymap.h" +#include "keycodes.h" // clang-format off // Aliases diff --git a/quantum/keymap_extras/keymap_danish.h b/quantum/keymap_extras/keymap_danish.h index 18107ccd53..cea9444896 100644 --- a/quantum/keymap_extras/keymap_danish.h +++ b/quantum/keymap_extras/keymap_danish.h @@ -24,7 +24,7 @@ *******************************************************************************/ #pragma once -#include "keymap.h" +#include "keycodes.h" // clang-format off // Aliases diff --git a/quantum/keymap_extras/keymap_dvorak.h b/quantum/keymap_extras/keymap_dvorak.h index 5767530b3b..9205a72057 100644 --- a/quantum/keymap_extras/keymap_dvorak.h +++ b/quantum/keymap_extras/keymap_dvorak.h @@ -24,7 +24,7 @@ *******************************************************************************/ #pragma once -#include "keymap.h" +#include "keycodes.h" // clang-format off // Aliases diff --git a/quantum/keymap_extras/keymap_dvorak_fr.h b/quantum/keymap_extras/keymap_dvorak_fr.h index 60675fbf13..b206767614 100644 --- a/quantum/keymap_extras/keymap_dvorak_fr.h +++ b/quantum/keymap_extras/keymap_dvorak_fr.h @@ -24,7 +24,7 @@ *******************************************************************************/ #pragma once -#include "keymap.h" +#include "keycodes.h" // clang-format off // Aliases diff --git a/quantum/keymap_extras/keymap_dvorak_programmer.h b/quantum/keymap_extras/keymap_dvorak_programmer.h index 6e1ae17807..19187ed13b 100644 --- a/quantum/keymap_extras/keymap_dvorak_programmer.h +++ b/quantum/keymap_extras/keymap_dvorak_programmer.h @@ -24,7 +24,7 @@ *******************************************************************************/ #pragma once -#include "keymap.h" +#include "keycodes.h" // clang-format off // Aliases diff --git a/quantum/keymap_extras/keymap_estonian.h b/quantum/keymap_extras/keymap_estonian.h index 462bcde429..ea9c56c12a 100644 --- a/quantum/keymap_extras/keymap_estonian.h +++ b/quantum/keymap_extras/keymap_estonian.h @@ -24,7 +24,7 @@ *******************************************************************************/ #pragma once -#include "keymap.h" +#include "keycodes.h" // clang-format off // Aliases diff --git a/quantum/keymap_extras/keymap_finnish.h b/quantum/keymap_extras/keymap_finnish.h index 7e94896e2e..c0dc1af81e 100644 --- a/quantum/keymap_extras/keymap_finnish.h +++ b/quantum/keymap_extras/keymap_finnish.h @@ -24,7 +24,7 @@ *******************************************************************************/ #pragma once -#include "keymap.h" +#include "keycodes.h" // clang-format off // Aliases diff --git a/quantum/keymap_extras/keymap_french.h b/quantum/keymap_extras/keymap_french.h index da9467a475..03dbb7bc40 100644 --- a/quantum/keymap_extras/keymap_french.h +++ b/quantum/keymap_extras/keymap_french.h @@ -24,7 +24,7 @@ *******************************************************************************/ #pragma once -#include "keymap.h" +#include "keycodes.h" // clang-format off // Aliases diff --git a/quantum/keymap_extras/keymap_french_afnor.h b/quantum/keymap_extras/keymap_french_afnor.h index 259e0a30f4..869984c4d2 100644 --- a/quantum/keymap_extras/keymap_french_afnor.h +++ b/quantum/keymap_extras/keymap_french_afnor.h @@ -24,7 +24,7 @@ *******************************************************************************/ #pragma once -#include "keymap.h" +#include "keycodes.h" // clang-format off // Aliases diff --git a/quantum/keymap_extras/keymap_french_mac_iso.h b/quantum/keymap_extras/keymap_french_mac_iso.h index 9a8ed72604..e5f7514a80 100644 --- a/quantum/keymap_extras/keymap_french_mac_iso.h +++ b/quantum/keymap_extras/keymap_french_mac_iso.h @@ -24,7 +24,7 @@ *******************************************************************************/ #pragma once -#include "keymap.h" +#include "keycodes.h" // clang-format off // Aliases diff --git a/quantum/keymap_extras/keymap_german.h b/quantum/keymap_extras/keymap_german.h index 251491fb81..38b0c685ba 100644 --- a/quantum/keymap_extras/keymap_german.h +++ b/quantum/keymap_extras/keymap_german.h @@ -24,7 +24,7 @@ *******************************************************************************/ #pragma once -#include "keymap.h" +#include "keycodes.h" // clang-format off // Aliases diff --git a/quantum/keymap_extras/keymap_german_mac_iso.h b/quantum/keymap_extras/keymap_german_mac_iso.h index de7b60546b..efa9099f20 100644 --- a/quantum/keymap_extras/keymap_german_mac_iso.h +++ b/quantum/keymap_extras/keymap_german_mac_iso.h @@ -24,7 +24,7 @@ *******************************************************************************/ #pragma once -#include "keymap.h" +#include "keycodes.h" // clang-format off // Aliases diff --git a/quantum/keymap_extras/keymap_greek.h b/quantum/keymap_extras/keymap_greek.h index b4f5b5c5b3..01779cf2e8 100644 --- a/quantum/keymap_extras/keymap_greek.h +++ b/quantum/keymap_extras/keymap_greek.h @@ -24,7 +24,7 @@ *******************************************************************************/ #pragma once -#include "keymap.h" +#include "keycodes.h" // clang-format off // Aliases diff --git a/quantum/keymap_extras/keymap_hebrew.h b/quantum/keymap_extras/keymap_hebrew.h index 372d7f2e93..284562072d 100644 --- a/quantum/keymap_extras/keymap_hebrew.h +++ b/quantum/keymap_extras/keymap_hebrew.h @@ -24,7 +24,7 @@ *******************************************************************************/ #pragma once -#include "keymap.h" +#include "keycodes.h" // clang-format off // Aliases diff --git a/quantum/keymap_extras/keymap_hungarian.h b/quantum/keymap_extras/keymap_hungarian.h index 591d71c09c..fbc31ed155 100644 --- a/quantum/keymap_extras/keymap_hungarian.h +++ b/quantum/keymap_extras/keymap_hungarian.h @@ -24,7 +24,7 @@ *******************************************************************************/ #pragma once -#include "keymap.h" +#include "keycodes.h" // clang-format off // Aliases diff --git a/quantum/keymap_extras/keymap_icelandic.h b/quantum/keymap_extras/keymap_icelandic.h index 800899b515..3bd71c19f2 100644 --- a/quantum/keymap_extras/keymap_icelandic.h +++ b/quantum/keymap_extras/keymap_icelandic.h @@ -24,7 +24,7 @@ *******************************************************************************/ #pragma once -#include "keymap.h" +#include "keycodes.h" // clang-format off // Aliases diff --git a/quantum/keymap_extras/keymap_irish.h b/quantum/keymap_extras/keymap_irish.h index 2cd63a48e3..6e161628c8 100644 --- a/quantum/keymap_extras/keymap_irish.h +++ b/quantum/keymap_extras/keymap_irish.h @@ -24,7 +24,7 @@ *******************************************************************************/ #pragma once -#include "keymap.h" +#include "keycodes.h" // clang-format off // Aliases diff --git a/quantum/keymap_extras/keymap_italian.h b/quantum/keymap_extras/keymap_italian.h index 95f3348f63..8092dc1301 100644 --- a/quantum/keymap_extras/keymap_italian.h +++ b/quantum/keymap_extras/keymap_italian.h @@ -24,7 +24,7 @@ *******************************************************************************/ #pragma once -#include "keymap.h" +#include "keycodes.h" // clang-format off // Aliases diff --git a/quantum/keymap_extras/keymap_italian_mac_ansi.h b/quantum/keymap_extras/keymap_italian_mac_ansi.h index 5e7e2a37e8..ae1281be26 100644 --- a/quantum/keymap_extras/keymap_italian_mac_ansi.h +++ b/quantum/keymap_extras/keymap_italian_mac_ansi.h @@ -24,7 +24,7 @@ *******************************************************************************/ #pragma once -#include "keymap.h" +#include "keycodes.h" // clang-format off // Aliases diff --git a/quantum/keymap_extras/keymap_italian_mac_iso.h b/quantum/keymap_extras/keymap_italian_mac_iso.h index 1d30451376..f3f01839c3 100644 --- a/quantum/keymap_extras/keymap_italian_mac_iso.h +++ b/quantum/keymap_extras/keymap_italian_mac_iso.h @@ -24,7 +24,7 @@ *******************************************************************************/ #pragma once -#include "keymap.h" +#include "keycodes.h" // clang-format off // Aliases diff --git a/quantum/keymap_extras/keymap_japanese.h b/quantum/keymap_extras/keymap_japanese.h index 286863deea..947317833e 100644 --- a/quantum/keymap_extras/keymap_japanese.h +++ b/quantum/keymap_extras/keymap_japanese.h @@ -24,7 +24,7 @@ *******************************************************************************/ #pragma once -#include "keymap.h" +#include "keycodes.h" // clang-format off // Aliases diff --git a/quantum/keymap_extras/keymap_korean.h b/quantum/keymap_extras/keymap_korean.h index 073647de7f..440a6b3b4d 100644 --- a/quantum/keymap_extras/keymap_korean.h +++ b/quantum/keymap_extras/keymap_korean.h @@ -24,7 +24,7 @@ *******************************************************************************/ #pragma once -#include "keymap.h" +#include "keycodes.h" // clang-format off // Aliases diff --git a/quantum/keymap_extras/keymap_latvian.h b/quantum/keymap_extras/keymap_latvian.h index e3ac1cd433..2f26b1d8af 100644 --- a/quantum/keymap_extras/keymap_latvian.h +++ b/quantum/keymap_extras/keymap_latvian.h @@ -24,7 +24,7 @@ *******************************************************************************/ #pragma once -#include "keymap.h" +#include "keycodes.h" // clang-format off // Aliases diff --git a/quantum/keymap_extras/keymap_lithuanian_azerty.h b/quantum/keymap_extras/keymap_lithuanian_azerty.h index 11de3ad030..f6dd94f0ca 100644 --- a/quantum/keymap_extras/keymap_lithuanian_azerty.h +++ b/quantum/keymap_extras/keymap_lithuanian_azerty.h @@ -24,7 +24,7 @@ *******************************************************************************/ #pragma once -#include "keymap.h" +#include "keycodes.h" // clang-format off // Aliases |