Shortcuts using external numeric keypad

First of all, thanks for this fantastic tool. I love TotalSpaces2 and I cannot work without it.

I bought an external numeric keypad for my MacAir. I’d like to associate each number of the external keypad to a desktop. It does not allow me to record any number of the external keypad as shortcut. With or without a modifier.
I can record Alt-1 using “1” form the MacAir’s keyboard, but I cannot record Alt-1 using “1” form the external keyboard.
The best scenario for me was if I could record external keys without any modifier as shortcuts. I want to use the external keypad only to change the desktop. Eventually I will paint logos on the keys to replace numbers.

Thanks for your assistance

It’s possible that TotalSpaces2 is seeing the keypresses, but is ignoring it because it’s not recognised as something valid.

What kind of external keypad are you using? - maybe I can get some clues as to how to fix this if I google it.

Hi, thank you for your support.

It is a generic USB numeric keypad I bought at ebay from a Chinese supplier.
There it is: http://m.tinydeal.com/en/product/MCSAITE-SK-51AG-18-key-Wireless-Numeric-Keypad-24GHz-Keyboard-p-144038

System Info shows:
2.4G Keyboard Mouse:

Product ID: 0x4101
Vendor ID: 0x062a (ProVision Technology, Inc.)
Version: 1.07
Speed: Up to 12 Mb/sec
Manufacturer: MOSART Semi.
Location ID: 0x14100000 / 7
Current Available (mA): 500
Current Required (mA): 100

Thanks!

I don’t find any technical info on that particular keypad. But no matter.

As far as I can see from the shortcut code, we should allow any keypress provided there is a modifier present (e.g. alt).

So this leads me to suspect that we just aren’t seeing the keypress events. Do you know if you can use the keypad to set hotkeys in other apps (e.g. if you have Alfred or some other app that uses global shortcuts).

I did use ControllerMate to do a workaround: http://www.orderedbytes.com/controllermate/

But it does not work well because it does not consume the key pressed. For example, if I press 1, it runs the script I have created but still type 1 on the focused application.

So, answering your question, keypress events are being generated, but for some reason, they are not recognized by TotalSpaces2.

Is there any way to help you debug this? Any log, and debug mode, or something like that?

Tks

You might try running this app that will set up a monitor on all your keyboard events and report both the keycode and modifier keys for each keypress.

Send me a screenshot of what you get when using your keypad (if anything).

http://downloads.binaryage.com/KbdEventTest.app.zip

That’s what I get:

      Code        |    Key
K:0059 M:200100   | Keypad #7
K:005B M:200100   | Keypad #8
K:005C M:200100   | Keypad #9
K:0056 M:200100   | Keypad #4
K:0057 M:200100   | Keypad #5
K:0058 M:200100   | Keypad #6
K:0053 M:200100   | Keypad #1
K:0054 M:200100   | Keypad #2
K:0055 M:200100   | Keypad #3
K:0052 M:200100   | Keypad #0
K:0041 M:200100   | Keypad ./del
K:004C M:200100   | Keypad Enter
K:0047 M:800100   | Keypad NumLock
K:004B M:200100   | Keypad /
K:0043 M:200100   | Keypad *
K:0033 M:000100   | Keypad BackSpace

Ok, thanks. Would it be correct to say that pressing ALT-Keypad #7 generates this?

K:0059 M:280100

I have just simulated this keypress, and TotalSpaces2 appeared to record it as a hotkey ok, so I’m a bit puzzled why it doesn’t do that for you.

No. I just pressed Keypad #7.
Do you want me to press ALT-Keypad #7 to see what happens?

I will record the screen using screenflick to show you.
But only tomorrow because the keypad is at the office.

Yes, from my experiments I see no reason why ALT-Keypad 7 cannot be recorded by TotalSpaces2. Please test that, both with the Keyboard test app (so I can check what code I think it should be sending) and as a hotkey in TS2.

This is how it goes:

When I press (keyboard) ALT, I get:

K003 M:080120 - on key press
K003 M:000100 - on key release

When I press (keyboard) 0, I get:

K:001D M:000100 - on key press

When I press (keyboard) ALT-0, I get:

K:003A M:080120 - on ALT key press
K:001D M:080120 - on 0 key press
K:003A M:000100 - on ALT key release

When I press (keypad) 0, I get:

K:0052 M:200100 - on 0 key press

When I press (keyboard) ALT + (keypad) 0, I get:

K:003A M:080120
K:0052 M:200100
K:003A M:000100

I made a small .mov showing two cases:

1 - pressing keyboard-ALT + keyboard-0
2 - pressing keyboard-ALT + keypad-0

The link is: https://www.dropbox.com/s/3igincxamub5raw/keypaderror.mov?dl=0

I hope it helps…
Tks!

Hi!

Thank you, that’s cleared everything up.

The modifier flags are 200100 when pressing Keypad 0, and 200100 when pressing ALT-Keypad 0. So clearly the modifier key (the ALT key in this case) is not having any effect whatsoever on the keypad. This is why you can’t record hotkeys using it - the events being sent just do not include the modifier keys.

However, the events do include the numeric keypad flag (that’s the 2 a the beginning). What I can do is to allow events with this flag set as hotkeys. Then the keypad can act as hotkeys (but it will make no difference if you hold down any modifier keys or not).

If that’s what you wish, I can make you a build of TotalSpaces2 that does this.

It would be great if you could release this feature: keys with numeric keypad flag as hotkeys to switch between desktops.

I found out that key keypad is the TotalSpace2 best friend:

I’ve been working using the ControllerMate workaround but it is not good.
As soon as you release the new version, I will print icons for each key. Maybe 3D-print new keys. Who knows…

Tks!

Hi… Thanks for the pic :smile:

I have made a build of TotalSpaces2 which just might work for you. The Apple hotkey API doesn’t seem to fully understand the Keypad modifiers, but let’s see if it works anyway.

You may download it here:

http://downloads.binaryage.com/TotalSpaces2-2.2.22.dmg

Worked like a charm!
Perfect! Beautiful! Many thanks!

My dream is to have TotalSpaces integrated with this: http://www.artlebedev.com/everything/optimus/aux/

I dream with a TotalSpaces where I can define an icon for each space and it is automatically assigned to the corresponding key on the optimus keypad.

Thanks again!

Great that it works. Yeh, those Optimus products were really interesting.
In the mean time, I guess you have to print some key stickers!