From 08c556b78b9dc672a2aa2388bbd3fdf408e3ce98 Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Sun, 5 Jun 2022 10:26:02 +1000 Subject: Add keymap wrappers for introspection into the keymap. (#17229) * Introspection handlers for keymaps. * Renaming. --- quantum/keymap_introspection.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 quantum/keymap_introspection.h (limited to 'quantum/keymap_introspection.h') diff --git a/quantum/keymap_introspection.h b/quantum/keymap_introspection.h new file mode 100644 index 0000000000..23f6f2016f --- /dev/null +++ b/quantum/keymap_introspection.h @@ -0,0 +1,15 @@ +// Copyright 2022 Nick Brassel (@tzarc) +// SPDX-License-Identifier: GPL-2.0-or-later +#pragma once + +#include + +// Get the number of layers defined in the keymap +uint8_t keymap_layer_count(void); + +#if defined(ENCODER_ENABLE) && defined(ENCODER_MAP_ENABLE) + +// Get the number of layers defined in the encoder map +uint8_t encodermap_layer_count(void); + +#endif // defined(ENCODER_ENABLE) && defined(ENCODER_MAP_ENABLE) -- cgit v1.2.3