Suggestion/idea: Could XMBC "remap" keycodes

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.
NOTE: To reduce spam, new users can not post links, files or images until they have at least 4 posts.
Post Reply
Taurondir
New User
Posts: 1
Joined: Fri Feb 21, 2020 1:03 pm

Suggestion/idea: Could XMBC "remap" keycodes

Post by Taurondir »

Ok, so I'm trying to go from brain to paper here and my brain works weird, so please be patient as I try to explain what I mean. Now, this is just a very vague idea/suggestion/question that has gone through my head at 3:10 AM because my cat wont let me sleep. I have ZERO idea if what I'm writing is possible or makes sense, so ... grain of salt here.

Ok, so, we all agree that you cant map higher mouse buttons over 5 because of Windows limits and the fact that since Microsoft cant even be bothered to redo drivers for their OWN hardware (I have old-er MS keyboards with special keys that work in Win8 but break in Win10), but COULD a program like XMBC intercept normal keyboard keycodes as well, and remap those to switching profiles on the fly?

Example:
We pick a bunch of "out of the way" keycodes, lets say Num0 to Num9, which apparently are raw keycodes 96 to 105, and we (users at home) all go into our "mouse brand provider software suites" (ie Synapse for Razer) and we all map the extra mouse buttons, in order, to just return on a click, a matching Num1 to Num9, so for my Naga Trinity with the circly buttons 1-7 I would just set in ONE generic profile to return Num1 (keycode 97) when I hit "button #1" and Num7 (keycode 103) when I hit "button #7" on the side wheel.

If XMBC had a setting to always respond and intercept specific keycodes for its own re-mapping (I mean, you could map F1 to F12 but Function keys are often used AND hardwired by games, while offhand I cant think of any games that have hardwired Num# keys in them), then it would be a very kludgy way to work around the 5 mouse button limitation?

So in short:
I would tap Button #5 on my mouse - this of course could normally do ANYTHING because those type of buttons are handled by whatever software your mouse came with - but because I have "my mouse software" just spit out "Num5", also known as "Keycode 101" when I hit "Button #5", XMBC is watching all the Num# keycodes, so it intercept that, and then handles it internally based on however you have set it in XMBC, in just the same way it would handle a "normal" mouse button in the 1-5 range.

I guess? that a similar thing could be done with a Macro software package that can detect Window Names and switch bindings on the fly? but XMBC is already SO good and easy to use, and I thought that maybe adding the ability to watch for specific keycodes to intercept might be trivial? but seriously I have no idea. I'm just saying that keeping the functionality in ONE package would be awesome.

Also, I think I can hear people screaming "but if you have synapse, why bypass it to use XMBC?". Well, Synapse is a bloated piece of garbage and XMBC is multiple orders of magnitude better at detecting profile changes, switches instantly and not ... ... ... A FEW SECONDS LATER, and managing all the profiles does not cause you to punch your computer screen. If I could just set Synapse ONCE (with a single Num# fixed mapping) and then never touch it again? It would still be one dive into Synapse too many.
User avatar
phil
Site Admin
Posts: 7627
Joined: Sun Apr 06, 2003 11:12 pm

Re: Suggestion/idea: Could XMBC "remap" keycodes

Post by phil »

In theory I guess its possible - but XMBC is for mapping mouse buttons - it does not do keyboard keys = problem.
Unfortunately I'm not about to go adding remapping keyboard keys to custom actions (primarily because of the amount of effort involved and lack of time I have - the GUI work alone would be immense (actually that's the most difficult bit!))

You could use something like Autohotkey to do this - and write as many macros as you desire to handle as many keys...

Also remapping to a number pad key (I would think) would be a problem because they are commonly used - especially when gaming - so you could get stuck trying to find keys that were not common used - or not physically on the keyboard. And there is also a (small) chance (depending on how the synapse software works) that the keys are not detectable by Windows hooks which would render the whole exercise fruitless.

I know that kind'a avoids the point of using XMBC because it is the easy thing to do - but frankly, adding that to XMBC would bulk it up, slow it down (somewhat) and make more complex anyway.
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9/G604/M720/MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, AMD Ryzen 5900x, MSI x570 Tomahawk, 32GB DDR4,
nVidia RTX 2070s, Evo 970 1Tb NVME, 2x2TB WD Black (RAID1)
Post Reply