Page 1 of 1

Request: simulate button on press and other on release

Posted: Wed Feb 22, 2012 2:35 pm
by Rokas1997
Hello, I've tried to make "Precision mode" button (its mainly for First Person Shooter games like CS:S). Goal is to make mouse sensitivity lower on botton hold and after release to make it normal back on CS;S, so I did it but in a really messy way... First I did binded [ and ] on sensitivity in CS:S :

Code: Select all

Bind "[" "Sensitivity 3"
Bind "]" "Sensitivity 6"
. Then I tried to make [ on mouse button hold and ] on release... That was a mess! http://img849.imageshack.us/img849/3408/xmouse2.png and http://img442.imageshack.us/img442/2863/xmouse.png . It is working very well in notepad, but in game {CTRL}{SHIFT}{ALT}y is recognised as buttons, so layer doesn't change and I get only low sensetivity, no back... So please make it, it have very high potencial in games! Turning every mouse to a gaming one would be awesome! To make it probably would need new "Simulating mode" or {Layer2} and {Layer1} function... Thanks for reading and sorry for my awful English ^.^

Re: Request: simulate button on press and other on release

Posted: Wed Feb 22, 2012 3:43 pm
by phil
So you want to send one sequence on key down, and a different one on release, or you want the layer switching to work in game?

The first option is a massive change, and you might be better off using some more powerful scripting engine like Auto Hotkey.

The second option, is probably a case of choosing a layer modifier key that does work. I understand that the game captures some keys - but all of them? I will have to fire up CS:S and have a look - at least its a game I have so I can see if there is a work around.

Thanks,
Phil

Re: Request: simulate button on press and other on release

Posted: Wed Feb 22, 2012 3:53 pm
by Rokas1997
Oh... Layer changing in Simulating string would be great ex. : {Layer1}, {Layer2} that are supposed to be at end of simulating string.

Re: Request: simulate button on press and other on release

Posted: Wed Feb 22, 2012 7:09 pm
by phil
Thats not really what I was getting at - but it might be another solution...

There is already some support for switching layers form simkeys. It might work but it is undocumented BECAUSE I expect it to produce unstable results.

In Sim keys you should be able to put {Layer1} .. {Layer5} etc. to switch to that layer.
I think thats the right syntax but as Im not at home in front of the code I cant be sure right now.

Phil

Re: Request: simulate button on press and other on release

Posted: Thu Feb 23, 2012 4:04 pm
by Rokas1997
Thanks this is awesome! :) It works! Now I'll test it on CS:S

EDIT: It doesn't work on CS:S, or I just messed up something, that Xmouse doesnt work on CSS anymore :D, anyway its greate that {Layer1} and {Layer2} works :)

Re: Request: simulate button on press and other on release

Posted: Thu Feb 23, 2012 9:29 pm
by phil
I'll add it to the to investigate list for CS:s - I'll have to dust off my steam account lol.

Re: Request: simulate button on press and other on release

Posted: Fri Feb 24, 2012 5:26 pm
by Rokas1997
Hey, Phil. I found out that it does works perfect in CS:S. Very thank you! The problem was that I had added a profile for CS:S and unchecked it :D. Sorry for my dumbness :D So as it works now, every mouse now can be gaming :)

Re: Request: simulate button on press and other on release

Posted: Fri Feb 24, 2012 5:36 pm
by phil
Great :)

I'm glad I could help without having to make any code changes :) You have a request from another user here (I cant remember who) to thank for the {Layerx} sim keys - maybe it is worth documenting them in the future but I still think it may be a potentially dangerous thing to do because you could, in theory key it all confused and stuck on the wrong layer - that is the disadvantage of flexibility lol!

Thanks,
Phil