[Fuse-for-macosx-commits] SF.net SVN: fuse-for-macosx: [258] branches/fusegl/fuse
Brought to you by:
fredm
From: <fr...@us...> - 2006-12-20 07:41:00
|
Revision: 258 http://svn.sourceforge.net/fuse-for-macosx/?rev=258&view=rev Author: fredm Date: 2006-12-19 23:40:59 -0800 (Tue, 19 Dec 2006) Log Message: ----------- Add support for backspace key. Modified Paths: -------------- branches/fusegl/fuse/fusepb/views/DisplayOpenGLView.h branches/fusegl/fuse/fusepb/views/DisplayOpenGLView.m branches/fusegl/fuse/ui/cocoa/keysyms.m Modified: branches/fusegl/fuse/fusepb/views/DisplayOpenGLView.h =================================================================== --- branches/fusegl/fuse/fusepb/views/DisplayOpenGLView.h 2006-12-20 01:44:56 UTC (rev 257) +++ branches/fusegl/fuse/fusepb/views/DisplayOpenGLView.h 2006-12-20 07:40:59 UTC (rev 258) @@ -45,6 +45,10 @@ BOOL screenTexInitialised; GHashTable *unicode_keysyms_hash; + + BOOL optDown; + BOOL ctrlDown; + BOOL shiftDown; } +(DisplayOpenGLView *) instance; +(void) initialize; @@ -63,8 +67,8 @@ -(void) keyDown:(NSEvent *)theEvent; -(void) keyUp:(NSEvent *)theEvent; -- (BOOL) acceptsFirstResponder; -- (BOOL) becomeFirstResponder; -- (BOOL) resignFirstResponder; +-(BOOL) acceptsFirstResponder; +-(BOOL) becomeFirstResponder; +-(BOOL) resignFirstResponder; @end Modified: branches/fusegl/fuse/fusepb/views/DisplayOpenGLView.m =================================================================== --- branches/fusegl/fuse/fusepb/views/DisplayOpenGLView.m 2006-12-20 01:44:56 UTC (rev 257) +++ branches/fusegl/fuse/fusepb/views/DisplayOpenGLView.m 2006-12-20 07:40:59 UTC (rev 258) @@ -135,6 +135,10 @@ screenTexInitialised = NO; + optDown = NO; + ctrlDown = NO; + shiftDown = NO; + return self; } @@ -322,9 +326,6 @@ -(void) flagsChanged:(NSEvent *)theEvent { - static BOOL optDown = NO; - static BOOL ctrlDown = NO; - static BOOL shiftDown = NO; int flags = [theEvent modifierFlags]; BOOL optDownNew = (flags & NSAlternateKeyMask) ? YES : NO; BOOL ctrlDownNew = (flags & NSControlKeyMask) ? YES : NO; @@ -410,17 +411,17 @@ [self keyChange:theEvent type:INPUT_EVENT_KEYRELEASE]; } -- (BOOL)acceptsFirstResponder +-(BOOL) acceptsFirstResponder { return YES; } -- (BOOL)becomeFirstResponder +-(BOOL) becomeFirstResponder { return YES; } -- (BOOL)resignFirstResponder +-(BOOL) resignFirstResponder { return YES; } Modified: branches/fusegl/fuse/ui/cocoa/keysyms.m =================================================================== --- branches/fusegl/fuse/ui/cocoa/keysyms.m 2006-12-20 01:44:56 UTC (rev 257) +++ branches/fusegl/fuse/ui/cocoa/keysyms.m 2006-12-20 07:40:59 UTC (rev 258) @@ -1,4 +1,4 @@ -/* keysyms.c: UI keysym to Fuse input layer keysym mappings +/* keysyms.m: UI keysym to Fuse input layer keysym mappings Copyright (c) 2000-2005 Philip Kendall, Matan Ziv-Av, Russell Marks, Fredrick Meunier, Catalin Mihaila @@ -23,9 +23,6 @@ */ -/* This file is autogenerated from keysyms.dat by keysyms.pl. - Do not edit unless you know what you're doing! */ - #import <AppKit/NSEvent.h> #include <config.h> @@ -40,6 +37,7 @@ { 53, INPUT_KEY_Escape }, { 48, INPUT_KEY_Tab }, { 36, INPUT_KEY_Return }, + { 51, INPUT_KEY_BackSpace }, /* Start keypad */ { 83, INPUT_KEY_1 }, { 84, INPUT_KEY_2 }, @@ -101,7 +99,7 @@ }; -/* Map low byte of UCS-2(?) Unicode to Fuse input layer keysym for +/* Map UCS-2(?) Unicode to Fuse input layer keysym for non-extended mode Spectrum symbols present on keyboards */ const keysyms_map_t unicode_keysyms_map[] = { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |