mirror of
https://github.com/qmk/qmk_firmware.git
synced 2026-09-11 04:52:02 +02:00
Attempt at simplifying interface.
This commit is contained in:
@@ -17,3 +17,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "test_common.h"
|
||||
|
||||
#define KEYCODE_STRING_NAMES_USER
|
||||
#define KEYCODE_STRING_NAMES_KB
|
||||
|
||||
|
||||
@@ -15,3 +15,4 @@
|
||||
KEYCODE_STRING_ENABLE = yes
|
||||
EXTRAKEY_ENABLE = yes
|
||||
MOUSEKEY_ENABLE = yes
|
||||
INTROSPECTION_KEYMAP_C = test_keymap.c
|
||||
|
||||
@@ -15,23 +15,7 @@
|
||||
#include <iostream>
|
||||
|
||||
#include "test_common.hpp"
|
||||
|
||||
enum {
|
||||
MYMACRO1 = SAFE_RANGE,
|
||||
MYMACRO2,
|
||||
};
|
||||
|
||||
// clang-format off
|
||||
extern "C" const keycode_string_name_t *keycode_string_names_kb = (keycode_string_name_t []){
|
||||
KEYCODE_STRING_NAME(MYMACRO1),
|
||||
KEYCODE_STRING_NAMES_END // End of table sentinel.
|
||||
};
|
||||
extern "C" const keycode_string_name_t *keycode_string_names_user = (keycode_string_name_t []){
|
||||
KEYCODE_STRING_NAME(MYMACRO2),
|
||||
KEYCODE_STRING_NAME(KC_EXLM),
|
||||
KEYCODE_STRING_NAMES_END // End of table sentinel.
|
||||
};
|
||||
// clang-format on
|
||||
#include "test_keymap.h"
|
||||
|
||||
class KeycodeStringTest : public TestFixture {};
|
||||
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
// Copyright 2025 Google LLC
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// https://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#include "test_keymap.h"
|
||||
#include "quantum.h"
|
||||
|
||||
// clang-format off
|
||||
const keycode_string_name_t keycode_string_names_kb[] = {
|
||||
KEYCODE_STRING_NAME(MYMACRO1),
|
||||
};
|
||||
|
||||
const keycode_string_name_t keycode_string_names_user[] = {
|
||||
KEYCODE_STRING_NAME(MYMACRO2),
|
||||
KEYCODE_STRING_NAME(KC_EXLM),
|
||||
};
|
||||
// clang-format on
|
||||
@@ -0,0 +1,20 @@
|
||||
// Copyright 2025 Google LLC
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// https://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#pragma once
|
||||
|
||||
enum {
|
||||
MYMACRO1 = SAFE_RANGE,
|
||||
MYMACRO2,
|
||||
};
|
||||
Reference in New Issue
Block a user