From 06a36824ad7e964c41e10e49780dd220ae573a95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=83=95=E3=82=A3=E3=83=AB=E3=82=BF=E3=83=BC=E3=83=9A?= =?UTF-8?q?=E3=83=BC=E3=83=91=E3=83=BC?= <76888457+filterpaper@users.noreply.github.com> Date: Sun, 9 Jul 2023 18:05:45 +0800 Subject: [Docs] Squeeze AVR with simplified magic config functions (#21477) --- docs/squeezing_avr.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'docs') diff --git a/docs/squeezing_avr.md b/docs/squeezing_avr.md index ce9e43cdae..d5ced57382 100644 --- a/docs/squeezing_avr.md +++ b/docs/squeezing_avr.md @@ -88,6 +88,21 @@ Or if you're not using layers at all, you can outright remove the functionality #define NO_ACTION_LAYER ``` +## Magic keycodes + +There are two `__attribute__ ((weak))` placeholder functions available to customize magic keycodes. If you are not using that feature to swap keycodes, such as backslash with backspace, add the following to your `keymap.c` or user space code: +```c +uint16_t keycode_config(uint16_t keycode) { + return keycode; +} +``` +Likewise, if you are not using magic keycodes to swap modifiers, such as Control with GUI, add the following to your `keymap.c` or user space code: +```c +uint8_t mod_config(uint8_t mod) { + return mod; +} +``` +Both of them will overwrite the placeholder functions with a simple return statement to reduce firmware size. ## OLED tweaks -- cgit v1.2.3