Created
December 16, 2025 15:57
-
-
Save ipetepete/8e16349bd1d4187b4aac95de1814e4dd to your computer and use it in GitHub Desktop.
Snipe mode for QMK pointer devices
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| bool process_record_user(uint16_t keycode, keyrecord_t* record) { | |
| switch (keycode) { | |
| /* | |
| Next steps allow any key i.e. KC_NO to be assigned with Via or | |
| Remap-keys etc and return tap for the original assigned key | |
| */ | |
| case LT(0,KC_G): { | |
| // intercept hold | |
| // Snipe Mode - slow down pointer while held | |
| if (!record->tap.count && record->event.pressed){ | |
| pointing_device_driver_set_cpi(2); | |
| return false; // don't continue processing key | |
| }else{ // release | |
| pointing_device_driver_set_cpi(10); | |
| return true; // continue to process | |
| } | |
| // default - allow processing of key press/tap | |
| return true; | |
| } | |
| } | |
| return true; | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment