Request: simulate button on press and other on release

x64 Replacement/Alternative to Microsoft's IntelliMouse application.
Forum rules
Please read the forum rules before posting for the first time.
The more information you can provide, the quicker and more accurately someone can help.
Post Reply
Rokas1997
New User
Posts: 5
Joined: Wed Feb 22, 2012 11:11 am

Request: simulate button on press and other on release

Post by Rokas1997 » Wed Feb 22, 2012 2:35 pm

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 ^.^

User avatar
phil
Site Admin
Posts: 5871
Joined: Sun Apr 06, 2003 11:12 pm

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

Post by phil » Wed Feb 22, 2012 3:43 pm

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
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9, Logitech MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, Intel i5-9600k, Asus Z390-ROG, 16GB DDR4,
nVidia GeForce GTX 970, Evo 970 500Gb NVME, 2x2TB WD Black (RAID1)

Rokas1997
New User
Posts: 5
Joined: Wed Feb 22, 2012 11:11 am

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

Post by Rokas1997 » Wed Feb 22, 2012 3:53 pm

Oh... Layer changing in Simulating string would be great ex. : {Layer1}, {Layer2} that are supposed to be at end of simulating string.

User avatar
phil
Site Admin
Posts: 5871
Joined: Sun Apr 06, 2003 11:12 pm

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

Post by phil » Wed Feb 22, 2012 7:09 pm

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
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9, Logitech MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, Intel i5-9600k, Asus Z390-ROG, 16GB DDR4,
nVidia GeForce GTX 970, Evo 970 500Gb NVME, 2x2TB WD Black (RAID1)

Rokas1997
New User
Posts: 5
Joined: Wed Feb 22, 2012 11:11 am

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

Post by Rokas1997 » Thu Feb 23, 2012 4:04 pm

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 :)

User avatar
phil
Site Admin
Posts: 5871
Joined: Sun Apr 06, 2003 11:12 pm

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

Post by phil » Thu Feb 23, 2012 9:29 pm

I'll add it to the to investigate list for CS:s - I'll have to dust off my steam account lol.
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9, Logitech MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, Intel i5-9600k, Asus Z390-ROG, 16GB DDR4,
nVidia GeForce GTX 970, Evo 970 500Gb NVME, 2x2TB WD Black (RAID1)

Rokas1997
New User
Posts: 5
Joined: Wed Feb 22, 2012 11:11 am

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

Post by Rokas1997 » Fri Feb 24, 2012 5:26 pm

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 :)

User avatar
phil
Site Admin
Posts: 5871
Joined: Sun Apr 06, 2003 11:12 pm

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

Post by phil » Fri Feb 24, 2012 5:36 pm

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
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9, Logitech MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, Intel i5-9600k, Asus Z390-ROG, 16GB DDR4,
nVidia GeForce GTX 970, Evo 970 500Gb NVME, 2x2TB WD Black (RAID1)

Post Reply