Where can I get complete list of the xml key codes and their keyboard keys?

Questions and answers about 3Dconnexion devices on Windows.

Moderator: Moderators

Post Reply
Framed_Previz90
Posts: 19
Joined: Sat May 23, 2020 8:31 pm

Where can I get complete list of the xml key codes and their keyboard keys?

Post by Framed_Previz90 »

Around November last year, I asked Jwick if he could provide me a Global.xml file for use with the Space Mouse Wireless product, the request can be found HERE.

Today I actually found that file in my junk mail and to my surprise it works exactly as I requested. So thank you allot for that!

In the original file, as requested, only one of the axis has keyboard keys mapped to it. I want to expand upon it and map all the other axis to keyboard keys.

I can do this perfectly fine on my own and its something I plan to change again and again in the future.

The issue I am having is that I don't have a list of what the key codes printed in the axis <key> element corresponds to. The following is a sample from the Global.Xm file:

Code: Select all

    <Input>
	<ActionID>HIDMultiAxis_Z</ActionID>
	<Min>-512</Min>
	<Max>0</Max>
	<Deadband>200</Deadband>
    </Input>
    <Output>
	<ActionID>KB_Keystroke</ActionID>
	<RepeatStyle>PressAndHold</RepeatStyle>
	<KeyStroke>
	  <Key>3B</Key>
	</KeyStroke>
    </Output>
<Key>3B</Key> corresponds to keyboard key F1 / F2. Where can I get other key codes for other keyboard keys?
This is not really just for a specific key, I would really like a full list of supported keyboard keys for use with the puck, for my own future reference.

The tests I performed using the GUI to generate Xml key codes, only seem to work with Space Mouses physical keys and not with the puck.

Any help on this or simply pointing me in the right direction would be greatly appreciated
Phil999
Posts: 425
Joined: Tue Jun 30, 2009 5:20 am

Re: Where can I get complete list of the xml key codes and their keyboard keys?

Post by Phil999 »

I think this is called 'HID code table' what you are looking for. HID stands for Human Interface Device.

This is a good resource for HID codes: https://gist.github.com/MightyPork/6da2 ... 55fdc73db2

But there are others sources, printable, as pdf. And you are right, one can expand the possibilities for non-3D software, and use the cap for keyboard shortcuts, mouse scrolling, timeline transport, etc.

You might also be interested in the old beta forum. There are many good tips and tricks to be found, also from jwick. However, the xml code from that time was slightly different, but many parts of the xml structure are still the same.

https://forum.3dconnexion.com/viewforum.php?f=35
Space Navigator x2, Space Pilot, Space Pilot Pro, SpaceMouse Enterprise
jwick
Moderator
Moderator
Posts: 3341
Joined: Wed Dec 20, 2006 2:25 pm
Location: USA
Contact:

Re: Where can I get complete list of the xml key codes and their keyboard keys?

Post by jwick »

You can also use our GUI to record a macro for your keyboard. Even if you don't need that macro, it will write the correct KeyCode for your keyboard into the XML file.

That is a ButtonAction, not directly useful for an Axis. But it will at least tell you the correct key.

Unfortunately, the keys are not as independent from the keyboard layout as I had hoped.
Framed_Previz90
Posts: 19
Joined: Sat May 23, 2020 8:31 pm

Re: Where can I get complete list of the xml key codes and their keyboard keys?

Post by Framed_Previz90 »

Phil999 wrote: Thu Apr 13, 2023 7:42 pm I think this is called 'HID code table' what you are looking for. HID stands for Human Interface Device.

This is a good resource for HID codes: https://gist.github.com/MightyPork/6da2 ... 55fdc73db2

But there are others sources, printable, as pdf. And you are right, one can expand the possibilities for non-3D software, and use the cap for keyboard shortcuts, mouse scrolling, timeline transport, etc.

You might also be interested in the old beta forum. There are many good tips and tricks to be found, also from jwick. However, the xml code from that time was slightly different, but many parts of the xml structure are still the same.

https://forum.3dconnexion.com/viewforum.php?f=35
Hey Thanks allot for the links, much appreciated. The last one will certainly be usefull, as I go deeper into this project of mine.
jwick wrote: Fri Apr 14, 2023 12:48 am You can also use our GUI to record a macro for your keyboard. Even if you don't need that macro, it will write the correct KeyCode for your keyboard into the XML file.

That is a ButtonAction, not directly useful for an Axis. But it will at least tell you the correct key.

Unfortunately, the keys are not as independent from the keyboard layout as I had hoped.
Perfect! so thats what I needed to use. It also gives me the correct key codes for mouse keys such as, Mouse wheel up.
Thank you for all your help. This will prove to be monumental to my work
Post Reply