3
votes

I want to write an script that lets me enter a comma when I hit SHIFT + Numpad .

The modifier symbol for SHIFT is the plus sign +. I wrote this

+NumpadDot::
Send, ,
return

But I find this does not work. If I change the modifier to CTRL ^, it works as I expect.

^NumpadDot::
Send, ,
return

Why does my first script not work?

1

1 Answers

4
votes

This is specific to Numpad ., 0, 1, 3, 7, and 9. The reason for this is that shift + any of these keys results in a different button press; specifically del, ins, end, pg dn, home, and pg up respectively.

In your specific case, you can use NumpadDel::, but note that since you have to hold shift to activate it, anything you send will be modified with shift. Here's a workaround:

NumpadDel::
Send , {shift up}{,}{shift down}
return

Edit: Correction: this appears to be the case with all the Numpad keys. Rather obviously, 2, 4, 6, and 8 correspond to down, left, right, and up. I don't know what shift + Numpad5 is supposed to do. Maybe some enlightened soul could elucidate?