Skip to content

Instantly share code, notes, and snippets.

View fauxpark's full-sized avatar

Ryan fauxpark

  • Australia
View GitHub Profile
@fauxpark
fauxpark / hires.diff
Created July 10, 2022 06:26
mouse report resolution multiplier
diff --git a/tmk_core/protocol/lufa/lufa.c b/tmk_core/protocol/lufa/lufa.c
index b4b03357a3..d183c4bcca 100644
--- a/tmk_core/protocol/lufa/lufa.c
+++ b/tmk_core/protocol/lufa/lufa.c
@@ -96,6 +96,10 @@ uint8_t keyboard_protocol = 1;
static uint8_t keyboard_led_state = 0;
static report_keyboard_t keyboard_report_sent;
+report_mouse_res_t mouse_res_report = {
+ REPORT_ID_MOUSE,
@fauxpark
fauxpark / keymap.c
Last active March 26, 2023 20:48
rawhid in python
#include <string.h>
// This function is called when a packet is received on the raw HID interface.
// `length` will always be the size of the output (host to device) report in bytes - 32 in current QMK, but will eventually be raised to 64.
// Thus, if you wish to send variable length data, you should send the length along with the payload, splitting across multiple reports
// if needed, and handle the parsing yourself.
//
// In this simple example, we check that the first byte of the received data is the ASCII character 'A',
// in which case we respond with 'B' and toggle the backlight.
void raw_hid_receive(uint8_t *data, uint8_t length) {
@fauxpark
fauxpark / applefn.patch
Last active June 14, 2024 05:46
QMK Apple Fn
diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk
index 18f8b0bbfc..4ef3e230e4 100644
--- a/builddefs/common_features.mk
+++ b/builddefs/common_features.mk
@@ -878,6 +878,10 @@ ifeq ($(strip $(JOYSTICK_ENABLE)), yes)
endif
endif
+ifeq ($(strip $(APPLE_FN_ENABLE)), yes)
+ OPT_DEFS += -DAPPLE_FN_ENABLE