1
I’m developing a system that has some functions (e.g., F12 -> Close the system). In the system has the form of parameters, and in this form I would like the client to choose which shortcut for each function. detail: each function is a method in the source code, so I just need to reference a shortcut to a method at runtime.
if(e.keycode == Keys.F12)
{
FecharSistema();
}
This code and how the system works today, but now has a form settings where it would be possible to change the shortcut from F12 to F10. In short, let the customer choose which function will be in each key. Currently F1 - Opens the box, F2 - starts a sale, F12 - Closes the system. But each customer wants the shortcut in different buttons. A form has been developed where it is possible for the user to choose which key to perform each function.
How to change the code so that the shortcut is customizable?
Ué, change the if and ready.
if(e.keycode == TECLA_DE_FECHAR_O_SISTEMA)
.– hugomg
I can’t change the code because I can’t guess which key the client will choose. Each one wants a different shortcut, the system is customizable!
– user18748