Mouse cursor disappears in Windows 11 When I plug an Xbox controller in?
Hi all, I'm not sure what I'm doing wrong here, but I would like to use an Xbox controller for the mouse cursor on A PC Every time I plug the controller into the HID remapper, the mouse cursor disappears in Windows 11
Disable "Unmapped inputs passthrough" before you plug the controller in.
There's a configuration that you can use as a starting point in the Examples tab.
(If you're using an Xbox controller you'll probably want to change input_state to input_state_scaled everywhere. I need to update this.)
OK i'm not sure what I did wrong but when I did that and then I tried plugging in the controller the mouse goes to the upper left hand corner of the screen and just sticks up there and I can't even move it with the mouse that is connected to the computer If I reload the firmware on the board will this reset it so that I can plug it in and program it further because if I plug it back in now even with the controller not plugged in the masses ghosted upper left corner and I cannot control it at all
No, it will remember the configuration if you flash the firmware again.
You can flash this file to wipe the board:
https://datasheets.raspberrypi.com/soft/flash_nuke.uf2
You will then have to flash the firmware again.
Hi will that firmware work on Adafruit Feather RP2040 with USB Type A Host thanks
The flash_nuke one? Yes.
On second thought, the Feather board has 8 MB of flash and flash_nuke might only clear the first 2 MB because that's how much a Pico has. And we're storing the configuration near the end of the flash.
If that doesn't work you can try this, it should wipe the entire flash:
https://github.com/Gadgetoid/pico-universal-flash-nuke/releases/download/v1.0.1/universal_flash_nuke.uf2
I have tried both of those files and it's still acting as it was before where the mouse cursor is just sticking up in the one corner is there anything else I could do to try to rescue this board
These nuke files take some time to do their thing so after copying them you have to wait until the RP2-RPI drive shows up, don't unplug the board.
You can also navigate the configuration website with keyboard and save a blank config to the device.
I don't know about Edge, but in Chrome you can do it with tab and perhaps arrow keys.
Hi I was able to use the keyboard and get into good profile Then once I made the change for the pass through I could hook up the joystick and look at it and the monitor Here are the values that I was seeing when I moved the joystick around
This is because Xbox controllers use a range of -32768..32767 for its sticks where most other controllers use 0..255.
It's not a problem in itself, but you need to change input_state to input_state_scaled everywhere in the expressions like I mentioned earlier.
If you're worried it will hijack your mouse again you can use the Caps Lock LED trick to try and maintain sanity:
https://www.youtube.com/watch?v=i3eKBoJzuIU
OK which profile would you start with?
Sorry, what?
What example from the HID remember website can I start with that would let me take the output from that joystick and turn it into mouse movement
"expressions: gamepad-to-mouse adapter"
Change input_state to input_state_scaled everywhere in the expressions.
OK here is
Expression one 0x00010030 input_state_scaled -128 add dup abs 10 gt mul 0.025 mul Expression two 0x00010031 input_state_scaled -128 add dup abs 10 gt mul 0.025 mul
When I moved the joystick the mouse pointer is not moving on the screen So my question is when you're working with expressions like this is there some way that I can output What input state scaling is showing me so I can see what values I'm getting to be able to figure out what math I need to do to get it to the correct values that I'm looking for to move the bass planer or how does this work
You can use something like this to send the current topmost value on the stack to the Monitor tab:
dup 0xffff0001 monitor
You can insert it at pretty much any point to peek into what's happening (for example after input_state_scaled). Use different hex numbers to monitor multiple values this way.
Do you have any idea why the expression posted above would not be moving the mouse pointer when I move the joystick?
It looks fine to me, in fact I just tested those expressions with an Xbox controller and it does move the mouse cursor for me.
(With Expression 1 mapped to Cursor X and Expression 2 mapped to Cursor Y.)
OK I have removed all of them mappings except for those two and the um expressions and I got it to work but I noticed that the mouse flies all over the screen because there's very little just sick my bed because the past while the joysticks are but it's doing like gigantic movements on the screen and if you if you try to do a phone joystick limit it actually starts flying and moving across the screen by itself so to adjust to adjust that out do I need your address the formula itself or do I start playing with the values in the scaling
You can adjust the numbers in the expression.
"10" is the deadzone and "0.025" is sensitivity.
Here's a better expression:
0x00010030 input_state_scaled
0x00010031 input_state_scaled
32 /* inner deadzone radius */
0 /* outer deadzone */
deadzone2
128 sub
0.025 /* sensitivity */
mul 2 store /* mouse Y */
128 sub
0.025 /* sensitivity */
mul 1 store /* mouse X */
It has both inner and outer deadzones and the deadzone formula works better - it still lets you make very small movements.
If you use this, change the mappings to have "Register 1" and "Register 2" as inputs, instead of "Expression 1" and "Expression 2".
Hi thanks One question if I wanted to slow down the mouse Where it says 0.25 would I just decrease that number And also I noticed the mouse cursor won't go off the top of the screen which is great but it does get lost on occasion at the bottom Is there something I can add in there that control how far down the screen it would go or to at least keep it from getting going past the bottom of the screen