Change the orientation (vertical and horizontal) of the Kanji conversion candidate selection window when entering Japanese in NSTextInputClient

Asked 2 years ago, Updated 2 years ago, 106 views

Instead of using NSTextView, we create custom views that input Japanese using the NSTextInputClient.When performing the Japanese Kanji conversion, the Kanji conversion candidate selection window is displayed, but whether the text is written horizontally or vertically, the horizontal candidate selection window is always displayed, so I don't know how to switch to the vertical candidate selection window.
Please tell me how to switch the orientation of the candidate selection window vertically and horizontally.
(The NSTextView and the attached application TextEdit seem to be able to change the orientation of the candidate selection window depending on the orientation of the text.)

Candidate selection window with horizontal layout  → Candidate selection window with vertical layout

objective-c japanese

2022-09-30 11:17

1 Answers

NSTextInputClient protocol method - (BOOL) drawVerticallyForCharacterAtIndex: (NSUInteger) charIndex [1] allows you to specify vertical or horizontal menus for translation candidates.

[1] -drawsVerticallyForCharacterAtIndex:


2022-09-30 11:17

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.