How to Stop Closing Application when Ctrl+Q is Executed? #1413
Answered
by
BDisp
ichan-akira
asked this question in
Q&A
-
Pretty much the same question as #633 but now for Ctrl+Q: How can I prevent the console application from closing when |
Beta Was this translation helpful? Give feedback.
Answered by
BDisp
Aug 4, 2021
Replies: 2 comments 4 replies
-
Try this: Application.Top.KeyPress += (e) => {
if (e.KeyEvent.Key == (Key.CtrlMask | Key.Q)) {
// Do nothing and return true
e.Handled = true;
}
}; |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
ichan-akira
-
Is a different question. On old versions and on all OS, pressing Ctrl+C forces the application to close. Then I added flags to respective drivers to avoiding that. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Try this: