Alt Codes not working on external usb numpad

If I have 2 keyboards, and I press ALT on one of them, while typing 230 on the other, I don’t get the resultant alt code µ. Is there some limitation in the USB HID spec that would cause this behaviour or is this possibly OS specific?

@ cyberh0me - How does everyone else do it?

Touch Keyboard :wink:

@ ianlee74 - Sigh, and what if I’m using a .netmf device that has 2 attached keyboards?

Apple is removing keys from their keyboards and you’re just adding more keyboards. Two different extremes of silly :wink: Now I’m curious what you’re doing that requires two keyboards?

@ ianlee74 - No, my college purchased a keypad because his keyboard doesn’t have one (like laptops). It was only after he plugged it in that we relized that we didn’t have ALT + code capability. We use special chars often. Also, it seems that we can’t use the numbers on the top row of the keyboard either, it has to be from a num pad. So we were wondering if this was because of the USB HID keyboard spec or a limitation of the OS.

Also, since I’m back to playing EVE online (an MMORPG) I really need macro keys, so I wanted to be able to attach more and more keypads to the computer (via a NETMF device of course) to have better control of my toon.

@ cyberh0me - Yes, I do value my time :smiley:

@ Mr. John Smith -

Looks like your not the only one with the problem.

https://answers.microsoft.com/en-us/windows/forum/windows_vista-hardware/cant-use-numpad-alt-codes-with-usb-keypad/4dd1b6d1-fc90-49cb-aff9-8c95df6c75af

Would this work for you?

@ willgeorge - I don’t think they have those keys. Interesting to note though. If they are on the laptop like that, then it could be because this functionality comes from the HID device and not windows itself.

I am pretty sure that the ALT key keycodes are generated by the HID (and pedantically, it’s not a HID device, that’s like an ATM machine :slight_smile: ). So holding ALT from a different keyboard and pressing numbers on the keypad is different to holding ALT and pressing numbers from the one device. I can’t recall where I saw that documented long long ago, but I remember thinking it mist have been accurate (it may have been on some legacy IBM website)

The HID spec specifies different codes for each of the many possible keys. Number pad numbers have different HID key codes than the normal numbers. It is left as an exercise to the consumer how to interpret the key codes. Windows does this by allowing users to select different languages, which means you can use an AZERTY keyboard and still get QWERTY. Windows requires the left ALT key (right ALT has a different key code) and number pad numbers to get special characters. The other method to get special characters (on Windows) is Character Map.

Here is the HID documentation. http://www.usb.org/developers/hidpage
Page 53 of the HID Usage Tables describes the codes for a keyboard

As to why the accessory number pad does not work, that could be because it used regular numbers or because it does not have a left alt, both are required (since alt is a modifier key and has to come in the same request as the key code).

1 Like

@ Frogmore - So it might have used the regular numbers Instead of the numpad keycodes. That should be easy enough to check.

This is why. You cant have Alt on one device modify input on another device.

Yeah, but you didn’t say why :wink:

2 Likes