Keys not available to definehotkeys

Testing definehotkeys so I can replace my keydown procedure I’ve discovered that numbers on the keyboard don’t work (or I’m doing something wrong).

if I use this:
definehotkeys “database”,“CONTROL-SHIFT-3”,{message “Works”}

pressing Control-Shift and the 3 on the keyboard I get “#”

if I press the 3 on the keypad, I get the requested message.

I’ve been using the keyboard numbers for years with .Keydown. Have those keys been deprecated or taken over? What keys are available?

I just tried this and was able to duplicate your results. In fact, only two numbers seem to work, 1 and 7. I think there is a bug here, so I added it to the list.

Ok, I fixed this problem. If you are ambitious, you should be able to fix this yourself on your local copy rather than waiting for the next release.

Start by opening the source for the DEFINEHOTKEYS in the _PanoramaLib library. You can do this either with the View Organizer wizard or the Open View dialog.

At the bottom of this procedure, starting on line 133, a variable named HotKeyXLat is defined. Replace that code with the new code listed below (leave the rest of the code alone). Save the _PanoramaLib database and close the window. DEFINEHOTKEYS should now work with all numeric digits.

HotKeyXLat={ANYKEY¬*
A¬00
TAB¬30
M¬2E
Y¬10
COMMAND¬37
0¬1D
*¬43
FUNCTION9¬65
B¬0B
N¬2D
Z¬06
SPACE¬31
-¬1B
+¬4E
FUNCTION10¬6D
C¬08
O¬1F
7¬1A
[¬21
~¬32
=¬18
DASH¬45
F11¬67
D¬02
P¬23
]¬1E
1¬12
DELETE¬33
ESC¬35
ESCAPE¬35
F12¬6F
E¬0E
Q¬0C
;¬29
2¬13
\¬2A
FUNCTION1¬7A
FUNCTION13¬69
F¬03
R¬0F
‘¬27
3¬14
RETURN¬24
LEFT¬7B
FUNCTION2¬78
FUNCTION14¬6B
G¬05
T¬11
S¬01
,¬2B
4¬15
UP¬7E
FUNCTION3¬63
FUNCTION15¬71
H¬04
T¬11
.¬2F
5¬17
DOWN¬7D
FUNCTION4¬76
HOME¬73
I¬22
U¬20
/¬2C
6¬16
LEFT¬7B
ENTER¬34
ENTER¬4C
FUNCTION5¬60
PAGEUP¬74
J¬26
V¬09
SHIFT¬38
7¬A
RIGHT¬7C
CLEAR¬47
FUNCTION6¬61
PAGEDOWN¬79
K¬28
W¬0D
CONTROL¬3B
8¬1C
0¬52
=¬51
FUNCTION7¬62
END¬77
L¬25
X¬07
OPTION¬3A
9¬19
/¬4B
FUNCTION8¬64
HELP¬72}
rtn:

Thanks
Martin McCaffery
martinmc@knology.net

Made the code change. Now the Keyboard numbers work (which is what I was after), but the Keypad numbers don’t, though they used to.

Ok, I’ll have to dig out my old keyboard that has a numeric key pad.

I haven’t found my old keyboard with a numeric key pad. But I think I do have a fix, I’m hoping @martinmc or someone here with a numeric keypad can verify that it works. This requires an additional patch to the DEFINEHOTKEYS statement. First make sure you have applied the patch I gave yesterday (see above). Then change the end of the procedure from:

FUNCTION8¬64
HELP¬72}
rtn:

to:

FUNCTION8¬64
HELP¬72
KEYPAD0¬52
KEYPAD1¬53
KEYPAD2¬54
KEYPAD3¬55
KEYPAD4¬56
KEYPAD5¬57
KEYPAD6¬58
KEYPAD7¬59
KEYPAD8¬5B
KEYPAD9¬5C}
rtn:

Once this change is made, you should be able to set up hotkeys for keypad keys as shown before. Notice that keypad keys are set up separately from the regular number keys.

definehotkeys "global",
    "keypad1",{message "pressed key pad 1"},
    "1",{message "pressed regular number 1 key"}

That works.
FWI, tried it with a modifier and that works also:
definehotkeys “database”,“Control-Keypad3”,{message “Worked”}