-
-
Notifications
You must be signed in to change notification settings - Fork 112
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
80 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
mac/KeymanEngine4Mac/KeymanEngine4Mac/CoreWrapper/CoreKey.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* | ||
* Keyman is copyright (C) SIL International. MIT License. | ||
* | ||
* Created by Shawn Schantz on 2024-09-20. | ||
*/ | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
@interface CoreKey : NSObject | ||
@property (nonatomic, readonly) NSUInteger keyCode; | ||
@property (nonatomic, readonly) NSUInteger keyModifiers; | ||
-(instancetype)init:(NSUInteger)code modifiers:(NSUInteger)modifiers; | ||
@end | ||
|
||
NS_ASSUME_NONNULL_END |
23 changes: 23 additions & 0 deletions
23
mac/KeymanEngine4Mac/KeymanEngine4Mac/CoreWrapper/CoreKey.m
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/* | ||
* Keyman is copyright (C) SIL International. MIT License. | ||
* | ||
* Created by Shawn Schantz on 2024-09-20. | ||
* | ||
* A value object to represent a keycode and modifier pair. | ||
* This corresponds to the km_core_keyboard_key struct returned by Core. | ||
*/ | ||
|
||
#import "CoreKey.h" | ||
|
||
@implementation CoreKey | ||
-(instancetype)init:(NSUInteger)code modifiers:(NSUInteger)modifiers { | ||
self = [super init]; | ||
if (self) { | ||
_keyCode = code; | ||
_keyModifiers = modifiers; | ||
} | ||
return self; | ||
} | ||
|
||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters