macOS: Fix Command-A in password fields

Install a macOS-specific secure text field hotkey handler so Command-A selects the full contents of password controls when Cocoa does not route the shortcut through wxWidgets accelerators. Keep the existing wxWidgets accelerator handler for Command-V and Command-A, and recognize the standard paste/select-all IDs when they do reach the C++ event path.

Add Objective-C++ compilation support for the macOS helper and include it in the GUI target only on macOS.

Fixes https://github.com/veracrypt/VeraCrypt/issues/1567
This commit is contained in:
Mounir IDRASSI committed 2026-05-28 17:18:47 +02:00
1 parent cfd54af700
commit 0caacd3405
5 files changed
+156 -5

No files matched your search

+20
View File
@@ -0,0 +1,20 @@
/*
Copyright (c) 2013-2025 AM Crypto. All rights reserved.
Governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/
#ifndef TC_HEADER_Main_MacOSXSecureTextFieldHotkeys
#define TC_HEADER_Main_MacOSXSecureTextFieldHotkeys
#ifdef TC_MACOSX
namespace VeraCrypt
{
void InstallMacOSXSecureTextFieldHotkeys ();
void UninstallMacOSXSecureTextFieldHotkeys ();
}
#endif
#endif // TC_HEADER_Main_MacOSXSecureTextFieldHotkeys