File tree Expand file tree Collapse file tree 1 file changed +21
-2
lines changed
Expand file tree Collapse file tree 1 file changed +21
-2
lines changed Original file line number Diff line number Diff line change @@ -622,14 +622,33 @@ static gboolean ibus_array_engine_process_key_event (IBusEngine *engine, guint
622622
623623 switch (keyval ) {
624624 case IBUS_space :
625- if (arrayeng -> preedit -> len == 0 )
625+ if (arrayeng -> preedit -> len == 0 ) {
626+ if (is_fullwidth_mode ) {
627+ if (keyval >= 32 && keyval - 32 < sizeof (sFullWidthTable )) {
628+ IBusText * newtext = ibus_text_new_from_string (sFullWidthTable [keyval - 32 ]);
629+ ibus_engine_commit_text ((IBusEngine * )arrayeng , newtext );
630+ return TRUE;
631+ }
632+ }
633+
626634 return FALSE;
635+ }
636+
627637 ibus_array_engine_space_press (arrayeng );
628638 return TRUE;
629639
630640 case IBUS_apostrophe :
631- if (arrayeng -> preedit -> len == 0 )
641+ if (arrayeng -> preedit -> len == 0 ) {
642+ if (is_fullwidth_mode ) {
643+ if (keyval >= 32 && keyval - 32 < sizeof (sFullWidthTable )) {
644+ IBusText * newtext = ibus_text_new_from_string (sFullWidthTable [keyval - 32 ]);
645+ ibus_engine_commit_text ((IBusEngine * )arrayeng , newtext );
646+ return TRUE;
647+ }
648+ }
649+
632650 return FALSE;
651+ }
633652
634653 /* The behavior of phrase key is like space key first time */
635654 if (arrayeng -> space_press_count == 0 ) {
You can’t perform that action at this time.
0 commit comments