Skip to content
⌘ NSIS Forum Archive

nsKeyHook plug-in

4 posts

Afrow UK#

nsKeyHook plug-in

Wrote this small plug-in so I could validate input of a product key in a client's installer. They've let me release it 🙂. You can handle WM_CHAR for example to only allow alphanumeric input and WM_PASTE to only allow paste of alphanumeric text. You can also handle WM_PASTE to automatically fill all product key fields (e.g. 5 text boxes for a 25 character product key).
Allows handling of WM_CHAR, WM_KEYDOWN, WM_KEYUP and WM_PASTE through NSIS script. WM_CHAR in particular can be used to validate input by
suppressing or allowing certain keystrokes.
See the example scripts and readme for more information.



Stu