mirror of
https://github.com/kanjitalk755/macemu.git
synced 2024-12-23 19:29:18 +00:00
Extra code to map cursor keys
This commit is contained in:
parent
cfca085155
commit
262c59442e
@ -261,13 +261,31 @@ static int prevFlags;
|
||||
- (void) keyDown: (NSEvent *) event
|
||||
{
|
||||
if ( [self processKeyEvent: event] )
|
||||
ADBKeyDown([event keyCode]);
|
||||
{
|
||||
int code = [event keyCode];
|
||||
|
||||
if ( code == 126 ) code = 0x3e; // CURS_UP
|
||||
if ( code == 125 ) code = 0x3d; // CURS_DOWN
|
||||
if ( code == 124 ) code = 0x3c; // CURS_RIGHT
|
||||
if ( code == 123 ) code = 0x3b; // CURS_LEFT
|
||||
|
||||
ADBKeyDown(code);
|
||||
}
|
||||
}
|
||||
|
||||
- (void) keyUp: (NSEvent *) event
|
||||
{
|
||||
if ( [self processKeyEvent: event] )
|
||||
ADBKeyUp([event keyCode]);
|
||||
{
|
||||
int code = [event keyCode];
|
||||
|
||||
if ( code == 126 ) code = 0x3e; // CURS_UP
|
||||
if ( code == 125 ) code = 0x3d; // CURS_DOWN
|
||||
if ( code == 124 ) code = 0x3c; // CURS_RIGHT
|
||||
if ( code == 123 ) code = 0x3b; // CURS_LEFT
|
||||
|
||||
ADBKeyUp(code);
|
||||
}
|
||||
}
|
||||
|
||||
static NSPoint mouse; // Previous/current mouse location
|
||||
|
Loading…
Reference in New Issue
Block a user