--- libchewing-0.3.0/src/chewingio.c.4-bz216377 2006-11-21 15:45:08.000000000 +1000 +++ libchewing-0.3.0/src/chewingio.c 2006-11-21 15:45:08.000000000 +1000 @@ -860,6 +860,44 @@ return 0; } +CHEWING_API int chewing_handle_PageUp( ChewingContext *ctx ) +{ + ChewingData *pgdata = ctx->data; + ChewingOutput *pgo = ctx->output; + int keystrokeRtn = KEYSTROKE_ABSORB; + + CheckAndResetRange( pgdata ); + + if ( ! ChewingIsEntering( pgdata ) ) { + keystrokeRtn = KEYSTROKE_IGNORE; + } + else if ( ! pgdata->bSelect ) { + pgdata->chiSymbolCursor = pgdata->chiSymbolBufLen; + pgdata->cursor = pgdata->nPhoneSeq; + } + MakeOutputWithRtn( pgo, pgdata, keystrokeRtn ); + return 0; +} + +CHEWING_API int chewing_handle_PageDown( ChewingContext *ctx ) +{ + ChewingData *pgdata = ctx->data; + ChewingOutput *pgo = ctx->output; + int keystrokeRtn = KEYSTROKE_ABSORB; + + CheckAndResetRange( pgdata ); + + if ( ! ChewingIsEntering( pgdata ) ) { + keystrokeRtn = KEYSTROKE_IGNORE; + } + else if ( ! pgdata->bSelect ) { + pgdata->chiSymbolCursor = pgdata->chiSymbolBufLen; + pgdata->cursor = pgdata->nPhoneSeq; + } + MakeOutputWithRtn( pgo, pgdata, keystrokeRtn ); + return 0; +} + /* Dvorak <-> Qwerty keyboard layout converter */ static int dvorak_convert( int key ) { --- libchewing-0.3.0/include/chewingio.h.4-bz216377 2006-11-21 15:45:46.000000000 +1000 +++ libchewing-0.3.0/include/chewingio.h 2006-11-21 15:45:03.000000000 +1000 @@ -37,6 +37,8 @@ CHEWING_API int chewing_handle_Up( ChewingContext * ); CHEWING_API int chewing_handle_Home( ChewingContext * ); CHEWING_API int chewing_handle_End( ChewingContext * ); +CHEWING_API int chewing_handle_PageUp( ChewingContext * ); +CHEWING_API int chewing_handle_PageDown( ChewingContext * ); CHEWING_API int chewing_handle_Down( ChewingContext * ); CHEWING_API int chewing_handle_Capslock( ChewingContext * ); CHEWING_API int chewing_handle_Default( ChewingContext *, int key );