Page 1 of 1

missing constant for key "-"

Posted: Fri Nov 01, 2013 4:44 pm
by HarryT
I am trying to intercept the - key (minus) with the AddKeyboardShortcut() function.
But I can't find the #PB constant for this key. Is there none or was it just forgotten in the documentation?
#PB_Shortcut_Subtract works only for the numeric Keypad.

Any hints ?

Thanks,
Harry

Re: missing constant for key "-"

Posted: Fri Nov 01, 2013 4:50 pm
by netmaestro
#VK_OEM_MINUS is working here for the other one, on Windows at least.

Re: missing constant for key "-"

Posted: Fri Nov 01, 2013 7:36 pm
by HarryT
netmaestro wrote:#VK_OEM_MINUS is working here for the other one, on Windows at least.
Thank you, netmaestro. It works.

Re: missing constant for key "-"

Posted: Fri Nov 01, 2013 8:13 pm
by BorisTheOld
The best solution is to set up a small program to trap KeyUp events, and test each key in turn. You'll need to do this for each operating system that you use, as the key codes are sometimes different.

Some keys will give different values, depending on the OS and the state of the caps lock and shift key.

(Ooops! our power just went out, so I hope the microwave tower 10km away still has power. Our UPS system is keeping our own network and modem running, but we may have lost contact with the outside world.)