Forum

> > Off Topic > Can't set additional mouse buttons
Forums overviewOff Topic overviewLog in to reply

English Can't set additional mouse buttons

5 replies
To the start Previous 1 Next To the start

old Can't set additional mouse buttons

Assassin moder
User Off Offline

Quote
Hello,

I hav a A4Tech X-755FS mouse and any Oscar Software don't work on it also attached on CD Smart-X7 Software don't support Win 7. Is any other way to set side buttons? I've trtied X-Mouse Button Control but it doesn't work well.

old Re: Can't set additional mouse buttons

VADemon
User Off Offline

Quote
Mouse button support is limited to the OS, afaik. So only the mouse software will recognize these buttons. My tip: set these mouse buttons (in the delivered driver/software) to some key combinations like "Ctrl+Shift+2" so you can still use them in some games (like MMORPGs)

old Re: Can't set additional mouse buttons

TimeQuesT
User Off Offline

Quote
[Only when you know cpp]
When you include "windows.h" in c++, you get access to the function "GetAsyncKeyState". Loop like this:
1
2
3
4
5
6
7
for (int i = 0; i < 256; i++)
{
	if (GetAsyncKeyState(i))
	{
		std::cout<<"Key: "<<i<<std::endl;
	}
}

to find out what "Keys" are sent when pressing the mouses extra buttons.
After you've done that you can just check if they have been triggered in something like a background service. From here you can simulate other key strokes then.

Edit: Functions you need:
keybd_event - To simulate key strokes
GetAsyncKeyState - To Check if a key was pressed.

Could look like this >


edit²:
Actually does GetAsyncKeyState only receives if the key is currently pressed. You have to detect if the key goes up again.
edited 2×, last 06.06.14 01:23:54 pm
To the start Previous 1 Next To the start
Log in to replyOff Topic overviewForums overview