Implement mac utils for rditor.

parent 7920bbe9
#include "mac-util.h"
#import <Cocoa/Cocoa.h>
bool EditorMacUtil::isRussianLayout()
{
// TODO implement me!
NSTextInputContext * context = [NSTextInputContext currentInputContext];
if(context != nil)
return [[context selectedKeyboardInputSource] containsString:@"Russian"];
return false;
}
bool EditorMacUtil::isCapsLock()
{
// TODO implement me!
return false;
NSUInteger flags = [NSEvent modifierFlags] & NSDeviceIndependentModifierFlagsMask;
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