Fix iOS/macOS keycode handling regression for textoverlay example, update and use keycodes.hpp defines for iOS/macOS
This commit is contained in:
parent
8080b7a91b
commit
a1e19ea5de
5 changed files with 43 additions and 49 deletions
|
|
@ -91,13 +91,13 @@ MVKExample* _mvkExample;
|
|||
// SRS - Handle keyboard events
|
||||
-(void) keyDown:(NSEvent*) theEvent {
|
||||
NSString *text = [theEvent charactersIgnoringModifiers];
|
||||
unichar keychar = (text.length > 0) ? [text characterAtIndex: 0] : 0;
|
||||
unichar keychar = (text.length > 0) ? [text.lowercaseString characterAtIndex: 0] : 0;
|
||||
_mvkExample->keyDown(keychar);
|
||||
}
|
||||
|
||||
-(void) keyUp:(NSEvent*) theEvent {
|
||||
NSString *text = [theEvent charactersIgnoringModifiers];
|
||||
unichar keychar = (text.length > 0) ? [text characterAtIndex: 0] : 0;
|
||||
unichar keychar = (text.length > 0) ? [text.lowercaseString characterAtIndex: 0] : 0;
|
||||
_mvkExample->keyUp(keychar);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue