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
missing constant for key "-"
- netmaestro
- PureBasic Bullfrog

- Posts: 8453
- Joined: Wed Jul 06, 2005 5:42 am
- Location: Fort Nelson, BC, Canada
Re: missing constant for key "-"
#VK_OEM_MINUS is working here for the other one, on Windows at least.
BERESHEIT
Re: missing constant for key "-"
Thank you, netmaestro. It works.netmaestro wrote:#VK_OEM_MINUS is working here for the other one, on Windows at least.
-
BorisTheOld
- Enthusiast

- Posts: 542
- Joined: Tue Apr 24, 2012 5:08 pm
- Location: Ontario, Canada
Re: missing constant for key "-"
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.)
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.)
For ten years Caesar ruled with an iron hand, then with a wooden foot, and finally with a piece of string.
~ Spike Milligan
~ Spike Milligan
