我覺得問題還是在 "SemiSymbolInput"這個function上面,
你可以先看看這個function是在做什麼事情,
原本trunk 上面的版本:
====================
int SemiSymbolInput(int key, ChewingData *pgdata)
{
static char keybuf[] = { ' ', '1' };
static char *chibuf[] = { " ", "符" };
static int nSpecial = 2;
return InternalSpecialSymbol( key, pgdata, nSpecial, keybuf,
chibuf );
}
=====================
我不太確定windows是用哪一個branch, 不過因為它不會出現"符"這個字, 所以我假設是這個版本
http://svn.csie.net/filedetails.php?repname=chewing&path=%2Flibchewing%2Fbranches%2Fwin32%2Fsrc%2Fchewingutil.c
int SemiSymbolInput(int key, ChewingData *pgdata)
{
static char keybuf[] = {' ', '1'} ;
static int nSpecial = 2 ;
return InternalSpecialSymbol( key, pgdata, nSpecial, keybuf,
chibuf );
}
=======================
當然我不確定, 改掉這個就是否解決你的問題, 因為兩邊的code 我並沒有去比較差多少
只是我覺得先把已經知道有問題的地方改好, 這樣才比較可抓到問題的根源.
-wiz
On 7月14日, 上午10時20分, slchen <
drifthe...@gmail.com> wrote:
> Hi, 大家:
> 我目前的情形是因為公司其他人員回報 Shift-Space 及 Caps 按了之後會只能打英文, 並且不能用 ctrl-space 做中英文切
> 換. 這個部份的比較應該是以 windows 上的新注音為準的.
>
> 就這個 shift-space 的 case, 我最後是讓它不要 return 空值,
> 也就是把
> CHEWING_API int chewing_handle_ShiftSpace( ChewingContext *ctx )
> {
> ChewingData *pgdata = ctx->data;
> ChewingOutput *pgo = ctx->output;
> int rtn, key = ' ';
> int keystrokeRtn = KEYSTROKE_ABSORB;
>
> if ( ! pgdata->bSelect ) {
> CheckAndResetRange( pgdata );
> rtn = SemiSymbolInput( key, pgdata );
> }
> CallPhrasing( pgdata );
> MakeOutputWithRtn( pgo, pgdata, keystrokeRtn );
> return 0;
>
> }
>
> 中的 key 設成空字元'\0'
>
> 這樣因為 key 是'\0' , 所以 MakeOutputWithRtn() 傳給輸出緩衝區的也是 '\0' , 表面上看起來就不會有游標移
> 動一個空白字元的現象. 不過我並未仔細去瞭解這樣對組字會不會有什麼影響就是了.
>
> 我是看到 scim-chewing 在 shift-space 的 case 呼叫了這隻 api, 才開始看這個部份的
>
> 另外一旦shift-space 被按下, 切換成全形之後, 在酷音的英文模式時, 所打的英文字都是全形. 中文模式則仍是在等待注音組字的模
> 式.
>
> 如果在中文模式下, 切換成全形, 改成打全形符號, 不曉得大家絕得好不好用?
>
> 另外請教大家, bSelect, bCaseChange 是做什麼用的?
> 在 global.h 中的 ChewingData 這個 structure 裡宣告了, 但是並沒看到註解.
>
> 謝謝