Commit 1103a335 authored by Victor Yacovlev's avatar Victor Yacovlev

Merge branch 'master' into 'master'

Implement mac utils for editor.

See merge request !3
parents 7920bbe9 1702fc7e
Pipeline #881 failed with stages
in 15 minutes and 31 seconds
#include "mac-util.h" #include "mac-util.h"
#import <Cocoa/Cocoa.h>
bool EditorMacUtil::isRussianLayout() bool EditorMacUtil::isRussianLayout()
{ {
// TODO implement me! NSTextInputContext * context = [NSTextInputContext currentInputContext];
if(context != nil)
return [[context selectedKeyboardInputSource] containsString:@"Russian"];
return false; return false;
} }
bool EditorMacUtil::isCapsLock() bool EditorMacUtil::isCapsLock()
{ {
// TODO implement me! NSUInteger flags = [NSEvent modifierFlags] & NSDeviceIndependentModifierFlagsMask;
return false; return flags & NSAlphaShiftKeyMask;
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment