[Fuse-for-macosx-commits] SF.net SVN: fuse-for-macosx: [285] trunk/fuse/ui/sdl/sdlkeyboard.c
Brought to you by:
fredm
From: <fr...@us...> - 2007-01-09 14:14:57
|
Revision: 285 http://svn.sourceforge.net/fuse-for-macosx/?rev=285&view=rev Author: fredm Date: 2007-01-09 06:14:51 -0800 (Tue, 09 Jan 2007) Log Message: ----------- Also pass on native keysyms to the input layer. Modified Paths: -------------- trunk/fuse/ui/sdl/sdlkeyboard.c Modified: trunk/fuse/ui/sdl/sdlkeyboard.c =================================================================== --- trunk/fuse/ui/sdl/sdlkeyboard.c 2007-01-03 12:53:51 UTC (rev 284) +++ trunk/fuse/ui/sdl/sdlkeyboard.c 2007-01-09 14:14:51 UTC (rev 285) @@ -211,6 +211,7 @@ unicode_keysyms_hash ); if( fuse_keysym != INPUT_KEY_NONE ) { unicode_keysym = fuse_keysym; + /* record current values of caps and symbol shift. We will temoprarily * override these for the duration of the unicoded simulated keypresses */ @@ -228,6 +229,10 @@ if( fuse_keysym == INPUT_KEY_NONE ) return; fuse_event.type = INPUT_EVENT_KEYPRESS; + if( unicode_keysym == INPUT_KEY_NONE ) + fuse_event.types.key.native_key = fuse_keysym; + else + fuse_event.types.key.native_key = unicode_keysym; fuse_event.types.key.spectrum_key = fuse_keysym; input_event( &fuse_event ); @@ -262,6 +267,10 @@ if( fuse_keysym == INPUT_KEY_NONE ) return; fuse_event.type = INPUT_EVENT_KEYRELEASE; + /* SDL doesn't provide key release information for UNICODE, assuming that + the values will just be used for dialog boxes et. al. so put in SDL keysym + equivalent and hope for the best */ + fuse_event.types.key.native_key = fuse_keysym; fuse_event.types.key.spectrum_key = fuse_keysym; input_event( &fuse_event ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |