Skip to content
⌘ NSIS Forum Archive

custom key functionality

7 posts

vRock67#

custom key functionality

How can you make some function run when a keyboard button is pressed in nsis setup.

For example: I don't want setup(made of NSIS) to quit when esc button is pressed, Instead i want to run some function.

Please help me ASAP.

Thank you in advance.
T.Slappy#
You need to recompile NSIS from sources - find keys behaviour routine and change it to your needs.
MSG#
Well maybe you could create a plugin that can handle this, but... that's about it, I'm afraid.
LoRd_MuldeR#
There is an easier way to prevent the abortion of the installer when the ESC key (or the "X" button) is pressed:
!define MUI_ABORTWARNING

(This of course will only work when your installer is using Modern UI. Otherwise write your own .onUserAbort function)