mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-04-04 21:17:43 +03:00
Implement Caps Lock warning
This commit is contained in:
parent
596d2cf425
commit
d9214db404
12 changed files with 122 additions and 22 deletions
|
@ -19,6 +19,9 @@
|
|||
#include "MacUtils.h"
|
||||
#include <QApplication>
|
||||
|
||||
#include <CoreGraphics/CGEventSource.h>
|
||||
|
||||
|
||||
QPointer<MacUtils> MacUtils::m_instance = nullptr;
|
||||
|
||||
MacUtils::MacUtils(QObject* parent)
|
||||
|
@ -85,3 +88,8 @@ bool MacUtils::enableScreenRecording()
|
|||
{
|
||||
return m_appkit->enableScreenRecording();
|
||||
}
|
||||
|
||||
bool MacUtils::isCapslockEnabled()
|
||||
{
|
||||
return (CGEventSourceFlagsState(kCGEventSourceStateHIDSystemState) & kCGEventFlagMaskAlphaShift) != 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue