Keyboard Mapping – Getting Calculator Button on Microsoft Sculpt Keyboard Working

keyboardmapping

I'm on a MacBook Pro using Microsoft's Ergonomic Sculpt Desktop (i.e. keyboard, mouse, and number pad). The Number Pad looks like this and as you can see has a Calculator button. Unfortunately, on Macos, it seems that Calculator button does nothing. I would have expected it to ideally have opened the Calculator app, but it does nothing.

Incidentally, I happen to use a separate tool called "Better Touch Tool" (similar to Karabiner I think) to remap certain keystrokes, and I thought that perhaps I could use this tool to map whatever button press this Calculator button generates to a custom action that would open the Calculator app. However, BTT doesn't even detect a key press at all when I press the Calculator button. I don't see that Microsoft has made any drivers for Mac for this keyboard available so does that mean I'm stuck?

Does that mean this button is just totally unusable on Macs?

Best Answer

If macOS isn't "seeing" the scan code then there's not much that can be done in mapping it - it's got to see it to map it.

There is a utility you can use that can verify if the keyboard is sending the code or not - xev. You'll need to run it in XQuartz which is an X11 environment.

Using the following command, you can get the output of each keypress

xev | grep -A2 --line-buffered '^KeyRelease' \
| sed -n '/keycode /s/^.*keycode \([0-9]*\).* (.*, \(.*\)).*$/\1 \2/p'

Below is some random keypresses on my wired Unix keyboard attached to my Mac. xev sample output XQuartz

I've used this to test and map Sun Microsystems Type 5, 6, and 7 keyboards on my Mac and can verify that it detected the extra keys. If xev can see it, it means that the scancode is being sent, it's just the HID kexts macOS uses are insufficient.

Can it be fixed?

That would be a software development question outside my and this site's scope.

Bottom Line

If it's not being detectable at all, it's unusable. If it is being detected, there's a chance of using it, but you'll need an application to see the keypress to utilize it.

(You might want to try ControllerMate)