Block RAW mouse movement Input

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
KY REAPER
Posts: 1
Joined: 27 May 2023, 22:22

Block RAW mouse movement Input

Post by KY REAPER » 27 May 2023, 22:26

I am an Occupational Therapist working with a patient who has quadriplegia but had great head movement. He has Windows 11 and He wants to be able to hardcore game on his gaming laptop and we have been using an amazing head-mouse to allow him to easily navigate web pages. However, in order to play games like Halo or Call of Duty, he needs to be able to recenter his head without the mouse registering this movement.

I have successfully used a AHK script to temporarily disable mouse input with a keyhold using AutoHotKey:

Code: Select all

Rcontrol::
BlockInput, MouseMove
Loop
{
    Sleep, 10
    GetKeyState, state, Rcontrol, P
    if state = U  
        break
  
}
BlockInput, MouseMoveOff

return

Esc::ExitApp
This works great on desktops and even in game menus when paused, HOWEVER this does not work in game when aiming.. The mouse continues to move. I was told this is because the game relies on RAW INPUT so I would need to use something like Autohotinterception but I have no idea how to do this. Can anyone please walk me through this? or is there another way to block RAW mouse movement input that can be triggered by holding a key?


[Mod edit: Added [code][/code] tags. Please use them yourself when posting code.]

[Mod action: Topic moved from "Ask for Help (v2)" since this is v1 code.]

Return to “Ask for Help (v1)”