Implement mac utils for rditor.

parent 7920bbe9
#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