summaryrefslogtreecommitdiffstats
path: root/src/newt/native/NewtMacWindow.h
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2012-10-28 05:44:24 +0100
committerSven Gothel <[email protected]>2012-10-28 05:44:24 +0100
commitcf9a4e236891ce2f6d9469a017e880eed704dea0 (patch)
treedd4a4a9ba0709dfe00c99931eafaf93f90466966 /src/newt/native/NewtMacWindow.h
parent70d58b030bdbac98ba592a3a14a84cc0e4941c51 (diff)
Fix NEWT KeyCode: Basic KeyCode Validation on X11, Windows and OSX
- X11: Add VK_QUOTE mapping - OSX: Add single shift, ctrl alt key press; Fix mapping: Command -> Windows, Option -> ALT, add BACK_QUOTE and QUOTE.
Diffstat (limited to 'src/newt/native/NewtMacWindow.h')
-rw-r--r--src/newt/native/NewtMacWindow.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/newt/native/NewtMacWindow.h b/src/newt/native/NewtMacWindow.h
index c0912ad3c..29b646fbf 100644
--- a/src/newt/native/NewtMacWindow.h
+++ b/src/newt/native/NewtMacWindow.h
@@ -111,6 +111,7 @@
BOOL mouseInside;
BOOL cursorIsHidden;
BOOL realized;
+ BOOL modsDown[4]; // shift, ctrl, alt/option, win/command
NSPoint lastInsideMousePosition;
@public
int cachedInsets[4]; // l, r, t, b
@@ -145,6 +146,7 @@
- (void) setMousePosition:(NSPoint)p;
- (void) sendKeyEvent: (NSEvent*) event eventType: (jint) evType;
+- (void) sendKeyEvent: (jint) keyCode characters: (NSString*) chars modifiers: (NSUInteger)mods eventType: (jint) evType;
- (void) sendMouseEvent: (NSEvent*) event eventType: (jint) evType;
- (void) focusChanged: (BOOL) gained;
@@ -157,6 +159,8 @@
- (void) windowDidResignKey: (NSNotification *) notification;
- (void) keyDown: (NSEvent*) theEvent;
- (void) keyUp: (NSEvent*) theEvent;
+- (void) handleFlagsChanged:(int) keyMask keyIndex: (int) keyIdx keyCode: (int) keyCode modifiers: (NSUInteger) mods;
+- (void) flagsChanged: (NSEvent *) theEvent;
- (void) mouseEntered: (NSEvent*) theEvent;
- (void) mouseExited: (NSEvent*) theEvent;
- (void) mouseMoved: (NSEvent*) theEvent;